site_hook 0.9.12 → 0.9.14
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/commands/config_class.rb +7 -3
- data/lib/site_hook/commands/server_class.rb +2 -2
- data/lib/site_hook/config.rb +4 -2
- data/lib/site_hook/paths.rb +3 -1
- data/lib/site_hook/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21410e9adb2efa53d97f8209ccbb05e1811d553b57df13e3abe42a18735dae33
|
4
|
+
data.tar.gz: 27338485f9bf897f8e36d6bc47a972de6cf177d2309891672d931e2715c6b849
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3095f6adc9d4dd8566d37a63fb39d8d124518713aa8dd02d0de133211c7ece4fbea4234961cf3cf340f89289bf08a42bc70b473c4832acc457768e990a671948
|
7
|
+
data.tar.gz: 3ac627ce4eedb364ab105549344f60ddfbbfdd6dc2cb81e63acef310df01cce6c464ee1c8445dd699ac25df01182cbed3ab29fe6acc25ca77674ac7444077815
|
@@ -11,16 +11,20 @@ module SiteHook
|
|
11
11
|
# map ['-v', '--version'] => __version
|
12
12
|
|
13
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:
|
14
|
+
method_option(:output, type: :boolean, default: false, aliases: '-o')
|
15
15
|
def gen
|
16
16
|
unless SiteHook::Paths.default_config.exist?
|
17
17
|
if options[:output] == true
|
18
|
-
|
18
|
+
say SiteHook::ConfigSections.all_samples
|
19
19
|
else
|
20
|
-
File.open(SiteHook::Paths.config, 'w') do |file|
|
20
|
+
File.open(SiteHook::Paths.config, 'w+') do |file|
|
21
21
|
file.puts SiteHook::ConfigSections.all_samples
|
22
22
|
end
|
23
23
|
end
|
24
|
+
else
|
25
|
+
if options[:output] == true
|
26
|
+
say SiteHook::ConfigSections.all_samples
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
end
|
@@ -14,8 +14,8 @@ module SiteHook
|
|
14
14
|
# puts SiteHook::VERSION
|
15
15
|
# end
|
16
16
|
# map ['-v', '--version'] => __version
|
17
|
-
method_option(:host, banner: 'HOST', aliases: ['-h'], type: :string, default: SiteHook::Config.new.webhook.host)
|
18
|
-
method_option(:port, banner: 'PORT', aliases: ['-p'], type: :numeric, default: SiteHook::Config.new.webhook.port)
|
17
|
+
method_option(:host, banner: 'HOST', aliases: ['-h'], type: :string, default: SiteHook::Config.new.class.webhook.host)
|
18
|
+
method_option(:port, banner: 'PORT', aliases: ['-p'], type: :numeric, default: SiteHook::Config.new.class.webhook.port)
|
19
19
|
desc 'listen [options]', ''
|
20
20
|
def listen
|
21
21
|
$threads << Thread.new do
|
data/lib/site_hook/config.rb
CHANGED
@@ -80,9 +80,11 @@ module SiteHook
|
|
80
80
|
@@filename.empty?
|
81
81
|
end
|
82
82
|
rescue NoConfigError
|
83
|
-
SiteHook::Commands::ConfigClass.invoke(
|
83
|
+
#SiteHook::Commands::ConfigClass.invoke()
|
84
|
+
puts SiteHook::Commands::ConfigClass.methods
|
84
85
|
rescue NeitherConfigError
|
85
|
-
SiteHook::Commands::ConfigClass.invoke(:gen)
|
86
|
+
#SiteHook::Commands::ConfigClass.invoke(:gen)
|
87
|
+
puts SiteHook::Commands::ConfigClass.methods
|
86
88
|
end
|
87
89
|
|
88
90
|
# @return [Webhook]
|
data/lib/site_hook/paths.rb
CHANGED
data/lib/site_hook/version.rb
CHANGED