distributed-press-api-client 0.1.4 → 0.1.5
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/lib/distributed_press.rb +3 -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: 9629ab7d59c1d050b2bab1917411f46ca1d1e23eede72d0ea99341d0dd2aca01
|
|
4
|
+
data.tar.gz: 5d755057e6eb43e84ae65409bdd864635c8135307a4377290ecc384ce8fc97e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6bbbae13ac80552f7b83a3967ac74530a916c29ed8896f577b93028e3e5eb9002f7a23554cc8c84b5bc7fb150802873f862bf541c5f06da639767d0867895e2
|
|
7
|
+
data.tar.gz: f796cb6a9f5ed258a55580a32e8ba8625adc50ae367ec6eb29c885ddbd7f589d4b8ea9565eb019550f2045ba18928a2d6c8def03a21b1f329b6185066e622c41
|
data/lib/distributed_press.rb
CHANGED
|
@@ -7,6 +7,7 @@ require 'open3'
|
|
|
7
7
|
class DistributedPress
|
|
8
8
|
include ::HTTParty
|
|
9
9
|
|
|
10
|
+
DEFAULT_URL = 'https://api.distributed.press'
|
|
10
11
|
NEWLINE = "\r\n"
|
|
11
12
|
BOUNDARY = '--'
|
|
12
13
|
|
|
@@ -16,7 +17,8 @@ class DistributedPress
|
|
|
16
17
|
# @option options [String] :url API URL
|
|
17
18
|
# @option options [String] :api_key API Key
|
|
18
19
|
# @option options [String] :project_domain Domain name
|
|
19
|
-
def initialize(url:
|
|
20
|
+
def initialize(url: DEFAULT_URL, api_key: nil, project_domain: nil)
|
|
21
|
+
url ||= DEFAULT_URL
|
|
20
22
|
@api_key = api_key || ENV['DISTRIBUTED_PRESS_API_KEY']
|
|
21
23
|
@project_domain = project_domain || ENV['DISTRIBUTED_PRESS_PROJECT_DOMAIN']
|
|
22
24
|
|