extjs-mvc 0.4.0.h → 0.4.0.i

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/VERSION +1 -1
  2. data/bin/run +2 -1
  3. data/lib/extjs-mvc/api.rb +25 -17
  4. data/lib/vendor.yml +2 -0
  5. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0.h
1
+ 0.4.0.i
data/bin/run CHANGED
@@ -11,7 +11,8 @@ require 'extjs-mvc'
11
11
  # Boot Xmvc CLI listener feeding it an instance of ExtJS::MVC::CLI
12
12
  begin
13
13
  Xmvc::CLI.start(ARGV, {
14
- :host => ExtJS::MVC # <-- Supplied module must contain a CLI Thor task extension
14
+ :host => ExtJS::MVC, # <-- Supplied module must contain a CLI Thor task extension
15
+ :vendors => [ExtJS, ExtJS::MVC]
15
16
  })
16
17
  rescue Xmvc::Error => e
17
18
  Xmvc.ui.error(e.message)
@@ -1,41 +1,49 @@
1
1
  module ExtJS
2
2
  module MVC
3
+
4
+ VENDOR_NAME = "extjs-mvc"
5
+
3
6
  class API < Thor
4
7
  include Thor::Actions
5
8
 
6
9
  desc "secretary", "Returns vendor assets; css, js, images, sass, haml, html...whatever. Returns a Sprockets::Secretary"
7
10
  def secretary
8
11
  say_status "ExtJS::MVC", "secretary"
9
-
10
- #TODO Figure out a std vendor.yml loading mechanism
11
- # load_paths?
12
- root = File.expand_path(File.join(options[:root], "extjs-mvc"))
13
- begin
14
- config = YAML.load_file(File.join(root, "vendor.yml"))
15
- rescue StandardError => e
16
- raise Xmvc::VendorFileNotFound.new("Failed to load vendor file 'vendor/extjs-mvc/vendor.yml'")
17
- end
18
-
19
12
  Sprockets::Secretary.new({
20
13
  :source_files => config["javascripts"],
21
14
  :root => root
22
15
  })
23
16
  end
24
-
17
+
18
+ desc "config", "Returns config from vendor.yml"
19
+ def config
20
+ config = {}
21
+ root = File.expand_path(File.join(options[:root], ExtJS::MVC::VENDOR_NAME))
22
+ path = File.join(root, "vendor.yml")
23
+ if File.exists?(path)
24
+ config = YAML.load_file(path)
25
+ else
26
+ #raise Xmvc::VendorFileNotFound.new("Failed to load vendor file 'vendor/extjs-mvc/vendor.yml'")
27
+ puts "failed to load ExtJS::MVC config #{path}"
28
+ end
29
+ config
30
+ end
31
+
25
32
  ##
26
33
  # This task is executed by Xmvc::Generator::App when the "generate app" task is executed.
27
34
  # Xmvc provides the /vendor directory as the param
28
35
  #
29
36
  desc "install", "Install extjs-mvc framework"
30
- def install(vendor_root)
31
- fancy_name = File.join(File.basename(vendor_root), VENDOR_NAME)
32
-
37
+ def install
38
+ fancy_name = File.join(File.basename(options[:root]), VENDOR_NAME)
33
39
  say_status "git clone", "#{GIT_URL} -> #{fancy_name}"
34
40
 
35
41
  # Clone the extjs-mvc-js repo!
36
- path = File.join(vendor_root, VENDOR_NAME)
37
- Git.clone(GIT_URL, path)
38
-
42
+ path = File.join(options[:root], VENDOR_NAME)
43
+ ##
44
+ # UNCOMMENT THIS TO INSTALL FROM GIT
45
+ #
46
+ Git.clone(GIT_URL, path)
39
47
  # report to console which files were created.
40
48
  Dir["#{path}/**/*.*"].each do |f|
41
49
  say_status :create, File.join(fancy_name, File.basename(f))
@@ -27,3 +27,5 @@ javascripts:
27
27
  - testrunner/TestRunner.js
28
28
  - testrunner/*.js
29
29
  stylesheets:
30
+ - extjs-mvc-all.css
31
+ sass:
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 4
8
8
  - 0
9
- - h
10
- version: 0.4.0.h
9
+ - i
10
+ version: 0.4.0.i
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ed Spencer and Chris Scott
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-15 00:00:00 -04:00
18
+ date: 2010-03-16 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency