harvesting 0.5.1 → 0.6.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: 36525f3c1b0a053c53690e55831d69d402bdc9fb5709b68e0d8cfc885f9a5bf0
4
- data.tar.gz: bb3c642047e046ebbc8a72448ac5c29358264f8609b34f2c7a746680e721a74c
3
+ metadata.gz: 8f6d054347741b50002f88258ec6816852d6463fddcf45163779d5c8cc56c5b6
4
+ data.tar.gz: c92bb840b2825539dad52caab0d51871f89248d63b37ecb6e08cde0d9154b6b6
5
5
  SHA512:
6
- metadata.gz: be1d66442a2b3bf3c0896055e15f8cdbdf506c8929814b1d5781c07676a36eab523e3182b155d593371aa91639fd55d86fb8689b0e1194f6f54ff091dd93c886
7
- data.tar.gz: f0660def1ec97d8e02cb04dda6a52a14cd1fd08811a0372854632d076162ccc7990bcfa8e34906df3a439a7dcfc8d92bed60b25a78d531f1b045e9176062de1c
6
+ metadata.gz: e6a1957ac8fb4f16e77996e3f1d1504825d4b6bb90fb1e0bf749a0b399755fd04756eb4fd60b54bc2635b03c843de99a5fc19309fe4627059344ec9ec2027749
7
+ data.tar.gz: 96bae4c6ead7a63caacee4b67def836f5f76047677a09b0f7cdda4ecb0521f4b1bd81bc1666239cbb0a2bdfb3426e80564210b82ad5a8e79c94665a4768b35f7
data/.travis.yml CHANGED
@@ -4,6 +4,7 @@ rvm:
4
4
  - 2.5.8
5
5
  - 2.6.6
6
6
  - 2.7.1
7
+ - 3.0
7
8
  env:
8
9
  - HARVEST_FIRST_NAME=Aaron HARVEST_LAST_NAME=Burr HARVEST_ACCOUNT_ID=112341234 HARVEST_NON_ADMIN_ACCOUNT_ID=112341234 HARVEST_ACCESS_TOKEN=112341234 HARVEST_NON_ADMIN_ACCESS_TOKEN=112341234 HARVEST_ADMIN_FULL_NAME=112341234
9
10
 
data/README.md CHANGED
@@ -24,7 +24,7 @@ Or install it yourself as:
24
24
 
25
25
  ## Documentation
26
26
 
27
- The API is documented [here](https://www.rubydoc.info/github/fastruby/harvesting)
27
+ The API is documented [here](https://www.rubydoc.info/gems/harvesting)
28
28
 
29
29
  ## Usage
30
30
 
@@ -243,6 +243,16 @@ We follow semantic versioning for version numbers: [https://semver.org](https://
243
243
 
244
244
  Bug reports and pull requests are welcome on GitHub at [https://github.com/fastruby/harvesting](https://github.com/fastruby/harvesting). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
245
245
 
246
+ When Submitting a Pull Request:
247
+
248
+ * If your PR closes any open GitHub issues, please include `Closes #XXXX` in your comment
249
+
250
+ * Please include a summary of the change and which issue is fixed or which feature is introduced.
251
+
252
+ * If changes to the behavior are made, clearly describe what changes.
253
+
254
+ * If changes to the UI are made, please include screenshots of the before and after.
255
+
246
256
  ## License
247
257
 
248
258
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/RELEASE_NOTES.md CHANGED
@@ -6,6 +6,14 @@
6
6
 
7
7
  **Bug Fixes**
8
8
 
9
+ ### Version 0.6.0 - July 17, 2023
10
+
11
+ **Notes**
12
+
13
+ **Bug Fixes**
14
+
15
+ - Fix incompatibility with Ruby 3.0 and kwargs: https://github.com/fastruby/harvesting/pull/68
16
+
9
17
  ### Version 0.5.1 - January 14, 2021
10
18
 
11
19
  **Notes**
data/TODO.md CHANGED
@@ -1,2 +1,2 @@
1
- * Implement methods like `user.time_entries`
1
+ * Implement methods like `project.time_entries` or `user.time_entries`
2
2
  * Implement methods like `project.time_entries.create(attribute: value)`
data/harvesting.gemspec CHANGED
@@ -20,13 +20,13 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = "exe"
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
- spec.add_dependency "http", ">= 3.3", "< 5.0"
23
+ spec.add_dependency "http", ">= 3.3", "< 5.1"
24
24
 
25
25
  spec.add_development_dependency "bundler", ">= 2.0", "< 3.0"
26
26
  spec.add_development_dependency "rake", "~> 13.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.0"
28
28
  spec.add_development_dependency "guard-rspec", "~> 4.7", ">= 4.7"
29
- spec.add_development_dependency "byebug", "~> 10.0", ">= 10.0"
29
+ spec.add_development_dependency "byebug", ">= 10.0", "< 12.0"
30
30
  spec.add_development_dependency "vcr", "~> 4.0", ">= 4.0"
31
31
  spec.add_development_dependency "webmock", "~> 3.4", ">= 3.4"
32
32
  spec.add_development_dependency "dotenv", "~> 2.5", ">= 2.5"
@@ -12,7 +12,7 @@ module Harvesting
12
12
 
13
13
  # Returns a new instance of `Client`
14
14
  #
15
- # client = Client.new(access_token: "12345678", account_id: "98764")
15
+ # client = Client.new({ access_token: "12345678", account_id: "98764" })
16
16
  #
17
17
  # @param [Hash] opts the options to create an API client
18
18
  # @option opts [String] :access_token Harvest access token
@@ -30,7 +30,7 @@ module Harvesting
30
30
  def me
31
31
  Harvesting::Models::User.new(get("users/me"), harvest_client: self)
32
32
  end
33
-
33
+
34
34
  # @return [Harvesting::Models::Clients]
35
35
  def clients(opts = {})
36
36
  Harvesting::Models::Clients.new(get("clients", opts), opts, harvest_client: self)
@@ -116,7 +116,7 @@ module Harvesting
116
116
  uri = URI(url)
117
117
  response = http_response(:delete, uri)
118
118
  raise UnprocessableRequest.new(response.to_s) unless response.code.to_i == 200
119
-
119
+
120
120
  JSON.parse(response.body)
121
121
  end
122
122
 
@@ -9,7 +9,7 @@ module Harvesting
9
9
  def initialize(attrs, opts = {})
10
10
  @models = {}
11
11
  @attributes = attrs.dup
12
- @harvest_client = opts[:harvest_client] || Harvesting::Client.new(opts)
12
+ @harvest_client = opts[:harvest_client] || Harvesting::Client.new(**opts)
13
13
  end
14
14
 
15
15
  # It calls `create` or `update` depending on the record's ID. If the ID
@@ -65,7 +65,7 @@ module Harvesting
65
65
  # @param opts [Hash] options to pass along to the `Harvesting::Client`
66
66
  # instance
67
67
  def self.get(id, opts = {})
68
- client = opts[:harvest_client] || Harvesting::Client.new(opts)
68
+ client = opts[:harvest_client] || Harvesting::Client.new(**opts)
69
69
  self.new({ 'id' => id }, opts).fetch
70
70
  end
71
71
 
@@ -108,7 +108,7 @@ module Harvesting
108
108
  def self.modeled(opts = {})
109
109
  opts.each do |attribute_name, model|
110
110
  attribute_name_string = attribute_name.to_s
111
- Harvesting::Models::Base.send :define_method, attribute_name_string do
111
+ define_method(attribute_name_string) do
112
112
  @models[attribute_name_string] ||= model.new(@attributes[attribute_name_string] || {}, harvest_client: harvest_client)
113
113
  end
114
114
  end
@@ -1,3 +1,3 @@
1
1
  module Harvesting
2
- VERSION = "0.5.1".freeze
2
+ VERSION = "0.6.0".freeze
3
3
  end
@@ -0,0 +1,9 @@
1
+ **IMPORTANT: Please read the README before submitting pull requests for this project. Additionally, if your PR closes any open GitHub issues, make sure you include _Closes #XXXX_ in your comment or use the option on the PR's sidebar to add related issues to auto-close the issue that your PR fixes. **
2
+
3
+ **Description:**
4
+
5
+ Please include a summary of the change and which issue is fixed or which feature is introduced. If changes to the behavior are made, clearly describe what changes.
6
+ If changes to the UI are made, please include screenshots of the before and after.
7
+
8
+
9
+ I will abide by the [code of conduct](CODE_OF_CONDUCT.md).
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harvesting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-15 00:00:00.000000000 Z
12
+ date: 2023-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: http
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '3.3'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.0'
23
+ version: '5.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '3.3'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: '5.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: bundler
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -103,22 +103,22 @@ dependencies:
103
103
  name: byebug
104
104
  requirement: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - "~>"
107
- - !ruby/object:Gem::Version
108
- version: '10.0'
109
106
  - - ">="
110
107
  - !ruby/object:Gem::Version
111
108
  version: '10.0'
109
+ - - "<"
110
+ - !ruby/object:Gem::Version
111
+ version: '12.0'
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
117
- - !ruby/object:Gem::Version
118
- version: '10.0'
119
116
  - - ">="
120
117
  - !ruby/object:Gem::Version
121
118
  version: '10.0'
119
+ - - "<"
120
+ - !ruby/object:Gem::Version
121
+ version: '12.0'
122
122
  - !ruby/object:Gem::Dependency
123
123
  name: vcr
124
124
  requirement: !ruby/object:Gem::Requirement
@@ -257,6 +257,7 @@ files:
257
257
  - lib/harvesting/models/user.rb
258
258
  - lib/harvesting/models/users.rb
259
259
  - lib/harvesting/version.rb
260
+ - pull_request_template.md
260
261
  homepage: https://github.com/fastruby/harvesting
261
262
  licenses:
262
263
  - MIT
@@ -276,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
277
  - !ruby/object:Gem::Version
277
278
  version: '0'
278
279
  requirements: []
279
- rubygems_version: 3.1.3
280
+ rubygems_version: 3.4.10
280
281
  signing_key:
281
282
  specification_version: 4
282
283
  summary: Ruby wrapper for the Harvest API v2.0