site_hook 0.8.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/.rspec +0 -2
  4. data/.rubocop.yml +2 -0
  5. data/Gemfile +1 -5
  6. data/Rakefile +35 -3
  7. data/bin/site_hook +5 -1
  8. data/features/get_help.feature +3 -0
  9. data/features/step_definitions/get_help_step_definition.rb +1 -0
  10. data/features/step_definitions/my_steps.rb +3 -0
  11. data/features/support/env.rb +1 -0
  12. data/lib/site_hook.rb +2 -28
  13. data/lib/site_hook/cli.rb +22 -39
  14. data/lib/site_hook/commands/config_class.rb +22 -68
  15. data/lib/site_hook/commands/jekyll_class.rb +38 -0
  16. data/lib/site_hook/commands/server_class.rb +38 -34
  17. data/lib/site_hook/config.rb +390 -14
  18. data/lib/site_hook/config_sections.rb +60 -9
  19. data/lib/site_hook/deprecate.rb +34 -11
  20. data/lib/site_hook/env/env.rb +2 -0
  21. data/lib/site_hook/exceptions.rb +26 -2
  22. data/lib/site_hook/log.rb +20 -15
  23. data/lib/site_hook/logger.rb +94 -173
  24. data/lib/site_hook/loggers.rb +10 -0
  25. data/lib/site_hook/loggers/access.rb +20 -0
  26. data/lib/site_hook/loggers/app.rb +78 -0
  27. data/lib/site_hook/loggers/build.rb +77 -0
  28. data/lib/site_hook/loggers/fake.rb +52 -0
  29. data/lib/site_hook/loggers/git.rb +81 -0
  30. data/lib/site_hook/loggers/hook.rb +74 -0
  31. data/lib/site_hook/methods.rb +26 -0
  32. data/lib/site_hook/paths.rb +65 -2
  33. data/lib/site_hook/prelogger.rb +88 -0
  34. data/lib/site_hook/prompt.rb +14 -0
  35. data/lib/site_hook/prompts/prompt_project.rb +48 -0
  36. data/lib/site_hook/runner.rb +36 -0
  37. data/lib/site_hook/sender.rb +4 -9
  38. data/lib/site_hook/string_ext.rb +57 -0
  39. data/lib/site_hook/version.rb +2 -2
  40. data/lib/site_hook/webhook.rb +120 -129
  41. data/site_hook.gemspec +39 -22
  42. data/spec/spec_helper.rb +13 -0
  43. data/spec/string_ext_spec.rb +10 -0
  44. metadata +87 -85
  45. data/CODE_OF_CONDUCT.md +0 -74
  46. data/bin/console +0 -14
  47. data/lib/site_hook/assets/css/styles.css +0 -26
  48. data/lib/site_hook/commands/debug_class.rb +0 -29
  49. data/lib/site_hook/config_sections/cli.rb +0 -24
  50. data/lib/site_hook/config_sections/log_levels.rb +0 -15
  51. data/lib/site_hook/config_sections/projects.rb +0 -22
  52. data/lib/site_hook/const.rb +0 -10
  53. data/lib/site_hook/gem.rb +0 -26
  54. data/lib/site_hook/persist.rb +0 -14
  55. data/lib/site_hook/prompts/gen_config.rb +0 -48
  56. data/lib/site_hook/spinner.rb +0 -19
  57. data/lib/site_hook/views/layout.haml +0 -24
  58. data/lib/site_hook/views/webhooks.haml +0 -7
@@ -1,3 +1,4 @@
1
+ require 'pathname'
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'site_hook/version'
@@ -8,7 +9,7 @@ Gem::Specification.new do |spec|
8
9
  spec.authors = ['Ken Spencer']
9
10
  spec.email = ['me@iotaspencer.me']
10
11
 
11
- spec.summary = %q{Catch a POST request from a git service webhook and build a jekyll site.}
12
+ spec.summary = %q{Catch a POST request from a git service push webhook and build a jekyll site.}
12
13
  spec.homepage = 'https://iotaspencer.me/projects/site_hook/'
13
14
  spec.license = 'MIT'
14
15
  spec.licenses = ['MIT']
@@ -16,31 +17,47 @@ Gem::Specification.new do |spec|
16
17
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
18
  # to allow pushing to a single host or delete this section to allow pushing to any host.
18
19
  spec.metadata = {
19
- 'source_uri' => 'https://github.com/IotaSpencer/site_hook',
20
- 'source_code_uri' => 'https://github.com/IotaSpencer/site_hook',
21
- 'tutorial_uri' => 'https://iotaspencer.me/projects/site_hook/'
20
+ 'source_uri' => 'https://github.com/IotaSpencer/site_hook',
21
+ 'source_code_uri' => 'https://github.com/IotaSpencer/site_hook',
22
+ 'tutorial_uri' => 'https://iotaspencer.me/projects/site_hook/',
23
+ 'documentation_uri' => 'https://iotaspencer.me/projects/site_hook'
24
+
22
25
  }
23
26
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
27
  f.match(%r{^(tests)/})
25
28
  end
26
29
  spec.bindir = 'bin'
27
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
30
+ spec.executables = spec.files.grep(%r{^bin/}) do |f|
31
+ wanted_bins = %w[site_hook]
32
+ File.basename(f) if wanted_bins.include?(Pathname.new(f).basename.to_s)
33
+ end
28
34
  spec.require_paths = ['lib']
29
- spec.add_runtime_dependency 'activesupport', '~> 5.1'
30
- spec.add_runtime_dependency 'git', '~> 1.3'
31
- spec.add_runtime_dependency 'haml', '~> 5.0'
32
- spec.add_runtime_dependency 'highline', '~> 2.0', '>= 2.0.0'
33
- spec.add_runtime_dependency 'logging', '~> 2.2'
34
- spec.add_runtime_dependency 'paint', '~> 2.0'
35
- spec.add_runtime_dependency 'random_password', '~> 0.1.1'
36
- spec.add_runtime_dependency 'recursive-open-struct', '~> 1.1'
37
- spec.add_runtime_dependency 'sinatra', '~> 2.0.2', '>= 2.0.5'
38
- spec.add_runtime_dependency 'sinatra-contrib', '~> 2.0', '>= 2.0.5'
39
- spec.add_runtime_dependency 'thin', '~> 1.7'
40
- spec.add_runtime_dependency 'gli', '~> 2.18.0'
41
- spec.add_development_dependency 'bundler', '~> 1.16'
42
- spec.add_development_dependency 'rake', '~> 10.0'
43
- spec.add_development_dependency 'minitest', '~> 5.11.3'
44
-
45
- spec.post_install_message
35
+ spec.add_dependency 'git', '~> 1.3'
36
+ spec.add_dependency 'highline', '~> 2.0.1'
37
+ spec.add_dependency 'grape', '~> 1.2.3'
38
+ spec.add_dependency 'grape-route-helpers', '~> 2.1'
39
+ spec.add_dependency 'paint', '~> 2.0'
40
+ spec.add_dependency 'puma'
41
+ spec.add_dependency 'random_password', '~> 0.1.1'
42
+ spec.add_dependency 'recursive-open-struct', '~> 1.1'
43
+ spec.add_dependency 'thor', '~> 0.20.3'
44
+ spec.add_dependency 'grape-raketasks'
45
+ spec.add_development_dependency 'rspec', '3.8.0'
46
+ spec.add_development_dependency 'aruba', '~> 0.14.8'
47
+ spec.add_development_dependency 'bundler', '~> 1.16.1', '< 2.0'
48
+ spec.add_development_dependency 'cucumber', '>= 3.1.2'
49
+ spec.add_development_dependency 'pry', '~> 0.12.2'
50
+
51
+
52
+
53
+ spec.post_install_message = <<~POSTINSTALL
54
+ site_hook 0.9.*+ introduces breaking configuration changes!
55
+
56
+ 1) .shrc/config -> root:host and root:port directives should now be located in
57
+ root:webhook:host and root:webhook:port
58
+
59
+ Tutorials on site_hook configuration, installation and setup
60
+ can be seen on https://iotaspencer.me/projects/site_hook
61
+
62
+ POSTINSTALL
46
63
  end
@@ -0,0 +1,13 @@
1
+ require 'rspec'
2
+ require 'rspec/expectations'
3
+
4
+ RSpec.configure do |t|
5
+ t.color = true
6
+ t.libs = ['lib']
7
+ t.expect_with(:rspec) do |c|
8
+ c.syntax = :expect
9
+ end
10
+ t.mock_with(:rspec) do |c|
11
+ c.syntax = :expect
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ require 'site_hook/string_ext'
2
+ require 'spec_helper'
3
+ describe String do
4
+ describe '#underscore' do
5
+ let(:working_string) { 'LogLevels' }
6
+ it 'should return an object with the string underscored' do
7
+ expect(working_string).to respond_to(:underscore)
8
+ end
9
+ end
10
+ end
metadata CHANGED
@@ -1,105 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site_hook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Spencer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-06 00:00:00.000000000 Z
11
+ date: 2019-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport
14
+ name: git
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '5.1'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '5.1'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
- name: git
28
+ name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
33
+ version: 2.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.3'
40
+ version: 2.0.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: haml
42
+ name: grape
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: 1.2.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: 1.2.3
55
55
  - !ruby/object:Gem::Dependency
56
- name: highline
56
+ name: grape-route-helpers
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.0'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 2.0.0
61
+ version: '2.1'
65
62
  type: :runtime
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '2.0'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 2.0.0
68
+ version: '2.1'
75
69
  - !ruby/object:Gem::Dependency
76
- name: logging
70
+ name: paint
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - "~>"
80
74
  - !ruby/object:Gem::Version
81
- version: '2.2'
75
+ version: '2.0'
82
76
  type: :runtime
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: '2.2'
82
+ version: '2.0'
89
83
  - !ruby/object:Gem::Dependency
90
- name: paint
84
+ name: puma
91
85
  requirement: !ruby/object:Gem::Requirement
92
86
  requirements:
93
- - - "~>"
87
+ - - ">="
94
88
  - !ruby/object:Gem::Version
95
- version: '2.0'
89
+ version: '0'
96
90
  type: :runtime
97
91
  prerelease: false
98
92
  version_requirements: !ruby/object:Gem::Requirement
99
93
  requirements:
100
- - - "~>"
94
+ - - ">="
101
95
  - !ruby/object:Gem::Version
102
- version: '2.0'
96
+ version: '0'
103
97
  - !ruby/object:Gem::Dependency
104
98
  name: random_password
105
99
  requirement: !ruby/object:Gem::Requirement
@@ -129,120 +123,113 @@ dependencies:
129
123
  - !ruby/object:Gem::Version
130
124
  version: '1.1'
131
125
  - !ruby/object:Gem::Dependency
132
- name: sinatra
126
+ name: thor
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: 2.0.2
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: 2.0.5
131
+ version: 0.20.3
141
132
  type: :runtime
142
133
  prerelease: false
143
134
  version_requirements: !ruby/object:Gem::Requirement
144
135
  requirements:
145
136
  - - "~>"
146
137
  - !ruby/object:Gem::Version
147
- version: 2.0.2
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: 2.0.5
138
+ version: 0.20.3
151
139
  - !ruby/object:Gem::Dependency
152
- name: sinatra-contrib
140
+ name: grape-raketasks
153
141
  requirement: !ruby/object:Gem::Requirement
154
142
  requirements:
155
- - - "~>"
156
- - !ruby/object:Gem::Version
157
- version: '2.0'
158
143
  - - ">="
159
144
  - !ruby/object:Gem::Version
160
- version: 2.0.5
145
+ version: '0'
161
146
  type: :runtime
162
147
  prerelease: false
163
148
  version_requirements: !ruby/object:Gem::Requirement
164
149
  requirements:
165
- - - "~>"
166
- - !ruby/object:Gem::Version
167
- version: '2.0'
168
150
  - - ">="
169
151
  - !ruby/object:Gem::Version
170
- version: 2.0.5
152
+ version: '0'
171
153
  - !ruby/object:Gem::Dependency
172
- name: thin
154
+ name: rspec
173
155
  requirement: !ruby/object:Gem::Requirement
174
156
  requirements:
175
- - - "~>"
157
+ - - '='
176
158
  - !ruby/object:Gem::Version
177
- version: '1.7'
178
- type: :runtime
159
+ version: 3.8.0
160
+ type: :development
179
161
  prerelease: false
180
162
  version_requirements: !ruby/object:Gem::Requirement
181
163
  requirements:
182
- - - "~>"
164
+ - - '='
183
165
  - !ruby/object:Gem::Version
184
- version: '1.7'
166
+ version: 3.8.0
185
167
  - !ruby/object:Gem::Dependency
186
- name: gli
168
+ name: aruba
187
169
  requirement: !ruby/object:Gem::Requirement
188
170
  requirements:
189
171
  - - "~>"
190
172
  - !ruby/object:Gem::Version
191
- version: 2.18.0
192
- type: :runtime
173
+ version: 0.14.8
174
+ type: :development
193
175
  prerelease: false
194
176
  version_requirements: !ruby/object:Gem::Requirement
195
177
  requirements:
196
178
  - - "~>"
197
179
  - !ruby/object:Gem::Version
198
- version: 2.18.0
180
+ version: 0.14.8
199
181
  - !ruby/object:Gem::Dependency
200
182
  name: bundler
201
183
  requirement: !ruby/object:Gem::Requirement
202
184
  requirements:
203
185
  - - "~>"
204
186
  - !ruby/object:Gem::Version
205
- version: '1.16'
187
+ version: 1.16.1
188
+ - - "<"
189
+ - !ruby/object:Gem::Version
190
+ version: '2.0'
206
191
  type: :development
207
192
  prerelease: false
208
193
  version_requirements: !ruby/object:Gem::Requirement
209
194
  requirements:
210
195
  - - "~>"
211
196
  - !ruby/object:Gem::Version
212
- version: '1.16'
197
+ version: 1.16.1
198
+ - - "<"
199
+ - !ruby/object:Gem::Version
200
+ version: '2.0'
213
201
  - !ruby/object:Gem::Dependency
214
- name: rake
202
+ name: cucumber
215
203
  requirement: !ruby/object:Gem::Requirement
216
204
  requirements:
217
- - - "~>"
205
+ - - ">="
218
206
  - !ruby/object:Gem::Version
219
- version: '10.0'
207
+ version: 3.1.2
220
208
  type: :development
221
209
  prerelease: false
222
210
  version_requirements: !ruby/object:Gem::Requirement
223
211
  requirements:
224
- - - "~>"
212
+ - - ">="
225
213
  - !ruby/object:Gem::Version
226
- version: '10.0'
214
+ version: 3.1.2
227
215
  - !ruby/object:Gem::Dependency
228
- name: minitest
216
+ name: pry
229
217
  requirement: !ruby/object:Gem::Requirement
230
218
  requirements:
231
219
  - - "~>"
232
220
  - !ruby/object:Gem::Version
233
- version: 5.11.3
221
+ version: 0.12.2
234
222
  type: :development
235
223
  prerelease: false
236
224
  version_requirements: !ruby/object:Gem::Requirement
237
225
  requirements:
238
226
  - - "~>"
239
227
  - !ruby/object:Gem::Version
240
- version: 5.11.3
228
+ version: 0.12.2
241
229
  description:
242
230
  email:
243
231
  - me@iotaspencer.me
244
232
  executables:
245
- - console
246
233
  - site_hook
247
234
  extensions: []
248
235
  extra_rdoc_files: []
@@ -251,42 +238,48 @@ files:
251
238
  - ".rspec"
252
239
  - ".rubocop.yml"
253
240
  - ".travis.yml"
254
- - CODE_OF_CONDUCT.md
255
241
  - Gemfile
256
- - Gemfile.lock
257
242
  - LICENSE.txt
258
243
  - README.md
259
244
  - Rakefile
260
- - bin/console
261
245
  - bin/site_hook
246
+ - features/get_help.feature
247
+ - features/step_definitions/get_help_step_definition.rb
248
+ - features/step_definitions/my_steps.rb
249
+ - features/support/env.rb
262
250
  - lib/site_hook.rb
263
- - lib/site_hook/assets/css/styles.css
264
251
  - lib/site_hook/cli.rb
265
252
  - lib/site_hook/commands/config_class.rb
266
- - lib/site_hook/commands/debug_class.rb
253
+ - lib/site_hook/commands/jekyll_class.rb
267
254
  - lib/site_hook/commands/server_class.rb
268
255
  - lib/site_hook/config.rb
269
256
  - lib/site_hook/config_sections.rb
270
- - lib/site_hook/config_sections/cli.rb
271
- - lib/site_hook/config_sections/log_levels.rb
272
- - lib/site_hook/config_sections/projects.rb
273
- - lib/site_hook/const.rb
274
257
  - lib/site_hook/deprecate.rb
258
+ - lib/site_hook/env/env.rb
275
259
  - lib/site_hook/exceptions.rb
276
- - lib/site_hook/gem.rb
277
260
  - lib/site_hook/log.rb
278
261
  - lib/site_hook/logger.rb
262
+ - lib/site_hook/loggers.rb
263
+ - lib/site_hook/loggers/access.rb
264
+ - lib/site_hook/loggers/app.rb
265
+ - lib/site_hook/loggers/build.rb
266
+ - lib/site_hook/loggers/fake.rb
267
+ - lib/site_hook/loggers/git.rb
268
+ - lib/site_hook/loggers/hook.rb
269
+ - lib/site_hook/methods.rb
279
270
  - lib/site_hook/paths.rb
280
- - lib/site_hook/persist.rb
281
- - lib/site_hook/prompts/gen_config.rb
271
+ - lib/site_hook/prelogger.rb
272
+ - lib/site_hook/prompt.rb
273
+ - lib/site_hook/prompts/prompt_project.rb
274
+ - lib/site_hook/runner.rb
282
275
  - lib/site_hook/sender.rb
283
- - lib/site_hook/spinner.rb
276
+ - lib/site_hook/string_ext.rb
284
277
  - lib/site_hook/version.rb
285
- - lib/site_hook/views/layout.haml
286
- - lib/site_hook/views/webhooks.haml
287
278
  - lib/site_hook/webhook.rb
288
279
  - site_hook.gemspec
289
280
  - sonar-project.properties
281
+ - spec/spec_helper.rb
282
+ - spec/string_ext_spec.rb
290
283
  homepage: https://iotaspencer.me/projects/site_hook/
291
284
  licenses:
292
285
  - MIT
@@ -294,7 +287,16 @@ metadata:
294
287
  source_uri: https://github.com/IotaSpencer/site_hook
295
288
  source_code_uri: https://github.com/IotaSpencer/site_hook
296
289
  tutorial_uri: https://iotaspencer.me/projects/site_hook/
297
- post_install_message:
290
+ documentation_uri: https://iotaspencer.me/projects/site_hook
291
+ post_install_message: |2+
292
+ site_hook 0.9.*+ introduces breaking configuration changes!
293
+
294
+ 1) .shrc/config -> root:host and root:port directives should now be located in
295
+ root:webhook:host and root:webhook:port
296
+
297
+ Tutorials on site_hook configuration, installation and setup
298
+ can be seen on https://iotaspencer.me/projects/site_hook
299
+
298
300
  rdoc_options: []
299
301
  require_paths:
300
302
  - lib
@@ -310,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
312
  version: '0'
311
313
  requirements: []
312
314
  rubyforge_project:
313
- rubygems_version: 2.7.6
315
+ rubygems_version: 2.7.6.2
314
316
  signing_key:
315
317
  specification_version: 4
316
- summary: Catch a POST request from a git service webhook and build a jekyll site.
318
+ summary: Catch a POST request from a git service push webhook and build a jekyll site.
317
319
  test_files: []