unit-ruby 0.2.5 → 0.2.7
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 +7 -7
- data/README.md +14 -1
- data/lib/unit-ruby/types/hash.rb +2 -0
- data/lib/unit-ruby/util/resource_operations.rb +4 -4
- data/lib/unit-ruby/version.rb +1 -1
- data/unit-ruby.gemspec +1 -1
- metadata +15 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae38f8e1ee09fd207b735b74d15de81fba939d1f1c5cc5314bb5ad25fd3d9340
|
4
|
+
data.tar.gz: 79b0207921b5dbe4b5532dfcedeb52ed2d83543cffc8ef1c3d75779a889fc6c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a8f58c875a14c2893aaa953e171aa1b152eac07b5970a63dd54880033b50a8177babf9ce06c35ee5acc64b62cd9cd8397353a2e2df4d0327172092891e49d9a
|
7
|
+
data.tar.gz: 36dc9055d927889bdeddf29a637720cb7f2fb9349131e74df0c9267216f64bae2bab56f1ed3de514f655549aa031a2d76e978b7aa739c487e89b048f67bdb52c
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unit-ruby (0.2.
|
5
|
-
activesupport
|
4
|
+
unit-ruby (0.2.6)
|
5
|
+
activesupport (>= 6.1.5, < 7.1.0)
|
6
6
|
faraday (~> 1.8.0)
|
7
7
|
faraday_middleware (~> 1.0.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (7.0.4.
|
12
|
+
activesupport (7.0.4.3)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (>= 1.6, < 2)
|
15
15
|
minitest (>= 5.1)
|
16
16
|
tzinfo (~> 2.0)
|
17
17
|
ast (2.4.2)
|
18
18
|
coderay (1.1.3)
|
19
|
-
concurrent-ruby (1.
|
19
|
+
concurrent-ruby (1.2.2)
|
20
20
|
diff-lcs (1.5.0)
|
21
21
|
dotenv (2.7.6)
|
22
22
|
faraday (1.8.0)
|
@@ -43,8 +43,8 @@ GEM
|
|
43
43
|
i18n (1.12.0)
|
44
44
|
concurrent-ruby (~> 1.0)
|
45
45
|
method_source (1.0.0)
|
46
|
-
minitest (5.
|
47
|
-
multipart-post (2.
|
46
|
+
minitest (5.18.0)
|
47
|
+
multipart-post (2.3.0)
|
48
48
|
parallel (1.21.0)
|
49
49
|
parser (3.1.0.0)
|
50
50
|
ast (~> 2.4.1)
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
parser (>= 3.0.1.1)
|
82
82
|
ruby-progressbar (1.11.0)
|
83
83
|
ruby2_keywords (0.0.5)
|
84
|
-
tzinfo (2.0.
|
84
|
+
tzinfo (2.0.6)
|
85
85
|
concurrent-ruby (~> 1.0)
|
86
86
|
unicode-display_width (2.1.0)
|
87
87
|
|
data/README.md
CHANGED
@@ -37,7 +37,20 @@ end
|
|
37
37
|
|
38
38
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
39
|
|
40
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
41
|
+
|
42
|
+
## Releasing
|
43
|
+
|
44
|
+
In order to publish this gem on [RubyGems.org](https://rubygems.org/), you will need to create a RubyGems account. Note that multi-factor authentication must be set up on your account before a gem can be published.
|
45
|
+
|
46
|
+
Once your account is set up, the following operations will facilitate publishing the latest version of the gem:
|
47
|
+
|
48
|
+
1. Ensure that PR request is approved by appropriate member(s) of the engineering team
|
49
|
+
2. Update the gem version number in `version.rb`
|
50
|
+
3. Run `gem build unit-ruby`. This will build a version of the gem called `unit-ruby-[gem version number].gem`
|
51
|
+
4. Push this latest version of the gem to RubyGems.org by calling `gem push unit-ruby-[gem version number].gem`
|
52
|
+
5. Commit `version.rb` file
|
53
|
+
6. Merge PR into `main` branch
|
41
54
|
|
42
55
|
## Contributing
|
43
56
|
|
data/lib/unit-ruby/types/hash.rb
CHANGED
@@ -63,17 +63,17 @@ module Unit
|
|
63
63
|
end
|
64
64
|
|
65
65
|
module Save
|
66
|
-
def save
|
66
|
+
def save(attributes)
|
67
|
+
resource = self.class.new(attributes.except(:id))
|
67
68
|
updated_resource = self.class.connection.patch(
|
68
|
-
resource_path,
|
69
|
+
self.class.resource_path(id),
|
69
70
|
{
|
70
71
|
data: {
|
71
72
|
type: resource_type,
|
72
|
-
attributes: as_json_api.slice(*dirty_attributes)
|
73
|
+
attributes: resource.as_json_api.slice(*resource.dirty_attributes)
|
73
74
|
}
|
74
75
|
}
|
75
76
|
)
|
76
|
-
|
77
77
|
update_resource_from_json_api(updated_resource)
|
78
78
|
end
|
79
79
|
end
|
data/lib/unit-ruby/version.rb
CHANGED
data/unit-ruby.gemspec
CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
35
|
spec.require_paths = ['lib']
|
36
36
|
|
37
|
-
spec.add_dependency 'activesupport'
|
37
|
+
spec.add_dependency 'activesupport', '>= 6.1.5', '< 7.1.0'
|
38
38
|
spec.add_dependency 'faraday', '~> 1.8.0'
|
39
39
|
spec.add_dependency 'faraday_middleware', '~> 1.0.0'
|
40
40
|
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unit-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chloe Isacke
|
8
8
|
- Ian Yamey
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -17,14 +17,20 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 6.1.5
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 7.1.0
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
30
|
+
version: 6.1.5
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 7.1.0
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: faraday
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +143,7 @@ dependencies:
|
|
137
143
|
- - "~>"
|
138
144
|
- !ruby/object:Gem::Version
|
139
145
|
version: 1.24.1
|
140
|
-
description:
|
146
|
+
description:
|
141
147
|
email:
|
142
148
|
- chloe@retirable.com
|
143
149
|
- ian@retirable.com
|
@@ -204,7 +210,7 @@ metadata:
|
|
204
210
|
source_code_uri: https://github.com/retirable/unit-ruby
|
205
211
|
changelog_uri: https://github.com/retirable/unit-ruby/blob/main/CHANGELOG.md
|
206
212
|
rubygems_mfa_required: 'true'
|
207
|
-
post_install_message:
|
213
|
+
post_install_message:
|
208
214
|
rdoc_options: []
|
209
215
|
require_paths:
|
210
216
|
- lib
|
@@ -219,8 +225,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
225
|
- !ruby/object:Gem::Version
|
220
226
|
version: '0'
|
221
227
|
requirements: []
|
222
|
-
rubygems_version: 3.
|
223
|
-
signing_key:
|
228
|
+
rubygems_version: 3.3.26
|
229
|
+
signing_key:
|
224
230
|
specification_version: 4
|
225
231
|
summary: A Ruby gem for communicating with the Unit API.
|
226
232
|
test_files: []
|