ratonvirus-resty 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/README.md +27 -1
- data/lib/generators/ratonviurs/resty/templates/initializer.rb +1 -1
- data/lib/ratonvirus/resty/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ca674bbaa7388fe3abf005c42fab873240a3496ab2fd2abf12a0510a492f8a2
|
4
|
+
data.tar.gz: 546e68bff0c07f0632e967faa1d9f8e8a4ae27dc900c25932bc8df65b0484e0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1849cc1308c24d5de8830167009af88ddc0c346a8b248c4010ebb6a19a5728dc77bd24802885fe7b67c90020db0a109512c207a63edafacc681a100b1669ae4b
|
7
|
+
data.tar.gz: ad858fa1e34e4c3f9c8a4fef415fcf35e8b9cfac3b9db72cdcf2a57bba74464f48717c0411f259e7488f96f8111af5dfaf8a47522bd5743fd037d417e5f60a62
|
data/README.md
CHANGED
@@ -22,7 +22,33 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### Rails Integration
|
26
|
+
When using rails you can use a generator to create an initializer to configure
|
27
|
+
this gem:
|
28
|
+
|
29
|
+
```bash
|
30
|
+
$ rails generate ratonvirus-resty:install
|
31
|
+
```
|
32
|
+
|
33
|
+
### How do I configure the API endpoints.
|
34
|
+
|
35
|
+
You can set defaults in the generated initializer:
|
36
|
+
|
37
|
+
# config/initializers/ratonvirus-resty.rb
|
38
|
+
GetAgApi.configure do |config|
|
39
|
+
config.service_url = ENV.fetch('RESTY_SERVICE_URL', 'http://localhost:9000/scan')
|
40
|
+
config.username = ENV.fetch('RESTY_USERNAME', nil) # optional
|
41
|
+
config.password = ENV.fetch('RESTY_PASSWORD', nil) # optional
|
42
|
+
config.proxy_url = ENV.fetch('PROXY_URL', nil) # optional
|
43
|
+
end
|
44
|
+
|
45
|
+
These value are overridden by following environment variables:
|
46
|
+
|
47
|
+
* RESTY_SERVICE_URL
|
48
|
+
* RESTY_USERNAME
|
49
|
+
* RESTY_PASSWORD
|
50
|
+
|
51
|
+
|
26
52
|
|
27
53
|
## Development
|
28
54
|
|
@@ -3,7 +3,7 @@ Ratonvirus::Resty.configure do |config|
|
|
3
3
|
#
|
4
4
|
# default: config.base_url = ENV.fetch('RESTY_SERVICE_URL') { 'http://localhost:9000/scan' }
|
5
5
|
#
|
6
|
-
config.
|
6
|
+
config.service_url = ENV.fetch('RESTY_SERVICE_URL', 'http://localhost:9000/scan')
|
7
7
|
|
8
8
|
# Optional sets the username for api requests
|
9
9
|
#
|