rails_utils 2.1.4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +5 -0
- data/lib/rails_utils.rb +1 -1
- data/lib/rails_utils/version.rb +1 -1
- data/test/rails_utils_test.rb +21 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aa6c40f062ba83c318a29281a4e2a2ef1d3c755
|
4
|
+
data.tar.gz: a0a431d9899c860b41a49f0e20aa312610adc984
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3cd04591dc63ad0edfb23024b8a021fd6d980bd146166a78837d2833e8395a53a901b6e4204875ab11b2175264daee1359a0d1e871d335f93cec1a822336a58
|
7
|
+
data.tar.gz: 3c2d7e0f07f14287f9e86f848c04eecbb10a97d389ef5808ff238639b474d2f3c85d6a03d1e9f14eab4bf3c8e5db421dff76d1ce4adbbfeed2cdc7a0113c1859
|
data/README.markdown
CHANGED
@@ -93,6 +93,11 @@ Pull Requests are very welcomed (with specs, of course)!
|
|
93
93
|
|
94
94
|
Minitest-ed. To run all tests, just run `rake` or `rake test`.
|
95
95
|
|
96
|
+
## Changelog
|
97
|
+
|
98
|
+
_Version 3.0.0_
|
99
|
+
|
100
|
+
- Controller namespace added to `page_class` and `javascript_initialization`.
|
96
101
|
|
97
102
|
## Author
|
98
103
|
|
data/lib/rails_utils.rb
CHANGED
data/lib/rails_utils/version.rb
CHANGED
data/test/rails_utils_test.rb
CHANGED
@@ -11,12 +11,26 @@ describe "RailsUtils::ActionViewExtensions" do
|
|
11
11
|
end
|
12
12
|
|
13
13
|
describe "#page_controller_class" do
|
14
|
-
|
14
|
+
describe "simple controller" do
|
15
|
+
let(:controller_class) { "Anime" }
|
16
|
+
let(:controller_name) { "anime" }
|
17
|
+
|
18
|
+
before { controller.stubs(:class).returns(controller_class) }
|
19
|
+
|
20
|
+
it "returns controller name" do
|
21
|
+
view.page_controller_class.must_equal controller_name
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "simple controller" do
|
26
|
+
let(:controller_class) { "Awesome::Anime" }
|
27
|
+
let(:controller_name) { "awesome_anime" }
|
15
28
|
|
16
|
-
|
29
|
+
before { controller.stubs(:class).returns(controller_class) }
|
17
30
|
|
18
|
-
|
19
|
-
|
31
|
+
it "returns controller name" do
|
32
|
+
view.page_controller_class.must_equal controller_name
|
33
|
+
end
|
20
34
|
end
|
21
35
|
end
|
22
36
|
|
@@ -57,10 +71,11 @@ describe "RailsUtils::ActionViewExtensions" do
|
|
57
71
|
end
|
58
72
|
|
59
73
|
describe "#javascript_initialization" do
|
60
|
-
let(:
|
74
|
+
let(:controller_class) { "Awesome::Anime" }
|
75
|
+
let(:controller_name) { "awesome_anime" }
|
61
76
|
|
62
77
|
before do
|
63
|
-
controller.stubs(:
|
78
|
+
controller.stubs(:class).returns(controller_class)
|
64
79
|
controller.stubs(:action_name).returns(action_name)
|
65
80
|
end
|
66
81
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winston Teo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project:
|
132
|
-
rubygems_version: 2.0.
|
132
|
+
rubygems_version: 2.0.6
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Rails helpers based on opinionated project practices.
|