bootswatch_rails 3.2.0.2 → 3.2.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: 342cc27ed5b419db3c2632ce53262711097c7a9e
4
- data.tar.gz: 4846d710b355579f3f2ab218f48cd215483255f3
3
+ metadata.gz: 9c53416b94639991b391d9fe00e53c01ca9f26c2
4
+ data.tar.gz: bf40c9f4b1783b10722d2b70ef200fed005e6d17
5
5
  SHA512:
6
- metadata.gz: f07f16ad6f2719221d69e29f3092120ea8a39ce4403813636f72f564e93b9e1676ca239f399afbee6e28829e2a5cc3a3f7757a087ccb5e6f41661ae187e688e7
7
- data.tar.gz: 467f37e9c53cea551d1b10d9f73e1179f0b850b00809c8f345ed31045354835942584fdbe01af639ab59521bfbfa056f967b7db7b6396dc83a7f6181ce6daa3c
6
+ metadata.gz: 6e3c4bc7eab4531722a723651fd9f288ac5c5111a6268f05a8a77c1150b351003aba8fa552eeb43e904be0413d8204585cba103898200f8a74e4ac886ac99a1a
7
+ data.tar.gz: e1ecbaaddd55f2bfb95ffad32e1f3704e2c5bc38f676fb722edef1a5cae19ff46c9eecf4d3889c888db160a81fbc3fbef84d6c488331f3d94fc7f0328ebe2e49
@@ -1,5 +1,5 @@
1
1
  module BootswatchRails
2
- VERSION = "3.2.0.2"
2
+ VERSION = "3.2.0.3"
3
3
  THEMES = [:amelia, :cerulean, :cosmo, :custom, :cyborg, :darkly, :flatly, :journal, :lumen, :paper, :readable, :sandstone, :simplex, :slate, :spacelab, :superhero, :united, :yeti]
4
4
  DEFAULT = 1
5
5
  end
@@ -4,12 +4,18 @@ module BootswatchRails
4
4
  desc "Setup application to use bootswatch.com"
5
5
  class_option :bootstrap, type: :boolean, default: true,
6
6
  desc: 'Add bootstrap to application.js'
7
+ class_option :turbolinks, type: :boolean, default: false,
8
+ desc: 'Activate turbolinks (off by default)'
7
9
  source_root File.expand_path("../templates", __FILE__)
8
10
 
9
11
  def update_javascripts
10
12
  return unless options.bootstrap?
11
13
  file = "app/assets/javascripts/application.js"
12
14
  inject_into_file file, "\n//= require bootstrap", after: /require jquery_ujs$/
15
+ unless options.turbolinks?
16
+ gsub_file file, /^\/\/(= require turbolinks)/, "//---\\1"
17
+ comment_lines "Gemfile", /gem 'turbolinks/
18
+ end
13
19
  end
14
20
 
15
21
  def update_application_controller
@@ -37,6 +43,12 @@ module BootswatchRails
37
43
  directory "config"
38
44
  directory "lib", force: true
39
45
  end
46
+
47
+ def remove_turbolinks
48
+ return if options.turbolinks?
49
+ file = "app/views/layouts/_head.html.erb"
50
+ gsub_file file, /, 'data-turbolinks-track' => true/, ""
51
+ end
40
52
  end
41
53
  end
42
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootswatch_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0.2
4
+ version: 3.2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand