rails_utils 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2aa6c40f062ba83c318a29281a4e2a2ef1d3c755
4
- data.tar.gz: a0a431d9899c860b41a49f0e20aa312610adc984
3
+ metadata.gz: 9535e78db4cb9484af2b6a0d792ac14c42fbfb01
4
+ data.tar.gz: 0d23784ec670c813f138f54d6e41a73516bc39d4
5
5
  SHA512:
6
- metadata.gz: c3cd04591dc63ad0edfb23024b8a021fd6d980bd146166a78837d2833e8395a53a901b6e4204875ab11b2175264daee1359a0d1e871d335f93cec1a822336a58
7
- data.tar.gz: 3c2d7e0f07f14287f9e86f848c04eecbb10a97d389ef5808ff238639b474d2f3c85d6a03d1e9f14eab4bf3c8e5db421dff76d1ce4adbbfeed2cdc7a0113c1859
6
+ metadata.gz: dee0d5b4e3f0a9352292f18b99f2172d697ae616bcfb2da8c139b2ec2bfd8dc6f729ca5d9040baa58c55ba38709271df5909ba5bfd8ca2a051ac6f2e2d18562b
7
+ data.tar.gz: 80bb0e8845afffd488adac1c67444f5e9cf355b6c37c5e74891abcf516caa40b02e9c0ad0cfe2947ba0f9bd4e7e034c29875862c5614fa9e1bb6989801e4a14a
data/README.markdown CHANGED
@@ -95,6 +95,11 @@ Minitest-ed. To run all tests, just run `rake` or `rake test`.
95
95
 
96
96
  ## Changelog
97
97
 
98
+ _Version 3.1.0_
99
+
100
+ - Drop string `controller` from `page_class` and `javascript_initialization`.
101
+
102
+
98
103
  _Version 3.0.0_
99
104
 
100
105
  - Controller namespace added to `page_class` and `javascript_initialization`.
data/lib/rails_utils.rb CHANGED
@@ -3,7 +3,7 @@ require 'action_view'
3
3
  module RailsUtils
4
4
  module ActionViewExtensions
5
5
  def page_controller_class
6
- controller.class.to_s.underscore.sub(/Controller$/, "").sub(/\//, "_")
6
+ controller.class.to_s.sub(/Controller$/, "").underscore.sub(/\//, "_")
7
7
  end
8
8
 
9
9
  def page_action_class
@@ -1,3 +1,3 @@
1
1
  module RailsUtils
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
@@ -12,7 +12,7 @@ describe "RailsUtils::ActionViewExtensions" do
12
12
 
13
13
  describe "#page_controller_class" do
14
14
  describe "simple controller" do
15
- let(:controller_class) { "Anime" }
15
+ let(:controller_class) { "AnimeController" }
16
16
  let(:controller_name) { "anime" }
17
17
 
18
18
  before { controller.stubs(:class).returns(controller_class) }
@@ -23,7 +23,7 @@ describe "RailsUtils::ActionViewExtensions" do
23
23
  end
24
24
 
25
25
  describe "simple controller" do
26
- let(:controller_class) { "Awesome::Anime" }
26
+ let(:controller_class) { "Awesome::AnimeController" }
27
27
  let(:controller_name) { "awesome_anime" }
28
28
 
29
29
  before { controller.stubs(:class).returns(controller_class) }
@@ -71,7 +71,7 @@ describe "RailsUtils::ActionViewExtensions" do
71
71
  end
72
72
 
73
73
  describe "#javascript_initialization" do
74
- let(:controller_class) { "Awesome::Anime" }
74
+ let(:controller_class) { "Awesome::AnimeController" }
75
75
  let(:controller_name) { "awesome_anime" }
76
76
 
77
77
  before do
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: 3.0.0
4
+ version: 3.1.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: 2014-05-12 00:00:00.000000000 Z
11
+ date: 2014-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails