invisible_controller 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d76bccccf792e9b55d4c8ce7c690e66b40175fae
4
- data.tar.gz: 6c51ede7ea23b13a68a226e09aee6a102ca02a0f
3
+ metadata.gz: 8b866cfef3589b557a232021b5c8076029c528be
4
+ data.tar.gz: 3949106dfe4d79c4509a05f0ccb583d477a2e96f
5
5
  SHA512:
6
- metadata.gz: f4acb05dc6c57ac6f49a4e92a836f0c323c659b3bc09d8522316f1730926860c67d68ccf726cec995a92694ed3c7f266ccfc080b49f2b735c404ed32fa2e8b56
7
- data.tar.gz: 4c437f733d1a602471f1e62acdfa017cbc7982a085bb210564e9f45433becb2a0cf52c018cefc72c8e51fde35947859fee1fd1c087dd8317ccd2bfc6744d3569
6
+ metadata.gz: 3c00c4b64ad0c991c35a6ffa435f70c1f2b6a9989be8724b0e55e2a1f4e2085000d84eb8131020fae83fa0646b26ddb2345ff74d1759c2124d7830329b0fc09a
7
+ data.tar.gz: 45910cd5bb304b56e3199731e2121600cc482725736f641dbff710a3acc54d986b21b4a68f0a5a2094a7cf582f232509f09e5b75faea420b7ec8588311b188db
@@ -36,15 +36,19 @@ module ActiveSupport
36
36
  rescue NameError => e
37
37
  raise unless e.missing_name? qualified_name_for(parent, const_name)
38
38
  end
39
- # NO CONTROLLER INTERCEPTOR
40
- elsif !!(qualified_name =~ /Controller$/)
41
- return Object.const_set(qualified_name, InvisibleController::Base)
42
39
  end
40
+ activated_name = before_raise_uninitialized_constant(qualified_name)
41
+ return activated_name if activated_name.present?
43
42
  # Continue Rails code
44
43
  name_error = NameError.new("uninitialized constant #{qualified_name}", const_name)
45
44
  name_error.set_backtrace(caller.reject {|l| l.starts_with? __FILE__ })
46
45
  raise name_error
47
46
  end
47
+ def before_raise_uninitialized_constant(qualified_name)
48
+ if !!(qualified_name =~ /Controller$/)
49
+ return Object.const_set(qualified_name, InvisibleController::Base)
50
+ end
51
+ return false
52
+ end
48
53
  end
49
54
  end
50
- # ActiveSupport::Dependencies.send(:include, ActiveSupportExtension)
@@ -1,3 +1,3 @@
1
1
  module InvisibleController
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invisible_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-06 00:00:00.000000000 Z
11
+ date: 2015-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.2.0
170
+ rubygems_version: 2.4.3
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: RESTful api controllers.