staple 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63b52e06b84953c304bc12c3900e468a7965c90b
4
- data.tar.gz: 99f5ea3402eb3c8b394ac4dc1d29e788bf909cac
3
+ metadata.gz: 283a8d9b22610402c81c22bf837c31bf7a93ad19
4
+ data.tar.gz: f1f96fa532ef31145f0573fe446bb5a748491836
5
5
  SHA512:
6
- metadata.gz: 2580c7ec2c307534532590151853423b3e26aaf71dfb4b69b85fbec0f102dc22f7d0789566058ad3ef560161ed28f8f9f0dcac46854b934c73a7d7be3d78544a
7
- data.tar.gz: 982e99d469ee635f5f4927248a06f4c9d659079b4cee1848aaa06f74960ada2692b784d4cc6e790993ffbdd1fa99efa363323a56f35fd20b5ef59b743933fb68
6
+ metadata.gz: 92e8e8fd97760d8e5d683461b006ecf0382bff57e25b3af13f9ec12930fe7186941efbd75191984bc3ecedee6aa8f3609754b95cc8dea59375d5145405142d40
7
+ data.tar.gz: 8f1fef138794ad6946c2f5fb3ab260de5ece26946973448c474ab9c6daf819f428b641203a154ea07c46444b0f4f7c437e6a676b5cae2500e261acdeaf6d97f3
data/Gemfile CHANGED
@@ -1,10 +1,5 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'foundation-rails' #rails g foundation:install
4
- gem 'simple_form' #rails g simple_form:install --foundation
5
- gem 'slim-rails'
6
- gem "font-awesome-rails"
7
-
8
3
 
9
4
  group :test do
10
5
  gem 'rspec'
data/README.md CHANGED
@@ -5,16 +5,17 @@ CSS platform in the spirit of thoughtbot/refills. Built on top of foundation.
5
5
  ##Install
6
6
  ```ruby
7
7
  #Gemfile
8
- gem 'staple'
9
- bundle install
8
+ gem 'foundation-rails'
9
+ gem 'staple', :git => 'git://github.com/rhelsing/staple.git'
10
10
  ```
11
11
 
12
- or
13
-
14
- ```ruby
15
- gem install 'staple'
12
+ ```command
13
+ bundle install
14
+ rails g staple:install
16
15
  ```
17
16
 
17
+ If generator hangs, call spring stop then try again
18
+
18
19
  ##Simple, Universal Markup
19
20
  ```slim
20
21
  section.row
@@ -48,4 +49,10 @@ staple color_scheme:Flatland
48
49
  ```
49
50
 
50
51
  gem build staple.gemspec
51
- gem push staple-0.0.1.gem
52
+ gem push staple-0.0.1.gem
53
+
54
+ #TODO
55
+
56
+ * fix foundation-rails require, inlcude install in staple install?
57
+ * set scaffold to use slim? simple_form?
58
+ * stop spring
@@ -0,0 +1,43 @@
1
+ require 'rails/generators'
2
+
3
+ module Staple
4
+ class InstallGenerator < Rails::Generators::Base
5
+ desc 'Install foundation w/ slim template, simple form and staple base styles'
6
+ source_root File.join(File.dirname(__FILE__), '..', '..')
7
+ def foundation_install
8
+ generate "foundation:install", "--slim" #rails g foundation:install --slim
9
+ end
10
+
11
+ def simple_form_install
12
+ generate "simple_form:install", "--foundation" #rails generate simple_form:install --foundation
13
+ end
14
+
15
+ def remove_tree
16
+ gsub_file "app/assets/stylesheets/application#{detect_css_format[0]}", "\n#{detect_css_format[1]} require_tree .", ""
17
+ end
18
+
19
+ def include_font_awesome
20
+ insert_into_file "app/assets/stylesheets/application#{detect_css_format[0]}", "\n#{detect_css_format[1]} require font-awesome", :after => "require foundation_and_overrides"
21
+ end
22
+
23
+ def modify_simple_form
24
+ gsub_file "config/initializers/simple_form_foundation.rb", "b.use :error, wrap_with: { tag: :small }", "b.use :error, :wrap_with => { :tag => :small, :class => :error }"
25
+ gsub_file "config/initializers/simple_form_foundation.rb", "# b.use :hint, wrap_with: { tag: :span, class: :hint }", "b.use :hint, wrap_with: { tag: :small, class: :error }"
26
+ end
27
+
28
+ def simplify_foundation_and_overrides
29
+ copy_file "source/foundation_and_overrides.scss", "app/assets/stylesheets/foundation_and_overrides.scss", :force => true
30
+ end
31
+
32
+ #import base style
33
+
34
+ def detect_css_format
35
+ return ['.css', ' *='] if File.exist?('app/assets/stylesheets/application.css')
36
+ return ['.css.sass', ' //='] if File.exist?('app/assets/stylesheets/application.css.sass')
37
+ return ['.sass', ' //='] if File.exist?('app/assets/stylesheets/application.sass')
38
+ return ['.css.scss', ' //='] if File.exist?('app/assets/stylesheets/application.css.scss')
39
+ return ['.scss', ' //='] if File.exist?('app/assets/stylesheets/application.scss')
40
+ end
41
+
42
+ end
43
+ end
data/lib/staple.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require 'staple/import_generator'
2
2
  require 'staple/list_generator'
3
+ require 'staple/install_generator'
@@ -0,0 +1,4 @@
1
+ @import "foundation/functions";
2
+ $include-html-classes: true;
3
+ $include-html-global-classes: $include-html-classes;
4
+ @import 'foundation';
data/staple.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "staple"
7
- spec.version = "0.0.2"
7
+ spec.version = "0.0.3"
8
8
  spec.summary = "a high level ui generator (COMING SOON)"
9
9
  spec.description = "Does not work yet. Coming Soon. Built on top of foundation. In the spirit of thoughtbot/refills"
10
10
  spec.authors = ["Ryan Helsing"]
@@ -12,6 +12,11 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/rhelsing/staple"
13
13
  spec.license = "MIT"
14
14
 
15
+ spec.add_runtime_dependency 'font-awesome-rails', '~> 4.2', '>= 4.2.0.0'
16
+ spec.add_runtime_dependency 'foundation-rails', '~> 5.4', '>= 5.4.5.0'
17
+ spec.add_runtime_dependency 'simple_form', '~> 3.0', '>= 3.0.2'
18
+ spec.add_runtime_dependency 'slim-rails', '~> 2.1', '>= 2.1.0'
19
+
15
20
  spec.files = `git ls-files`.split($/)
16
21
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,15 +1,95 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Helsing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-09 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2014-11-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: font-awesome-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 4.2.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '4.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 4.2.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: foundation-rails
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '5.4'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 5.4.5.0
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '5.4'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 5.4.5.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: simple_form
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '3.0'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 3.0.2
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.0'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 3.0.2
73
+ - !ruby/object:Gem::Dependency
74
+ name: slim-rails
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - "~>"
78
+ - !ruby/object:Gem::Version
79
+ version: '2.1'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.1.0
83
+ type: :runtime
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.1'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 2.1.0
13
93
  description: Does not work yet. Coming Soon. Built on top of foundation. In the spirit
14
94
  of thoughtbot/refills
15
95
  email:
@@ -27,6 +107,7 @@ files:
27
107
  - lib/snippet_helpers.rb
28
108
  - lib/staple.rb
29
109
  - lib/staple/import_generator.rb
110
+ - lib/staple/install_generator.rb
30
111
  - lib/staple/list_generator.rb
31
112
  - source/CNAME
32
113
  - source/_accordion.html.erb
@@ -79,6 +160,7 @@ files:
79
160
  - source/_vertical_tabs.html.erb
80
161
  - source/_video.html.erb
81
162
  - source/components.html.erb
163
+ - source/foundation_and_overrides.scss
82
164
  - source/index.html.erb
83
165
  - source/javascripts/all.js
84
166
  - source/javascripts/jquery.erToc.js