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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de801c65869a22224c37180d25d454fabb3a6f92ce20f0c35c519f20cf8bebc8
4
- data.tar.gz: e71e339fa4ceff836d5e5c48a67bc3520cdc35137ed9cbfbea3bda3319b5e866
3
+ metadata.gz: 7ca674bbaa7388fe3abf005c42fab873240a3496ab2fd2abf12a0510a492f8a2
4
+ data.tar.gz: 546e68bff0c07f0632e967faa1d9f8e8a4ae27dc900c25932bc8df65b0484e0e
5
5
  SHA512:
6
- metadata.gz: 30beb2cfa79f106da76939e0407cbf81061d6d496617e996736b8073b58285d69b52425d7c4cc2e4c5ff9cb643beb48e0e61224690e071b5f50b9ec880f4a20d
7
- data.tar.gz: a1abb2e01e4d7db7efb899f7a86932f1f9d7f92151ba96488877f3819db8064e1ab14650836f82714a49bd926b647b243f969b7ef3594eb55cac4cabba86a6d8
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
- TODO: Write usage instructions here
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.base_url = ENV.fetch('RESTY_SERVICE_URL', 'http://localhost:9000/scan')
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
  #
@@ -1,5 +1,5 @@
1
1
  module Ratonvirus
2
2
  module Resty
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ratonvirus-resty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugen Müller