plants 0.1.0 → 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: b8e9b712b2177d93408282db2d2b6efc283fb9fbfb84d17d6fc80efcc58a710b
4
- data.tar.gz: e51872144774793b602adac46640d515ae2a353a07e89fa3beb70d33b50a4ffc
3
+ metadata.gz: f19367bf655abf1c1d915f59af1efe4422864a9b0501c436b00fe7e466d36294
4
+ data.tar.gz: bbd93479682c27feb7531aa83361eba060efb63f7e317930e5b30cb7fa9a55b9
5
5
  SHA512:
6
- metadata.gz: 3df27aab14d6ed43639c9837cbaa53b4ccf18790929af2f5966d25608735535057f43969c5185d7e4c4b0d7e578acf815ce2b7e30c144f1193760bed8a15ca9f
7
- data.tar.gz: c3094796cde53a394b4b819047e1d1d38c492efb2e20d0b5c736f7ee891a46ce5eca065f43b2a063237fb215fdbf0a8921de19421b68b5cd2ad349c06ea7d31a
6
+ metadata.gz: 56e75eca4db0d770db6399322ba73b9e551baae162f5d412b78a8fe0a3df218c295db02dcb51f5d4a05184cfa266b1f3115fce06368e64dafeba27fd83aabe8b
7
+ data.tar.gz: 3f6370875a99aff8ca0a47d16e0fca8633f5b0ccb7ea5c4c0dfdb166607ebad9f0fac1875a305a5d0d8971734d697774f6ff0dfa49d2414d922df13f2c4b1927
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2024-02-28
3
+ ## [0.2.0] - 2024-02-29
4
+ - allow user to override logger
4
5
 
6
+ ## [0.1.0] - 2024-02-28
5
7
  - Initial release
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem to interact with the [trefle](https://docs.trefle.io/reference) API.
3
3
 
4
4
  ## Install
5
- `spec.add_dependency 'plants', ~> 0`
5
+ `spec.add_dependency 'plants', '~> 0'`
6
6
 
7
7
  ## Usage
8
8
  You need an authorization token, [see this](https://docs.trefle.io/docs/guides/getting-started).
@@ -11,7 +11,14 @@ Plants.token = 'your token here'
11
11
  Plants.list_plants # ...
12
12
  ```
13
13
 
14
+ If you wish to override the log:
15
+ ```ruby
16
+ Plants::Log.instance = logger # Your logger here
17
+ ```
18
+
14
19
  ### Endpoints
20
+ All methods return an instance of [`HTTP::Response`](https://github.com/httprb/http/wiki/Response-Handling)
21
+
15
22
  #### Corrections
16
23
  ```ruby
17
24
  # List
data/lib/plants/log.rb CHANGED
@@ -48,6 +48,12 @@ module Plants
48
48
  def instance
49
49
  @_instance ||= new
50
50
  end
51
+
52
+ # @param other_logger [#debug, #info, #warn, #error, #fatal]
53
+ # @return [void]
54
+ def instance=(other_logger)
55
+ @_instance = other_logger
56
+ end
51
57
  end
52
58
  end
53
59
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Plants
4
4
  # @return [String]
5
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plants
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xero
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http