wss_agent 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1b1691d23ca6b013c056d16c86d70b50365d20f
4
- data.tar.gz: c1d898a1afaca2708bb2f625e3ce6855fdfbbdab
3
+ metadata.gz: 553cbb4078181b71510d97b87a24bb5457c7603e
4
+ data.tar.gz: d22f452a74083b7d73ec765f0eaa9ccacdd347aa
5
5
  SHA512:
6
- metadata.gz: 7b72ea144a0098755d8d15296e8d4595c6fdee1776bcffef6fd17ba58ab47de5ea338c42a1b13d718d008bae12250c65a1170d92320721fc025283c08f2640ac
7
- data.tar.gz: 68a267871f382d61cf7c8df7e8fbb6f2125584eca77d80ffa1961e58c0e6a1556dcfea1d3bbffe0a084be393d65abd81e5fc98860f6c6f5c3951450edb1c0659
6
+ metadata.gz: 3ecc3bf2097bf4a806d75a93d91e37de9195951a640797530cca4197f48243e8378c43bb4fd866546cfb20c04b8f2c779fed30df83d8aa0d510cff72b52fe31f
7
+ data.tar.gz: faaacda910ab27219ee65e385ec238dc255811a5fba4ac1bf37a76333444056ea37ab283d196f6f1eb2f46cc565e11cb56c723fc8cea9b396acbc43280566297
data/README.md CHANGED
@@ -52,6 +52,14 @@ $ wss_agent update
52
52
  $ wss_agent check_policies
53
53
  ```
54
54
 
55
+ ### 6) checking all dependencies that they conforms with company policy (force).
56
+ ```bash
57
+ $ wss_agent check_policies -f
58
+ ```
59
+
60
+ or add 'force_check_all_dependencies: true' to 'wss_agent.yml'
61
+
62
+
55
63
  ## Debug
56
64
 
57
65
 
data/lib/wss_agent/cli.rb CHANGED
@@ -31,9 +31,11 @@ module WssAgent
31
31
  method_option :force, type: :boolean, aliases: '-f', desc: 'Force Check All Dependencies'
32
32
  def update
33
33
  WssAgent.enable_debug! if options['verbose']
34
- Specifications.update(options)
34
+ result = Specifications.update(options)
35
+ result.success? ? exit(0) : exit(1)
35
36
  rescue => ex
36
37
  ap ex.message, color: { string: :red }
38
+ abort
37
39
  end
38
40
 
39
41
  desc 'check_policies', 'checking dependencies that they conforms with company policy.'
@@ -41,7 +43,8 @@ module WssAgent
41
43
  method_option :force, type: :boolean, aliases: '-f', desc: 'Force Check All Dependencies'
42
44
  def check_policies
43
45
  WssAgent.enable_debug! if options['verbose']
44
- Specifications.check_policies(options)
46
+ result = Specifications.check_policies(options)
47
+ (result.success? && result.policy_violations?) ? exit(1) : exit(0)
45
48
  end
46
49
 
47
50
  desc 'version', 'Agent version'
@@ -69,7 +69,7 @@ module WssAgent
69
69
  ap "error: #{result.status}/#{result.data}", color: { string: :red }
70
70
  end
71
71
 
72
- result.success?
72
+ result
73
73
  end
74
74
 
75
75
  # checking dependencies that they conforms with company policy.
@@ -88,6 +88,8 @@ module WssAgent
88
88
  WssAgent.logger.debug "check policies errors occur: #{result.status}, message: #{result.message}, data: #{result.data}"
89
89
  ap "error: #{result.status}/#{result.data}", color: { string: :red }
90
90
  end
91
+
92
+ result
91
93
  end
92
94
 
93
95
  # Get all dependencies includes development
@@ -1,4 +1,4 @@
1
1
  module WssAgent
2
- VERSION = '0.0.21'.freeze
2
+ VERSION = '0.0.22'.freeze
3
3
  NAME = 'wss_agent'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wss_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Pechnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-21 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler