distributed-press-api-client 0.3.0rc0 → 0.3.0rc2

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: 25fa00e1c0a4044f03953f30018830d9cc3e934445be8bd1e72004e0c1f5b1bf
4
- data.tar.gz: 0ddb5921a185fb2172669957b3a22d8619fa6a0d2d53fe33a5bb10372706a1b4
3
+ metadata.gz: 1c508b60370d912f4f45de6b3f4e58498cd67dbc4df3a762a4934b5f47ad3a08
4
+ data.tar.gz: 6aad02b5eca7d6954f4dc0b9bb77848d70fb18235305634b8523ac5dda8b8b5a
5
5
  SHA512:
6
- metadata.gz: 895ce13e70b28366fa412be512eeb075a179239a5eb7e45e302b58147baa55bccaba37505a93fdc97cef127d63faa655163eaa33c740bf2e5c334a3ab7879a5a
7
- data.tar.gz: dcd6f8f7a6471ae979199de943350cff2b37ad5c148dbe8d143c6234cbb93e48dbc83b2794476bb0e7d193aff828dd591f96e747822bd085d89c9ef9c0a995e7
6
+ metadata.gz: '09e9c0483f970d76f1ad068ca96eeb79bcf761ffbec0e4659481b36da1bbb3f0b5e252c386baef38af4fb98cbe18cf751ad7acb3062afe68df141878b3e93d0e'
7
+ data.tar.gz: f0531bd786dd810bd3f4c54a0c75d63787153e367075c413b0c0573e7484ec2ccfcd0902bed5000b67f6437d78755e6625c5ae66867c1070d3f9f83b4976defc
@@ -45,8 +45,11 @@ class DistributedPress
45
45
  # @param :public_key [String] URL where public key is available
46
46
  # @param :private_key_pem [String] RSA Private key, PEM encoded
47
47
  # @param :key_size [Integer]
48
- def initialize(url: 'https://social.distributed.press', public_key_url:, private_key_pem: nil, key_size: 2048)
48
+ # @param :logger [Logger]
49
+ def initialize(url: 'https://social.distributed.press', public_key_url:, private_key_pem: nil, key_size: 2048, logger: nil)
49
50
  self.class.default_options[:base_uri] = @url = HTTParty.normalize_base_uri(url)
51
+ self.class.default_options[:logger] = logger
52
+ self.class.default_options[:log_level] = :debug
50
53
 
51
54
  @public_key_url = public_key_url
52
55
  @key_size = key_size
@@ -96,7 +99,7 @@ class DistributedPress
96
99
  def default_headers
97
100
  {
98
101
  'User-Agent' => "DistributedPress/#{DistributedPress::VERSION}",
99
- 'Content-Type' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
102
+ 'Content-Type' => 'application/json',
100
103
  'Host' => host
101
104
  }
102
105
  end
@@ -3,5 +3,5 @@
3
3
  # API client
4
4
  class DistributedPress
5
5
  # Version
6
- VERSION = '0.3.0rc0'
6
+ VERSION = '0.3.0rc2'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: distributed-press-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0rc0
4
+ version: 0.3.0rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable