coral_vagrant 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ module VagrantPlugins
2
+ module Coral
3
+ class Plugin < Vagrant.plugin('2')
4
+ name 'coral plugins'
5
+ description 'The `coral` plugin provides an easy way to manage and sync coral clusters locally and on the cloud from within Vagrant.'
6
+
7
+ command('coral') do
8
+ Coral::Vagrant::Command::CoralBase
9
+ end
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,183 +1,127 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: coral_vagrant
3
- version: !ruby/object:Gem::Version
4
- hash: 21
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Adrian Webb
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-05-10 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: vagrant
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
12
+ date: 2013-05-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: coral_plan
16
+ requirement: &4990540 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
18
+ requirements:
26
19
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 15
29
- segments:
30
- - 1
31
- - 0
32
- version: "1.0"
20
+ - !ruby/object:Gem::Version
21
+ version: '0.1'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: coral_plan
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *4990540
25
+ - !ruby/object:Gem::Dependency
26
+ name: coral_cloud
27
+ requirement: &4882440 !ruby/object:Gem::Requirement
39
28
  none: false
40
- requirements:
29
+ requirements:
41
30
  - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 9
44
- segments:
45
- - 0
46
- - 1
47
- version: "0.1"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.1'
48
33
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: coral_cloud
52
34
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *4882440
36
+ - !ruby/object:Gem::Dependency
37
+ name: bundler
38
+ requirement: &4881580 !ruby/object:Gem::Requirement
54
39
  none: false
55
- requirements:
40
+ requirements:
56
41
  - - ~>
57
- - !ruby/object:Gem::Version
58
- hash: 9
59
- segments:
60
- - 0
61
- - 1
62
- version: "0.1"
63
- type: :runtime
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: bundler
42
+ - !ruby/object:Gem::Version
43
+ version: '1.2'
44
+ type: :development
67
45
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *4881580
47
+ - !ruby/object:Gem::Dependency
48
+ name: jeweler
49
+ requirement: &4880680 !ruby/object:Gem::Requirement
69
50
  none: false
70
- requirements:
51
+ requirements:
71
52
  - - ~>
72
- - !ruby/object:Gem::Version
73
- hash: 11
74
- segments:
75
- - 1
76
- - 2
77
- version: "1.2"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.8'
78
55
  type: :development
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: jeweler
82
56
  prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *4880680
58
+ - !ruby/object:Gem::Dependency
59
+ name: rspec
60
+ requirement: &4879740 !ruby/object:Gem::Requirement
84
61
  none: false
85
- requirements:
62
+ requirements:
86
63
  - - ~>
87
- - !ruby/object:Gem::Version
88
- hash: 31
89
- segments:
90
- - 1
91
- - 8
92
- version: "1.8"
64
+ - !ruby/object:Gem::Version
65
+ version: '2.10'
93
66
  type: :development
94
- version_requirements: *id005
95
- - !ruby/object:Gem::Dependency
96
- name: rspec
97
67
  prerelease: false
98
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *4879740
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdoc
71
+ requirement: &4878900 !ruby/object:Gem::Requirement
99
72
  none: false
100
- requirements:
73
+ requirements:
101
74
  - - ~>
102
- - !ruby/object:Gem::Version
103
- hash: 23
104
- segments:
105
- - 2
106
- - 10
107
- version: "2.10"
75
+ - !ruby/object:Gem::Version
76
+ version: '3.12'
108
77
  type: :development
109
- version_requirements: *id006
110
- - !ruby/object:Gem::Dependency
111
- name: rdoc
112
78
  prerelease: false
113
- requirement: &id007 !ruby/object:Gem::Requirement
79
+ version_requirements: *4878900
80
+ - !ruby/object:Gem::Dependency
81
+ name: yard
82
+ requirement: &4877940 !ruby/object:Gem::Requirement
114
83
  none: false
115
- requirements:
84
+ requirements:
116
85
  - - ~>
117
- - !ruby/object:Gem::Version
118
- hash: 31
119
- segments:
120
- - 3
121
- - 12
122
- version: "3.12"
86
+ - !ruby/object:Gem::Version
87
+ version: '0.8'
123
88
  type: :development
124
- version_requirements: *id007
125
- - !ruby/object:Gem::Dependency
126
- name: yard
127
89
  prerelease: false
128
- requirement: &id008 !ruby/object:Gem::Requirement
90
+ version_requirements: *4877940
91
+ - !ruby/object:Gem::Dependency
92
+ name: vagrant
93
+ requirement: &4876980 !ruby/object:Gem::Requirement
129
94
  none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- hash: 27
134
- segments:
135
- - 0
136
- - 8
137
- version: "0.8"
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
138
99
  type: :development
139
- version_requirements: *id008
140
- description: |-
141
- = coral_vagrant
142
-
143
- This library contains various commands and exposes a data model to Vagrant
144
- that allows for tightly integrated management of Virtual machines that are
145
- linked to remote servers.
146
-
147
- This also allows for custom execution plans.
148
-
149
- Note: This library is still very early in development!
150
-
151
- == Contributing to coral_vagrant
152
-
153
- * Check out the latest {major}.{minor} branch to make sure the feature hasn't
154
- been implemented or the bug hasn't been fixed yet.
155
- * Check out the issue tracker to make sure someone already hasn't requested
156
- it and/or contributed it.
157
- * Fork the project.
158
- * Start a feature/bugfix branch.
159
- * Commit and push until you are happy with your contribution.
160
- * Make sure to add tests for it. This is important so I don't break it in a
161
- future version unintentionally.
162
- * Please try not to mess with the Rakefile, version, or history. If you want
163
- to have your own version, or is otherwise necessary, that is fine, but
164
- please isolate to its own commit so I can cherry-pick around it.
165
-
166
- == Copyright
167
-
168
- Licensed under GPLv3. See LICENSE.txt for further details.
169
-
170
- Copyright (c) 2013 Adrian Webb <adrian.webb@coraltech.net>
171
- Coral Technology Group LLC
100
+ prerelease: false
101
+ version_requirements: *4876980
102
+ description: ! "= coral_vagrant\n\nThis library contains various commands and exposes
103
+ a data model to Vagrant\nthat allows for tightly integrated management of Virtual
104
+ machines that are\nlinked to remote servers. \n\nThis also allows for custom execution
105
+ plans.\n\nNote: This library is still very early in development!\n\n== Contributing
106
+ to coral_vagrant\n \n* Check out the latest {major}.{minor} branch to make sure
107
+ the feature hasn't \n been implemented or the bug hasn't been fixed yet.\n* Check
108
+ out the issue tracker to make sure someone already hasn't requested \n it and/or
109
+ contributed it.\n* Fork the project.\n* Start a feature/bugfix branch.\n* Commit
110
+ and push until you are happy with your contribution.\n* Make sure to add tests for
111
+ it. This is important so I don't break it in a \n future version unintentionally.\n*
112
+ Please try not to mess with the Rakefile, version, or history. If you want \n to
113
+ have your own version, or is otherwise necessary, that is fine, but \n please isolate
114
+ to its own commit so I can cherry-pick around it.\n\n== Copyright\n\nLicensed under
115
+ GPLv3. See LICENSE.txt for further details.\n\nCopyright (c) 2013 Adrian Webb
116
+ <adrian.webb@coraltech.net>\nCoral Technology Group LLC"
172
117
  email: adrian.webb@coraltech.net
173
- executables: []
174
-
118
+ executables:
119
+ - coral
175
120
  extensions: []
176
-
177
- extra_rdoc_files:
121
+ extra_rdoc_files:
178
122
  - LICENSE.txt
179
123
  - README.rdoc
180
- files:
124
+ files:
181
125
  - .document
182
126
  - Gemfile
183
127
  - Gemfile.lock
@@ -186,54 +130,52 @@ files:
186
130
  - Rakefile
187
131
  - VERSION
188
132
  - Vagrantfile
133
+ - bin/coral
189
134
  - coral_vagrant.gemspec
190
135
  - lib/coral_vagrant.rb
136
+ - lib/coral_vagrant/commands/coral/add.rb
137
+ - lib/coral_vagrant/commands/coral/config.rb
138
+ - lib/coral_vagrant/commands/coral/create.rb
139
+ - lib/coral_vagrant/commands/coral/image.rb
140
+ - lib/coral_vagrant/commands/coral/init.rb
141
+ - lib/coral_vagrant/commands/coral/push.rb
142
+ - lib/coral_vagrant/commands/coral/rm.rb
143
+ - lib/coral_vagrant/commands/coral/run.rb
144
+ - lib/coral_vagrant/commands/coral/send.rb
145
+ - lib/coral_vagrant/commands/coral/update.rb
191
146
  - lib/coral_vagrant/commands/coral_base.rb
192
- - lib/coral_vagrant/commands/coral_init.rb
193
- - lib/coral_vagrant/commands/coral_push.rb
194
- - lib/coral_vagrant/commands/coral_run.rb
195
- - lib/coral_vagrant/commands/coral_update.rb
147
+ - lib/plugin.rb
196
148
  - spec/coral_test_kernel.rb
197
149
  - spec/spec_helper.rb
198
150
  homepage: http://github.com/coraltech/ruby-coral_vagrant
199
- licenses:
151
+ licenses:
200
152
  - GPLv3
201
153
  post_install_message:
202
- rdoc_options:
154
+ rdoc_options:
203
155
  - --title
204
156
  - Coral Vagrant library
205
157
  - --main
206
158
  - README.rdoc
207
159
  - --line-numbers
208
- require_paths:
160
+ require_paths:
209
161
  - lib
210
- required_ruby_version: !ruby/object:Gem::Requirement
162
+ required_ruby_version: !ruby/object:Gem::Requirement
211
163
  none: false
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- hash: 53
216
- segments:
217
- - 1
218
- - 8
219
- - 1
164
+ requirements:
165
+ - - ! '>='
166
+ - !ruby/object:Gem::Version
220
167
  version: 1.8.1
221
- required_rubygems_version: !ruby/object:Gem::Requirement
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
222
169
  none: false
223
- requirements:
224
- - - ">="
225
- - !ruby/object:Gem::Version
226
- hash: 3
227
- segments:
228
- - 0
229
- version: "0"
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
230
174
  requirements: []
231
-
232
175
  rubyforge_project: coral_vagrant
233
- rubygems_version: 1.8.15
176
+ rubygems_version: 1.8.11
234
177
  signing_key:
235
178
  specification_version: 3
236
179
  summary: Provides a data model and various Coral commands for Vagrant
237
180
  test_files: []
238
-
239
181
  has_rdoc:
@@ -1,78 +0,0 @@
1
-
2
- module Vagrant
3
- module Command
4
- module Coral
5
- class Init < Base
6
-
7
- #-----------------------------------------------------------------------------
8
- # Execution
9
-
10
- def execute
11
- options = {}
12
- success = true
13
-
14
- opts = OptionParser.new do |opts|
15
- opts.banner = "Usage: vagrant coral init [server-name]... [-h] ..."
16
- opts.separator ""
17
-
18
- opts.on("-d", "--destroy", "Remove existing servers and start from scratch") do |d|
19
- options[:destroy] = d
20
- end
21
-
22
- opts.on("-f", "--force", "Destroy without confirmation") do |f|
23
- options[:force] = f
24
- end
25
-
26
- #---
27
-
28
- options[:min] = 1
29
- opts.on("-m", "--min TRIES", "Minimum number of provision runs") do |m|
30
- options[:min] = m
31
- end
32
-
33
- options[:tries] = 1
34
- opts.on("-t", "--tries TRIES", "Number of provision attempts before stopping with an error") do |t|
35
- options[:tries] = t
36
- end
37
-
38
- options[:exit] = ''
39
- opts.on("-e", "--exit CONDITIONS", "Conditions on which to exit in the format (separated by comma): 'User[git]:ensure:created'") do |e|
40
- options[:exit] = e
41
- end
42
-
43
- options[:repos] = ''
44
- opts.on("-r", "--repos REPO_DIRS,...'", "Local directories of repositories to syncronize remotes (relative to the Vagrantfile root)") do |r|
45
- options[:repos] = r
46
- end
47
- end
48
-
49
- options[:min] = 1
50
- options[:auth] = true
51
-
52
- #---
53
-
54
- servers = parse_options(opts)
55
- return if ! servers
56
-
57
- with_target_vms(servers) do |vm|
58
- @env.ui.info("Starting initialization run for: #{vm.name}")
59
-
60
- server = ::Coral::Cloud::Server.new({
61
- :cloud => ::Coral.vagrant,
62
- :machine => vm,
63
- :logger => @logger,
64
- :ui => @env.ui,
65
- })
66
-
67
- if options[:destroy]
68
- success = server.destroy(options) if success
69
- end
70
- success = server.start(options) if success
71
- success = server.update(options) if success
72
- end
73
- exit success ? 0 : 1
74
- end
75
- end
76
- end
77
- end
78
- end
@@ -1,84 +0,0 @@
1
-
2
- module Vagrant
3
- module Command
4
- module Coral
5
- class Push < Base
6
-
7
- #-----------------------------------------------------------------------------
8
- # Execution
9
-
10
- def execute
11
- options = {}
12
- success = true
13
-
14
- opts = OptionParser.new do |opts|
15
- opts.banner = "Usage: vagrant coral push [server-name]... [-h] ..."
16
- opts.separator ""
17
-
18
- opts.on("-c", "--commit", "Commit any uncommitted changes before pushing to remotes") do |c|
19
- options[:commit] = c
20
- end
21
-
22
- opts.on("-e", "--allow_empty", "Allow commits with no changes") do |e|
23
- options[:allow_empty] = e
24
- end
25
-
26
- opts.on("-t", "--tags", "Push all local tags with selected branch") do |t|
27
- options[:tags] = t
28
- end
29
-
30
- #---
31
-
32
- options[:message] = ''
33
- opts.on("-m", "--message MESSAGE", "Commit message") do |m|
34
- options[:message] = m
35
- end
36
-
37
- options[:author] = ''
38
- opts.on("-a", "--author AUTHOR", "Author of the changes being committed if different from the committer") do |a|
39
- options[:author] = a
40
- end
41
-
42
- options[:branch] = ''
43
- opts.on("-b", "--branch BRANCH", "Local branch of the remotes to push") do |b|
44
- options[:branch] = b
45
- end
46
-
47
- options[:repos] = ''
48
- opts.on("-r", "--repos REPO_DIRS,...", "Local directories of repositories to push (relative to the Vagrantfile root)") do |r|
49
- options[:repos] = r
50
- end
51
- end
52
-
53
- options[:auth] = true
54
-
55
- #---
56
-
57
- remotes = parse_options(opts)
58
- return if ! remotes
59
-
60
- if remotes.empty?
61
- remotes = [ 'all' ]
62
- end
63
-
64
- remotes.each do |remote_name|
65
- @env.ui.info("Starting push for: #{remote_name}")
66
-
67
- server = ::Coral::Cloud::Server.new({
68
- :cloud => ::Coral.vagrant,
69
- :machine => remote_name,
70
- :logger => @logger,
71
- :ui => @env.ui,
72
- })
73
-
74
- if options[:commit]
75
- success = server.commit(options) if success
76
- end
77
- success = server.push(options) if success
78
- end
79
- exit success ? 0 : 1
80
- end
81
- end
82
- end
83
- end
84
- end