nucleus-core 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nucleus_core/policy.rb +0 -2
- data/lib/nucleus_core/version.rb +1 -1
- data/lib/nucleus_core.rb +11 -6
- metadata +1 -2
- data/lib/nucleus_core/exceptions.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc1a3b1d1596531ada1d8537243b467070363b551133d8daa5e44503323a104f
|
4
|
+
data.tar.gz: 95251212007f9bf1ee7d2f6df738c4389a885323d85bf2e861cd6260ca8c2be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8325af67543e7de1f5519483a34b90adc0b98ca84a0610604d3e76592410da63fb82fd4eda685518490bc7652dd90ee13038d5f6703039c3e0bdbf03ffe3f59e
|
7
|
+
data.tar.gz: a5e5d5d640253499f4f961aeabc135149522b4b59b2bd42f0fbddac089bc5b184ea4b65c46574f8769720b3cecf655eae8986f351bcb744607a31d815010a9fc
|
data/lib/nucleus_core/policy.rb
CHANGED
data/lib/nucleus_core/version.rb
CHANGED
data/lib/nucleus_core.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require "ostruct"
|
2
2
|
require "json"
|
3
3
|
require "set"
|
4
|
-
require "nucleus_core/exceptions"
|
5
4
|
|
6
5
|
Dir[File.join(__dir__, "nucleus_core", "extensions", "*.rb")].sort.each { |file| require file }
|
7
6
|
|
@@ -18,6 +17,12 @@ module NucleusCore
|
|
18
17
|
autoload :Workflow, "nucleus_core/workflow"
|
19
18
|
autoload :Responder, "nucleus_core/responder"
|
20
19
|
|
20
|
+
class BaseException < StandardError; end
|
21
|
+
class NotAuthorized < BaseException; end
|
22
|
+
class NotFound < BaseException; end
|
23
|
+
class Unprocessable < BaseException; end
|
24
|
+
class BadRequest < BaseException; end
|
25
|
+
|
21
26
|
class Configuration
|
22
27
|
attr_reader :exceptions_map, :response_adapter
|
23
28
|
attr_accessor :logger
|
@@ -67,14 +72,14 @@ module NucleusCore
|
|
67
72
|
].freeze
|
68
73
|
|
69
74
|
def verify_adapter!(adapter)
|
70
|
-
current_adapter_methods = Set[*(adapter.methods - Object.methods)]
|
71
|
-
required_adapter_methods = ADAPTER_METHODS.to_set
|
75
|
+
# current_adapter_methods = Set[*(adapter.methods - Object.methods)]
|
76
|
+
# required_adapter_methods = ADAPTER_METHODS.to_set
|
72
77
|
|
73
|
-
return if current_adapter_methods == required_adapter_methods
|
78
|
+
# return if current_adapter_methods == required_adapter_methods
|
74
79
|
|
75
|
-
missing = current_adapter_methods.subtract(required_adapter_methods)
|
80
|
+
# missing = current_adapter_methods.subtract(required_adapter_methods)
|
76
81
|
|
77
|
-
raise ArgumentError, "responder.adapter must implement: #{missing}"
|
82
|
+
# raise ArgumentError, "responder.adapter must implement: #{missing}"
|
78
83
|
end
|
79
84
|
end
|
80
85
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nucleus-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dodgerogers
|
@@ -151,7 +151,6 @@ files:
|
|
151
151
|
- lib/nucleus_core/aggregate.rb
|
152
152
|
- lib/nucleus_core/basic_object.rb
|
153
153
|
- lib/nucleus_core/cli.rb
|
154
|
-
- lib/nucleus_core/exceptions.rb
|
155
154
|
- lib/nucleus_core/extensions/array.rb
|
156
155
|
- lib/nucleus_core/extensions/rack.rb
|
157
156
|
- lib/nucleus_core/operation.rb
|
@@ -1,5 +0,0 @@
|
|
1
|
-
class NucleusCore::BaseException < StandardError; end
|
2
|
-
class NucleusCore::NotAuthorized < NucleusCore::BaseException; end
|
3
|
-
class NucleusCore::NotFound < NucleusCore::BaseException; end
|
4
|
-
class NucleusCore::Unprocessable < NucleusCore::BaseException; end
|
5
|
-
class NucleusCore::BadRequest < NucleusCore::BaseException; end
|