site_hook 0.6.23 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/site_hook/config_class.rb +0 -1
- data/lib/site_hook/server_class.rb +4 -1
- data/lib/site_hook/version.rb +1 -1
- data/lib/site_hook/webhook.rb +4 -3
- data/site_hook.gemspec +3 -4
- metadata +8 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a179e2e28a03138fe1607d9b7a1b7402dcb9a0d6a217c343ba38ae5697b97e19
|
4
|
+
data.tar.gz: e5c47b34f65dc0ab9dfdbc1632869f4654a7ff8386947f237a60cfb84332b871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1cd3c572ea15320ec9e76f7be95d5bf157e9d98f415cfa4e0acc94672aaa036ef0b0e21a57758a2980190f0f0d972e040d21a28ad80eb3b291ccb5be4deb923
|
7
|
+
data.tar.gz: 804b1103f68ab6661391058ba37186a1a75d3922c8e931727ea6a672b047207e307f18e3ee690f0219556096dc462ef97951376f5b1685ba5d02d606d717fae5
|
@@ -9,15 +9,18 @@
|
|
9
9
|
require 'thor'
|
10
10
|
module SiteHook
|
11
11
|
autoload :Webhook, 'site_hook/webhook'
|
12
|
-
|
12
|
+
JPHRC = YAML.load_file(Pathname(Dir.home).join('.jph', 'config'))
|
13
13
|
# *ServerClass*
|
14
14
|
#
|
15
15
|
# Holds all of the commands for the config subcommand
|
16
16
|
class ServerClass < Thor
|
17
17
|
method_option(:log_levels, type: :hash, banner: 'LEVELS', default: SiteHook::Logs.log_levels)
|
18
|
+
method_option :host, type: :string, banner: 'BINDHOST', default: JPHRC.fetch('host', '127.0.0.1')
|
19
|
+
method_option :port, type: :string, banner: 'BINDPORT', default: JPHRC.fetch('port', 9090)
|
18
20
|
desc 'listen', 'Start SiteHook'
|
19
21
|
def listen
|
20
22
|
SiteHook.mklogdir unless SiteHook::Paths.logs.exist?
|
23
|
+
SiteHook::Webhook.set_bind(options[:host], options[:port])
|
21
24
|
SiteHook::Webhook.run!
|
22
25
|
end
|
23
26
|
end
|
data/lib/site_hook/version.rb
CHANGED
data/lib/site_hook/webhook.rb
CHANGED
@@ -15,9 +15,10 @@ module SiteHook
|
|
15
15
|
BUILDLOG = SiteHook::HookLogger::BuildLog.new(SiteHook::Logs.log_levels['build']).log
|
16
16
|
APPLOG = SiteHook::HookLogger::AppLog.new(SiteHook::Logs.log_levels['app']).log
|
17
17
|
JPHRC = YAML.load_file(Pathname(Dir.home).join('.jph', 'config'))
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
def self.set_bind(host, port)
|
19
|
+
self.set port: port
|
20
|
+
self.set bind: host
|
21
|
+
end
|
21
22
|
set server: %w[thin]
|
22
23
|
set quiet: true
|
23
24
|
set raise_errors: true
|
data/site_hook.gemspec
CHANGED
@@ -32,14 +32,13 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_runtime_dependency 'highline', '~> 2.0', '>= 2.0.0'
|
33
33
|
spec.add_runtime_dependency 'logging', '~> 2.2'
|
34
34
|
spec.add_runtime_dependency 'paint', '~> 2.0'
|
35
|
-
spec.add_runtime_dependency 'pry', '~> 0.11'
|
36
35
|
spec.add_runtime_dependency 'random_password', '~> 0.1.1'
|
37
36
|
spec.add_runtime_dependency 'recursive-open-struct', '~> 1.1'
|
38
37
|
spec.add_runtime_dependency 'sass', '~> 3.5'
|
39
|
-
spec.add_runtime_dependency 'sinatra', '~> 2.0.2', '>= 2.0.
|
40
|
-
spec.add_runtime_dependency 'sinatra-contrib', '~> 2.0', '>= 2.0.
|
38
|
+
spec.add_runtime_dependency 'sinatra', '~> 2.0.2', '>= 2.0.5'
|
39
|
+
spec.add_runtime_dependency 'sinatra-contrib', '~> 2.0', '>= 2.0.5'
|
41
40
|
spec.add_runtime_dependency 'thin', '~> 1.7'
|
42
|
-
spec.add_runtime_dependency 'thor', '~> 0.20'
|
41
|
+
spec.add_runtime_dependency 'thor', '~> 0.20.3'
|
43
42
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
44
43
|
spec.add_development_dependency 'rake', '~> 10.0'
|
45
44
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: site_hook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Spencer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -100,20 +100,6 @@ dependencies:
|
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '2.0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: pry
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0.11'
|
110
|
-
type: :runtime
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '0.11'
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
104
|
name: random_password
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,7 +151,7 @@ dependencies:
|
|
165
151
|
version: 2.0.2
|
166
152
|
- - ">="
|
167
153
|
- !ruby/object:Gem::Version
|
168
|
-
version: 2.0.
|
154
|
+
version: 2.0.5
|
169
155
|
type: :runtime
|
170
156
|
prerelease: false
|
171
157
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -175,7 +161,7 @@ dependencies:
|
|
175
161
|
version: 2.0.2
|
176
162
|
- - ">="
|
177
163
|
- !ruby/object:Gem::Version
|
178
|
-
version: 2.0.
|
164
|
+
version: 2.0.5
|
179
165
|
- !ruby/object:Gem::Dependency
|
180
166
|
name: sinatra-contrib
|
181
167
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,7 +171,7 @@ dependencies:
|
|
185
171
|
version: '2.0'
|
186
172
|
- - ">="
|
187
173
|
- !ruby/object:Gem::Version
|
188
|
-
version: 2.0.
|
174
|
+
version: 2.0.5
|
189
175
|
type: :runtime
|
190
176
|
prerelease: false
|
191
177
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -195,7 +181,7 @@ dependencies:
|
|
195
181
|
version: '2.0'
|
196
182
|
- - ">="
|
197
183
|
- !ruby/object:Gem::Version
|
198
|
-
version: 2.0.
|
184
|
+
version: 2.0.5
|
199
185
|
- !ruby/object:Gem::Dependency
|
200
186
|
name: thin
|
201
187
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,14 +202,14 @@ dependencies:
|
|
216
202
|
requirements:
|
217
203
|
- - "~>"
|
218
204
|
- !ruby/object:Gem::Version
|
219
|
-
version:
|
205
|
+
version: 0.20.3
|
220
206
|
type: :runtime
|
221
207
|
prerelease: false
|
222
208
|
version_requirements: !ruby/object:Gem::Requirement
|
223
209
|
requirements:
|
224
210
|
- - "~>"
|
225
211
|
- !ruby/object:Gem::Version
|
226
|
-
version:
|
212
|
+
version: 0.20.3
|
227
213
|
- !ruby/object:Gem::Dependency
|
228
214
|
name: bundler
|
229
215
|
requirement: !ruby/object:Gem::Requirement
|