mason_hub_api 0.1.6 → 0.2.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: '01119c4c2efc5a0f86969e4c173e189c3fe444d3043fbddb7d530bf011466d9d'
4
- data.tar.gz: 637a87b0b28c0f0e7d14c946e4646132a43e89f4f902b244725712a7c3e0acef
3
+ metadata.gz: 6b08b78472e016f717c16461ba498cb1c46f41db1d1bd1e4ea499d3506446515
4
+ data.tar.gz: 5729b164377a40951a8609865423333a9495ce1d00a7d2cf31959a4fb67393ef
5
5
  SHA512:
6
- metadata.gz: 5bcfa0106a1f134f12eb52dffa360c2f0f82da0872a77105516d96d6574a7dfa57737ddda0f21dd1830216ac73be458d33ab7deb796eedf1caf631ec8d369110
7
- data.tar.gz: 7b6e3d7b243834a1dbd40fb8e069facdcc7505ee63e86d1f4a9023ae0b91fa93eba88746eea36e72e9abce12b2d2092e0fdbdef4fef5ea5896db10de4c08e6da
6
+ metadata.gz: 42d33cc9460418fd16d1cd7e598658f6173d2161e054e43bee95a7fe7b3a411d0c2ea8827d1630292228991b87592e00409af396f4366bbdcd4d34e6f2502c8e
7
+ data.tar.gz: b5eefad5af4b4fef73dac2505ce713cce81b2e04aa8e65b50d18917565614a3641626e97d1ac43c6d0f09b12ad76803917b9b1afdfd38fcbd6c7e51d2b99a90c
data/Gemfile.lock CHANGED
@@ -1,29 +1,33 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mason_hub_api (0.1.3)
4
+ mason_hub_api (0.1.6)
5
5
  activesupport
6
6
  faraday (~> 2.7.10)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (7.1.3.2)
11
+ activesupport (8.0.1)
12
12
  base64
13
+ benchmark (>= 0.3)
13
14
  bigdecimal
14
- concurrent-ruby (~> 1.0, >= 1.0.2)
15
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
16
  connection_pool (>= 2.2.5)
16
17
  drb
17
18
  i18n (>= 1.6, < 2)
19
+ logger (>= 1.4.2)
18
20
  minitest (>= 5.1)
19
- mutex_m
20
- tzinfo (~> 2.0)
21
+ securerandom (>= 0.3)
22
+ tzinfo (~> 2.0, >= 2.0.5)
23
+ uri (>= 0.13.1)
21
24
  ast (2.4.2)
22
25
  base64 (0.2.0)
23
- bigdecimal (3.1.6)
26
+ benchmark (0.4.0)
27
+ bigdecimal (3.1.9)
24
28
  coderay (1.1.3)
25
- concurrent-ruby (1.2.3)
26
- connection_pool (2.4.1)
29
+ concurrent-ruby (1.3.5)
30
+ connection_pool (2.5.0)
27
31
  diff-lcs (1.5.0)
28
32
  dotenv (2.8.1)
29
33
  drb (2.2.1)
@@ -32,13 +36,13 @@ GEM
32
36
  faraday-net_http (>= 2.0, < 3.1)
33
37
  ruby2_keywords (>= 0.0.4)
34
38
  faraday-net_http (3.0.2)
35
- i18n (1.14.4)
39
+ i18n (1.14.7)
36
40
  concurrent-ruby (~> 1.0)
37
41
  json (2.6.3)
38
42
  language_server-protocol (3.17.0.3)
43
+ logger (1.6.6)
39
44
  method_source (1.0.0)
40
- minitest (5.22.2)
41
- mutex_m (0.2.0)
45
+ minitest (5.25.4)
42
46
  parallel (1.23.0)
43
47
  parser (3.2.2.4)
44
48
  ast (~> 2.4.1)
@@ -79,12 +83,16 @@ GEM
79
83
  parser (>= 3.2.1.0)
80
84
  ruby-progressbar (1.13.0)
81
85
  ruby2_keywords (0.0.5)
86
+ securerandom (0.4.1)
82
87
  tzinfo (2.0.6)
83
88
  concurrent-ruby (~> 1.0)
84
89
  unicode-display_width (2.5.0)
90
+ uri (1.0.2)
85
91
 
86
92
  PLATFORMS
87
93
  arm64-darwin-21
94
+ arm64-darwin-23
95
+ arm64-darwin-24
88
96
 
89
97
  DEPENDENCIES
90
98
  dotenv
@@ -2,12 +2,25 @@
2
2
 
3
3
  require "active_support"
4
4
  require "active_support/core_ext/string"
5
+ require "json"
5
6
  require "ostruct"
6
7
 
7
8
  module MasonHubAPI
8
9
  class Object < OpenStruct
9
10
  def initialize(attributes)
10
- super to_ostruct(attributes)
11
+ parsed =
12
+ if attributes.is_a?(String)
13
+ begin
14
+ JSON.parse(attributes)
15
+ rescue JSON::ParserError
16
+ raise MasonHubAPI::Error,
17
+ "MasonHub returned an unexpected non-JSON response: #{attributes.truncate(200)}"
18
+ end
19
+ else
20
+ attributes
21
+ end
22
+
23
+ super to_ostruct(parsed)
11
24
  end
12
25
 
13
26
  def to_ostruct(obj)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MasonHubAPI
4
- VERSION = "0.1.6"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mason_hub_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nickfarm27
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-10 00:00:00.000000000 Z
11
+ date: 2026-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.2.33
133
+ rubygems_version: 3.5.22
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: MasonHub API Wrapper