extjs-mvc 0.4.0.h → 0.4.0.i
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/bin/run +2 -1
- data/lib/extjs-mvc/api.rb +25 -17
- data/lib/vendor.yml +2 -0
- metadata +3 -3
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.4.0. | 
| 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)
         | 
    
        data/lib/extjs-mvc/api.rb
    CHANGED
    
    | @@ -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 | 
| 31 | 
            -
                    fancy_name = File.join(File.basename( | 
| 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( | 
| 37 | 
            -
                     | 
| 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))
         | 
    
        data/lib/vendor.yml
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version | |
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 4
         | 
| 8 8 | 
             
              - 0
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.4.0. | 
| 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- | 
| 18 | 
            +
            date: 2010-03-16 00:00:00 -04:00
         | 
| 19 19 | 
             
            default_executable: 
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         |