rack-backbone 0.1.0 → 0.1.1

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/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CH CH CH CHANGES #
2
2
 
3
+
4
+ ## Saturday the 12th of October 2013, v0.1.1 ##
5
+
6
+ * Had a rogue newline since the fallback script was split. Fixed.
7
+
8
+ ----
9
+
10
+
3
11
  ## Friday the 11th of October 2013, v0.1.0 ##
4
12
 
5
13
  * Added option `debug` for getting the unminified version of the script, to help with debugging.
@@ -83,7 +83,7 @@ STR
83
83
 
84
84
  script_src = "#{script_src[0..-8]}.js" if debug
85
85
 
86
- %Q!<script src='#{script_src}'></script>\n#{FALLBACK_TOP}#{env["rack.backbone.http_path"]}#{FALLBACK_BOTTOM}!
86
+ %Q!<script src='#{script_src}'></script>\n#{FALLBACK_TOP.chomp}#{env["rack.backbone.http_path"]}#{FALLBACK_BOTTOM}!
87
87
  else
88
88
  "<script src='#{env["rack.backbone.http_path"]}'></script>"
89
89
  end
@@ -2,7 +2,7 @@ module Rack
2
2
  class Backbone
3
3
 
4
4
  # the version of this library
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
 
7
7
  # the version of Backbone it supports.
8
8
  BACKBONE_VERSION = "1.0.0"
@@ -19,12 +19,14 @@ describe "The class methods" do
19
19
  subject(:cdn) { Rack::Backbone.cdn env, default_options.merge(options) }
20
20
 
21
21
  context "Given the organisation option" do
22
+ let(:fallback) { "#{FALLBACK_TOP.chomp}#{path}#{FALLBACK_BOTTOM}" }
23
+ let(:expected){ "<script src='#{cdn_name}'></script>\n#{fallback}"}
22
24
  context "of nil (the default)" do
23
25
  let(:options) { {:organisation => nil } }
24
- let(:expected){ "<script src='#{CDN::CLOUDFLARE}'></script>\n#{FALLBACK_TOP}#{path}#{FALLBACK_BOTTOM}"}
26
+ let(:cdn_name) {CDN::CLOUDFLARE }
25
27
  it { should == expected }
26
28
  context "and debug" do
27
- let(:unminified) { "#{CDN::CLOUDFLARE[0..-8]}.js" }
29
+ let(:unminified) { "#{cdn_name[0..-8]}.js" }
28
30
  let(:options) {
29
31
  {:organisation => nil, :debug => true }
30
32
  }
@@ -33,10 +35,10 @@ describe "The class methods" do
33
35
  end
34
36
  context "of :jsdelivr" do
35
37
  let(:options) { {:organisation => :jsdelivr } }
36
- let(:expected){ "<script src='#{CDN::JSDELIVR}'></script>\n#{FALLBACK_TOP}#{path}#{FALLBACK_BOTTOM}" }
38
+ let(:cdn_name) {CDN::JSDELIVR }
37
39
  it { should == expected }
38
40
  context "and debug" do
39
- let(:unminified) { "#{CDN::JSDELIVR[0..-8]}.js" }
41
+ let(:unminified) { "#{cdn_name[0..-8]}.js" }
40
42
  let(:options) {
41
43
  {:organisation => :jsdelivr, :debug => true }
42
44
  }
@@ -45,10 +47,10 @@ describe "The class methods" do
45
47
  end
46
48
  context "of :cloudflare" do
47
49
  let(:options) { {:organisation => :cloudflare } }
48
- let(:expected){ "<script src='#{CDN::CLOUDFLARE}'></script>\n#{FALLBACK_TOP}#{path}#{FALLBACK_BOTTOM}"}
50
+ let(:cdn_name) {CDN::CLOUDFLARE }
49
51
  it { should == expected }
50
52
  context "and debug" do
51
- let(:unminified) { "#{CDN::CLOUDFLARE[0..-8]}.js" }
53
+ let(:unminified) { "#{cdn_name[0..-8]}.js" }
52
54
  let(:options) {
53
55
  {:organisation => nil, :debug => true }
54
56
  }
@@ -57,10 +59,11 @@ describe "The class methods" do
57
59
  end
58
60
  context "of false, to get the fallback script only" do
59
61
  let(:options) { {:organisation => false } }
62
+ let(:cdn_name) { CDN::CLOUDFLARE }
60
63
  let(:expected){ "<script src='#{path}'></script>" }
61
64
  it { should == expected }
62
65
  context "and debug" do
63
- let(:unminified) { "#{CDN::CLOUDFLARE[0..-8]}.js" }
66
+ let(:unminified) { "#{cdn_name[0..-8]}.js" }
64
67
  let(:options) {
65
68
  {:organisation => false, :debug => true }
66
69
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-backbone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-10-11 00:00:00.000000000 Z
12
+ date: 2013-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler