foundation-cli 0.0.1.alpha1 → 0.0.1.alpha2
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.
- checksums.yaml +4 -4
- data/foundation-cli.gemspec +0 -1
- data/lib/foundation/cli/generator.rb +45 -36
- data/lib/foundation/cli/version.rb +1 -1
- metadata +2 -16
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e1c279f241d9c216d9490135c1b5b9cbc1a267d7
         | 
| 4 | 
            +
              data.tar.gz: 456491f25d822a3fb6410c32bd1f5e7d34311560
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: b08c3a3956d752cf14b0339b4da6d7d8ffaf81190798fecb2ff0a3cb7c7927b9760627390a11c26e1c43727397031c500eecae03e3b2ffb27ba735f9ee6d9967
         | 
| 7 | 
            +
              data.tar.gz: 894369d6cd674d46706464a906cebd87efbaea3eee34a404b4a5851c3ae884ac0f09225df7bcd965b054c04e192b896c9cb6101b050d9fbd780f7f7e63896119
         | 
    
        data/foundation-cli.gemspec
    CHANGED
    
    
| @@ -1,13 +1,9 @@ | |
| 1 1 | 
             
            require "thor"
         | 
| 2 | 
            -
            require "zurb-foundation"
         | 
| 3 | 
            -
            require "bundler"
         | 
| 4 2 |  | 
| 5 3 | 
             
            module Foundation
         | 
| 6 4 | 
             
              module CLI
         | 
| 7 5 | 
             
                class Generator < Thor
         | 
| 8 6 | 
             
                  include Thor::Actions
         | 
| 9 | 
            -
                  # source_root File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
         | 
| 10 | 
            -
                  source_root Foundation.root
         | 
| 11 7 |  | 
| 12 8 | 
             
                  no_commands do
         | 
| 13 9 | 
             
                    def which(cmd)
         | 
| @@ -28,52 +24,65 @@ module Foundation | |
| 28 24 | 
             
                  end
         | 
| 29 25 |  | 
| 30 26 | 
             
                  desc "new", "create new project"
         | 
| 31 | 
            -
                  option : | 
| 27 | 
            +
                  option :libsass, type: :boolean, default: false
         | 
| 28 | 
            +
                  option :version, type: :string
         | 
| 32 29 | 
             
                  def new(name)
         | 
| 33 30 | 
             
                    # RUBY_VERSION == "2.0.0"
         | 
| 34 | 
            -
                    unless which(" | 
| 35 | 
            -
                       | 
| 36 | 
            -
                       | 
| 31 | 
            +
                    unless which("node") || which("npm")
         | 
| 32 | 
            +
                      say "Please install NodeJS. Aborting."
         | 
| 33 | 
            +
                      exit 1
         | 
| 37 34 | 
             
                    end
         | 
| 38 35 |  | 
| 39 | 
            -
                     | 
| 40 | 
            -
             | 
| 41 | 
            -
                       | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 36 | 
            +
                    unless which("bower")
         | 
| 37 | 
            +
                      say "Please install bower. Aborting."
         | 
| 38 | 
            +
                      exit 1
         | 
| 39 | 
            +
                    end
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                    unless which("grunt")
         | 
| 42 | 
            +
                      say "Please install grunt-cli. Aborting."
         | 
| 43 | 
            +
                      exit 1
         | 
| 44 | 
            +
                    end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                    unless which("git")
         | 
| 47 | 
            +
                      say "Please install git. Aborting."
         | 
| 48 | 
            +
                      exit 1
         | 
| 49 | 
            +
                    end
         | 
| 50 | 
            +
             | 
| 51 | 
            +
             | 
| 52 | 
            +
                    if options[:libsass]
         | 
| 53 | 
            +
                      repo = "git@github.com:zurb/foundation-libsass-template.git"
         | 
| 54 | 
            +
                    else
         | 
| 55 | 
            +
                      unless which("compass")
         | 
| 56 | 
            +
                        run("gem install compass", capture: true, verbose: false)
         | 
| 57 | 
            +
                        run("rbenv rehash", capture: true, verbose: false) if which("rbenv")
         | 
| 51 58 | 
             
                      end
         | 
| 59 | 
            +
                      repo = "git@github.com:zurb/foundation-compass-template.git"
         | 
| 60 | 
            +
                    end
         | 
| 52 61 |  | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 62 | 
            +
                    say "Creating ./#{name}"
         | 
| 63 | 
            +
                    empty_directory(name)
         | 
| 64 | 
            +
                    run "git clone #{repo} #{name}", capture: true, verbose: false
         | 
| 65 | 
            +
                    inside(name) do
         | 
| 66 | 
            +
                      say "Installing dependencies with bower..."
         | 
| 67 | 
            +
                      run "bower install", capture: true, verbose: false
         | 
| 68 | 
            +
                      run "git remote rm origin", capture: true, verbose: false
         | 
| 69 | 
            +
                      if options[:libsass]
         | 
| 70 | 
            +
                        run "npm install"
         | 
| 71 | 
            +
                        run "grunt build"
         | 
| 56 72 | 
             
                      end
         | 
| 57 73 | 
             
                    end
         | 
| 58 74 |  | 
| 59 | 
            -
                    say " | 
| 75 | 
            +
                    say "./#{name} was created"
         | 
| 60 76 | 
             
                  end
         | 
| 61 77 |  | 
| 62 78 | 
             
                  desc "update", "update an existing project"
         | 
| 63 | 
            -
                  option :version, type: :string | 
| 79 | 
            +
                  option :version, type: :string
         | 
| 64 80 | 
             
                  def update
         | 
| 65 | 
            -
                     | 
| 66 | 
            -
             | 
| 67 | 
            -
             | 
| 68 | 
            -
                  end
         | 
| 69 | 
            -
             | 
| 70 | 
            -
                  desc "watch", "compile assets"
         | 
| 71 | 
            -
                  def watch
         | 
| 72 | 
            -
                    pid = fork do
         | 
| 73 | 
            -
                      run "bundle exec compass watch"
         | 
| 81 | 
            +
                    unless which("bower")
         | 
| 82 | 
            +
                      "Please install bower. Aborting."
         | 
| 83 | 
            +
                      exit 1
         | 
| 74 84 | 
             
                    end
         | 
| 75 | 
            -
                     | 
| 76 | 
            -
                    exit $?.exitstatus
         | 
| 85 | 
            +
                    run "bower update"
         | 
| 77 86 | 
             
                  end
         | 
| 78 87 | 
             
                end
         | 
| 79 88 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: foundation-cli
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0.1. | 
| 4 | 
            +
              version: 0.0.1.alpha2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Mark Hayes
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013- | 
| 11 | 
            +
            date: 2013-11-18 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -52,20 +52,6 @@ dependencies: | |
| 52 52 | 
             
                - - '>='
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 54 | 
             
                    version: 0.18.1
         | 
| 55 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            -
              name: zurb-foundation
         | 
| 57 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            -
                requirements:
         | 
| 59 | 
            -
                - - '>='
         | 
| 60 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            -
                    version: 4.3.2
         | 
| 62 | 
            -
              type: :runtime
         | 
| 63 | 
            -
              prerelease: false
         | 
| 64 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            -
                requirements:
         | 
| 66 | 
            -
                - - '>='
         | 
| 67 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            -
                    version: 4.3.2
         | 
| 69 55 | 
             
            description: A CLI for working with Foundation
         | 
| 70 56 | 
             
            email:
         | 
| 71 57 | 
             
            - mark@zurb.com
         |