rails_utils 3.3.2 → 3.3.3

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: 569b976c686f0894cee61eab2b3e9bb6a734be81
4
- data.tar.gz: 839e43dfd75277b580f921d9ab7636d3a64d0f6a
3
+ metadata.gz: d8a71c02c3f9c23a1d8b0283171b3187bd603aff
4
+ data.tar.gz: b90ef0eaecd45331bc3ed1b9224a1521a8606750
5
5
  SHA512:
6
- metadata.gz: 17401582ef98f636428dc7cc835d31e92c5e24a6b711612a66c6126b4c695bc256ff489c14b2cd646ee24fd97458eb35bb8206d12bc69a42959083f017f5b053
7
- data.tar.gz: 8dc65383216c2719a1c5e67c36b24d2de93a829ac9f9a76f2d5c06a1f307bea700dc7051e3adeec4aa2ea94c1bd4033c492c9e36fd4ae36b4b93b3ac31e94f51
6
+ metadata.gz: 4c67eb979a153261098208dd17aee0c2f39e70eea030818d8fa4a6f1eb69f593607686f89e1e2987b9568bf09e5a676971594fe8b709834c41743e5b2f887395
7
+ data.tar.gz: 4f499a4cad7418adc7aac531a42d1bcc1ce888eff2fed12e6838303ef2aba66148f2b3310e737a6a75c19ffea301651f7728d1cc814c2317367e483dca9680c1
@@ -1,3 +1,3 @@
1
1
  module RailsUtils
2
- VERSION = "3.3.2"
2
+ VERSION = "3.3.3"
3
3
  end
data/lib/rails_utils.rb CHANGED
@@ -78,7 +78,7 @@ module RailsUtils
78
78
  end
79
79
 
80
80
  def page_controller_class_underscored
81
- controller.class.to_s.sub(/Controller$/, "").underscore.sub(/\//, "_")
81
+ controller.class.to_s.sub(/Controller$/, "").underscore.gsub(/\//, "_")
82
82
  end
83
83
  end
84
84
  end
@@ -22,9 +22,9 @@ describe "RailsUtils::ActionViewExtensions" do
22
22
  end
23
23
  end
24
24
 
25
- describe "simple controller" do
26
- let(:controller_class) { "Awesome::AnimeController" }
27
- let(:controller_name) { "awesome_anime" }
25
+ describe "nested controller returns underscored name by default" do
26
+ let(:controller_class) { "Super::Awesome::AnimeController" }
27
+ let(:controller_name) { "super_awesome_anime" }
28
28
 
29
29
  before { controller.stubs(:class).returns(controller_class) }
30
30
 
@@ -33,9 +33,9 @@ describe "RailsUtils::ActionViewExtensions" do
33
33
  end
34
34
  end
35
35
 
36
- describe "simple controller with hyphenated selector format" do
37
- let(:controller_class) { "Awesome::AnimeController" }
38
- let(:controller_name) { "awesome-anime" }
36
+ describe "nested controller with selector format returns hyphenated name" do
37
+ let(:controller_class) { "Super::Awesome::AnimeController" }
38
+ let(:controller_name) { "super-awesome-anime" }
39
39
 
40
40
  before do
41
41
  RailsUtils.configure do |config|
@@ -50,9 +50,9 @@ describe "RailsUtils::ActionViewExtensions" do
50
50
  end
51
51
  end
52
52
 
53
- describe "simple controller with specified selector format in string" do
54
- let(:controller_class) { "Awesome::AnimeController" }
55
- let(:controller_name) { "awesome_anime" }
53
+ describe "nested controller with selector format of string returns name in specified format" do
54
+ let(:controller_class) { "Super::Awesome::AnimeController" }
55
+ let(:controller_name) { "super_awesome_anime" }
56
56
 
57
57
  before do
58
58
  RailsUtils.configure do |config|
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.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Winston Teo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-10 00:00:00.000000000 Z
11
+ date: 2015-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails