bosh-share 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +36 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +261 -0
- data/README.md +35 -0
- data/Rakefile +5 -0
- data/bosh-share.gemspec +35 -0
- data/lib/bosh/cli/commands/init_workspace.rb +43 -0
- data/lib/bosh/cli/commands/install_workspace.rb +50 -0
- data/lib/bosh/share.rb +11 -0
- data/lib/bosh/share/helpers.rb +16 -0
- data/lib/bosh/share/version.rb +5 -0
- data/spec/.rspec +3 -0
- data/spec/command_spec.rb +11 -0
- data/spec/spec_helper.rb +12 -0
- data/templates/.direnv +1 -0
- data/templates/.gitignore +37 -0
- data/templates/Gemfile +5 -0
- data/templates/README.md +21 -0
- metadata +206 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 850fec5c5f455a1fb11cb04c844e6ae4022a8aeb
|
4
|
+
data.tar.gz: f8028eac36c24ca60b481db562ff73c0398ca436
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bf2963cbe6afc0669b4fd04cf421b919e067231c69c413c0be726e71b10837071913026bceb49642bd217ca2d5373dc4ebdb7228c83824908bc8311b8532a3f3
|
7
|
+
data.tar.gz: a0cf18a2c17d895f0a8885ca329899e8d00899262a12f70b44b4ed88085985850bf63a5128ada3c126ffe8c4e538dee47e9d97149bd2cfe3cc72153433b83616
|
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
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
bosh-share (0.0.1)
|
5
|
+
bosh-plugin-pipeline (~> 0.2.1)
|
6
|
+
bosh_cli (>= 1.3100.0)
|
7
|
+
bosh_common (>= 1.3100.0)
|
8
|
+
git (~> 1.2.6)
|
9
|
+
membrane (~> 1.1.0)
|
10
|
+
|
11
|
+
PATH
|
12
|
+
remote: ../bosh-plugin-pipeline
|
13
|
+
specs:
|
14
|
+
bosh-plugin-pipeline (0.2.1)
|
15
|
+
bosh-versions (~> 0.1.1)
|
16
|
+
bosh_cli (>= 1.3098.0)
|
17
|
+
bosh_common (>= 1.3098.0)
|
18
|
+
erubis (~> 2.7.0)
|
19
|
+
git (~> 1.2.6)
|
20
|
+
membrane (~> 1.1.0)
|
21
|
+
|
22
|
+
GEM
|
23
|
+
remote: https://rubygems.org/
|
24
|
+
specs:
|
25
|
+
CFPropertyList (2.3.2)
|
26
|
+
ast (2.1.0)
|
27
|
+
astrolabe (1.3.1)
|
28
|
+
parser (~> 2.2)
|
29
|
+
aws-sdk (1.60.2)
|
30
|
+
aws-sdk-v1 (= 1.60.2)
|
31
|
+
aws-sdk-v1 (1.60.2)
|
32
|
+
json (~> 1.4)
|
33
|
+
nokogiri (>= 1.4.4)
|
34
|
+
blobstore_client (1.3100.0)
|
35
|
+
aws-sdk (= 1.60.2)
|
36
|
+
bosh_common (~> 1.3100.0)
|
37
|
+
fog (~> 1.34.0)
|
38
|
+
fog-aws (~> 0.7.6)
|
39
|
+
httpclient (= 2.4.0)
|
40
|
+
multi_json (~> 1.1)
|
41
|
+
bosh-template (1.3100.0)
|
42
|
+
semi_semantic (~> 1.1.0)
|
43
|
+
bosh-versions (0.1.1)
|
44
|
+
bosh_cli (>= 1.3098.0)
|
45
|
+
bosh_common (>= 1.3098.0)
|
46
|
+
membrane (~> 1.1.0)
|
47
|
+
rest-client (~> 1.8.0)
|
48
|
+
rubygems_api (~> 1.0.1)
|
49
|
+
bosh_cli (1.3100.0)
|
50
|
+
blobstore_client (~> 1.3100.0)
|
51
|
+
bosh-template (~> 1.3100.0)
|
52
|
+
bosh_common (~> 1.3100.0)
|
53
|
+
cf-uaa-lib (~> 3.2.1)
|
54
|
+
highline (~> 1.6.2)
|
55
|
+
httpclient (= 2.4.0)
|
56
|
+
json_pure (~> 1.7)
|
57
|
+
minitar (~> 0.5.4)
|
58
|
+
net-scp (~> 1.1.0)
|
59
|
+
net-ssh (= 2.9.2)
|
60
|
+
net-ssh-gateway (~> 1.2.0)
|
61
|
+
netaddr (~> 1.5.0)
|
62
|
+
progressbar (~> 0.9.0)
|
63
|
+
sshkey (~> 1.7.0)
|
64
|
+
terminal-table (~> 1.4.3)
|
65
|
+
bosh_common (1.3100.0)
|
66
|
+
logging (~> 1.8.2)
|
67
|
+
semi_semantic (~> 1.1.0)
|
68
|
+
builder (3.2.2)
|
69
|
+
cf-uaa-lib (3.2.4)
|
70
|
+
multi_json
|
71
|
+
diff-lcs (1.2.5)
|
72
|
+
domain_name (0.5.25)
|
73
|
+
unf (>= 0.0.5, < 1.0.0)
|
74
|
+
erubis (2.7.0)
|
75
|
+
excon (0.45.4)
|
76
|
+
fission (0.5.0)
|
77
|
+
CFPropertyList (~> 2.2)
|
78
|
+
fog (1.34.0)
|
79
|
+
fog-atmos
|
80
|
+
fog-aws (>= 0.6.0)
|
81
|
+
fog-brightbox (~> 0.4)
|
82
|
+
fog-core (~> 1.32)
|
83
|
+
fog-dynect (~> 0.0.2)
|
84
|
+
fog-ecloud (~> 0.1)
|
85
|
+
fog-google (>= 0.0.2)
|
86
|
+
fog-json
|
87
|
+
fog-local
|
88
|
+
fog-powerdns (>= 0.1.1)
|
89
|
+
fog-profitbricks
|
90
|
+
fog-radosgw (>= 0.0.2)
|
91
|
+
fog-riakcs
|
92
|
+
fog-sakuracloud (>= 0.0.4)
|
93
|
+
fog-serverlove
|
94
|
+
fog-softlayer
|
95
|
+
fog-storm_on_demand
|
96
|
+
fog-terremark
|
97
|
+
fog-vmfusion
|
98
|
+
fog-voxel
|
99
|
+
fog-xml (~> 0.1.1)
|
100
|
+
ipaddress (~> 0.5)
|
101
|
+
nokogiri (~> 1.5, >= 1.5.11)
|
102
|
+
fog-atmos (0.1.0)
|
103
|
+
fog-core
|
104
|
+
fog-xml
|
105
|
+
fog-aws (0.7.6)
|
106
|
+
fog-core (~> 1.27)
|
107
|
+
fog-json (~> 1.0)
|
108
|
+
fog-xml (~> 0.1)
|
109
|
+
ipaddress (~> 0.8)
|
110
|
+
fog-brightbox (0.9.0)
|
111
|
+
fog-core (~> 1.22)
|
112
|
+
fog-json
|
113
|
+
inflecto (~> 0.0.2)
|
114
|
+
fog-core (1.32.1)
|
115
|
+
builder
|
116
|
+
excon (~> 0.45)
|
117
|
+
formatador (~> 0.2)
|
118
|
+
mime-types
|
119
|
+
net-scp (~> 1.1)
|
120
|
+
net-ssh (>= 2.1.3)
|
121
|
+
fog-dynect (0.0.2)
|
122
|
+
fog-core
|
123
|
+
fog-json
|
124
|
+
fog-xml
|
125
|
+
fog-ecloud (0.3.0)
|
126
|
+
fog-core
|
127
|
+
fog-xml
|
128
|
+
fog-google (0.1.1)
|
129
|
+
fog-core
|
130
|
+
fog-json
|
131
|
+
fog-xml
|
132
|
+
fog-json (1.0.2)
|
133
|
+
fog-core (~> 1.0)
|
134
|
+
multi_json (~> 1.10)
|
135
|
+
fog-local (0.2.1)
|
136
|
+
fog-core (~> 1.27)
|
137
|
+
fog-powerdns (0.1.1)
|
138
|
+
fog-core (~> 1.27)
|
139
|
+
fog-json (~> 1.0)
|
140
|
+
fog-xml (~> 0.1)
|
141
|
+
fog-profitbricks (0.0.5)
|
142
|
+
fog-core
|
143
|
+
fog-xml
|
144
|
+
nokogiri
|
145
|
+
fog-radosgw (0.0.4)
|
146
|
+
fog-core (>= 1.21.0)
|
147
|
+
fog-json
|
148
|
+
fog-xml (>= 0.0.1)
|
149
|
+
fog-riakcs (0.1.0)
|
150
|
+
fog-core
|
151
|
+
fog-json
|
152
|
+
fog-xml
|
153
|
+
fog-sakuracloud (1.3.3)
|
154
|
+
fog-core
|
155
|
+
fog-json
|
156
|
+
fog-serverlove (0.1.2)
|
157
|
+
fog-core
|
158
|
+
fog-json
|
159
|
+
fog-softlayer (0.4.7)
|
160
|
+
fog-core
|
161
|
+
fog-json
|
162
|
+
fog-storm_on_demand (0.1.1)
|
163
|
+
fog-core
|
164
|
+
fog-json
|
165
|
+
fog-terremark (0.1.0)
|
166
|
+
fog-core
|
167
|
+
fog-xml
|
168
|
+
fog-vmfusion (0.1.0)
|
169
|
+
fission
|
170
|
+
fog-core
|
171
|
+
fog-voxel (0.1.0)
|
172
|
+
fog-core
|
173
|
+
fog-xml
|
174
|
+
fog-xml (0.1.2)
|
175
|
+
fog-core
|
176
|
+
nokogiri (~> 1.5, >= 1.5.11)
|
177
|
+
formatador (0.2.5)
|
178
|
+
git (1.2.9.1)
|
179
|
+
highline (1.6.21)
|
180
|
+
http-cookie (1.0.2)
|
181
|
+
domain_name (~> 0.5)
|
182
|
+
httpclient (2.4.0)
|
183
|
+
hurley (0.2)
|
184
|
+
inflecto (0.0.2)
|
185
|
+
ipaddress (0.8.0)
|
186
|
+
json (1.8.3)
|
187
|
+
json_pure (1.8.2)
|
188
|
+
little-plugger (1.1.4)
|
189
|
+
logging (1.8.2)
|
190
|
+
little-plugger (>= 1.1.3)
|
191
|
+
multi_json (>= 1.8.4)
|
192
|
+
membrane (1.1.0)
|
193
|
+
mime-types (2.6.2)
|
194
|
+
mini_portile (0.6.2)
|
195
|
+
minitar (0.5.4)
|
196
|
+
multi_json (1.11.2)
|
197
|
+
net-scp (1.1.2)
|
198
|
+
net-ssh (>= 2.6.5)
|
199
|
+
net-ssh (2.9.2)
|
200
|
+
net-ssh-gateway (1.2.0)
|
201
|
+
net-ssh (>= 2.6.5)
|
202
|
+
netaddr (1.5.0)
|
203
|
+
netrc (0.10.3)
|
204
|
+
nokogiri (1.6.6.2)
|
205
|
+
mini_portile (~> 0.6.0)
|
206
|
+
parser (2.2.3.0)
|
207
|
+
ast (>= 1.1, < 3.0)
|
208
|
+
powerpack (0.1.1)
|
209
|
+
progressbar (0.9.2)
|
210
|
+
rainbow (2.0.0)
|
211
|
+
rake (10.4.2)
|
212
|
+
rest-client (1.8.0)
|
213
|
+
http-cookie (>= 1.0.2, < 2.0)
|
214
|
+
mime-types (>= 1.16, < 3.0)
|
215
|
+
netrc (~> 0.7)
|
216
|
+
rspec (3.3.0)
|
217
|
+
rspec-core (~> 3.3.0)
|
218
|
+
rspec-expectations (~> 3.3.0)
|
219
|
+
rspec-mocks (~> 3.3.0)
|
220
|
+
rspec-core (3.3.2)
|
221
|
+
rspec-support (~> 3.3.0)
|
222
|
+
rspec-expectations (3.3.1)
|
223
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
224
|
+
rspec-support (~> 3.3.0)
|
225
|
+
rspec-its (1.2.0)
|
226
|
+
rspec-core (>= 3.0.0)
|
227
|
+
rspec-expectations (>= 3.0.0)
|
228
|
+
rspec-mocks (3.3.2)
|
229
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
230
|
+
rspec-support (~> 3.3.0)
|
231
|
+
rspec-support (3.3.0)
|
232
|
+
rubocop (0.34.2)
|
233
|
+
astrolabe (~> 1.3)
|
234
|
+
parser (>= 2.2.2.5, < 3.0)
|
235
|
+
powerpack (~> 0.1)
|
236
|
+
rainbow (>= 1.99.1, < 3.0)
|
237
|
+
ruby-progressbar (~> 1.4)
|
238
|
+
ruby-progressbar (1.7.5)
|
239
|
+
rubygems_api (1.0.1)
|
240
|
+
hurley (~> 0)
|
241
|
+
semi_semantic (1.1.0)
|
242
|
+
sshkey (1.7.0)
|
243
|
+
terminal-table (1.4.5)
|
244
|
+
unf (0.1.4)
|
245
|
+
unf_ext
|
246
|
+
unf_ext (0.0.7.1)
|
247
|
+
|
248
|
+
PLATFORMS
|
249
|
+
ruby
|
250
|
+
|
251
|
+
DEPENDENCIES
|
252
|
+
bosh-plugin-pipeline!
|
253
|
+
bosh-share!
|
254
|
+
bundler (~> 1.10)
|
255
|
+
rake (~> 10.4.2)
|
256
|
+
rspec (~> 3.3.0)
|
257
|
+
rspec-its (~> 1.2.0)
|
258
|
+
rubocop (~> 0.34.2)
|
259
|
+
|
260
|
+
BUNDLED WITH
|
261
|
+
1.10.6
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Share BOSH CLI Plugin
|
2
|
+
|
3
|
+
BOSH CLI Plugin to share workspaces and your positive experience.
|
4
|
+
|
5
|
+
![some-funny-image](http://merickara.com/1_bsides/1_whitestripe/share.jpg)
|
6
|
+
|
7
|
+
## What is BOSH?
|
8
|
+
|
9
|
+
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
|
+
|
11
|
+
## How to install
|
12
|
+
```
|
13
|
+
gem install bosh-share
|
14
|
+
```
|
15
|
+
|
16
|
+
## How to use
|
17
|
+
```
|
18
|
+
bosh say hello
|
19
|
+
```
|
20
|
+
|
21
|
+
## How to publish gems
|
22
|
+
|
23
|
+
See [this notes](http://guides.rubygems.org/publishing/) to know how to publish your gem.
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
|
27
|
+
1. Fork it
|
28
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
+
5. Create new Pull Request
|
32
|
+
|
33
|
+
## Notes
|
34
|
+
|
35
|
+
Generated by [BOSH plugin generator](https://github.com/Altoros/bosh-plugin-generator)
|
data/Rakefile
ADDED
data/bosh-share.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
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/share/version'
|
6
|
+
bosh_version = '1.3100.0'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'bosh-share'
|
10
|
+
spec.version = Bosh::Share::VERSION
|
11
|
+
spec.authors = ['A.S. Lomoff']
|
12
|
+
spec.email = ['lomov.as@gmail.com']
|
13
|
+
spec.description = %q{Short description.}
|
14
|
+
spec.summary = %q{Short description.}
|
15
|
+
spec.homepage = 'https://github.com/cloudfoundry/bosh'
|
16
|
+
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.required_ruby_version = '>= 2.0.0'
|
23
|
+
|
24
|
+
spec.add_runtime_dependency 'bosh_cli', ">= #{bosh_version}"
|
25
|
+
spec.add_runtime_dependency 'bosh_common', ">= #{bosh_version}"
|
26
|
+
spec.add_runtime_dependency 'bosh-plugin-pipeline', '~> 0.2.1'
|
27
|
+
spec.add_runtime_dependency 'membrane', '~> 1.1.0'
|
28
|
+
spec.add_runtime_dependency 'git', '~> 1.2.6'
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.10'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 3.3.0'
|
32
|
+
spec.add_development_dependency 'rspec-its', '~> 1.2.0'
|
33
|
+
spec.add_development_dependency 'rake', '~> 10.4.2'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 0.34.2'
|
35
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'bosh/share'
|
2
|
+
require 'fileutils'
|
3
|
+
require 'git'
|
4
|
+
require 'bosh/template_generator/generator'
|
5
|
+
|
6
|
+
module Bosh::Cli::Command
|
7
|
+
class Share < Base
|
8
|
+
include Bosh::Share::Helpers
|
9
|
+
|
10
|
+
usage 'init workspace'
|
11
|
+
desc 'fetch and place in your workspace files from external workspace'
|
12
|
+
option '--template [github-repo]', String, 'template'
|
13
|
+
option "--description [text]", String, "Short description of the workspace"
|
14
|
+
def init_workspace(workspace_name = nil)
|
15
|
+
|
16
|
+
if workspace_name.nil?
|
17
|
+
workspace_name = 'bosh-workspace'
|
18
|
+
else
|
19
|
+
self.workspace_dir = File.join(Dir.pwd, workspace_name)
|
20
|
+
end
|
21
|
+
FileUtils::mkdir_p(self.workspace_dir) unless File.exist?(self.workspace_dir)
|
22
|
+
Dir.chdir(self.workspace_dir) do
|
23
|
+
default_workspace_folders.each do |folder_name|
|
24
|
+
FileUtils::mkdir_p(folder_name)
|
25
|
+
FileUtils.touch(File.join(folder_name, '.gitkeep'))
|
26
|
+
end
|
27
|
+
Git.init
|
28
|
+
end
|
29
|
+
context = {
|
30
|
+
workspace_name: workspace_name,
|
31
|
+
workspace_dir: self.workspace_dir,
|
32
|
+
description: options[:description]
|
33
|
+
}
|
34
|
+
templates_folder = File.expand_path("../../../../../templates", __FILE__)
|
35
|
+
generator = Bosh::TemplateGenerator::Generator.new(context, source_folder: templates_folder)
|
36
|
+
%w(.direnv .ruby-gemset Gemfile .gitignore .ruby-version README.md).each do |file_name|
|
37
|
+
generator.generate(file_name, File.join(self.workspace_dir, file_name))
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require "bosh/share"
|
2
|
+
|
3
|
+
module Bosh::Cli::Command
|
4
|
+
class Share < Base
|
5
|
+
include Bosh::Share::Helpers
|
6
|
+
|
7
|
+
usage 'install workspace'
|
8
|
+
desc 'fetch and place in your workspace files from external workspace'
|
9
|
+
option '--branch [name]', String, 'branch name'
|
10
|
+
option '--tag [tag]', String, 'tag name'
|
11
|
+
option '--prefix [prefix]', String, 'use this field if you want to place workspace assets to specific subfolder'
|
12
|
+
option '--namespace [namespace]', String, 'the same as prefix'
|
13
|
+
option '--force', 're-write existing files'
|
14
|
+
option '--use-mine', 're-write existing files'
|
15
|
+
def install_workspace(workspace)
|
16
|
+
git_repo_regex = /((git|ssh|http(s)?)|(git@[\w\.]+))(:(\/\/)?)(([\w\.@\:\-~]+)\/?)+(\.git)(\/)?/
|
17
|
+
unless workspace.match?(git_repo_regex)
|
18
|
+
if workspace.include?('/')
|
19
|
+
say 'Workspace name should be a git URL or github repo name with folowing format `account/repo-name`'
|
20
|
+
say '[ERROR] Can\'t find git repo'.make_red
|
21
|
+
exit(2)
|
22
|
+
end
|
23
|
+
workspace = "https://github.com/#{workspace}.git"
|
24
|
+
end
|
25
|
+
workspace_repo_name = workspace.match(git_repo_regex)[-3]
|
26
|
+
temp_folder = Dir.mktmpdir
|
27
|
+
external_workspace_dir = File.join(workspace, workspace_repo_name)
|
28
|
+
say "Clonning workaspace from #{workspace}"
|
29
|
+
repo = Git.clone(workspace, workspace_repo_name, path: temp_folder, recursive: true)
|
30
|
+
if options[:branch] && options[:tag]
|
31
|
+
say 'Please, specify one of branch or tag.'
|
32
|
+
say '[ERROR] Don\'t know what version to checkout.'.make_red
|
33
|
+
exit(2)
|
34
|
+
end
|
35
|
+
repo.checkout(branch: option[:branch]) if option[:branch]
|
36
|
+
repo.checkout(branch: "tags/#{option[:tag]}") if option[:tag]
|
37
|
+
|
38
|
+
say "This is demo version and it doesn't "
|
39
|
+
end
|
40
|
+
|
41
|
+
def workspace_dir
|
42
|
+
@workspace_dir ||= ENV['WORKSPACE_DIR'] || '~/workspace'
|
43
|
+
end
|
44
|
+
|
45
|
+
def folders_to_sync(external_workspace_dir)
|
46
|
+
%w(deployments templates scripts)
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
data/lib/bosh/share.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
module Bosh
|
2
|
+
module Share
|
3
|
+
module Helpers
|
4
|
+
attr_accessor :workspace_dir
|
5
|
+
|
6
|
+
def workspace_dir
|
7
|
+
@workspace_dir ||= ENV['WORKSPACE_DIR'] || "#{ENV['WORKSPACE_DIR']}/workspace"
|
8
|
+
end
|
9
|
+
|
10
|
+
def default_workspace_folders
|
11
|
+
%w(deployments templates scripts stubs)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/spec/.rspec
ADDED
data/spec/spec_helper.rb
ADDED
@@ -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/<%= short_plugin_name %>"
|
data/templates/.direnv
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export WORKSPACE_DIR=<%= workspace_dir %>
|
@@ -0,0 +1,37 @@
|
|
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
|
37
|
+
.workspace
|
data/templates/Gemfile
ADDED
data/templates/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# <%= workspace_name %>
|
2
|
+
|
3
|
+
## Description
|
4
|
+
|
5
|
+
<%= description || 'Short description here.' %>
|
6
|
+
|
7
|
+
## What is BOSH?
|
8
|
+
|
9
|
+
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
|
+
|
11
|
+
## Contributing
|
12
|
+
|
13
|
+
1. Fork it
|
14
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
15
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
16
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
17
|
+
5. Create new Pull Request
|
18
|
+
|
19
|
+
## Notes
|
20
|
+
|
21
|
+
This is a BOSH workspace generated by bosh-share tool.
|
metadata
ADDED
@@ -0,0 +1,206 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bosh-share
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- A.S. Lomoff
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-12 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.3100.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.3100.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.3100.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.3100.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bosh-plugin-pipeline
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.2.1
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.2.1
|
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.10'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.10'
|
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.3.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.3.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.2.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.2.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: 10.4.2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 10.4.2
|
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.34.2
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.34.2
|
153
|
+
description: Short description.
|
154
|
+
email:
|
155
|
+
- lomov.as@gmail.com
|
156
|
+
executables: []
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files: []
|
159
|
+
files:
|
160
|
+
- ".gitignore"
|
161
|
+
- ".rspec"
|
162
|
+
- ".travis.yml"
|
163
|
+
- Gemfile
|
164
|
+
- Gemfile.lock
|
165
|
+
- README.md
|
166
|
+
- Rakefile
|
167
|
+
- bosh-share.gemspec
|
168
|
+
- lib/bosh/cli/commands/init_workspace.rb
|
169
|
+
- lib/bosh/cli/commands/install_workspace.rb
|
170
|
+
- lib/bosh/share.rb
|
171
|
+
- lib/bosh/share/helpers.rb
|
172
|
+
- lib/bosh/share/version.rb
|
173
|
+
- spec/.rspec
|
174
|
+
- spec/command_spec.rb
|
175
|
+
- spec/spec_helper.rb
|
176
|
+
- templates/.direnv
|
177
|
+
- templates/.gitignore
|
178
|
+
- templates/Gemfile
|
179
|
+
- templates/README.md
|
180
|
+
homepage: https://github.com/cloudfoundry/bosh
|
181
|
+
licenses: []
|
182
|
+
metadata: {}
|
183
|
+
post_install_message:
|
184
|
+
rdoc_options: []
|
185
|
+
require_paths:
|
186
|
+
- lib
|
187
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: 2.0.0
|
192
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
|
+
requirements:
|
194
|
+
- - ">="
|
195
|
+
- !ruby/object:Gem::Version
|
196
|
+
version: '0'
|
197
|
+
requirements: []
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 2.4.8
|
200
|
+
signing_key:
|
201
|
+
specification_version: 4
|
202
|
+
summary: Short description.
|
203
|
+
test_files:
|
204
|
+
- spec/.rspec
|
205
|
+
- spec/command_spec.rb
|
206
|
+
- spec/spec_helper.rb
|