jquery-rails-google-cdn 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/demoapp/Gemfile +2 -1
- data/demoapp/Gemfile.lock +1 -1
- data/{jquery_rails_google_cdn.gemspec → jquery-rails-google-cdn.gemspec} +1 -1
- data/lib/jquery-rails-google-cdn.rb +2 -0
- data/lib/{jquery_rails_google_cdn → jquery-rails-google-cdn}/railtie.rb +1 -1
- data/lib/{jquery_rails_google_cdn → jquery-rails-google-cdn}/view_helpers.rb +1 -1
- metadata +6 -6
- data/lib/jquery_rails_google_cdn.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54ef529ccce260475c2c3fffc5128b83f3caa577
|
4
|
+
data.tar.gz: ca9fa62fabc2d6f7e1fd60a8a4e5cc6c1d35e5d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 110303dd9493d24f42a88ec22693356cd4709281ef3b1abe5aea66b5731e8f195909f45575e8ce00588b24b2ce828cede01dd96b7c6f93fec17b41f7ea80900f
|
7
|
+
data.tar.gz: 7b2541fc2b02651858074a8fc72fa7e0e6573dceee12a90a61144735f81f2f30cf9b9308fa6a403bd9d47d94daec73a476eb9b803dd0bca3510f83449a403616
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
I have to give credit to the authors of the gems I combined and modified to make this a reality:
|
2
|
-
[jquery-rails](https://github.com/
|
2
|
+
[jquery-rails-cdn](https://github.com/kenn/jquery-rails-cdn) and [jquery-ui-rails-cdn](https://github.com/styx/jquery-ui-rails-cdn). This gem will utilize [jquery-rails](https://github.com/rails/jquery-rails) however, it will serve your jquery files from the google cdn, if possible, than fall back to your local copies if neccessary.
|
3
3
|
|
4
4
|
Serving jQuery from a publicly available [CDN](http://en.wikipedia.org/wiki/Content_Delivery_Network) has clear benefits:
|
5
5
|
|
@@ -74,5 +74,7 @@ window.jQuery || document.write(unescape('%3Cscript src="/assets/jquery.min.js">
|
|
74
74
|
|
75
75
|
###Changelog
|
76
76
|
|
77
|
+
* v0.0.4: Bug Fixes
|
78
|
+
* v0.0.3: Bug Fixes
|
77
79
|
* v0.0.2: Changed up initial workflow, forking even further from the previous authors
|
78
80
|
* v0.0.1: Initial release
|
data/demoapp/Gemfile
CHANGED
@@ -20,7 +20,8 @@ gem 'coffee-rails', '~> 4.0.0'
|
|
20
20
|
|
21
21
|
# Use jquery as the JavaScript library
|
22
22
|
gem 'jquery-rails'
|
23
|
-
gem 'jquery-rails-google-cdn'
|
23
|
+
gem 'jquery-rails-google-cdn'
|
24
|
+
# gem 'jquery-rails-google-cdn', path: '../'
|
24
25
|
|
25
26
|
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
26
27
|
gem 'turbolinks'
|
data/demoapp/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ module Jquery::Rails
|
|
2
2
|
module Google
|
3
3
|
module CDN
|
4
4
|
class Railtie < Rails::Railtie
|
5
|
-
initializer "
|
5
|
+
initializer "jquery-rails-google-cdn.view_helpers" do
|
6
6
|
ActionView::Base.send :include, Jquery::Rails::Google::CDN::ViewHelpers
|
7
7
|
end
|
8
8
|
end
|
@@ -4,7 +4,7 @@ module Jquery::Rails
|
|
4
4
|
module ViewHelpers
|
5
5
|
def jquery_include_tag(version = nil)
|
6
6
|
version ||= Jquery::Rails::JQUERY_VERSION
|
7
|
-
[ javascript_include_tag("//ajax.googleapis.com/ajax/libs/jquery/#{version}/
|
7
|
+
[ javascript_include_tag("//ajax.googleapis.com/ajax/libs/jquery/#{version}/jquery.min.js"),
|
8
8
|
javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag('jquery/jquery.min').gsub('<','%3C')}'))")
|
9
9
|
].join("\n").html_safe
|
10
10
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-rails-google-cdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hough
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Use the Google CDN to serve jquery and fall back to the local version
|
14
14
|
if the CDN is unreachable.
|
@@ -78,10 +78,10 @@ files:
|
|
78
78
|
- demoapp/vendor/assets/javascripts/.keep
|
79
79
|
- demoapp/vendor/assets/javascripts/jquery/jquery.min.js
|
80
80
|
- demoapp/vendor/assets/stylesheets/.keep
|
81
|
-
-
|
82
|
-
- lib/
|
83
|
-
- lib/
|
84
|
-
- lib/
|
81
|
+
- jquery-rails-google-cdn.gemspec
|
82
|
+
- lib/jquery-rails-google-cdn.rb
|
83
|
+
- lib/jquery-rails-google-cdn/railtie.rb
|
84
|
+
- lib/jquery-rails-google-cdn/view_helpers.rb
|
85
85
|
homepage: https://github.com/chrishough/jquery-rails-google-cdn
|
86
86
|
licenses:
|
87
87
|
- GPL
|