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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/distributed_press.rb +3 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c37544ed2afa25eb25880482b5882f197dd2eb7debf9db754cf7759e3d99fe26
4
- data.tar.gz: f34ebb76bb1ce46164812ae1527202d888cb01a8bba51859f8100eebc71ba117
3
+ metadata.gz: 9629ab7d59c1d050b2bab1917411f46ca1d1e23eede72d0ea99341d0dd2aca01
4
+ data.tar.gz: 5d755057e6eb43e84ae65409bdd864635c8135307a4377290ecc384ce8fc97e4
5
5
  SHA512:
6
- metadata.gz: 4576d6dfb4095303612df97b3a7a737f973ea0fa8f8c2d33c881eb642ecaae6dd477661173fd52cc1467cf786c82a45fc0cb1ca0b4b349e2d4cf3f9b42a5fd4c
7
- data.tar.gz: 21afc0dd53b4e48246e75bf53499638821aad983c2120f63f5919e5ce2be3e200d877999f0dbd02ea833d8eaaa66edf363c77f1c00dcb56fadbff7286c5e71cf
6
+ metadata.gz: d6bbbae13ac80552f7b83a3967ac74530a916c29ed8896f577b93028e3e5eb9002f7a23554cc8c84b5bc7fb150802873f862bf541c5f06da639767d0867895e2
7
+ data.tar.gz: f796cb6a9f5ed258a55580a32e8ba8625adc50ae367ec6eb29c885ddbd7f589d4b8ea9565eb019550f2045ba18928a2d6c8def03a21b1f329b6185066e622c41
@@ -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: 'https://api.distributed.press', api_key: nil, project_domain: nil)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distributed-press-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - f