acquia_toolbelt 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzQwNDA2Y2I3N2ZkMTY3NDUyZDRhZmEzYTBiZWY4NmNhYWM0MDdiMQ==
4
+ YTIzNDE0ZDYwY2IzODBlMGY5NzcxZmRiYmIwY2YzMGVmZTVjOTdiYg==
5
5
  data.tar.gz: !binary |-
6
- NmNlMTgyMTIyMTgyNWVkODQ4MGQ5NGY1OTQyNTRhNDhhNTliZWYzZg==
6
+ NzhlNjI2ZDE3ODM5MjZkYWU0ZGQwYTJjN2MxMzBiNjdkOTFkNGIyYw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZThiNWRmYWExYzE4NDE2NDQwMzYzNmUwNWQzYzM0YzNhZThhNjM4MjdlOGFk
10
- YzVkNjlhNTY4Y2U5MzFjYjNlMzYyZDZlOThhZTU4MzRhM2I3ZjY3YjFlNWJl
11
- MzgxMmNmNjUzMDVmNjM2ZmMzZmRhMTA2N2U3NzdjODE4MTRjZTU=
9
+ MjczMDJiZWRmZDE4NDRkNzQyZTBiNzc5MTI2MWI4N2Q0MDlkMDVjY2VhMmNj
10
+ Mjc0YzUwZmMyYWM0ZTNlNmMxOTExNzQwZTgyZWM1ZDUwMDBjNzNhMGZiMDI1
11
+ OTcxMzZhZGExNzIwYTcyZTU1YjQ5OTYzZDNlNzEwMzBiMmNjMDY=
12
12
  data.tar.gz: !binary |-
13
- OWQwNjMzZjVmYTViN2JhYzc1ZDMzYTUwYWZjZmI5YzJmMzU2MzBjMGNhZWIy
14
- YWUwOWYyNzE5ZDM3YWZiODVjZWMyNDExNzY2ODczNGJjNWU4MjNiN2FiOTZm
15
- ZTJlNzhmMTNjYmI2NzJjOWQ1MTI4ZjY0MTBlNmVlOTRhNTY5MjU=
13
+ Yzc0YTIxNmMwNzlmMTg1MTA0MzY2ODE3NDY1MTBmNTVmNjYyODQ3MjFlMjQ1
14
+ OTgwMDk0MjBmNDk2YzhkMTJjY2Y3Mzk0YmRiNmViMzk4MTIyZDFhMTM0OTYz
15
+ MjQyNDVjYTI1MGVjNTgxZjg4YzE0ZjY1Zjc5YWRmNGE1MmQ4NDY=
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  .DS_Store
2
- .tmp
3
- .swp
2
+ *.tmp
3
+ *.swp
4
+ *.gem
data/bin/acquia CHANGED
@@ -41,8 +41,13 @@ class Acquia < Thor
41
41
  n = Netrc.read
42
42
  @acquia_user, @acquia_password = n["cloudapi.acquia.com"]
43
43
 
44
- #conn = Faraday.new(:proxy => "http://csydl217.au.fcl.internal:3128")
45
- conn = Faraday.new
44
+ # Check if the user is behind a proxy and add the proxy settings if found.
45
+ if using_proxy?
46
+ conn = Faraday.new(:proxy => ENV["HTTPS_PROXY"])
47
+ else
48
+ conn = Faraday.new
49
+ end
50
+
46
51
  conn.basic_auth(@acquia_user, @acquia_password)
47
52
 
48
53
  case method
@@ -105,6 +110,17 @@ class Acquia < Thor
105
110
  purge_request = acquia_api_call "sites/#{subscription}/envs/#{environment}/domains/#{domain}/cache", "DELETE"
106
111
  success "#{domain} has been successfully purged." if purge_request["id"]
107
112
  end
113
+
114
+ # Internal: Check whether a proxy is in use.
115
+ #
116
+ # Return boolean based on whether HTTPS_PROXY is set.
117
+ def using_proxy?
118
+ if ENV["HTTPS_PROXY"]
119
+ true
120
+ else
121
+ false
122
+ end
123
+ end
108
124
  }
109
125
 
110
126
  # Public: Log into the Acquia Cloud API.
@@ -1,3 +1,3 @@
1
1
  module AcquiaToolbelt
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
data/readme.md CHANGED
@@ -44,6 +44,23 @@ Commands:
44
44
 
45
45
  Before you can start using any commands, you need to first run `acquia 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!
46
46
 
47
+ ## FAQ
48
+
49
+ **Q:** Is there support for proxies and corporate firewalls?
50
+
51
+ **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:
52
+
53
+ ```bash
54
+ $ export HTTPS_PROXY="http://myproxy.url.internal:1234"
55
+ ```
56
+
57
+ Then to check the value was correctly set:
58
+
59
+ ```bash
60
+ $ echo $HTTPS_PROXY
61
+ $ http://myproxy.url.internal:1234
62
+ ```
63
+
47
64
  ## Contributing
48
65
 
49
66
  1. Fork it
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acquia_toolbelt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Bednarz