angularjs-rails-cdn 0.1.3 → 0.1.4
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +3 -2
- data/lib/angularjs-rails-cdn/version.rb +1 -1
- data/spec/angularjs_spec.rb +9 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86af1d29f94e7996ee24994b011c4cb02578516
|
4
|
+
data.tar.gz: 4bb6d4d5dca1bd99abf2280e1ecb5f9d0cb8eb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9157cc1b18307f42c1b939c22bf5922650cfb9d5a838a647acc41ac90b59e5ffe960ffe60dca93fb852fd14c17f922ebdd89c36202934568d62d04f812c35725
|
7
|
+
data.tar.gz: 572d6c4a999f098d686b569f995d2ba1ccfde453183874e31806a9cb6ccf7c448d3524d897cc358b24a69fbfe9050fe662ea19886b1f34477a536ad10dc05166
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -38,6 +38,7 @@ Implications of externalizing AngularJS from `application.js` are:
|
|
38
38
|
|
39
39
|
Changelog:
|
40
40
|
|
41
|
+
* v0.1.4: Clean up and missing specs
|
41
42
|
* v0.1.3: Be a bit more html_safe
|
42
43
|
* v0.1.2: Specified license in spec file
|
43
44
|
* v0.1.1: Pass options to javascript_include_tag
|
@@ -61,7 +62,7 @@ If you're using assets pipeline with Rails 3.1+, first remove `//= require angul
|
|
61
62
|
Then in layout:
|
62
63
|
|
63
64
|
```ruby
|
64
|
-
= angularjs_include_tag :google
|
65
|
+
= angularjs_include_tag :google
|
65
66
|
= javascript_include_tag 'application'
|
66
67
|
```
|
67
68
|
|
@@ -75,7 +76,7 @@ Other possible usages:
|
|
75
76
|
:cookies]
|
76
77
|
```
|
77
78
|
|
78
|
-
Note
|
79
|
+
Note: currently only valid CDN symbols is:
|
79
80
|
|
80
81
|
```ruby
|
81
82
|
:google
|
data/spec/angularjs_spec.rb
CHANGED
@@ -3,9 +3,7 @@
|
|
3
3
|
require_relative 'spec_helper'
|
4
4
|
|
5
5
|
def javascript_tag(str, *args)
|
6
|
-
"<s>#{str}</s>"
|
7
|
-
s.class.send(:define_method, :html_safe, ->{ self })
|
8
|
-
end
|
6
|
+
"<s>#{str}</s>"
|
9
7
|
end
|
10
8
|
|
11
9
|
describe 'AngularJS::Rails::Cdn::ActionViewExtensions' do
|
@@ -37,14 +35,20 @@ describe 'AngularJS::Rails::Cdn::ActionViewExtensions' do
|
|
37
35
|
context 'offline mode' do
|
38
36
|
context 'no additional modules' do
|
39
37
|
it { subject.angularjs_include_tag(:google).should == '<s>angular.js</s>' }
|
38
|
+
it { subject.angularjs_include_tag(:google).should be_html_safe }
|
39
|
+
|
40
40
|
it { subject.angularjs_include_tag(:google, version: '1.0.7').should == '<s>angular.js</s>' }
|
41
|
+
it { subject.angularjs_include_tag(:google, version: '1.0.7').should be_html_safe }
|
41
42
|
end
|
42
43
|
|
43
44
|
context 'with additional module' do
|
44
45
|
before { subject.should_receive(:javascript_include_tag).with(:'angular-cookies').and_return('<s>angular-cookies.js</s>') }
|
45
46
|
|
46
47
|
it { subject.angularjs_include_tag(:google, modules: [:cookies]).should == '<s>angular.js</s><s>angular-cookies.js</s>' }
|
48
|
+
it { subject.angularjs_include_tag(:google, modules: [:cookies]).should be_html_safe }
|
49
|
+
|
47
50
|
it { subject.angularjs_include_tag(:google, version: '1.0.7', modules: [:cookies]).should == '<s>angular.js</s><s>angular-cookies.js</s>' }
|
51
|
+
it { subject.angularjs_include_tag(:google, version: '1.0.7', modules: [:cookies]).should be_html_safe }
|
48
52
|
end
|
49
53
|
end
|
50
54
|
|
@@ -55,6 +59,7 @@ describe 'AngularJS::Rails::Cdn::ActionViewExtensions' do
|
|
55
59
|
end
|
56
60
|
|
57
61
|
it { subject.angularjs_include_tag(:google, force: true, version: '1.1.5').should == "<s>//angular.min.js</s><s>window.angular || document.write(unescape('%3Cs>angular.js%3C/s>'))</s>" }
|
62
|
+
it { subject.angularjs_include_tag(:google, force: true, version: '1.1.5').should be_html_safe }
|
58
63
|
end
|
59
64
|
|
60
65
|
context 'with additional module' do
|
@@ -65,6 +70,7 @@ describe 'AngularJS::Rails::Cdn::ActionViewExtensions' do
|
|
65
70
|
end
|
66
71
|
|
67
72
|
it { subject.angularjs_include_tag(:google, force: true, version: '1.1.5', modules: [:cookies]).should == "<s>//angular.min.js</s><s>//angular-cookies.min.js</s><s>window.angular || document.write(unescape('%3Cs>angular.js%3C/s>%3Cs>angular-cookies.js%3C/s>'))</s>" }
|
73
|
+
it { subject.angularjs_include_tag(:google, force: true, version: '1.1.5', modules: [:cookies]).should be_html_safe }
|
68
74
|
end
|
69
75
|
end
|
70
76
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: angularjs-rails-cdn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikhail Pobolovets
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
Z2S2HQ6LJ1YyB0Sjwx2KZ4Sofni5coZE6d4ayx6nFEKQGlSKVIXtc0W3HD3+Q1Ww
|
31
31
|
RYreADroU/Sf7E9uVmOmkQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2013-10-
|
33
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: angularjs-rails
|
metadata.gz.sig
CHANGED
Binary file
|