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 +4 -4
- data/Gemfile.lock +19 -11
- data/lib/mason_hub_api/object.rb +14 -1
- data/lib/mason_hub_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b08b78472e016f717c16461ba498cb1c46f41db1d1bd1e4ea499d3506446515
|
|
4
|
+
data.tar.gz: 5729b164377a40951a8609865423333a9495ce1d00a7d2cf31959a4fb67393ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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 (
|
|
11
|
+
activesupport (8.0.1)
|
|
12
12
|
base64
|
|
13
|
+
benchmark (>= 0.3)
|
|
13
14
|
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
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
|
-
|
|
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
|
-
|
|
26
|
+
benchmark (0.4.0)
|
|
27
|
+
bigdecimal (3.1.9)
|
|
24
28
|
coderay (1.1.3)
|
|
25
|
-
concurrent-ruby (1.
|
|
26
|
-
connection_pool (2.
|
|
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.
|
|
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.
|
|
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
|
data/lib/mason_hub_api/object.rb
CHANGED
|
@@ -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
|
-
|
|
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)
|
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.
|
|
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:
|
|
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.
|
|
133
|
+
rubygems_version: 3.5.22
|
|
134
134
|
signing_key:
|
|
135
135
|
specification_version: 4
|
|
136
136
|
summary: MasonHub API Wrapper
|