vmc 0.0.8 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/LICENSE +8 -3
  2. data/README.md +83 -0
  3. data/Rakefile +11 -65
  4. data/bin/vmc +3 -2
  5. data/lib/cli/commands/admin.rb +57 -0
  6. data/lib/cli/commands/apps.rb +828 -0
  7. data/lib/cli/commands/base.rb +56 -0
  8. data/lib/cli/commands/misc.rb +99 -0
  9. data/lib/cli/commands/services.rb +84 -0
  10. data/lib/cli/commands/user.rb +60 -0
  11. data/lib/cli/config.rb +109 -0
  12. data/lib/cli/core_ext.rb +119 -0
  13. data/lib/cli/errors.rb +19 -0
  14. data/lib/cli/frameworks.rb +97 -0
  15. data/lib/cli/runner.rb +437 -0
  16. data/lib/cli/services_helper.rb +74 -0
  17. data/lib/cli/usage.rb +94 -0
  18. data/lib/cli/version.rb +5 -0
  19. data/lib/cli/zip_util.rb +61 -0
  20. data/lib/cli.rb +30 -0
  21. data/lib/vmc/client.rb +415 -0
  22. data/lib/vmc/const.rb +19 -0
  23. data/lib/vmc.rb +2 -1589
  24. data/spec/assets/app_info.txt +9 -0
  25. data/spec/assets/app_listings.txt +9 -0
  26. data/spec/assets/bad_create_app.txt +9 -0
  27. data/spec/assets/delete_app.txt +9 -0
  28. data/spec/assets/global_service_listings.txt +9 -0
  29. data/spec/assets/good_create_app.txt +9 -0
  30. data/spec/assets/good_create_service.txt +9 -0
  31. data/spec/assets/info_authenticated.txt +27 -0
  32. data/spec/assets/info_return.txt +15 -0
  33. data/spec/assets/info_return_bad.txt +16 -0
  34. data/spec/assets/login_fail.txt +9 -0
  35. data/spec/assets/login_success.txt +9 -0
  36. data/spec/assets/sample_token.txt +1 -0
  37. data/spec/assets/service_already_exists.txt +9 -0
  38. data/spec/assets/service_listings.txt +9 -0
  39. data/spec/assets/service_not_found.txt +9 -0
  40. data/spec/assets/user_info.txt +9 -0
  41. data/spec/spec_helper.rb +11 -0
  42. data/spec/unit/cli_opts_spec.rb +73 -0
  43. data/spec/unit/client_spec.rb +284 -0
  44. metadata +114 -71
  45. data/README +0 -58
  46. data/lib/parse.rb +0 -719
  47. data/lib/vmc_base.rb +0 -205
  48. data/vendor/gems/httpclient/VERSION +0 -1
  49. data/vendor/gems/httpclient/lib/http-access2/cookie.rb +0 -1
  50. data/vendor/gems/httpclient/lib/http-access2/http.rb +0 -1
  51. data/vendor/gems/httpclient/lib/http-access2.rb +0 -53
  52. data/vendor/gems/httpclient/lib/httpclient/auth.rb +0 -522
  53. data/vendor/gems/httpclient/lib/httpclient/cacert.p7s +0 -1579
  54. data/vendor/gems/httpclient/lib/httpclient/cacert_sha1.p7s +0 -1579
  55. data/vendor/gems/httpclient/lib/httpclient/connection.rb +0 -84
  56. data/vendor/gems/httpclient/lib/httpclient/cookie.rb +0 -562
  57. data/vendor/gems/httpclient/lib/httpclient/http.rb +0 -867
  58. data/vendor/gems/httpclient/lib/httpclient/session.rb +0 -864
  59. data/vendor/gems/httpclient/lib/httpclient/ssl_config.rb +0 -417
  60. data/vendor/gems/httpclient/lib/httpclient/timeout.rb +0 -136
  61. data/vendor/gems/httpclient/lib/httpclient/util.rb +0 -86
  62. data/vendor/gems/httpclient/lib/httpclient.rb +0 -1020
  63. data/vendor/gems/httpclient/lib/tags +0 -908
metadata CHANGED
@@ -1,166 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
5
- prerelease: false
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
- - 8
10
- version: 0.0.8
8
+ - 2
9
+ - 4
10
+ version: 0.2.4
11
11
  platform: ruby
12
12
  authors:
13
- - Ezra Zygmuntowicz
13
+ - VMware
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-15 00:00:00 -08:00
18
+ date: 2011-03-19 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: main
22
+ name: json_pure
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- hash: 51
29
+ hash: 1
30
30
  segments:
31
- - 4
32
- - 3
33
- - 0
34
- version: 4.3.0
31
+ - 1
32
+ - 5
33
+ - 1
34
+ version: 1.5.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
38
- name: arrayfields
38
+ name: rubyzip2
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- hash: 43
45
+ hash: 13
46
46
  segments:
47
- - 4
48
- - 7
49
- - 4
50
- version: 4.7.4
47
+ - 2
48
+ - 0
49
+ - 1
50
+ version: 2.0.1
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency
54
- name: fattr
54
+ name: highline
55
55
  prerelease: false
56
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
57
  none: false
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- hash: 7
61
+ hash: 13
62
62
  segments:
63
- - 2
64
- - 2
65
- - 0
66
- version: 2.2.0
63
+ - 1
64
+ - 6
65
+ - 1
66
+ version: 1.6.1
67
67
  type: :runtime
68
68
  version_requirements: *id003
69
69
  - !ruby/object:Gem::Dependency
70
- name: json_pure
70
+ name: rest-client
71
71
  prerelease: false
72
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
- - - ~>
75
+ - - ">="
76
76
  - !ruby/object:Gem::Version
77
- hash: 11
77
+ hash: 13
78
78
  segments:
79
79
  - 1
80
- - 4
81
80
  - 6
82
- version: 1.4.6
81
+ - 1
82
+ version: 1.6.1
83
+ - - <
84
+ - !ruby/object:Gem::Version
85
+ hash: 11
86
+ segments:
87
+ - 1
88
+ - 7
89
+ - 0
90
+ version: 1.7.0
83
91
  type: :runtime
84
92
  version_requirements: *id004
85
93
  - !ruby/object:Gem::Dependency
86
- name: mime-types
94
+ name: terminal-table
87
95
  prerelease: false
88
96
  requirement: &id005 !ruby/object:Gem::Requirement
89
97
  none: false
90
98
  requirements:
91
99
  - - ~>
92
100
  - !ruby/object:Gem::Version
93
- hash: 47
101
+ hash: 3
94
102
  segments:
95
103
  - 1
96
- - 16
97
- version: "1.16"
104
+ - 4
105
+ - 2
106
+ version: 1.4.2
98
107
  type: :runtime
99
108
  version_requirements: *id005
100
109
  - !ruby/object:Gem::Dependency
101
- name: rubyzip2
110
+ name: rake
102
111
  prerelease: false
103
112
  requirement: &id006 !ruby/object:Gem::Requirement
104
113
  none: false
105
114
  requirements:
106
- - - ~>
115
+ - - ">="
107
116
  - !ruby/object:Gem::Version
108
- hash: 13
117
+ hash: 3
109
118
  segments:
110
- - 2
111
119
  - 0
112
- - 1
113
- version: 2.0.1
114
- type: :runtime
120
+ version: "0"
121
+ type: :development
115
122
  version_requirements: *id006
116
123
  - !ruby/object:Gem::Dependency
117
- name: highline
124
+ name: rspec
118
125
  prerelease: false
119
126
  requirement: &id007 !ruby/object:Gem::Requirement
120
127
  none: false
121
128
  requirements:
122
129
  - - ~>
123
130
  - !ruby/object:Gem::Version
124
- hash: 13
131
+ hash: 27
125
132
  segments:
126
133
  - 1
127
- - 6
128
- - 1
129
- version: 1.6.1
130
- type: :runtime
134
+ - 3
135
+ - 0
136
+ version: 1.3.0
137
+ type: :development
131
138
  version_requirements: *id007
132
- description: A gem that provides command line access to the VMware Cloud Application Platform
133
- email: ez@vmware.com
139
+ - !ruby/object:Gem::Dependency
140
+ name: webmock
141
+ prerelease: false
142
+ requirement: &id008 !ruby/object:Gem::Requirement
143
+ none: false
144
+ requirements:
145
+ - - ~>
146
+ - !ruby/object:Gem::Version
147
+ hash: 3
148
+ segments:
149
+ - 1
150
+ - 5
151
+ - 0
152
+ version: 1.5.0
153
+ type: :development
154
+ version_requirements: *id008
155
+ description: Client library and CLI that provides access to the VMware Cloud Application Platform.
156
+ email: support@vmware.com
134
157
  executables:
135
158
  - vmc
136
159
  extensions: []
137
160
 
138
161
  extra_rdoc_files:
139
- - README
162
+ - README.md
140
163
  - LICENSE
141
164
  files:
142
165
  - LICENSE
143
- - README
166
+ - README.md
144
167
  - Rakefile
145
- - lib/parse.rb
168
+ - lib/cli.rb
146
169
  - lib/vmc.rb
147
- - lib/vmc_base.rb
148
- - vendor/gems/httpclient/lib/http-access2/cookie.rb
149
- - vendor/gems/httpclient/lib/http-access2/http.rb
150
- - vendor/gems/httpclient/lib/http-access2.rb
151
- - vendor/gems/httpclient/lib/httpclient/auth.rb
152
- - vendor/gems/httpclient/lib/httpclient/cacert.p7s
153
- - vendor/gems/httpclient/lib/httpclient/cacert_sha1.p7s
154
- - vendor/gems/httpclient/lib/httpclient/connection.rb
155
- - vendor/gems/httpclient/lib/httpclient/cookie.rb
156
- - vendor/gems/httpclient/lib/httpclient/http.rb
157
- - vendor/gems/httpclient/lib/httpclient/session.rb
158
- - vendor/gems/httpclient/lib/httpclient/ssl_config.rb
159
- - vendor/gems/httpclient/lib/httpclient/timeout.rb
160
- - vendor/gems/httpclient/lib/httpclient/util.rb
161
- - vendor/gems/httpclient/lib/httpclient.rb
162
- - vendor/gems/httpclient/lib/tags
163
- - vendor/gems/httpclient/VERSION
170
+ - lib/vmc/const.rb
171
+ - lib/vmc/client.rb
172
+ - lib/cli/frameworks.rb
173
+ - lib/cli/commands/misc.rb
174
+ - lib/cli/commands/base.rb
175
+ - lib/cli/commands/admin.rb
176
+ - lib/cli/commands/user.rb
177
+ - lib/cli/commands/services.rb
178
+ - lib/cli/commands/apps.rb
179
+ - lib/cli/version.rb
180
+ - lib/cli/core_ext.rb
181
+ - lib/cli/zip_util.rb
182
+ - lib/cli/errors.rb
183
+ - lib/cli/usage.rb
184
+ - lib/cli/services_helper.rb
185
+ - lib/cli/config.rb
186
+ - lib/cli/runner.rb
187
+ - spec/unit/cli_opts_spec.rb
188
+ - spec/unit/client_spec.rb
189
+ - spec/spec_helper.rb
190
+ - spec/assets/service_already_exists.txt
191
+ - spec/assets/login_success.txt
192
+ - spec/assets/good_create_app.txt
193
+ - spec/assets/info_return_bad.txt
194
+ - spec/assets/info_authenticated.txt
195
+ - spec/assets/login_fail.txt
196
+ - spec/assets/app_listings.txt
197
+ - spec/assets/good_create_service.txt
198
+ - spec/assets/service_not_found.txt
199
+ - spec/assets/app_info.txt
200
+ - spec/assets/bad_create_app.txt
201
+ - spec/assets/delete_app.txt
202
+ - spec/assets/global_service_listings.txt
203
+ - spec/assets/sample_token.txt
204
+ - spec/assets/user_info.txt
205
+ - spec/assets/info_return.txt
206
+ - spec/assets/service_listings.txt
164
207
  - bin/vmc
165
208
  has_rdoc: true
166
209
  homepage: http://vmware.com
@@ -192,9 +235,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
235
  requirements: []
193
236
 
194
237
  rubyforge_project:
195
- rubygems_version: 1.3.7
238
+ rubygems_version: 1.5.0
196
239
  signing_key:
197
240
  specification_version: 3
198
- summary: A gem that provides command line access to the VMware Cloud Application Platform
241
+ summary: Client library and CLI that provides access to the VMware Cloud Application Platform.
199
242
  test_files: []
200
243
 
data/README DELETED
@@ -1,58 +0,0 @@
1
- # Copyright 2010, VMware, Inc. Licensed under the
2
- # MIT license, please see the LICENSE file. All rights reserved
3
-
4
- VMC is the VMware Cloud CLI tool. This is the command line interface to VMware's Application PaaS
5
-
6
- ⚡ $ vmc -h
7
-
8
- version # version
9
- help, -h # show usage
10
-
11
- aliases # lists current aliases
12
- alias <alias>[=]<command> # create an alias for a command
13
-
14
- target [host[:port]] # reports current target or sets the target site
15
- info # information
16
- register [--email, --passwd] # register and create an account
17
- login [email] [--email, --passwd] # login
18
- logout # logout
19
- passwd # change password for current user
20
- user # display current user
21
-
22
- services # list of services available
23
-
24
- create-service <service> [--name, --bind] # create a service instance. we will
25
- # auto-generate a name if you leave off
26
- # the --name flag, if you add the --bind
27
- # flag with an app name we will also bind
28
- # the service to that app
29
-
30
- delete-service [service] # delete the service
31
-
32
- bind-service <service> <appname> # bind service to appname
33
- unbind-service <service> <appname> # unbind service from appname
34
-
35
- apps # list your apps
36
- push <appname> [--instances --exec
37
- --noframework --url
38
- --mem --path
39
- --no-start] # push and start the application
40
- push <appname> # push and start the application
41
- start <appname> # start the application
42
- stop <appname> # stop the application
43
- restart <appname> # restart the application
44
- delete <appname || --all> [--force] # delete the application
45
- update <appname> [--canary] # update the application
46
- instances <appname> [num] # list instances, scale up or down
47
- # the number of instances
48
-
49
- mem <appname> [memsize] # update the memory reservation for this application
50
-
51
- crashes <appname> # list recent application crashes
52
- crashlogs <appname> [--instance] # dump all the logs for the crashed instance
53
- logs <appname> [--instance] # dump all the logs for the instance
54
- files <appname> [path] [--instance] # directory listing or file download
55
- stats <appname> # report resource usage for the application
56
-
57
- map <appname> <url> # register the application with the url
58
- unmap <appname> <url> # unregister the application from the url