cant_cant_cant 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cant_cant_cant.rb +1 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d30807d30e4b440ed1c11afb879bb831318b4d06
4
- data.tar.gz: 4e725da8038fb03b6e0c0464e63ea9e765f4b22a
3
+ metadata.gz: a0cbbfafb5251a59ebfcd83be030095d7f592fca
4
+ data.tar.gz: 2550913d0b8c3d464f8590c47627f3b67479aede
5
5
  SHA512:
6
- metadata.gz: 7906de2624a9d85a4ce4e3f27def392034a7aec61923c27a4d5651568b1e1bf6eb7fc365aa20b38895d73ed3699e3730062e145ee4c6f5f3f4af67afe6d80238
7
- data.tar.gz: 1c46b6c437b83eff24e979d529f2bea672d2bf3eb88c75e33c7e6bcbe865ebd3fbcd602351f446e9c4fd6b38bdf19b59e5e1ab19bf811b80fa5ec3c1a25a4ebd
6
+ metadata.gz: a2c95d0766a84c66f36867f24bc1a576dd8ccd3a6bb8c9e3637d93ccd6c248286c614918e45d5e302a3b1e9ec6b7f7596a58989101fb1c7018ba90cdbd693039
7
+ data.tar.gz: 0507ed6001d256ad501b16d62c8523e7554f6fbcd99ff07b8cd03f14ad117cfa95ae22612d918843bc0d45bce9129b19ba6e13f08919e54cba27b17845119a96
@@ -2,7 +2,6 @@ require 'yaml'
2
2
 
3
3
  module CantCantCant
4
4
  PermissionDenied = Class.new(RuntimeError)
5
- InvalidControllerOrAction = Class.new(RuntimeError)
6
5
  InvalidConfiguration = Class.new(RuntimeError)
7
6
 
8
7
  class << self
@@ -45,12 +44,10 @@ module CantCantCant
45
44
  controller_param, action = param.split('#')
46
45
  raise if controller_param.blank? || action.blank?
47
46
 
48
- const_name = "#{controller_param.classify}Controller"
47
+ const_name = "#{controller_param.camelize}Controller"
49
48
  controller_class = ActiveSupport::Dependencies.constantize(const_name)
50
49
 
51
50
  [controller_class, action]
52
- rescue RuntimeError, NameError
53
- raise InvalidControllerOrAction, param
54
51
  end
55
52
 
56
53
  def inject_action(param)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cant_cant_cant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shou Ya