ghub 0.12.0 → 0.14.0

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: 9af667b223b6cf1226e7c2dfe84da54bb2af2d70829467685913c981b1431a16
4
- data.tar.gz: 9a5361db7503ff90c1278a4b966e0eca7d679fd6b226cf4dd0c409176a63d6fe
3
+ metadata.gz: 7c23b2496c7f7c2b0e54971ca22f4ced04ce6350b5e72f1e5a9e2ee34c569251
4
+ data.tar.gz: d45391d014f558683f91cf3b02297b4b5af27f2c7271038ed70ebf46ddff8672
5
5
  SHA512:
6
- metadata.gz: 721960e1144b387e89e139989d3394a71b2022ed891c3d1e1295e2f8b878e0668a96db3f8e556de46cb6612fa5b148a58b70f41b7c2f02bf35b530942fa274bf
7
- data.tar.gz: 755456f6387e724c510583f30925a95739a35cce2d8bb23e6e4a7d76e4e5feef8310a3d7bf27ad620904527f9c23332cab5d3daeeebc173f7a21fdcbc9e80254
6
+ metadata.gz: 58d40a4f2bd9ea010d68c87917dae735bbd9a5f49d8f817e3c4d8b8ab5f6d3e620a4ecbfa9999e8a65c36f3773020de98b4ac516cce08ec75030912e27f1848e
7
+ data.tar.gz: a3e74654dbfc7815c24d152d698077340deadf6fee99e65f6b6613b6cf4bb81010e51e7b58318e3b62321fe92a09632cba6a1853f7c8c9f7843c954e8596ed31
checksums.yaml.gz.sig CHANGED
Binary file
data/ghub.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "ghub"
5
- spec.version = "0.12.0"
5
+ spec.version = "0.14.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/ghub"
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "dry-schema", "~> 1.13"
29
29
  spec.add_dependency "http", "~> 5.1"
30
30
  spec.add_dependency "infusible", "~> 3.5"
31
- spec.add_dependency "pipeable", "~> 0.2"
31
+ spec.add_dependency "pipeable", "~> 0.5"
32
32
  spec.add_dependency "refinements", "~> 12.1"
33
33
  spec.add_dependency "zeitwerk", "~> 2.6"
34
34
 
data/lib/ghub/client.rb CHANGED
@@ -16,7 +16,7 @@ module Ghub
16
16
  include Import[:configuration]
17
17
 
18
18
  def initialize(**)
19
- super(**)
19
+ super
20
20
  yield configuration if block_given?
21
21
  end
22
22
  end
@@ -20,7 +20,7 @@ module Ghub
20
20
  **parameters
21
21
  ),
22
22
  try(:parse, catch: JSON::ParserError),
23
- validate(response),
23
+ validate(response, as: :to_h),
24
24
  to(model, :for)
25
25
  )
26
26
  end
@@ -27,7 +27,7 @@ module Ghub
27
27
  insert(parameters),
28
28
  to(api, :put),
29
29
  try(:parse, catch: JSON::ParserError),
30
- validate(response),
30
+ validate(response, as: :to_h),
31
31
  to(model, :for)
32
32
  )
33
33
  end
@@ -23,7 +23,7 @@ module Ghub
23
23
  pipe format(path, owner:, repository:, branch:),
24
24
  to(api, :get),
25
25
  try(:parse, catch: JSON::ParserError),
26
- validate(response),
26
+ validate(response, as: :to_h),
27
27
  to(model, :for)
28
28
  end
29
29
 
@@ -31,7 +31,7 @@ module Ghub
31
31
  pipe format(path, owner:, repository:, branch:),
32
32
  to(api, :post),
33
33
  try(:parse, catch: JSON::ParserError),
34
- validate(response),
34
+ validate(response, as: :to_h),
35
35
  to(model, :for)
36
36
  end
37
37
 
@@ -20,7 +20,7 @@ module Ghub
20
20
  to(api, :get),
21
21
  try(:parse, catch: JSON::ParserError),
22
22
  fmap { |body| {body:} },
23
- validate(response),
23
+ validate(response, as: :to_h),
24
24
  as(:fetch, :body),
25
25
  map { |item| model.for(**item) }
26
26
  )
@@ -17,7 +17,7 @@ module Ghub
17
17
  api.get("repos/#{owner}/#{repository}/pulls", **parameters),
18
18
  try(:parse, catch: JSON::ParserError),
19
19
  fmap { |body| {body:} },
20
- validate(response),
20
+ validate(response, as: :to_h),
21
21
  as(:fetch, :body),
22
22
  map { |item| model.for(**item) }
23
23
  )
@@ -16,7 +16,7 @@ module Ghub
16
16
  pipe(
17
17
  api.get("repos/#{owner}/#{repository}/pulls/#{id}", **parameters),
18
18
  try(:parse, catch: JSON::ParserError),
19
- validate(response),
19
+ validate(response, as: :to_h),
20
20
  to(model, :for)
21
21
  )
22
22
  end
@@ -27,7 +27,7 @@ module Ghub
27
27
  insert(parameters),
28
28
  to(api, :post),
29
29
  try(:parse, catch: JSON::ParserError),
30
- validate(response),
30
+ validate(response, as: :to_h),
31
31
  to(model, :for)
32
32
  end
33
33
  end
@@ -19,7 +19,7 @@ module Ghub
19
19
  to(api, :get),
20
20
  try(:parse, catch: JSON::ParserError),
21
21
  fmap { |body| {body:} },
22
- validate(response),
22
+ validate(response, as: :to_h),
23
23
  as(:fetch, :body),
24
24
  map { |item| model.for(**item) }
25
25
  )
@@ -27,7 +27,7 @@ module Ghub
27
27
  insert(parameters),
28
28
  to(api, :patch),
29
29
  try(:parse, catch: JSON::ParserError),
30
- validate(response),
30
+ validate(response, as: :to_h),
31
31
  to(model, :for)
32
32
  end
33
33
  end
@@ -17,7 +17,7 @@ module Ghub
17
17
  insert(parameters),
18
18
  to(api, :get),
19
19
  try(:parse, catch: JSON::ParserError),
20
- validate(response),
20
+ validate(response, as: :to_h),
21
21
  to(model, :for)
22
22
  end
23
23
  end
@@ -17,7 +17,7 @@ module Ghub
17
17
  pipe(
18
18
  api.get("search/users", **parameters),
19
19
  try(:parse, catch: JSON::ParserError),
20
- validate(response),
20
+ validate(response, as: :to_h),
21
21
  as(:fetch, :items),
22
22
  map { |item| model.for(**item) }
23
23
  )
@@ -17,7 +17,7 @@ module Ghub
17
17
  api.get("users", **parameters),
18
18
  try(:parse, catch: JSON::ParserError),
19
19
  fmap { |body| {body:} },
20
- validate(response),
20
+ validate(response, as: :to_h),
21
21
  as(:fetch, :body),
22
22
  map { |item| model.for(**item) }
23
23
  )
@@ -15,7 +15,7 @@ module Ghub
15
15
  def call id, **parameters
16
16
  pipe api.get("users/#{id}", **parameters),
17
17
  try(:parse, catch: JSON::ParserError),
18
- validate(response),
18
+ validate(response, as: :to_h),
19
19
  to(model, :for)
20
20
  end
21
21
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2024-04-03 00:00:00.000000000 Z
38
+ date: 2024-06-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: containable
@@ -113,14 +113,14 @@ dependencies:
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '0.2'
116
+ version: '0.5'
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '0.2'
123
+ version: '0.5'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: refinements
126
126
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.5.7
284
+ rubygems_version: 3.5.11
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: A monadic GitHub API client.
metadata.gz.sig CHANGED
Binary file