quiverstaskrunner 0.1.254591 → 0.1.255291
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d06ba6f79d13410042b954d5225d08ff96b5bd2
|
4
|
+
data.tar.gz: 1a84578e6b1df1c96906186a14983cf43870d0c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91c586ec0bef28ccb2f73c99b0e53ad8f16c172dfecebe3e3ee9a9cd252ed280c8b9da1a3893b944073ec43cdddf962152866301458b82ff680a3f451a57de9e
|
7
|
+
data.tar.gz: ba9f9990ce05beb9e2a4a3c19dba04fbe1f30c8b824e6b4befcd540652b60171624bb435ce5a4c66ab6c07dde0cd09471516b2e1485399d10bfea24d345b7274
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require "yaml"
|
2
2
|
require "erb"
|
3
3
|
require "quiverstaskrunner/helpers/envhelper"
|
4
|
+
require "quiverstaskrunner/helpers/clihelper"
|
4
5
|
require 'colorize'
|
5
6
|
|
6
7
|
module QuiversTaskrunner
|
@@ -8,7 +9,7 @@ module QuiversTaskrunner
|
|
8
9
|
module_function
|
9
10
|
|
10
11
|
def get_settings(filepath, env={}, options={})
|
11
|
-
verbose = (defined? ARGV) && (!ARGV.nil?) && (!ARGV.empty?) && (ARGV.detect { |x| x == "-
|
12
|
+
verbose = (defined? ARGV) && (!ARGV.nil?) && (!ARGV.empty?) && (ARGV.detect { |x| x == "-v" })
|
12
13
|
environment = env.is_a?(Hash) ? "defaults" : env
|
13
14
|
file_contents = open(filepath).read
|
14
15
|
YAML.load(ERB.new(file_contents).result).to_hash
|
@@ -16,12 +17,12 @@ module QuiversTaskrunner
|
|
16
17
|
settings = all_settings[environment]
|
17
18
|
if verbose
|
18
19
|
puts "settings for the '#{filepath}' file and the '#{environment}' environment:".colorize(:yellow)
|
19
|
-
puts settings
|
20
|
+
puts CliHelper.pretty_print(settings)
|
20
21
|
end
|
21
22
|
injected_settings = SettingsHelper.get_cli_settings(options)
|
22
23
|
if verbose
|
23
24
|
puts "Injected settings from the CLI:".colorize(:yellow)
|
24
|
-
puts injected_settings
|
25
|
+
puts CliHelper.pretty_print(injected_settings)
|
25
26
|
end
|
26
27
|
|
27
28
|
final_settings =
|
@@ -41,7 +42,7 @@ module QuiversTaskrunner
|
|
41
42
|
|
42
43
|
def get_cli_settings(options={})
|
43
44
|
# Returns a Hash
|
44
|
-
verbose = (defined? ARGV) && (!ARGV.nil?) && (!ARGV.empty?) && (ARGV.detect { |x| x == "-
|
45
|
+
verbose = (defined? ARGV) && (!ARGV.nil?) && (!ARGV.empty?) && (ARGV.detect { |x| x == "-v" })
|
45
46
|
if verbose
|
46
47
|
puts "ARGV:".colorize(:yellow)
|
47
48
|
puts ARGV
|
@@ -1 +1 @@
|
|
1
|
-
module QuiversTaskrunner
|
1
|
+
module QuiversTaskrunner
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quiverstaskrunner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.255291
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ndao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|