tamashii-manager 0.2.7 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tamashii/manager.rb +5 -0
- data/lib/tamashii/manager/config.rb +9 -17
- data/lib/tamashii/manager/version.rb +1 -1
- data/tamashii-manager.gemspec +5 -3
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf25f71c1ff520c1a487f3dcb2962c0921804927
|
4
|
+
data.tar.gz: c4c6b55de3fc32683efd9e48edf25317da2ed96c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae60d3b1dc600e5afc93344d6d1eff496cda687567a552037b35d011c07af1a3da206c8d65ce2bbebbe92dd2f2509bdb843857fe229e31e07ab7b1341032fd33
|
7
|
+
data.tar.gz: 83238ccbf27e58d212a659db7e4c4dfb60d88a8a1c2d92370827beb992b15b806859a7000568ccfc69612e49ab2098d369794437cb7f408a08724074082d977c
|
data/lib/tamashii/manager.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'tamashii/server'
|
4
4
|
require 'tamashii/common'
|
5
|
+
require 'tamashii/hookable'
|
5
6
|
require 'tamashii/manager/version'
|
6
7
|
|
7
8
|
require 'tamashii/manager/subscription'
|
@@ -39,3 +40,7 @@ end
|
|
39
40
|
Tamashii::Resolver.default_handler Tamashii::Manager::Handler::Broadcaster
|
40
41
|
Tamashii::Resolver.handle Tamashii::Type::AUTH_TOKEN, Tamashii::Manager::Authorization
|
41
42
|
# rubocop:enable Metrics/LineLength
|
43
|
+
|
44
|
+
Tamashii::Hook.after(:config) do |config|
|
45
|
+
config.register(:manager, Tamashii::Manager.config)
|
46
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'tamashii/common'
|
4
|
-
require 'tamashii/
|
4
|
+
require 'tamashii/config'
|
5
5
|
|
6
6
|
module Tamashii
|
7
7
|
module Manager
|
@@ -18,7 +18,7 @@ module Tamashii
|
|
18
18
|
|
19
19
|
def method_missing(name, *args, &block)
|
20
20
|
# rubocop:disable Metrics/LineLength
|
21
|
-
return instance.send(name, *args, &block) if instance.
|
21
|
+
return instance.send(name, *args, &block) if instance.respond_to?(name)
|
22
22
|
# rubocop:enable Metrics/LineLength
|
23
23
|
super
|
24
24
|
end
|
@@ -28,21 +28,13 @@ module Tamashii
|
|
28
28
|
|
29
29
|
AUTH_TYPES = %i[none token].freeze
|
30
30
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
def [](key)
|
40
|
-
config(key)
|
41
|
-
end
|
42
|
-
|
43
|
-
def []=(key, value)
|
44
|
-
config(key, value)
|
45
|
-
end
|
31
|
+
config :auth_type, default: :none
|
32
|
+
config :token, default: nil
|
33
|
+
config :log_file, default: STDOUT
|
34
|
+
config :log_level, default: Logger::INFO
|
35
|
+
config :env, default: nil
|
36
|
+
config :heartbeat_interval, default: 3
|
37
|
+
config :port, default: 3000
|
46
38
|
|
47
39
|
def auth_type(type = nil)
|
48
40
|
return self[:auth_type] if type.nil?
|
data/tamashii-manager.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'tamashii/manager/version'
|
@@ -32,8 +33,9 @@ Gem::Specification.new do |spec|
|
|
32
33
|
spec.add_runtime_dependency "puma"
|
33
34
|
spec.add_runtime_dependency "concurrent-ruby"
|
34
35
|
spec.add_runtime_dependency "rack"
|
35
|
-
spec.add_runtime_dependency "tamashii"
|
36
|
-
spec.add_runtime_dependency "tamashii-common"
|
36
|
+
spec.add_runtime_dependency "tamashii", ">= 0.4"
|
37
|
+
spec.add_runtime_dependency "tamashii-common", ">= 0.2"
|
38
|
+
spec.add_runtime_dependency "tamashii-config"
|
37
39
|
spec.add_runtime_dependency "websocket-driver"
|
38
40
|
spec.add_runtime_dependency "nio4r"
|
39
41
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tamashii-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 蒼時弦也
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-11-
|
13
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: puma
|
@@ -60,16 +60,30 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
63
|
+
version: '0.4'
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '0'
|
70
|
+
version: '0.4'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: tamashii-common
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0.2'
|
78
|
+
type: :runtime
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0.2'
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: tamashii-config
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
74
88
|
requirements:
|
75
89
|
- - ">="
|