indieweb-endpoints 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2168f56d7a493faa4d1bd7a61e5ecc1cf52ca405baf43254ad3149fa6ad62460
4
- data.tar.gz: 93c838259316804108f5a5b9c9950235f9283c08109aa1b1c2eb9f89c6d3eac2
3
+ metadata.gz: 66554d42a1533c2688aeb99e1e1a2ab802640ef6cfce21794c34ee9eef2d6b7a
4
+ data.tar.gz: 171055da85c2b49b5c02657006d87c43691ddd0eae08cd76ece4a7dacd9abe10
5
5
  SHA512:
6
- metadata.gz: a685fc02841e5433b183103679df93b9e6d2b0c530a0d6b3b8acf01adb41d17814a2778ac74ec876b3b70671ebbbfe76edcd414f1c6f8195838834d62d826b15
7
- data.tar.gz: fbb870ada2afdb2b5b217fa224a6e43166e6faed8aa422d6e26c9cbd2375a2313ead2db29ec2e1d703423b856a6b80768d69100737c5a3709b8297a615b980f2
6
+ metadata.gz: e6d27232e1d39f0c388227e3acbeea0348f932e96849b6b31d1a417139b51aab1ae1a08f3fdf4fba8bf2b8ba2218f5fa93b4465040b9f0b584686bdf85fcaefc
7
+ data.tar.gz: 345f9bbc800fa538c0f7c7a03ff7b4f703c71f56d4efe69148c959bc6043f91b80c65be247d5d5f2b1f1ada3724e387d1720444c98c069aae605521d96259939
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 / 2019-04-30
4
+
5
+ - `IndieWeb::Endpoints::Client#endpoints` returns an `OpenStruct` instead of a `Hash` ([c209b0b](https://github.com/indieweb/indieweb-endpoints-ruby/commit/c209b0b))
6
+
3
7
  ## 0.2.0 / 2019-04-25
4
8
 
5
9
  - Subclass exceptions under `IndieWeb::Endpoints::Error` ([667eec7](https://github.com/indieweb/indieweb-endpoints-ruby/commit/667eec7)).
data/README.md CHANGED
@@ -47,10 +47,10 @@ require 'indieweb/endpoints'
47
47
 
48
48
  endpoints = IndieWeb::Endpoints.get('https://aaronparecki.com')
49
49
 
50
- puts endpoints
50
+ puts endpoints # => #<OpenStruct …>
51
51
  ```
52
52
 
53
- This example will search `https://aaronparecki.com` for valid IndieAuth, Micropub, and Webmention endpoints. In this case, the program returns a `Hash`:
53
+ This example will search `https://aaronparecki.com` for valid IndieAuth, Micropub, and Webmention endpoints. In this case, the program returns an `OpenStruct` with the following attributes:
54
54
 
55
55
  ```ruby
56
56
  {
@@ -62,7 +62,7 @@ This example will search `https://aaronparecki.com` for valid IndieAuth, Micropu
62
62
  }
63
63
  ```
64
64
 
65
- Each key in the resulting `Hash` will return either a `String` representing a URL or `nil`. The `redirect_uri` key will return either an `Array` or `nil` since a given URL may register multiple callback URLs.
65
+ Each attribute will return either a `String` representing a URL or `nil`. The `redirect_uri` attribute will return either an `Array` or `nil` since a given URL may register multiple callback URLs.
66
66
 
67
67
  ### Advanced Usage
68
68
 
@@ -73,8 +73,9 @@ require 'indieweb/endpoints'
73
73
 
74
74
  client = IndieWeb::Endpoints::Client.new('https://aaronparecki.com')
75
75
 
76
- puts client.response # => HTTP::Response
77
- puts client.endpoints # => Hash
76
+ puts client.response # => #<HTTP::Response …>
77
+ puts client.endpoints # => #<OpenStruct …>
78
+ puts client.endpoints.webmention # => 'https://webmention.io/aaronpk/webmention'
78
79
  ```
79
80
 
80
81
  ### Exception Handling
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ['lib']
22
22
 
23
23
  spec.add_development_dependency 'rake', '~> 12.3'
24
- spec.add_development_dependency 'reek', '~> 5.3'
24
+ spec.add_development_dependency 'reek', '~> 5.4'
25
25
  spec.add_development_dependency 'rspec', '~> 3.8'
26
26
  spec.add_development_dependency 'rubocop', '~> 0.67.2'
27
27
  spec.add_development_dependency 'rubocop-performance', '~> 1.1'
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
31
31
  spec.add_development_dependency 'webmock', '~> 3.5'
32
32
 
33
- spec.add_runtime_dependency 'absolutely', '~> 1.1'
33
+ spec.add_runtime_dependency 'absolutely', '~> 2.0'
34
34
  spec.add_runtime_dependency 'addressable', '~> 2.6'
35
35
  spec.add_runtime_dependency 'http', '~> 5.0.0.pre'
36
36
  spec.add_runtime_dependency 'nokogiri', '~> 1.10'
@@ -17,7 +17,7 @@ module IndieWeb
17
17
  end
18
18
 
19
19
  def endpoints
20
- @endpoints ||= Parsers.registered.transform_values { |parser| parser.new(response).results }
20
+ @endpoints ||= OpenStruct.new(Parsers.registered.transform_values { |parser| parser.new(response).results })
21
21
  end
22
22
 
23
23
  def response
@@ -1,5 +1,5 @@
1
1
  module IndieWeb
2
2
  module Endpoints
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indieweb-endpoints
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-25 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.3'
33
+ version: '5.4'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.3'
40
+ version: '5.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '1.1'
145
+ version: '2.0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '1.1'
152
+ version: '2.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: addressable
155
155
  requirement: !ruby/object:Gem::Requirement