foundation 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eb3bc52b1c9dcc4063f50c7b28d8aad6406ea066
4
+ data.tar.gz: 506484d17cb937e7b1d8aaea0fd3699155d7cdb0
5
+ SHA512:
6
+ metadata.gz: ef92abf78e8e6328b0eda237b4bf5736b12092bad898b3913ffc850ce7985a2c684c619cd92cb14deab516394002a495f3bc63d9b121b593465bd926bf0dfbf0
7
+ data.tar.gz: eecc070821666e97c1ddf23f5d05779ea7b203bf32884c037eee860f7594a201309da2c98958e698e9fbc2ce25ccf1dfa308383baf28c2c6d5451dd1615955c0
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in foundation-cli.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Mark Hayes
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,42 @@
1
+ # Foundation::Cli
2
+
3
+ **NOTE:** This is considered alpha, things may change without notice.
4
+
5
+ A CLI for creating and updating Foundation projects.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ git clone git@github.com:mhayes/foundation-cli.git
11
+ bundle install
12
+ bundle exec rake install
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Create a new project
18
+
19
+ ```bash
20
+ foundation new my_awesome_project --version 4.3.2
21
+ ```
22
+
23
+ ### Update a project
24
+ ```
25
+ cd ~/Sites/my_awesome_app
26
+ foundation update --version 4.3.2
27
+ ```
28
+
29
+ ### Compile assets
30
+
31
+ ```bash
32
+ cd ~/Sites/my_awesome_app
33
+ foundation watch
34
+ ```
35
+
36
+ ## Contributing
37
+
38
+ 1. Fork it
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "foundation/cli"
4
+ Foundation::CLI::Generator.start(ARGV)
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'foundation/cli/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "foundation"
8
+ spec.version = Foundation::CLI::VERSION
9
+ spec.authors = ["Mark Hayes"]
10
+ spec.email = ["mark@zurb.com"]
11
+ spec.description = %q{A CLI for working with Foundation}
12
+ spec.summary = %q{The easiest way to get started with Foundation}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_dependency "thor", [">= 0.18.1"]
24
+ end
@@ -0,0 +1,2 @@
1
+ require "foundation/cli/version"
2
+ require "foundation/cli/generator"
@@ -0,0 +1,90 @@
1
+ require "thor"
2
+
3
+ module Foundation
4
+ module CLI
5
+ class Generator < Thor
6
+ include Thor::Actions
7
+
8
+ no_commands do
9
+ def which(cmd)
10
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
11
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
12
+ exts.each { |ext|
13
+ exe = File.join(path, "#{cmd}#{ext}")
14
+ return exe if File.executable? exe
15
+ }
16
+ end
17
+ return nil
18
+ end
19
+ end
20
+
21
+ desc "version", "Display CLI version"
22
+ def version
23
+ puts "v#{Foundation::CLI::VERSION}"
24
+ end
25
+
26
+ desc "new", "create new project"
27
+ option :libsass, type: :boolean, default: false
28
+ option :version, type: :string
29
+ def new(name)
30
+ # RUBY_VERSION == "2.0.0"
31
+ unless which("compass")
32
+ run("gem install compass", capture: true, verbose: false)
33
+ run("rbenv rehash", capture: true, verbose: false) if which("rbenv")
34
+ end
35
+
36
+ unless which("node") || which("npm")
37
+ say "Please install NodeJS. (psst, go here: http://nodejs.org) Aborting."
38
+ exit 1
39
+
40
+ end
41
+
42
+ unless which("bower")
43
+ say "Please install bower. (psst, run: sudo npm install -g bower) Aborting."
44
+ exit 1
45
+ end
46
+
47
+
48
+ if options[:libsass]
49
+ unless which("grunt")
50
+ say "Please install grunt-cli. (psst, run: sudo npm install -g grunt-cli) Aborting."
51
+ exit 1
52
+ end
53
+ repo = "https://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")
58
+ end
59
+ repo = "https://github.com/zurb/foundation-compass-template.git"
60
+ end
61
+
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
+ create_file "scss/_settings.scss", File.read("#{destination_root}/bower_components/foundation/scss/foundation/_settings.scss")
69
+ run "git remote rm origin", capture: true, verbose: false
70
+ if options[:libsass]
71
+ run "npm install"
72
+ run "grunt build"
73
+ end
74
+ end
75
+
76
+ say "./#{name} was created"
77
+ end
78
+
79
+ desc "update", "update an existing project"
80
+ option :version, type: :string
81
+ def update
82
+ unless which("bower")
83
+ "Please install bower. Aborting."
84
+ exit 1
85
+ end
86
+ run "bower update"
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,5 @@
1
+ module Foundation
2
+ module CLI
3
+ VERSION = "1.0.2"
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "foundation", path: "../."
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: foundation
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Mark Hayes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-11-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: thor
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: 0.18.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: 0.18.1
55
+ description: A CLI for working with Foundation
56
+ email:
57
+ - mark@zurb.com
58
+ executables:
59
+ - foundation
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .gitignore
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - bin/foundation
69
+ - foundation-cli.gemspec
70
+ - lib/foundation/cli.rb
71
+ - lib/foundation/cli/generator.rb
72
+ - lib/foundation/cli/version.rb
73
+ - test/Gemfile
74
+ homepage: ''
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.0.3
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: The easiest way to get started with Foundation
98
+ test_files:
99
+ - test/Gemfile