kashi 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kashi.gemspec +1 -0
- data/lib/kashi/client.rb +3 -2
- data/lib/kashi/dsl/contact_group.rb +3 -2
- data/lib/kashi/dsl/test.rb +3 -2
- data/lib/kashi/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5587951b8b625ebc0b6ac65e09334d66210c2179984b47692a8a180280ec9cff
|
4
|
+
data.tar.gz: e2e61f8262b121851481dc543ea7545fd96bb37e2dec46661b82eabc795ca7ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3071382876981d495e17f87e8f3f48f4d2ec27e9b4e346703a673de52605cb3cd8a78e9a8b5e00a04be30bc7feb4d1679488e43d8855b74f4ddadb2f3aae7b16
|
7
|
+
data.tar.gz: 5d3e1ba954c7beeb329deff4e5ed1c34ff7bd619b512b09a8b7b848d116893da2e2313547c8c7955e810e1ebceeaf36abbc4c1f178bbaeb0717af15d6382016a
|
data/kashi.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency 'statuscake', '~> 0.1.2'
|
25
25
|
spec.add_dependency 'hashie', '~> 3.5', '>= 3.5.5'
|
26
26
|
spec.add_dependency 'diffy', '~> 3.2', '>= 3.2.0'
|
27
|
+
spec.add_dependency 'colorize', '>= 0.8.1'
|
27
28
|
|
28
29
|
spec.add_development_dependency 'bundler', '~> 1.14'
|
29
30
|
spec.add_development_dependency 'rake', '~> 10.0'
|
data/lib/kashi/client.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'colorize'
|
1
2
|
require 'json'
|
2
3
|
require 'kashi'
|
3
4
|
require 'kashi/converter'
|
@@ -47,7 +48,7 @@ module Kashi
|
|
47
48
|
# delete
|
48
49
|
sc_contact_groups_by_name.each do |name, sc_contact_groups|
|
49
50
|
sc_contact_groups.each do |sc_contact_group|
|
50
|
-
Kashi.logger.info("Delete ContactGroup `#{name}` #{sc_contact_group['ContactID']}")
|
51
|
+
Kashi.logger.info("Delete ContactGroup `#{name}` #{sc_contact_group['ContactID']}".colorize(:red))
|
51
52
|
next if @options[:dry_run]
|
52
53
|
client.contactgroups_update(method: :delete, ContactID: sc_contact_group['ContactID'])
|
53
54
|
end
|
@@ -96,7 +97,7 @@ module Kashi
|
|
96
97
|
# delete
|
97
98
|
sc_tests_by_name.each do |name, sc_tests|
|
98
99
|
sc_tests.each do |sc_test|
|
99
|
-
Kashi.logger.info("Delete Test `#{name}` #{sc_test['TestID']}")
|
100
|
+
Kashi.logger.info("Delete Test `#{name}` #{sc_test['TestID']}".colorize(:red))
|
100
101
|
next if @options[:dry_run]
|
101
102
|
client.tests_details(method: :delete, TestID: sc_test['TestID'])
|
102
103
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'colorize'
|
1
2
|
require 'kashi/utils'
|
2
3
|
require 'kashi/client_wrapper'
|
3
4
|
|
@@ -36,7 +37,7 @@ module Kashi
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def create
|
39
|
-
Kashi.logger.info("Create ContactGroup `#{group_name}`")
|
40
|
+
Kashi.logger.info("Create ContactGroup `#{group_name}`".colorize(:green))
|
40
41
|
Kashi.logger.debug(create_params)
|
41
42
|
return { 'Success' => true } if @options[:dry_run]
|
42
43
|
|
@@ -69,7 +70,7 @@ module Kashi
|
|
69
70
|
|
70
71
|
def modify
|
71
72
|
return unless updated?
|
72
|
-
Kashi.logger.info("Modify ContactGroup `#{group_name}` #{contact_id}")
|
73
|
+
Kashi.logger.info("Modify ContactGroup `#{group_name}` #{contact_id}".colorize(:blue))
|
73
74
|
Kashi.logger.info("<diff>\n#{Kashi::Utils.diff(sc_hash, dsl_hash, color: @options[:color])}")
|
74
75
|
Kashi.logger.debug(modify_params)
|
75
76
|
return if @options[:dry_run]
|
data/lib/kashi/dsl/test.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'colorize'
|
1
2
|
require 'ostruct'
|
2
3
|
require 'kashi/secret_expander'
|
3
4
|
|
@@ -53,7 +54,7 @@ module Kashi
|
|
53
54
|
end
|
54
55
|
|
55
56
|
def create
|
56
|
-
Kashi.logger.info("Create Test `#{website_name}`")
|
57
|
+
Kashi.logger.info("Create Test `#{website_name}`".colorize(:green))
|
57
58
|
Kashi.logger.debug(create_params)
|
58
59
|
return { 'Success' => true } if @options[:dry_run]
|
59
60
|
|
@@ -104,7 +105,7 @@ module Kashi
|
|
104
105
|
|
105
106
|
def modify
|
106
107
|
return unless updated?
|
107
|
-
Kashi.logger.info("Modify Test `#{website_name}` #{test_id}")
|
108
|
+
Kashi.logger.info("Modify Test `#{website_name}` #{test_id}".colorize(:blue))
|
108
109
|
masked_dsl_has = dsl_hash.dup.tap do |h|
|
109
110
|
h[:basic_pass] = '****' if h[:basic_pass] != ''
|
110
111
|
end
|
data/lib/kashi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kashi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- wata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: statuscake
|
@@ -64,6 +64,20 @@ dependencies:
|
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 3.2.0
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: colorize
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.8.1
|
74
|
+
type: :runtime
|
75
|
+
prerelease: false
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 0.8.1
|
67
81
|
- !ruby/object:Gem::Dependency
|
68
82
|
name: bundler
|
69
83
|
requirement: !ruby/object:Gem::Requirement
|