bootstrap_views_generator 0.1.11 → 0.1.12

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
  SHA256:
3
- metadata.gz: b823fd6085fe054970d415eff3f50e346c55c54854b7c9ecc9200b5d71ae4f1d
4
- data.tar.gz: 7e9542962814e5174e776823467d0f90f100d298e043ea9890bbd06ab0d9fa95
3
+ metadata.gz: 482451f5a14bb3cd59e420d81c7fbf4210a6642e5252550ac066b23b062961ba
4
+ data.tar.gz: b0d61c8ad56b4b27ee5afb86d5e9f9a7834de56aae49db8fec601f607f0b32c2
5
5
  SHA512:
6
- metadata.gz: 9d2e619ff36d1e0e59ce53c88e4d31702d09b9a2e859f993685185852a67a32b101532670a26a89a7b2b40614b30994cfcbf4b3d9f13900cec399301b56da0e1
7
- data.tar.gz: a6207e853e80a4e0bac9dcde08ed2b4b9b6e53ec65050eb66ad5124402426135b49d50e37912aafed1024f872bfa0fcf3a6c933652bfa2ac5415340158da0d5d
6
+ metadata.gz: adc7e6b3c9541096c11313f1fa33e14f9a081c3a061a405d9b370625a320b510d357a6e56217a5d5aec3b433f37de0aab9e446bb5c492dfd7dd2f2f679c9c3cf
7
+ data.tar.gz: 49757918844de023651a7328e8a5ad976a31d95ed70a2c9aff47b8cbcd4ae5d3ff312aa377325519c2ed850e957c9a230230a549982b9032e1eb09c088ebfa33
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bootstrap_views_generator (0.1.11)
5
- railties (>= 4.0)
4
+ bootstrap_views_generator (0.1.12)
5
+ railties (>= 4.0, <= 7)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -91,7 +91,7 @@ PLATFORMS
91
91
  DEPENDENCIES
92
92
  bootstrap (~> 4.0)
93
93
  bootstrap_views_generator!
94
- bundler (>= 1.17)
94
+ bundler (>= 1.17, <= 3)
95
95
  railties (>= 5.0)
96
96
  rake (>= 10.0)
97
97
 
data/README.md CHANGED
@@ -46,6 +46,10 @@ Options:
46
46
  # Default: false
47
47
  --devise # If you want to generate bootstrap based devise views
48
48
  # Default: false
49
+ --skip_javascript # If you want to skip adding javascript_include_tag || javascript_pack_tag to the layouts
50
+ # Default: false
51
+ --skip_turbolinks # Do you want to skip associating turbolinks with the assets and views
52
+ # Default: false
49
53
  ```
50
54
 
51
55
  ## Options
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
35
  spec.require_paths = ['lib']
36
36
 
37
- spec.add_runtime_dependency 'railties', '>= 4.0'
38
- spec.add_development_dependency 'bundler', '>= 1.17'
37
+ spec.add_runtime_dependency 'railties', '>= 4.0', '<= 7'
38
+ spec.add_development_dependency 'bundler', '>= 1.17', '<= 3'
39
39
  spec.add_development_dependency 'rake', '>= 10.0'
40
40
  end
@@ -1,3 +1,3 @@
1
1
  module BootstrapViewsGenerator
2
- VERSION = '0.1.11'.freeze
2
+ VERSION = '0.1.12'.freeze
3
3
  end
@@ -6,15 +6,30 @@ module Bootstrap
6
6
  class InstallGenerator < ::Rails::Generators::Base
7
7
  desc 'Overwrite default view scaffolding'
8
8
  source_root ::File.expand_path('../templates', __FILE__)
9
+ class_option :template_engine, type: :string, default: 'erb', enum: %w[erb slim haml],
10
+ desc: 'The template_engine to use for generating the applications views (Erb, Slim, HAML)'
9
11
 
10
- class_option :template_engine, type: :string, default: 'erb', aliases: '-t', desc: 'Set template engine to generate the views with'
11
12
  # Boolean flags that can be flagged by adding to the generator call ie: --pagination or --metag_tags
12
- class_option :devise, type: :boolean, default: false, desc: 'If views for devise will be required by the generator'
13
- class_option :layout, type: :boolean, default: false, aliases: "-l", desc: 'Over-write your application layout file with a bootstrap based layout'
14
- class_option :metatags, type: :boolean, default: false, aliases: "-m", desc: 'If views will assign pages title using metatags gem'
15
- class_option :pagination, type: :boolean, default: false, aliases: '-p', desc: 'Toggle if pagination will be used with the index view/controller (based off of Pagy)'
16
- class_option :simpleform, type: :boolean, default: false, aliases: '-sf', desc: 'Enable SimpleForms for the form generating'
13
+ class_option :devise, type: :boolean, default: false,
14
+ desc: 'If views for devise will be required by the generator'
17
15
 
16
+ class_option :layout, type: :boolean, default: false, aliases: '-l',
17
+ desc: 'Over-write your application layout file with a bootstrap based layout'
18
+
19
+ class_option :metatags, type: :boolean, default: false, aliases: '-m',
20
+ desc: 'If views will assign pages title using metatags gem'
21
+
22
+ class_option :pagination, type: :boolean, default: false, aliases: '-p',
23
+ desc: 'Toggle if pagination will be used with the index view/controller (based off of Pagy)'
24
+
25
+ class_option :simpleform, type: :boolean, default: false, aliases: '-sf',
26
+ desc: 'Enable SimpleForms for the form generating'
27
+
28
+ class_option :skip_javascript, type: :boolean, default: false,
29
+ desc: 'Skip adding javascript_include_tag or javascript_pack_tag to the layouts'
30
+
31
+ class_option :skip_turbolinks, type: :boolean, default: false,
32
+ desc: 'Skip associating assets and views with turbolinks'
18
33
 
19
34
  def copy_scaffold_views
20
35
  %w[edit index show new].each do |file|
@@ -4,28 +4,21 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta content="IE=Edge" http-equiv="X-UA-Compatible" />
6
6
  <meta content="width=device-width, initial-scale=1.0" name="viewport" />
7
- <%- if options[:metatags] %>
7
+ <%- if options[:metatags] -%>
8
8
  <%%= display_meta_tags site: '<%= Rails.application.class.parent.to_s.titleize %>' %>
9
9
  <%- else -%>
10
10
  <title>Bootstrap template</title>
11
11
  <% end -%>
12
12
  <%%= csrf_meta_tags %>
13
13
  <%%= csp_meta_tag %>
14
- <%- if options[:skip_turbolinks] -%>
15
- <%%= stylesheet_link_tag 'application', media: 'all' %>
16
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
17
- <%%= javascript_include_tag 'application' %>
18
- <%- else %>
19
- <%%= javascript_pack_tag 'application' %>
20
- <%- end %>
21
- <%- else -%>
22
- <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
23
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
24
- <%%= javascript_include_tag 'application', 'data-turbolinks-track': true %>
25
- <%- else %>
26
- <%%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
27
- <% end %>
28
- <%- end -%>
14
+ <%%= stylesheet_link_tag 'application', media: 'all'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" %> %>
15
+ <%- unless options[:skip_javascript] -%>
16
+ <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') -%>
17
+ <%%= javascript_include_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': true" -%> %>
18
+ <%- else -%>
19
+ <%%= javascript_pack_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" -%> %>
20
+ <%- end -%>
21
+ <%- end -%>
29
22
  <!--IE Polyfill for CSS Elements-->
30
23
  <!--HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries-->
31
24
  <!--[if lt IE 9]>
@@ -5,28 +5,21 @@
5
5
  %meta{charset: "utf-8"}/
6
6
  %meta{content: "IE=Edge", "http-equiv" => "X-UA-Compatible"}/
7
7
  %meta{content: "width=device-width, initial-scale=1.0", name: "viewport"}/
8
- <%- if options[:metatags] %>
8
+ <%- if options[:metatags] -%>
9
9
  = display_meta_tags site: '<%= Rails.application.class.parent.to_s.titleize %>'
10
- <% else %>
10
+ <%- else -%>
11
11
  %title Bootstrap template
12
- <% end %>
12
+ <%- end -%>
13
13
  = csrf_meta_tags
14
14
  = csp_meta_tag
15
- <%- if options[:skip_turbolinks] -%>
16
- = stylesheet_link_tag 'application', media: 'all'
17
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
18
- = javascript_include_tag 'application'
19
- <%- else %>
20
- = javascript_pack_tag 'application'
15
+ = stylesheet_link_tag 'application', media: 'all'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" %>
16
+ <%- unless options[:skip_javascript] -%>
17
+ <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') -%>
18
+ = javascript_include_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': true" -%>
19
+ <%- else -%>
20
+ = javascript_pack_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" -%>
21
+ <%- end -%>
21
22
  <%- end %>
22
- <%- else -%>
23
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
24
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
25
- = javascript_include_tag 'application', 'data-turbolinks-track': true
26
- <%- else %>
27
- = javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
28
- <% end %>
29
- <%- end -%>
30
23
  / IE Polyfill for CSS Elements
31
24
  / HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
32
25
  /[if lt IE 9]
@@ -4,28 +4,21 @@ html
4
4
  meta charset="utf-8"
5
5
  meta content="IE=Edge" http-equiv="X-UA-Compatible"
6
6
  meta content="width=device-width, initial-scale=1.0" name="viewport"
7
- <%- if options[:metatags] %>
7
+ <%- if options[:metatags] -%>
8
8
  = display_meta_tags site: '<%= Rails.application.class.parent.to_s.titleize %>'
9
- <% else %>
9
+ <%- else -%>
10
10
  title Bootstrap template
11
- <% end %>
11
+ <%- end -%>
12
12
  = csrf_meta_tags
13
13
  = csp_meta_tag
14
- <%- if options[:skip_turbolinks] -%>
15
- = stylesheet_link_tag 'application', media: 'all'
16
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
17
- = javascript_include_tag 'application'
18
- <%- else %>
19
- = javascript_pack_tag 'application'
14
+ = stylesheet_link_tag 'application', media: 'all'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" %>
15
+ <%- unless options[:skip_javascript] -%>
16
+ <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') -%>
17
+ = javascript_include_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': true" -%>
18
+ <%- else -%>
19
+ = javascript_pack_tag 'application'<%= options[:skip_turbolinks] ? '' : ", 'data-turbolinks-track': 'reload'" -%>
20
+ <%- end -%>
20
21
  <%- end %>
21
- <%- else -%>
22
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
23
- <%- if Gem::Version.new(Rails.version) < Gem::Version.new('6.0') %>
24
- = javascript_include_tag 'application', 'data-turbolinks-track': true
25
- <%- else %>
26
- = javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
27
- <% end %>
28
- <%- end -%>
29
22
  /! IE Polyfill for CSS Elements
30
23
  /! HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
31
24
  /[if lt IE 9]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_views_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Hicks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-20 00:00:00.000000000 Z
11
+ date: 2019-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.0'
20
+ - - "<="
21
+ - !ruby/object:Gem::Version
22
+ version: '7'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '4.0'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: '7'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +37,9 @@ dependencies:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
33
39
  version: '1.17'
40
+ - - "<="
41
+ - !ruby/object:Gem::Version
42
+ version: '3'
34
43
  type: :development
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +47,9 @@ dependencies:
38
47
  - - ">="
39
48
  - !ruby/object:Gem::Version
40
49
  version: '1.17'
50
+ - - "<="
51
+ - !ruby/object:Gem::Version
52
+ version: '3'
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: rake
43
55
  requirement: !ruby/object:Gem::Requirement