site_hook 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.rspec +0 -0
- data/.rubocop.yml +0 -0
- data/.travis.yml +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/features/get_help.feature +0 -0
- data/features/step_definitions/get_help_step_definition.rb +0 -0
- data/features/step_definitions/my_steps.rb +0 -0
- data/features/support/env.rb +0 -0
- data/lib/site_hook.rb +0 -0
- data/lib/site_hook/cli.rb +0 -0
- data/lib/site_hook/commands/config_class.rb +10 -4
- data/lib/site_hook/commands/jekyll_class.rb +0 -0
- data/lib/site_hook/commands/server_class.rb +0 -0
- data/lib/site_hook/config.rb +0 -0
- data/lib/site_hook/config_sections.rb +0 -0
- data/lib/site_hook/deprecate.rb +0 -0
- data/lib/site_hook/env/env.rb +0 -0
- data/lib/site_hook/exceptions.rb +0 -0
- data/lib/site_hook/log.rb +0 -0
- data/lib/site_hook/logger.rb +0 -0
- data/lib/site_hook/loggers.rb +0 -0
- data/lib/site_hook/loggers/access.rb +0 -0
- data/lib/site_hook/loggers/app.rb +0 -0
- data/lib/site_hook/loggers/build.rb +0 -0
- data/lib/site_hook/loggers/fake.rb +0 -0
- data/lib/site_hook/loggers/git.rb +0 -0
- data/lib/site_hook/loggers/hook.rb +0 -0
- data/lib/site_hook/methods.rb +0 -0
- data/lib/site_hook/paths.rb +21 -13
- data/lib/site_hook/prelogger.rb +0 -0
- data/lib/site_hook/prompt.rb +0 -0
- data/lib/site_hook/prompts/prompt_project.rb +0 -0
- data/lib/site_hook/runner.rb +0 -0
- data/lib/site_hook/sender.rb +0 -0
- data/lib/site_hook/string_ext.rb +0 -0
- data/lib/site_hook/version.rb +1 -1
- data/lib/site_hook/webhook.rb +0 -0
- data/site_hook.gemspec +0 -0
- data/sonar-project.properties +0 -0
- data/spec/spec_helper.rb +0 -0
- data/spec/string_ext_spec.rb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df7ac78096b79b21f4820c3bf45ae803cba852e1de713631e915d1dfb783ca30
|
4
|
+
data.tar.gz: 0affd937fdab4e2993ac1732b4647fd0d35ce4dc67ac8e56f5f29604c3db303f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57d4090ea3292daea27c45d250d4fdb1fc050d6c2e3c17a66e577b3aefc7ced81568421de9d20db54c98b98ec74b28ae5fb53deb28b6f2275643fa168ab02a65
|
7
|
+
data.tar.gz: 42249cef8dc434780768db032e273542ccb6cf1dc2811e0d01c64d930898bc3491deb99f36af565d76b36e5e35de57f2718eb0fea4a13cd45ac4644d1bc372a0
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
File without changes
|
data/.rubocop.yml
CHANGED
File without changes
|
data/.travis.yml
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/features/get_help.feature
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/features/support/env.rb
CHANGED
File without changes
|
data/lib/site_hook.rb
CHANGED
File without changes
|
data/lib/site_hook/cli.rb
CHANGED
File without changes
|
@@ -10,11 +10,17 @@ module SiteHook
|
|
10
10
|
# end
|
11
11
|
# map ['-v', '--version'] => __version
|
12
12
|
|
13
|
-
desc 'gen [
|
14
|
-
|
13
|
+
desc 'gen [-o]', 'generate a sample config, -o will output to STDOUT instead of to the default config location'
|
14
|
+
method_option(:output, type: :boolean, aliases: ['-o'], default: false)
|
15
15
|
def gen
|
16
|
-
|
17
|
-
|
16
|
+
unless SiteHook::Paths.default_config.exist?
|
17
|
+
if options[:output] == true
|
18
|
+
puts SiteHook::ConfigSections.all_samples
|
19
|
+
else
|
20
|
+
File.open(SiteHook::Paths.config, 'w') do |file|
|
21
|
+
file.puts SiteHook::ConfigSections.all_samples
|
22
|
+
end
|
23
|
+
end
|
18
24
|
end
|
19
25
|
|
20
26
|
end
|
File without changes
|
File without changes
|
data/lib/site_hook/config.rb
CHANGED
File without changes
|
File without changes
|
data/lib/site_hook/deprecate.rb
CHANGED
File without changes
|
data/lib/site_hook/env/env.rb
CHANGED
File without changes
|
data/lib/site_hook/exceptions.rb
CHANGED
File without changes
|
data/lib/site_hook/log.rb
CHANGED
File without changes
|
data/lib/site_hook/logger.rb
CHANGED
File without changes
|
data/lib/site_hook/loggers.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/site_hook/methods.rb
CHANGED
File without changes
|
data/lib/site_hook/paths.rb
CHANGED
@@ -33,27 +33,35 @@ module SiteHook
|
|
33
33
|
end
|
34
34
|
def self.default_config(old_exists = self.old_config.exist?, new_exists = self.config.exist?)
|
35
35
|
path = ''
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
if new_exists
|
40
|
-
path = self.config
|
36
|
+
begin
|
37
|
+
if old_exists
|
38
|
+
path = self.old_config
|
41
39
|
else
|
42
|
-
|
40
|
+
if new_exists
|
41
|
+
path = self.config
|
42
|
+
else
|
43
|
+
raise SiteHook::NeitherConfigError.new path
|
44
|
+
end
|
43
45
|
end
|
46
|
+
rescue SiteHook::NeitherConfigError
|
47
|
+
path = self.config
|
44
48
|
end
|
45
49
|
path
|
46
50
|
end
|
47
51
|
def self.default_logs(old_exists = self.old_logs.exist?, new_exists = self.logs.exist?)
|
48
52
|
path = ''
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
if new_exists
|
53
|
-
path = self.logs
|
53
|
+
begin
|
54
|
+
if old_exists
|
55
|
+
path = self.old_logs
|
54
56
|
else
|
55
|
-
|
57
|
+
if new_exists
|
58
|
+
path = self.logs
|
59
|
+
else
|
60
|
+
raise SiteHook::NoLogsError.new path
|
61
|
+
end
|
56
62
|
end
|
63
|
+
rescue SiteHook::NoLogsError
|
64
|
+
path = self.logs
|
57
65
|
end
|
58
66
|
path
|
59
67
|
end
|
@@ -79,7 +87,7 @@ module SiteHook
|
|
79
87
|
self.logs.join("#{klass.to_s.safe_log_name}#{level}.log")
|
80
88
|
else
|
81
89
|
path ||= SiteHook::Paths.logs
|
82
|
-
raise SiteHook::NoLogsError path
|
90
|
+
raise SiteHook::NoLogsError.new path
|
83
91
|
end
|
84
92
|
|
85
93
|
end
|
data/lib/site_hook/prelogger.rb
CHANGED
File without changes
|
data/lib/site_hook/prompt.rb
CHANGED
File without changes
|
File without changes
|
data/lib/site_hook/runner.rb
CHANGED
File without changes
|
data/lib/site_hook/sender.rb
CHANGED
File without changes
|
data/lib/site_hook/string_ext.rb
CHANGED
File without changes
|
data/lib/site_hook/version.rb
CHANGED
data/lib/site_hook/webhook.rb
CHANGED
File without changes
|
data/site_hook.gemspec
CHANGED
File without changes
|
data/sonar-project.properties
CHANGED
File without changes
|
data/spec/spec_helper.rb
CHANGED
File without changes
|
data/spec/string_ext_spec.rb
CHANGED
File without changes
|
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.9.
|
4
|
+
version: 0.9.5
|
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-
|
11
|
+
date: 2019-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
314
|
rubyforge_project:
|
315
|
-
rubygems_version: 2.7.6
|
315
|
+
rubygems_version: 2.7.6
|
316
316
|
signing_key:
|
317
317
|
specification_version: 4
|
318
318
|
summary: Catch a POST request from a git service push webhook and build a jekyll site.
|