Class: Ruber::PluginSpecificationReader

Inherits:
Object
  • Object
show all
Defined in:
lib/ruber/plugin_specification_reader.rb

Defined Under Namespace

Classes: Option

Constant Summary collapse

LICENSES =

A list of valid licences

[:unknown, :gpl, :gpl2, :lgpl, :lgpl2, :bsd, :artistic, :qpl, :qpl1, :gpl3, :lgpl3]

Instance Method Summary collapse

Constructor Details

#initialize(info) ⇒ PluginSpecificationReader

Returns a new instance of PluginSpecificationReader.



83
84
85
# File 'lib/ruber/plugin_specification_reader.rb', line 83

def initialize info
  @plugin_info = info
end

Instance Method Details

#process_pdf(hash) ⇒ Object



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/ruber/plugin_specification_reader.rb', line 87

def process_pdf hash
  @plugin_info.name = read_name hash
  @plugin_info.about = read_about hash
  @plugin_info.version = read_version hash
  @plugin_info.required = read_required hash
  @plugin_info.required.each do |f| 
    file = File.join @plugin_info.directory, f
    if file.end_with?('.rb') then load file
    else require file
    end
  end
  @plugin_info.class_obj = read_class hash
  @plugin_info.features = read_features hash
  @plugin_info.deps = read_deps hash
  @plugin_info.runtime_deps = read_runtime_deps hash
  @plugin_info.ui_file = read_ui_file hash
  @plugin_info.tool_widgets = read_tool_widgets hash
  @plugin_info.config_widgets = read_config_widgets hash
  @plugin_info.config_options = read_config_options hash
  @plugin_info.project_options = read_project_options hash
  @plugin_info.project_widgets = read_project_widgets hash
  @plugin_info.extensions = read_extensions hash
  @plugin_info.actions = read_actions hash
  @plugin_info
end

#process_pdf_intro(hash, component = false) ⇒ Object



113
114
115
116
117
118
119
120
121
122
# File 'lib/ruber/plugin_specification_reader.rb', line 113

def process_pdf_intro hash, component = false
  @plugin_info.name = read_name hash, component
  @plugin_info.about = read_about hash
  @plugin_info.version = read_version hash
  @plugin_info.required = read_required hash
  @plugin_info.features = read_features hash
  @plugin_info.deps = read_deps hash
  @plugin_info.runtime_deps = read_runtime_deps hash
  @plugin_info
end