acquia_toolbelt 1.0.0 → 1.1.0
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.
- checksums.yaml +8 -8
- data/.gitignore +3 -2
- data/bin/acquia +18 -2
- data/lib/acquia_toolbelt/version.rb +1 -1
- data/readme.md +17 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTIzNDE0ZDYwY2IzODBlMGY5NzcxZmRiYmIwY2YzMGVmZTVjOTdiYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzhlNjI2ZDE3ODM5MjZkYWU0ZGQwYTJjN2MxMzBiNjdkOTFkNGIyYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjczMDJiZWRmZDE4NDRkNzQyZTBiNzc5MTI2MWI4N2Q0MDlkMDVjY2VhMmNj
|
10
|
+
Mjc0YzUwZmMyYWM0ZTNlNmMxOTExNzQwZTgyZWM1ZDUwMDBjNzNhMGZiMDI1
|
11
|
+
OTcxMzZhZGExNzIwYTcyZTU1YjQ5OTYzZDNlNzEwMzBiMmNjMDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzc0YTIxNmMwNzlmMTg1MTA0MzY2ODE3NDY1MTBmNTVmNjYyODQ3MjFlMjQ1
|
14
|
+
OTgwMDk0MjBmNDk2YzhkMTJjY2Y3Mzk0YmRiNmViMzk4MTIyZDFhMTM0OTYz
|
15
|
+
MjQyNDVjYTI1MGVjNTgxZjg4YzE0ZjY1Zjc5YWRmNGE1MmQ4NDY=
|
data/.gitignore
CHANGED
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
|
-
#
|
45
|
-
|
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.
|
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
|