rack-jquery 1.3.2 → 1.4.0
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.
- data/.travis.yml +0 -1
- data/CHANGES.md +7 -0
- data/README.md +1 -1
- data/lib/rack/jquery.rb +5 -3
- data/lib/rack/jquery/version.rb +1 -1
- data/spec/rack_jquery_spec.rb +2 -2
- metadata +2 -2
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# CH CH CH CHANGES #
|
2
2
|
|
3
|
+
## Friday the 19th of July 2013, v1.4.0 ##
|
4
|
+
|
5
|
+
* Made Media Temple the default CDN, since Google and Microsoft (and others) are now in the employ of Lucifer and his minions running the states of the UK and US, I don't feel like helping them track people round the web in any way, and certainly not making it easier for them by default.
|
6
|
+
|
7
|
+
----
|
8
|
+
|
9
|
+
|
3
10
|
## v1.3.2 ##
|
4
11
|
|
5
12
|
Thursday the 23rd of May 2013
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ Have a look in the examples directory, but here's a snippet.
|
|
25
25
|
= Rack::JQuery.cdn
|
26
26
|
</code></pre>
|
27
27
|
|
28
|
-
Now you have the script tags to
|
28
|
+
Now you have the script tags to Media Temple's CDN in the head (you can also use Google or Microsoft, or Cloudflare, see the docs).
|
29
29
|
|
30
30
|
It also adds in a bit of javascript that will load in a locally kept version of jQuery, just incase the CDN is unreachable. The script will use the "/js/jquery-1.9.1.min.js" path (or, instead of 1.9.1, whatever is in {Rack::JQuery::VERSION}). You can change the "/js" bit if you like (see the docs).
|
31
31
|
|
data/lib/rack/jquery.rb
CHANGED
@@ -30,9 +30,9 @@ module Rack
|
|
30
30
|
</script>
|
31
31
|
STR
|
32
32
|
|
33
|
-
# @param [Symbol] organisation Choose which CDN to use, either :google, :microsoft or :media_temple
|
33
|
+
# @param [Symbol] organisation Choose which CDN to use, either :google, :microsoft or :media_temple, or :cloudflare
|
34
34
|
# @return [String] The HTML script tags to get the CDN.
|
35
|
-
def self.cdn( organisation=:
|
35
|
+
def self.cdn( organisation=:media_temple )
|
36
36
|
script = case organisation
|
37
37
|
when :media_temple
|
38
38
|
MEDIA_TEMPLE
|
@@ -40,8 +40,10 @@ STR
|
|
40
40
|
MICROSOFT
|
41
41
|
when :cloudflare
|
42
42
|
CLOUDFLARE
|
43
|
-
|
43
|
+
when :google
|
44
44
|
GOOGLE
|
45
|
+
else
|
46
|
+
MEDIA_TEMPLE
|
45
47
|
end
|
46
48
|
"#{script}\n#{FALLBACK}"
|
47
49
|
end
|
data/lib/rack/jquery/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Rack
|
2
2
|
class JQuery
|
3
|
-
VERSION = "1.
|
3
|
+
VERSION = "1.4.0" # the version of this library
|
4
4
|
JQUERY_VERSION = "2.0.0" # the version of jQuery it supports.
|
5
5
|
|
6
6
|
# This is the release date of the jQuery file, it makes an easy "Last-Modified" date for setting the headers around caching.
|
data/spec/rack_jquery_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe "The class methods" do
|
|
8
8
|
context "Given an argument" do
|
9
9
|
context "of nil (the default)" do
|
10
10
|
let(:organisation) { nil }
|
11
|
-
it { should == "#{Rack::JQuery::
|
11
|
+
it { should == "#{Rack::JQuery::MEDIA_TEMPLE}\n#{Rack::JQuery::FALLBACK}" }
|
12
12
|
end
|
13
13
|
context "of :google" do
|
14
14
|
let(:organisation) { :google }
|
@@ -70,7 +70,7 @@ describe "Inserting the CDN" do
|
|
70
70
|
end
|
71
71
|
it_should_behave_like "Any route"
|
72
72
|
subject { last_response.body }
|
73
|
-
let(:expected) { Rack::JQuery::
|
73
|
+
let(:expected) { Rack::JQuery::MEDIA_TEMPLE }
|
74
74
|
it { should include expected }
|
75
75
|
end
|
76
76
|
context "Cloudflare CDN" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-jquery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|