acquia_toolbelt 2.0.0 → 2.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.
@@ -1 +1 @@
1
- 1.9.3-p327
1
+ 1.9.3
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - "1.9.2"
4
+ - "1.9.3"
5
+ - "2.0.0"
6
+ script: "bundle exec ruby ./spec_helper.rb"
7
+ before_install: "ruby ./script/setup_build"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acquia_toolbelt (1.5.1)
4
+ acquia_toolbelt (2.0.1)
5
5
  faraday (= 0.8.8)
6
6
  highline (= 1.6.19)
7
7
  json (= 1.8.0)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Acquia Toolbelt [![Gem Version](https://badge.fury.io/rb/acquia_toolbelt.png)](http://badge.fury.io/rb/acquia_toolbelt)
1
+ # Acquia Toolbelt [![Gem Version](https://badge.fury.io/rb/acquia_toolbelt.png)](http://badge.fury.io/rb/acquia_toolbelt) [![Build Status](https://travis-ci.org/jacobbednarz/acquia-toolbelt.png)](https://travis-ci.org/jacobbednarz/acquia-toolbelt)
2
2
 
3
3
  The Acquia Toolbelt is a CLI tool for using the Acquia Cloud API. Some of the
4
4
  features include getting information around your servers, subscription,
@@ -12,10 +12,12 @@ Installation is available (and recommended) via Ruby Gems.
12
12
  $ gem install acquia_toolbelt
13
13
  ```
14
14
 
15
- Once installed, the toolbelt is accessible via invoking `acquia` within the command line.
15
+ Once installed, the toolbelt is accessible via invoking `acquia` within the
16
+ command line.
16
17
 
17
18
  ## Usage
18
- You can see all available commands by running `acquia help`. Additonally, more information on each command is available via `acquia [COMMAND] help`.
19
+ You can see all available commands by running `acquia help`. Additonally, more
20
+ information on each command is available via `acquia [COMMAND] help`.
19
21
 
20
22
  ```
21
23
  $ acquia help
@@ -43,7 +45,7 @@ Options:
43
45
 
44
46
  #### Example commands
45
47
 
46
- Without parameters
48
+ Without parameters:
47
49
 
48
50
  ```
49
51
  $ acquia database:list
@@ -52,7 +54,7 @@ $ acquia database:list
52
54
  > mydb2
53
55
  ```
54
56
 
55
- With parameters
57
+ With parameters:
56
58
 
57
59
  ```
58
60
  $ acquia database:list -e dev -d mydb
@@ -66,13 +68,19 @@ $ acquia database:list -e dev -d mydb
66
68
 
67
69
  ## Getting started
68
70
 
69
- Before you can start using any commands, you need to first run `acquia auth:login`. This will write your login details to a local netrc file so that you won't be prompted for login details every time a request is made. After that, the sky is the limit!
71
+ Before you can start using any commands, you need to first run
72
+ `acquia auth:login`. This will write your login details to a local netrc file so
73
+ that you won't be prompted for login details every time a request is made. After
74
+ that, the sky is the limit!
70
75
 
71
76
  ## FAQ
72
77
 
73
- **Q: Is there support for proxies and corporate firewalls? **
78
+ **Q: Is there support for proxies and corporate firewalls?**
74
79
 
75
- **A:** By god yes. Proxies and corporate firewalls are the bane of my existence so there was no way this toolbelt _wasn't_ going to support it. To use a proxy, all you need to do is set your HTTPS_PROXY environment variable to the required value. Example:
80
+ **A:** By god yes. Proxies and corporate firewalls are the bane of my existence
81
+ so there was no way this toolbelt _wasn't_ going to support it. To use a proxy,
82
+ all you need to do is set your HTTPS_PROXY environment variable to the required
83
+ value. Example:
76
84
 
77
85
  ```bash
78
86
  $ export HTTPS_PROXY="http://myproxy.url.internal:1234"
@@ -85,20 +93,55 @@ $ echo $HTTPS_PROXY
85
93
  $ http://myproxy.url.internal:1234
86
94
  ```
87
95
 
88
- **Q: Is there somewhere I can see all the commands with required parameters? **
96
+ **Q: Is there somewhere I can see all the commands with required parameters?**
89
97
 
90
- **A:** Yep. Check out the [commands listing](https://github.com/jacobbednarz/acquia-toolbelt/wiki/Commands) in the [wiki](https://github.com/jacobbednarz/acquia-toolbelt/wiki).
98
+ **A:** Yep. Check out the
99
+ [commands listing](https://github.com/jacobbednarz/acquia-toolbelt/wiki/Commands)
100
+ in the [wiki](https://github.com/jacobbednarz/acquia-toolbelt/wiki).
91
101
 
92
- ## Running tests
102
+ ## Hacking on the Acquia Toolbelt
103
+
104
+ The Acquia Toolbelt uses [VCR](https://github.com/vcr/vcr) for recording and
105
+ replaying API fixtures during test runs - doing this allows the tests to stay
106
+ fast and easy for anyone to run.
107
+
108
+ Authenticated requests are currently using the user credentials from the netrc
109
+ file on your local system. It is a good idea to have this setup first (simply
110
+ by running `acquia auth:login`) as if you are recording new cassettes you will
111
+ need to be able to make actual requests. Don't worry about your user credentials
112
+ being stored in the fixtures as they are removed during the request and they
113
+ will appear as ACQUIA_USERNAME and ACQUIA_PASSWORD in the requests
114
+ respectively.
115
+
116
+ Since the cassettes are periodically refreshed to match changes to the API,
117
+ remember the keep the following in mind when making cassettes.
118
+
119
+ * **Specs should be idempotent.** The HTTP calls made during a spec should be
120
+ able to be run over and over. This means deleting a known resource prior to
121
+ creating it if the name has to be unique.
122
+ * **Specs should be able to be run in random order.** If a spec depends on
123
+ another resource as a fixture, make sure that's created in the scope of the
124
+ spec and not depend on a previous spec to create the data needed.
125
+ * **Do not depend on authenticated user info.** Instead of asserting actual
126
+ values in resources, try to assert the existence of a key or that a response
127
+ is an Array. We're testing the client, not the API.
128
+
129
+ ### Running and writing new tests
130
+
131
+ The testing is mainly [MiniTest](https://github.com/seattlerb/minitest). To run
132
+ the test suite, execute the following in the root of the repository:
93
133
 
94
134
  ```
95
135
  bundle exec ruby spec_helper.rb
96
136
  ```
97
137
 
98
- ## Contributing
138
+ ### Supported versions
139
+
140
+ This library aims to support and is [tested against](https://travis-ci.org/jacobbednarz/acquia-toolbelt) the following Ruby implementations:
141
+
142
+ * Ruby 1.9.2
143
+ * Ruby 1.9.3
144
+ * Ruby 2.0.0
99
145
 
100
- 1. Fork it
101
- 2. Create your feature branch (`git checkout -b my-new-feature`)
102
- 3. Commit your changes (`git commit -am 'Add some feature'`)
103
- 4. Push to the branch (`git push origin my-new-feature`)
104
- 5. Create new Pull Request
146
+ If you would like support for other implementations or versions, please open an
147
+ issue and it can be looked into.
@@ -27,7 +27,8 @@ module AcquiaToolbelt
27
27
  # Use a custom symbol to separate the commands. Useful for rake styled
28
28
  # commands.
29
29
  if given_args[0].include? ":"
30
- given_args = given_args.flat_map {|e| e.split(':')}
30
+ commands = given_args.shift.split(":")
31
+ given_args = given_args.unshift(commands).flatten
31
32
  end
32
33
 
33
34
  super(given_args, {:shell => ui}.merge(config))
@@ -99,4 +100,4 @@ module AcquiaToolbelt
99
100
  desc "environments", ""
100
101
  subcommand "environments", AcquiaToolbelt::CLI::Environments
101
102
  end
102
- end
103
+ end
@@ -1,3 +1,3 @@
1
1
  module AcquiaToolbelt
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Create the temporary netrc with some mocked data.
4
+ `touch ~/.netrc`
5
+ `chmod 0600 ~/.netrc`
6
+ `echo "# This entry was added for connecting to the Acquia Cloud API\nmachine cloudapi.acquia.com\n login me@acquia.com\n password t0ps3cret" > ~/.netrc`
@@ -5,4 +5,4 @@ describe "when reading netrc values" do
5
5
  n = Netrc.read
6
6
  assert n["cloudapi.acquia.com"], "login values cannot be read or do not exist."
7
7
  end
8
- end
8
+ end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acquia_toolbelt
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jacob Bednarz
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-10-31 00:00:00.000000000 Z
12
+ date: 2013-11-05 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: thor
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - '='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - '='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: netrc
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - '='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - '='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: highline
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - '='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - '='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: faraday
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - '='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - '='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: json
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - '='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - '='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: rainbow
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - '='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - '='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: sshkey
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - '='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - '='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: bundler
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rake
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: minitest
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - ! '>='
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :development
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - ! '>='
151
172
  - !ruby/object:Gem::Version
@@ -160,6 +181,7 @@ extra_rdoc_files: []
160
181
  files:
161
182
  - .gitignore
162
183
  - .ruby-version
184
+ - .travis.yml
163
185
  - Gemfile
164
186
  - Gemfile.lock
165
187
  - LICENSE
@@ -268,32 +290,33 @@ files:
268
290
  - lib/vendor/thor/spec/thor_spec.rb
269
291
  - lib/vendor/thor/spec/util_spec.rb
270
292
  - lib/vendor/thor/thor.gemspec
293
+ - script/setup_build
271
294
  - spec/auth_spec.rb
272
295
  - spec_helper.rb
273
296
  homepage: https://github.com/jacobbednarz/acquia-toolbelt
274
297
  licenses:
275
298
  - MIT
276
- metadata: {}
277
299
  post_install_message:
278
300
  rdoc_options: []
279
301
  require_paths:
280
302
  - lib
281
303
  required_ruby_version: !ruby/object:Gem::Requirement
304
+ none: false
282
305
  requirements:
283
306
  - - ! '>='
284
307
  - !ruby/object:Gem::Version
285
308
  version: '0'
286
309
  required_rubygems_version: !ruby/object:Gem::Requirement
310
+ none: false
287
311
  requirements:
288
312
  - - ! '>='
289
313
  - !ruby/object:Gem::Version
290
314
  version: '0'
291
315
  requirements: []
292
316
  rubyforge_project:
293
- rubygems_version: 2.0.3
317
+ rubygems_version: 1.8.23
294
318
  signing_key:
295
- specification_version: 4
319
+ specification_version: 3
296
320
  summary: ''
297
321
  test_files:
298
322
  - spec/auth_spec.rb
299
- has_rdoc:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzQxOTk4OGFhZDkzMmEwYzBmZDMzN2NmZDc4YWY4YTA0N2Q5YjUxZA==
5
- data.tar.gz: !binary |-
6
- NjhjZGNiNGUxMDg4ZDczMTQzMWMzNjQwYmEwZWNiZTc3N2Y1ODFlNg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MGMxMzc5ZmEyOTUwZTVkNjA0MDk5ZjE5YWY0Y2U2ODdlMzY0NTJlNTNjZTFj
10
- ZWFiMWI1ODg4MjU4ZDhjZTI1N2ZkNjAzZTY2MmMyYjZlNmY2ZjA4M2I0MDI0
11
- NjFiNjM1MGEwZTYxZDMzNzViYjAzMWIyNjQxMjQ2ZmY1MjdjYzU=
12
- data.tar.gz: !binary |-
13
- MDY1YTM2ZWIxODJjNjE4MzI5MjVmNzE5OWU1YmI2MGRmMjMxZTkwZDQwNDRi
14
- NWRlM2I0YjIyODQ0OGQ4YTc1YmUyMzExNmJlY2VlMzJjZTBlY2Q5ZWJlZmEy
15
- MGQ2OTEyMmNjZjhjMmUwYTIwYzRmZWRkZjJiMTIxMWQ3MzhkNjE=