Class: ExtJS::API

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/extjs.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



14
15
16
# File 'lib/extjs.rb', line 14

def self.source_root
  "."
end

Instance Method Details

#configObject



39
40
41
42
43
44
45
46
47
# File 'lib/extjs.rb', line 39

def config
  config = {}
  begin
    config = YAML.load_file(File.join(options[:root], ExtJS::VENDOR_NAME, "vendor.yml"))
  rescue StandardError => e
    puts "ExtJS::API Failed to load its vendor file #{destination_root}/#{ExtJS::NAME}/vendor.yml"
  end
  config
end

#installObject



28
29
30
31
32
33
34
35
36
# File 'lib/extjs.rb', line 28

def install
  # source_root not working here???
  file = "#{File.dirname(__FILE__)}/vendor.yml"
  
  empty_directory(ExtJS::VENDOR_NAME)
  inside ExtJS::VENDOR_NAME do |dir|
    copy_file(file, File.join(dir, "vendor.yml"))
  end
end

#secretaryObject



23
24
25
# File 'lib/extjs.rb', line 23

def secretary
  say_status("ExtJS API")
end