conjur-asset-trial-factory 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.conjurrc +2 -0
- data/CHANGELOG.md +4 -0
- data/README.md +2 -2
- data/lib/conjur-asset-trial-factory-version.rb +1 -1
- data/lib/conjur/command/trial_factories.rb +26 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5c9264a9b78cb609a9f16e5ca6ac2b50ee187da
|
4
|
+
data.tar.gz: e9d1b464d490ca361050b824e8ba47715d9555e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a19b84a5afe9be824f135ddf3c6b44e98489fd0dc6469511c78175995a4d97ae422bd241524474c137bed5d458ea9b3cc71aed43aa242a970bad8a260f2d87a1
|
7
|
+
data.tar.gz: eb4b2d71b6f936325ba41d1ed0394333d14c953689e5f42a12cbdcdcff6bb265774b00b56fb7b957775925db246a98b77d1b8a926919c9ba32a92d033fed16a3
|
data/.conjurrc
CHANGED
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -42,9 +42,33 @@ class Conjur::Command::TrialFactories < Conjur::Command
|
|
42
42
|
trials.desc 'List trials'
|
43
43
|
trials.command "list" do |c|
|
44
44
|
c.action do |global_options,options,args|
|
45
|
-
api.trials
|
46
|
-
|
45
|
+
puts JSON.pretty_generate(api.trials)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
trials.desc 'Show trials which are at least 30 days old, and have no activity'
|
50
|
+
trials.command "stale" do |c|
|
51
|
+
c.action do |global_options,options,args|
|
52
|
+
require 'time'
|
53
|
+
ago = Time.now - 30.days
|
54
|
+
trials = api.trials
|
55
|
+
found = 0
|
56
|
+
puts "[\n"
|
57
|
+
trials.each do |t|
|
58
|
+
account = t.attributes['account']
|
59
|
+
contact = t.attributes['contact']
|
60
|
+
info = api.trial(account, short: true)
|
61
|
+
launch_time = Time.parse(info.attributes['instance']['launch_time'])
|
62
|
+
if launch_time < ago && info.attributes['activity']['count'] == 0
|
63
|
+
if found != 0
|
64
|
+
$stdout.write ",\n"
|
65
|
+
end
|
66
|
+
$stdout.write " "
|
67
|
+
$stdout.write JSON.generate([ account, contact ])
|
68
|
+
found += 1
|
69
|
+
end
|
47
70
|
end
|
71
|
+
puts "\n]"
|
48
72
|
end
|
49
73
|
end
|
50
74
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conjur-asset-trial-factory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Gilpin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- .conjurrc
|
105
105
|
- .gitignore
|
106
106
|
- .project
|
107
|
+
- CHANGELOG.md
|
107
108
|
- Gemfile
|
108
109
|
- LICENSE.txt
|
109
110
|
- README.md
|