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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c12a17183a9262372e6697611c9f706a829c28a85b59e9a77aea1cadc0a78ac4
4
- data.tar.gz: fd9f8007fa7f6eab43e021ebe3ccb84bc8f3b2f89cc8de4a71bbd086f19ca713
3
+ metadata.gz: 5587951b8b625ebc0b6ac65e09334d66210c2179984b47692a8a180280ec9cff
4
+ data.tar.gz: e2e61f8262b121851481dc543ea7545fd96bb37e2dec46661b82eabc795ca7ac
5
5
  SHA512:
6
- metadata.gz: 1a1d4b9cec488dfba86e6002690fea1b3dd5bb75cce05fc1a52e3e5c0fae8cafbef4ce0560e8f11acf6339c831ad83588e448f9968113b83b5c2845e3b020863
7
- data.tar.gz: 7abcfde7a82c2c7ecb07e4df914e9947cb507aa58072d181e62db41ae985453230733105afe84e427615149d2d7f3376542d06a0a16b7cb414384b08b281c30c
6
+ metadata.gz: 3071382876981d495e17f87e8f3f48f4d2ec27e9b4e346703a673de52605cb3cd8a78e9a8b5e00a04be30bc7feb4d1679488e43d8855b74f4ddadb2f3aae7b16
7
+ data.tar.gz: 5d3e1ba954c7beeb329deff4e5ed1c34ff7bd619b512b09a8b7b848d116893da2e2313547c8c7955e810e1ebceeaf36abbc4c1f178bbaeb0717af15d6382016a
@@ -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'
@@ -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]
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kashi
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
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.3
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-15 00:00:00.000000000 Z
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