bosh_lastpass_plugin 0.0.1 → 0.0.2

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: 78058666c781ba55b6a4522ee8e52b6c2071727e
4
- data.tar.gz: 6c91a3c50f4e36433377c6c6e96d651b389370b2
3
+ metadata.gz: 2872c5fde954a575b351c1e29c56cb96c1abcd21
4
+ data.tar.gz: db8b0f976e2e9c1344ec114afb2d28b00a111c86
5
5
  SHA512:
6
- metadata.gz: b38dd5d8b6ac83902834b657be139854587fe156f6d697d87f4dd90237a63d8ea96508e3579f33c02d563e8815deba8834d8b3b6da2cbe867d94c4349d57b3ef
7
- data.tar.gz: 29d6d3dafe80c07e51dfe252df1d5480172e78e487155b7b7f299014eb946f81dfe1eb2660522f09884d85a1d254f99e8afb07f7ee74dd881cf205337e8ada25
6
+ metadata.gz: 112dca7a6d9c18f3e19136353774f29929df083fa09001cbd871b367e1967d161a4717ebef0b92a33ba01c9873b741e9070b3c54b304a825c0ad35935c79cfb0
7
+ data.tar.gz: ab76e409bb92901ecd79334c0abd05caec570520dad31ed0fd4ab295daee2a8b7f05f299d8f972dd89265b854c2def127435d5b1f5f57ec80c6c298e45f55b48
data/Gemfile.lock ADDED
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ bosh_lastpass_plugin (0.0.1)
5
+ bosh_cli (>= 1.2682.0)
6
+ bosh_common (>= 1.2682.0)
7
+ git (~> 1.2.6)
8
+ membrane (~> 1.1.0)
9
+ semi_semantic (~> 1.1.0)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ ast (2.2.0)
15
+ aws-sdk-core (2.2.0)
16
+ jmespath (~> 1.0)
17
+ aws-sdk-resources (2.2.0)
18
+ aws-sdk-core (= 2.2.0)
19
+ blobstore_client (1.3232.0)
20
+ aws-sdk-resources (= 2.2.0)
21
+ bosh_common (~> 1.3232.0)
22
+ httpclient (= 2.7.1)
23
+ multi_json (~> 1.1)
24
+ bosh-template (1.3232.0)
25
+ semi_semantic (~> 1.1.0)
26
+ bosh_cli (1.3232.0)
27
+ blobstore_client (~> 1.3232.0)
28
+ bosh-template (~> 1.3232.0)
29
+ bosh_common (~> 1.3232.0)
30
+ cf-uaa-lib (~> 3.2.1)
31
+ highline (~> 1.6.2)
32
+ httpclient (= 2.7.1)
33
+ json_pure (~> 1.7)
34
+ minitar (~> 0.5.4)
35
+ net-scp (~> 1.1.0)
36
+ net-ssh (= 2.9.2)
37
+ net-ssh-gateway (~> 1.2.0)
38
+ netaddr (~> 1.5.0)
39
+ progressbar (~> 0.9.0)
40
+ sshkey (~> 1.7.0)
41
+ terminal-table (~> 1.4.3)
42
+ bosh_common (1.3232.0)
43
+ logging (~> 1.8.2)
44
+ semi_semantic (~> 1.1.0)
45
+ cf-uaa-lib (3.2.5)
46
+ multi_json
47
+ diff-lcs (1.2.5)
48
+ git (1.2.9.1)
49
+ highline (1.6.21)
50
+ httpclient (2.7.1)
51
+ jmespath (1.2.4)
52
+ json_pure (>= 1.8.1)
53
+ json_pure (1.8.3)
54
+ little-plugger (1.1.4)
55
+ logging (1.8.2)
56
+ little-plugger (>= 1.1.3)
57
+ multi_json (>= 1.8.4)
58
+ membrane (1.1.0)
59
+ minitar (0.5.4)
60
+ multi_json (1.12.0)
61
+ net-scp (1.1.2)
62
+ net-ssh (>= 2.6.5)
63
+ net-ssh (2.9.2)
64
+ net-ssh-gateway (1.2.0)
65
+ net-ssh (>= 2.6.5)
66
+ netaddr (1.5.1)
67
+ parser (2.3.1.0)
68
+ ast (~> 2.2)
69
+ powerpack (0.1.1)
70
+ progressbar (0.9.2)
71
+ rainbow (2.1.0)
72
+ rake (11.1.2)
73
+ rspec (3.1.0)
74
+ rspec-core (~> 3.1.0)
75
+ rspec-expectations (~> 3.1.0)
76
+ rspec-mocks (~> 3.1.0)
77
+ rspec-core (3.1.7)
78
+ rspec-support (~> 3.1.0)
79
+ rspec-expectations (3.1.2)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.1.0)
82
+ rspec-its (1.1.0)
83
+ rspec-core (>= 3.0.0)
84
+ rspec-expectations (>= 3.0.0)
85
+ rspec-mocks (3.1.3)
86
+ rspec-support (~> 3.1.0)
87
+ rspec-support (3.1.2)
88
+ rubocop (0.40.0)
89
+ parser (>= 2.3.1.0, < 3.0)
90
+ powerpack (~> 0.1)
91
+ rainbow (>= 1.99.1, < 3.0)
92
+ ruby-progressbar (~> 1.7)
93
+ unicode-display_width (~> 1.0, >= 1.0.1)
94
+ ruby-progressbar (1.8.1)
95
+ semi_semantic (1.1.0)
96
+ sshkey (1.7.0)
97
+ terminal-table (1.4.5)
98
+ unicode-display_width (1.0.5)
99
+
100
+ PLATFORMS
101
+ ruby
102
+
103
+ DEPENDENCIES
104
+ bosh_lastpass_plugin!
105
+ bundler (~> 1.6)
106
+ rake
107
+ rspec (~> 3.1.0)
108
+ rspec-its (~> 1.1.0)
109
+ rubocop
110
+
111
+ BUNDLED WITH
112
+ 1.11.2
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bosh lastpass plugin
2
2
 
3
- Short description.
3
+ Store bosh secrets in lastpass instead of the manifest.
4
4
 
5
5
  ## What is BOSH?
6
6
  BOSH orchestrates initial deployments and ongoing updates that are: predictable, repeatable, reliable, self-healing, infrastructure-agnostic. You can take a look on [BOSH project on GitHub](https://github.com/cloudfoundry/bosh) and read more details in [docs](http://docs.cloudfoundry.org/bosh/).
@@ -10,6 +10,8 @@ BOSH orchestrates initial deployments and ongoing updates that are: predictable,
10
10
  gem install bosh_lastpass_plugin
11
11
  ```
12
12
 
13
+ If `BOSH_USE_BUNDLER=true` is set in your environment, you would need to add the gem to the bosh bundle file located at `$GEM_HOME/gems/bosh_cli-$BOSH_VERISON/bin/run_bosh_with_bundler.Gemfile`. The bosh version can be found using the `version` subcommand on the bosh cli.
14
+
13
15
  ## How to use
14
16
 
15
17
  Use the `lpass` method in your deployment manifest to extract credentials out of lpass
@@ -2,15 +2,14 @@ require "bosh/lastpass_plugin"
2
2
 
3
3
  module Bosh::Cli::Command
4
4
  class LastpassPlugin < Base
5
- include Bosh::LastpassPlugin::Helpers
6
- extend Bosh::LastpassPlugin::YamlReader
5
+ extend Bosh::LastpassPlugin::Additions
7
6
 
8
7
  inject_into_yaml_parsing
9
8
 
10
- usage "lpass"
9
+ usage "lastpass keys"
11
10
  desc "simple BOSH CLI plugin"
12
11
  def perform
13
- say_hello
12
+ p "hello"
14
13
  end
15
14
 
16
15
  end
@@ -8,7 +8,6 @@ module Bosh
8
8
  end
9
9
 
10
10
 
11
- require "bosh/lastpass_plugin/helpers"
12
11
  require "bosh/lastpass_plugin/version"
13
- require "bosh/lastpass_plugin/yaml_reader"
12
+ require "bosh/lastpass_plugin/additions"
14
13
  require "bosh/cli/commands/lastpass_plugin"
@@ -0,0 +1,23 @@
1
+ module Bosh
2
+ module LastpassPlugin
3
+ module Additions
4
+ def inject_into_yaml_parsing
5
+ ::BoshExtensions.module_eval do
6
+ def lpass key,type
7
+ output = `lpass show #{key} --#{type}`
8
+ if $?.exitstatus != 0
9
+ say "Error: BOSH Lastpass Error failed to fetch #{key}"
10
+ exit($?.exitstatus)
11
+ end
12
+ output
13
+ rescue Errno::ENOENT => e
14
+ say "Error: BOSH Lastpass Error lastpass cli not found"
15
+ say "Error: Get cli from https://github.com/lastpass/lastpass-cli and ensure its in the PATH"
16
+ say "Error: #{e}"
17
+ exit($?.exitstatus)
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module LastpassPlugin
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh_lastpass_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jatin Naik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-03 00:00:00.000000000 Z
11
+ date: 2016-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_cli
@@ -160,14 +160,14 @@ files:
160
160
  - ".gitignore"
161
161
  - ".rspec"
162
162
  - Gemfile
163
+ - Gemfile.lock
163
164
  - README.md
164
165
  - Rakefile
165
166
  - bosh_lastpass_plugin.gemspec
166
167
  - lib/bosh/cli/commands/lastpass_plugin.rb
167
168
  - lib/bosh/lastpass_plugin.rb
168
- - lib/bosh/lastpass_plugin/helpers.rb
169
+ - lib/bosh/lastpass_plugin/additions.rb
169
170
  - lib/bosh/lastpass_plugin/version.rb
170
- - lib/bosh/lastpass_plugin/yaml_reader.rb
171
171
  - spec/command_spec.rb
172
172
  - spec/spec_helper.rb
173
173
  homepage: https://github.com/cloudfoundry/bosh
@@ -1,15 +0,0 @@
1
- module Bosh
2
- module LastpassPlugin
3
- module Helpers
4
-
5
- def say_hello
6
- say "Hello, world!".make_green
7
- end
8
-
9
-
10
- def do_evil_things
11
- p "evil"
12
- end
13
- end
14
- end
15
- end
@@ -1,13 +0,0 @@
1
- module Bosh
2
- module LastpassPlugin
3
- module YamlReader
4
- def inject_into_yaml_parsing
5
- ::BoshExtensions.module_eval do
6
- def lpass key,type
7
- `lpass show #{key} --#{type}`
8
- end
9
- end
10
- end
11
- end
12
- end
13
- end