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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e3cd12cedea4db76fbe115fc985f16b51990ed5fa1a25955af6e83b747836bd
4
- data.tar.gz: d82255e6bfda16ed80a5bfe8307784eca30e0996fbfcfe7f44c6d13dc42bf3fb
3
+ metadata.gz: a179e2e28a03138fe1607d9b7a1b7402dcb9a0d6a217c343ba38ae5697b97e19
4
+ data.tar.gz: e5c47b34f65dc0ab9dfdbc1632869f4654a7ff8386947f237a60cfb84332b871
5
5
  SHA512:
6
- metadata.gz: 2ee18dd2e559600a6b064d4e9dafc7cec34e5cf0607c505ab35085fc15f30d041c85a859071b19978e7dae61ab3113e38110cff014de96c93b2e81d1041250d9
7
- data.tar.gz: a2b904c7bb385c7d37365d26fa9d18c39452719b319d0c1e7bb1df9755241b9bc638179b30cbd46f0b6748a4f32754245fbdab0f049b327c8785d85b52ef8aa8
6
+ metadata.gz: c1cd3c572ea15320ec9e76f7be95d5bf157e9d98f415cfa4e0acc94672aaa036ef0b0e21a57758a2980190f0f0d972e040d21a28ad80eb3b291ccb5be4deb923
7
+ data.tar.gz: 804b1103f68ab6661391058ba37186a1a75d3922c8e931727ea6a672b047207e307f18e3ee690f0219556096dc462ef97951376f5b1685ba5d02d606d717fae5
@@ -3,7 +3,6 @@ require 'highline'
3
3
  require 'random_password'
4
4
  require 'yaml'
5
5
  require 'recursive-open-struct'
6
- require 'pry'
7
6
  module SiteHook
8
7
  class FileExistsError < Exception
9
8
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SiteHook
2
- VERSION = "0.6.23"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -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
- set port: JPHRC.fetch('port', 9090)
20
- set bind: '127.0.0.1'
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
@@ -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.2'
40
- spec.add_runtime_dependency 'sinatra-contrib', '~> 2.0', '>= 2.0.2'
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.6.23
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: 2018-11-15 00:00:00.000000000 Z
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.2
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.2
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.2
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.2
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: '0.20'
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: '0.20'
212
+ version: 0.20.3
227
213
  - !ruby/object:Gem::Dependency
228
214
  name: bundler
229
215
  requirement: !ruby/object:Gem::Requirement