twitter-bootstrap-rails-cdn 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38ea3cf0d30f44a8f39b59ca154deb6cea3a6daf
4
- data.tar.gz: 916ee7e00532b69edbfb0928d6497b0083ac840e
3
+ metadata.gz: 0716eea3303f33d6d70a8c10d8bf4bd152fb4e94
4
+ data.tar.gz: baec66d8d45c8a1400b7c9375211ae4f540d484f
5
5
  SHA512:
6
- metadata.gz: db3502d4cc06c8d5dc4a19320921022bb76195cac20ca2dd9f47977c8d294c4d69d8150f9aa7ce131f9c32193a637e5b492fe2d1791fd09ac0630c121e1866e1
7
- data.tar.gz: ab589d8f638c6133bb875d0427a6c44761fb4fdb7c2ee35c50de032a84395d1480d7bf2260a74aebcd3041150ac2fd0b130abe5356bf0dc6dd1912e4cc1e91c9
6
+ metadata.gz: 4bd34577b604349879f7f241d9bb54313e3a43b9b190296174a6e4875e0429e43a9dfc6e4f4e40b3410d7dd9cced5da0c0c10400bfe3a39d3264acabe9ffaa3c
7
+ data.tar.gz: bbd66ca98c2308f6140069778d7aba9f3b820ae3c8bcdbce97eba1da5e5eb97eb6930b185da92b425f6716ea89656b3fff980447702d203ab02438c02cdf1e80
data/README.md CHANGED
@@ -47,26 +47,21 @@ If you're using asset pipeline with Rails 3.1+ or 4.+,
47
47
  Then in layout:
48
48
 
49
49
  ```ruby
50
- = twitter_bootstrap_stylesheet_link_tag
50
+ = twitter_bootstrap_stylesheet_link_tag :netdna
51
51
  = stylesheet_link_tag 'application' ...
52
52
  ```
53
53
 
54
54
  ```ruby
55
- = twitter_bootstrap_javascript_include_tag
55
+ = twitter_bootstrap_javascript_include_tag :netdna
56
56
  = javascript_include_tag 'application' ...
57
57
  ```
58
58
 
59
- Note that valid CDN symbols are `:netdna`.
59
+ Note that currently, the only valid CDN symbol is `:netdna`, and this must be passed to tag methods.
60
60
 
61
61
  Now, it will generate the following on production:
62
62
 
63
63
  ```html
64
64
  <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" media="screen" rel="stylesheet" />
65
- <script>
66
- //<![CDATA[
67
- $(function(){ $('body').css('color') === 'rgb(51, 51, 51)' || $('head').prepend('<link href="/stylesheets/bootstrap-3.0.0.min.css" media="screen" rel="stylesheet" />'); });
68
- //]]>
69
- </script>
70
65
  ```
71
66
 
72
67
  ```html
@@ -1,8 +1,10 @@
1
+ require 'twitter-bootstrap-rails-cdn/engine' if ::Rails.version >= '3.1'
2
+ require 'twitter-bootstrap-rails-cdn/railtie'
1
3
  require 'twitter-bootstrap-rails-cdn/version'
2
4
 
3
5
  module TwitterBootstrap::Rails::Cdn
4
6
  module ActionViewExtensions
5
- OFFLINE = ( Rails.env.development? or Rails.env.test? )
7
+ OFFLINE = ( ::Rails.env.development? or ::Rails.env.test? )
6
8
  DEFAULT_HOST = :netdna
7
9
  BOOTSTRAP_VERSIONS = [ '3.0.0', '2.3.2' ]
8
10
 
@@ -59,12 +61,4 @@ module TwitterBootstrap::Rails::Cdn
59
61
  }[host]
60
62
  end
61
63
  end
62
-
63
- class Railtie < Rails::Railtie
64
- initializer 'twitter_bootstrap_rails_cdn.action_view' do |app|
65
- ActiveSupport.on_load(:action_view) do
66
- include TwitterBootstrap::Rails::Cdn::ActionViewExtensions
67
- end
68
- end
69
- end
70
64
  end
@@ -0,0 +1,8 @@
1
+ module TwitterBootstrap
2
+ module Rails
3
+ module Cdn
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ module TwitterBootstrap
2
+ module Rails
3
+ module Cdn
4
+ class Railtie < ::Rails::Railtie
5
+ initializer 'twitter_bootstrap_rails_cdn.action_view' do |app|
6
+ ActiveSupport.on_load(:action_view) do
7
+ include TwitterBootstrap::Rails::Cdn::ActionViewExtensions
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,7 +1,7 @@
1
1
  module TwitterBootstrap
2
2
  module Rails
3
3
  module Cdn
4
- VERSION = '1.1.2'
4
+ VERSION = '1.1.3'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-rails-cdn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Barthelemy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2013-10-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Twitter Boostrap CDN support for Rails 3 and 4
14
14
  email:
@@ -23,6 +23,8 @@ files:
23
23
  - README.md
24
24
  - Rakefile
25
25
  - lib/twitter-bootstrap-rails-cdn.rb
26
+ - lib/twitter-bootstrap-rails-cdn/engine.rb
27
+ - lib/twitter-bootstrap-rails-cdn/railtie.rb
26
28
  - lib/twitter-bootstrap-rails-cdn/version.rb
27
29
  - twitter-bootstrap-rails-cdn.gemspec
28
30
  - vendor/assets/fonts/glyphicons-halflings-regular.eot