unit-ruby 0.2.5 → 0.2.6

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: 36a4adc5ac66ecac5eeb0b01a57d131f26ce1457e1aefd766e9c75cc0b11599b
4
- data.tar.gz: 3c37bdf8d9eb16acb01389838ce8798d7d50b9b4c6d815474ccff1e4f5c37c8c
3
+ metadata.gz: 3de97a1740f4eccb8b4afba7feee092d42f7aec1a1a17125b0a512b12b704fac
4
+ data.tar.gz: 8eaec1f14a300006bf99dea3336db46295f875f55b23d9d637372c6df123424a
5
5
  SHA512:
6
- metadata.gz: 5ce9efd4376713ad8815f69df865baf3137889cc82de088be5fd8951aab2d08613d4a7d3f39106c8f78fe431e6a173144eb413b0bf23f211abd229c9e7af3770
7
- data.tar.gz: 278d00d967a57090d42038781e8f0bc63437398a33bb1d620301c60d13a81e0583f76e22fc76d7362b0618ac3d1be9efee414848a4014a207abbb6b61560fee2
6
+ metadata.gz: e8599644fb9e58615349538b9a6b73c99200c555b59504d68bcf405fcf95a30bc6d7a1da2f517eb258fa9fa3b5a6a21427f1993249ae8da12ac27df0788bf10c
7
+ data.tar.gz: 647419597cc13b8062bc5baf98f8693ec2ba52415694c4df7ee0aaf87444abaeb3fbcab96b791fb78bc52f131293c3ce93a1f05d5266da5309d2f892be639bce
data/Gemfile.lock CHANGED
@@ -2,18 +2,19 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  unit-ruby (0.2.5)
5
- activesupport
5
+ activesupport (~> 6.1.5)
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.1)
12
+ activesupport (6.1.7.1)
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
+ zeitwerk (~> 2.3)
17
18
  ast (2.4.2)
18
19
  coderay (1.1.3)
19
20
  concurrent-ruby (1.1.10)
@@ -84,6 +85,7 @@ GEM
84
85
  tzinfo (2.0.5)
85
86
  concurrent-ruby (~> 1.0)
86
87
  unicode-display_width (2.1.0)
88
+ zeitwerk (2.6.6)
87
89
 
88
90
  PLATFORMS
89
91
  ruby
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`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Unit
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
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'
38
38
  spec.add_dependency 'faraday', '~> 1.8.0'
39
39
  spec.add_dependency 'faraday_middleware', '~> 1.0.0'
40
40
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unit-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chloe Isacke
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-01-23 00:00:00.000000000 Z
12
+ date: 2023-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
20
+ version: 6.1.5
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '0'
27
+ version: 6.1.5
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: faraday
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.4.4
222
+ rubygems_version: 3.4.7
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: A Ruby gem for communicating with the Unit API.