staple 0.0.7 → 0.0.8

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: 15cf08413bdc2df54dc499d44259159af36cb7ab
4
- data.tar.gz: 9934d7a3d9aa7f00ca9cc1fba08aa0f5f65ef2a8
3
+ metadata.gz: 53d84f76c9b808f1a3adf38fd30568d49564e090
4
+ data.tar.gz: a03c5c2f51ac20eba9b4bb47b20bdea71ec4bf16
5
5
  SHA512:
6
- metadata.gz: 0e3923d77f9d07210d9d384b7d0217b3f910c210ee3f6b21c0733dc314c384db420bfeb495c0f888069c92680d17cd2ce334ab7d3249c1432d5373a68c8fe7a3
7
- data.tar.gz: 5e383658c1aba45a61e4cbcdab1bd4829c49661bce5c1cd6f58ccfa211e826dafa0662aa42d13b9ff229f6db85f65f297f04646b79e92eb7899ee9cf2b22c620
6
+ metadata.gz: 16d0a4f20ce1064c2a0675f1d1c420549cf079367b6dc47f57a8a6f624b5c5feb1ec9cb12d72507be58e179df2d5b511746ea69be49148c98e023b8d939eaed2
7
+ data.tar.gz: c78ab7c952798f55da216da4ad92368224e70f52f9d2e3f87fb15404a503e0c2585173e4987e4e4c490be82098050274e6c5da3faee282460eafa801a960781f
data/README.md CHANGED
@@ -5,8 +5,10 @@ High level UI framework. Built on top of foundation.
5
5
  ##Install
6
6
  ```ruby
7
7
  #Gemfile
8
- gem 'font-awesome-rails'
8
+ gem 'slim-rails'
9
9
  gem 'foundation-rails'
10
+ gem 'font-awesome-rails'
11
+ gem 'simple_form'
10
12
  gem 'staple'
11
13
  ```
12
14
 
@@ -53,9 +55,6 @@ gem push staple-0.0.1.gem
53
55
 
54
56
  #TODO
55
57
 
56
- * fix foundation-rails require, inlcude install in staple install?
57
58
  * declaring as dependency does not load it?
58
- * set scaffold to use slim? simple_form?
59
- * stop spring
60
59
  * make scaffold/generator use simple form/slim. not generate css
61
60
  * make install compatible with existing projects
@@ -6,16 +6,8 @@ module Staple
6
6
  source_root File.join(File.dirname(__FILE__), '..', '..')
7
7
  def foundation_install
8
8
  generate "foundation:install", "--slim" #rails g foundation:install --slim
9
- # insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require foundation\n", :after => "jquery_ujs\n"
10
- # append_to_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[2]}"
11
- # # NOT NEEDED:
12
- # # settings_file = File.join(File.dirname(__FILE__),"..", "..", "..", "..", "vendor", "assets", "stylesheets", "foundation", "_settings.scss")
13
- # # create_file "app/assets/stylesheets/foundation_and_overrides.scss", File.read(settings_file)
14
- # # append_to_file "app/assets/stylesheets/foundation_and_overrides.scss", "\n@import 'foundation';\n"
9
+ # trim fat
15
10
  copy_file "source/foundation/foundation_and_overrides.scss", "app/assets/stylesheets/foundation_and_overrides.scss", :force => true
16
- # insert_into_file "app/assets/stylesheets/application#{detect_css_format[0]}", "\n#{detect_css_format[1]} require foundation_and_overrides\n", :after => "require_self"
17
- # template 'source/foundation/application.html.slim', "app/views/layouts/application.html.slim"
18
- # remove_file 'app/views/layouts/application.html.erb'
19
11
  end
20
12
 
21
13
  def simple_form_install
@@ -39,6 +31,21 @@ module Staple
39
31
  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 }"
40
32
  end
41
33
 
34
+ def simple_form_template
35
+ copy_file "source/simple_form/_form.html.slim", "lib/templates/slim/scaffold/_form.html.slim"
36
+ end
37
+
38
+ def custom_scaffold
39
+ inject_into_file 'config/application.rb', after: "class Application < Rails::Application\n" do <<-'RUBY'
40
+ config.generators do |g|
41
+ g.template_engine :slim
42
+ g.stylesheets false
43
+ g.javascripts false
44
+ end
45
+ RUBY
46
+ end
47
+ end
48
+
42
49
  #import base style
43
50
 
44
51
  def detect_css_format
@@ -0,0 +1,8 @@
1
+ = simple_form_for(@<%= singular_table_name %>) do |f|
2
+ = f.error_notification
3
+ .inputs
4
+ <%- attributes.each do |attribute| -%>
5
+ = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %>
6
+ <%- end -%>
7
+ .actions
8
+ = f.button :submit
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.7"
7
+ spec.version = "0.0.8"
8
8
  spec.summary = "a high level ui generator (COMING SOON)"
9
9
  spec.description = "Coming Soon. Built on top of foundation."
10
10
  spec.authors = ["Ryan Helsing"]
@@ -12,10 +12,10 @@ Gem::Specification.new do |spec|
12
12
  spec.homepage = "https://github.com/rhelsing/staple"
13
13
  spec.license = "MIT"
14
14
 
15
- spec.add_dependency('foundation-rails', '>= 5.4')
16
- spec.add_dependency('simple_form', '>= 3.0')
17
- spec.add_dependency('font-awesome-rails', '>= 4.2')
18
- spec.add_dependency('slim-rails', '>= 2.1')
15
+ spec.add_dependency('foundation-rails', '~> 5.4')
16
+ spec.add_dependency('simple_form', '~> 3.0')
17
+ spec.add_dependency('font-awesome-rails', '~> 4.2')
18
+ spec.add_dependency('slim-rails', '~> 2.1')
19
19
 
20
20
  spec.add_development_dependency('rake')
21
21
  spec.add_development_dependency('rspec')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Helsing
@@ -14,56 +14,56 @@ dependencies:
14
14
  name: foundation-rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: simple_form
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: font-awesome-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '4.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: slim-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.1'
69
69
  - !ruby/object:Gem::Dependency
@@ -211,6 +211,7 @@ files:
211
211
  - source/refills-hero.html.erb
212
212
  - source/refills-menu.html.erb
213
213
  - source/refills-page-scripts.html.erb
214
+ - source/simple_form/_form.html.slim
214
215
  - source/stylesheets/_bourbon-nav.scss
215
216
  - source/stylesheets/_normalize.scss
216
217
  - source/stylesheets/_refills-nav.scss