bosh_lastpass_plugin 0.0.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 78058666c781ba55b6a4522ee8e52b6c2071727e
4
+ data.tar.gz: 6c91a3c50f4e36433377c6c6e96d651b389370b2
5
+ SHA512:
6
+ metadata.gz: b38dd5d8b6ac83902834b657be139854587fe156f6d697d87f4dd90237a63d8ea96508e3579f33c02d563e8815deba8834d8b3b6da2cbe867d94c4349d57b3ef
7
+ data.tar.gz: 29d6d3dafe80c07e51dfe252df1d5480172e78e487155b7b7f299014eb946f81dfe1eb2660522f09884d85a1d254f99e8afb07f7ee74dd881cf205337e8ada25
data/.gitignore ADDED
@@ -0,0 +1,36 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /lib/bundler/man/
26
+
27
+ # for a library or gem, you might want to ignore these files since the code is
28
+ # intended to run in multiple environments; otherwise, check them in:
29
+ # Gemfile.lock
30
+ # .ruby-version
31
+ # .ruby-gemset
32
+
33
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
34
+ .rvmrc
35
+ .ruby-gemset
36
+ .ruby-version
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format progress
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bosh-plugin.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # Bosh lastpass plugin
2
+
3
+ Short description.
4
+
5
+ ## What is BOSH?
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/).
7
+
8
+ ## How to install
9
+ ```
10
+ gem install bosh_lastpass_plugin
11
+ ```
12
+
13
+ ## How to use
14
+
15
+ Use the `lpass` method in your deployment manifest to extract credentials out of lpass
16
+
17
+ For example:
18
+ ```yaml
19
+ ---
20
+ name: foo-deploy
21
+
22
+ director_uuid: 76f2d2b1-fc3f-47d2-bbfe-4109dc799887
23
+
24
+ releases:
25
+ - name: &my-release
26
+ version: latest
27
+
28
+ stemcells:
29
+ - alias: trusty
30
+ os: ubuntu-trusty
31
+ version: latest
32
+
33
+ instance_groups:
34
+ - name: my-job
35
+ instances: 1
36
+ jobs:
37
+ - name: my-job
38
+ release: *my-release
39
+ vm_type: medium
40
+ persistent_disk_type: ten
41
+ stemcell: trusty
42
+ networks:
43
+ - name: my-job
44
+
45
+ properties:
46
+ aws:
47
+ access_key: <%= lpass "shared/aws", "username" %>
48
+ secret_access_key: <%= lpass "shared/aws", "password" %>
49
+ ```
50
+
51
+
52
+
53
+ ## Contributing
54
+
55
+ 1. Fork it
56
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
57
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
58
+ 4. Push to the branch (`git push origin my-new-feature`)
59
+ 5. Create new Pull Request
60
+
61
+ ## Notes
62
+
63
+ Generated by [BOSH plugin generator](https://github.com/Altoros/bosh-plugin-generator)
data/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ task :default => :spec
5
+ RSpec::Core::RakeTask.new
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'bosh/lastpass_plugin/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "bosh_lastpass_plugin"
9
+ spec.version = Bosh::LastpassPlugin::VERSION
10
+ spec.authors = ["Jatin Naik"]
11
+ spec.email = ["jsnaik@gmail.com"]
12
+ spec.description = %q{Short description.}
13
+ spec.summary = %q{Short description.}
14
+ spec.homepage = "https://github.com/cloudfoundry/bosh"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.required_ruby_version = '>= 2.0.0'
22
+
23
+ spec.add_runtime_dependency "bosh_cli", ">= 1.2682.0"
24
+ spec.add_runtime_dependency "bosh_common", ">= 1.2682.0"
25
+ spec.add_runtime_dependency "semi_semantic", "~> 1.1.0"
26
+ spec.add_runtime_dependency "membrane", "~> 1.1.0"
27
+ spec.add_runtime_dependency "git", "~> 1.2.6"
28
+
29
+ spec.add_development_dependency "bundler", "~> 1.6"
30
+ spec.add_development_dependency "rspec", "~> 3.1.0"
31
+ spec.add_development_dependency "rspec-its", '~> 1.1.0'
32
+ spec.add_development_dependency "rake"
33
+ spec.add_development_dependency "rubocop"
34
+ end
@@ -0,0 +1,17 @@
1
+ require "bosh/lastpass_plugin"
2
+
3
+ module Bosh::Cli::Command
4
+ class LastpassPlugin < Base
5
+ include Bosh::LastpassPlugin::Helpers
6
+ extend Bosh::LastpassPlugin::YamlReader
7
+
8
+ inject_into_yaml_parsing
9
+
10
+ usage "lpass"
11
+ desc "simple BOSH CLI plugin"
12
+ def perform
13
+ say_hello
14
+ end
15
+
16
+ end
17
+ end
@@ -0,0 +1,15 @@
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
@@ -0,0 +1,5 @@
1
+ module Bosh
2
+ module LastpassPlugin
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,13 @@
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
@@ -0,0 +1,14 @@
1
+ require "cli/core_ext"
2
+ require "cli/validation"
3
+
4
+ module Bosh
5
+ module LastpassPlugin
6
+ include BoshExtensions
7
+ end
8
+ end
9
+
10
+
11
+ require "bosh/lastpass_plugin/helpers"
12
+ require "bosh/lastpass_plugin/version"
13
+ require "bosh/lastpass_plugin/yaml_reader"
14
+ require "bosh/cli/commands/lastpass_plugin"
@@ -0,0 +1,11 @@
1
+ describe "bosh say hello" do
2
+
3
+ before do
4
+ system("bosh say hello > /dev/null")
5
+ end
6
+
7
+ it "exits without errors" do
8
+ expect($?.exitstatus).to eq(0)
9
+ end
10
+
11
+ end
@@ -0,0 +1,12 @@
1
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
2
+
3
+ require "rubygems"
4
+ require "bundler"
5
+ Bundler.setup(:default, :test)
6
+
7
+ $:.unshift(File.expand_path("../../lib", __FILE__))
8
+
9
+ require "rspec/core"
10
+ require "rspec/its"
11
+
12
+ require "bosh/lastpass_plugin"
metadata ADDED
@@ -0,0 +1,198 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bosh_lastpass_plugin
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jatin Naik
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bosh_cli
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.2682.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2682.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bosh_common
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2682.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.2682.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: semi_semantic
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 1.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.1.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: membrane
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.1.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: git
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.2.6
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.2.6
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.6'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.6'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 3.1.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 3.1.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-its
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.1.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.1.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description: Short description.
154
+ email:
155
+ - jsnaik@gmail.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".rspec"
162
+ - Gemfile
163
+ - README.md
164
+ - Rakefile
165
+ - bosh_lastpass_plugin.gemspec
166
+ - lib/bosh/cli/commands/lastpass_plugin.rb
167
+ - lib/bosh/lastpass_plugin.rb
168
+ - lib/bosh/lastpass_plugin/helpers.rb
169
+ - lib/bosh/lastpass_plugin/version.rb
170
+ - lib/bosh/lastpass_plugin/yaml_reader.rb
171
+ - spec/command_spec.rb
172
+ - spec/spec_helper.rb
173
+ homepage: https://github.com/cloudfoundry/bosh
174
+ licenses: []
175
+ metadata: {}
176
+ post_install_message:
177
+ rdoc_options: []
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: 2.0.0
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ requirements: []
191
+ rubyforge_project:
192
+ rubygems_version: 2.4.5.1
193
+ signing_key:
194
+ specification_version: 4
195
+ summary: Short description.
196
+ test_files:
197
+ - spec/command_spec.rb
198
+ - spec/spec_helper.rb