getto-roda 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: e4c08b3353b9fdce904e777832cd52dbb4c7a23189d2c992287b389ca428494f
4
- data.tar.gz: 6b2efa2bb3da50fde8f89f2437b4ffff94dde1befe2a9d2e135a87b587003acb
3
+ metadata.gz: 47d7e1b6b302e29484f4e5979060b7bdc1ed64143285067a0ca93ff8483735b9
4
+ data.tar.gz: 57d8ca731f920cb618a6787d573d0322454236455e0e5556b3b135bdee7593b8
5
5
  SHA512:
6
- metadata.gz: b83ae966261808b62e5f3ceed965eea5467cca0163b7432b3d0591b955f5feb5cbe6904cf2f572008a89ae3e656b436a54b20608641fda9eff8d4b3aa3fa8811
7
- data.tar.gz: 136ed50f7898bfff2755787ce4be1e285ee65124ba37edde44ccb21e7ac416f6f2da96212a8ce57e4e3461b0b14e84406981199273752119a1b26e88d48baaa3
6
+ metadata.gz: 0b8fe8dedfc5f6b135a67a13c06aa8919271ba2f4c44891c54b97bb482238c3271796e04fd18e47a8f1f559722d419a8c1095cf12771b473aa6870e8a3abc759
7
+ data.tar.gz: 705a7193eadb15b419146cf55c87ece57e456a09e819e4f4508b0c62960a4be09386c1835073b78bd4c686a0ac509655a3f2d763145afddbea25ed0afb7070fa
@@ -0,0 +1,7 @@
1
+ # Version : 1.1.0
2
+
3
+ add: signature check when EntryPoint.new
4
+
5
+ ## commits
6
+
7
+ * add: signature check when EntryPoint.new
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # Version : 1.1.0
2
+
3
+ add: signature check when EntryPoint.new
4
+
1
5
  # Version : 1.0.0
2
6
 
3
7
  version 1.0.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- getto-roda (1.0.0)
4
+ getto-roda (1.1.0)
5
5
  rack (~> 2.0)
6
6
  tzinfo (~> 1.1)
7
7
 
@@ -33,4 +33,4 @@ DEPENDENCIES
33
33
  simplecov (~> 0.16)
34
34
 
35
35
  BUNDLED WITH
36
- 1.16.2
36
+ 1.16.6
@@ -19,12 +19,30 @@ module Getto
19
19
  @config = config
20
20
  @params = params
21
21
 
22
- @request_logger = request_logger
23
- @exception_notifier = exception_notifier
22
+ @request_logger = check_signature(:request_logger, request_logger, [
23
+ :debug,
24
+ :info,
25
+ :warn,
26
+ :error,
27
+ :fatal,
28
+ ])
29
+ @exception_notifier = check_signature(:exception_notifier, exception_notifier, [
30
+ :notify_exception,
31
+ ])
24
32
 
25
33
  @logger = Getto::Roda::Logger.new
26
34
  end
27
35
 
36
+ private def check_signature(name,obj,methods)
37
+ obj.tap{
38
+ methods.each do |method|
39
+ unless obj.respond_to?(method)
40
+ raise ArgumentError, "argument type error: #{name} is not respond_to #{method}"
41
+ end
42
+ end
43
+ }
44
+ end
45
+
28
46
  attr_reader :error, :time,
29
47
  :app, :request,
30
48
  :config, :params, :account,
@@ -1,5 +1,5 @@
1
1
  module Getto
2
2
  module Roda
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getto-roda
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - shun@getto.systems
@@ -111,6 +111,7 @@ files:
111
111
  - CHANGELOG.md
112
112
  - CHANGELOG/0.2.0.md
113
113
  - CHANGELOG/1.0.0.md
114
+ - CHANGELOG/1.1.0.md
114
115
  - Gemfile
115
116
  - Gemfile.lock
116
117
  - LICENSE