ecoportal-api 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e53546b5e49ce581c3c46520ca310546a4e6003ad1f1381a060866539206ddf9
4
- data.tar.gz: be575ff10725c87ffb84091fa85d72d4117c6391d46c9299250352fff16cd7d0
3
+ metadata.gz: 45e5ed3cd96fedb7c4b79b0f302b0f97c5d20ba445de2a82c10b389f34172166
4
+ data.tar.gz: e8abe2ee8382132028ad44b571724d315e9901e0bf7b37de245a2f2ef6f1a42c
5
5
  SHA512:
6
- metadata.gz: 86210d309305158067abca647b803418ca6a6e81790fec3e56b746a8641d776d24b0329553b666ac0eb153c019f4d08439e2adaa5dd0af3a375c73cc3d67fb02
7
- data.tar.gz: 4dd9e9f916f8a6755ba50f99cd1c35d0955d31d06cb449f3df815f805eee0ffb20c7526a978839c4b23aa977bea24c81323e9599998a4d37fb359337f79c7712
6
+ metadata.gz: a84aad3d8fedf22538e01d64085d71c0c3b08ae43f6b573b4551342b3428f5428290109998ff65e297ca9b1845146384cdf90bb4b37a3fccbbe0bc37ed506bfb
7
+ data.tar.gz: 907fd4763a58ccc82eab68d239aea2fb931bc5eb683c1eb1eda6773a8a84a89f5f3fc0e73709b73cfd7d8594e80789e66edc601ee4326cd84b92e5f83c7986e9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [0.9.6] - 2024-02-03
5
+
6
+ ### Added
7
+ ### Changed
8
+ - upgraded some gems
9
+
10
+ ### Fixed
11
+ - Compatibility with `ruby 3`
12
+ - replaced `Proc.new` (with no block) by `block` in methods
13
+
4
14
  ## [0.9.5] - 2023-09-05
5
15
 
6
16
  ### Fixed
@@ -22,15 +22,14 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_development_dependency "bundler", ">= 2.4.9", "< 3"
26
- spec.add_development_dependency "rspec", ">= 3.10.0", "< 4"
27
- spec.add_development_dependency "rake", ">= 13.0.3", "< 14"
28
- spec.add_development_dependency "yard", ">= 0.9.26", "< 1"
29
- spec.add_development_dependency "redcarpet", ">= 3.5.1", "< 4"
25
+ spec.add_development_dependency "bundler", ">= 2.4.12", "< 3"
26
+ spec.add_development_dependency "rspec", ">= 3.12.0", "< 4"
27
+ spec.add_development_dependency "rake", ">= 13.1.0", "< 14"
28
+ spec.add_development_dependency "yard", ">= 0.9.34", "< 1"
29
+ spec.add_development_dependency "redcarpet", ">= 3.6.0", "< 4"
30
30
  spec.add_development_dependency "pry" , "~> 0.14"
31
31
 
32
- spec.add_dependency 'http', '~> 4.4.1', "< 5"
33
- spec.add_dependency 'dotenv', '>= 2.7.6', "< 3"
34
- spec.add_dependency 'elastic-apm', '>= 4.0.0', "< 5"
35
- spec.add_dependency 'hash-polyfill', '~> 0'
32
+ spec.add_dependency 'http', '~> 5.1', "< 6"
33
+ spec.add_dependency 'dotenv', '>= 2.8', "< 3"
34
+ spec.add_dependency 'elastic-apm', '>= 4.7', "< 5"
36
35
  end
@@ -45,53 +45,53 @@ module Ecoportal
45
45
  end
46
46
  end
47
47
 
48
- def get(doc)
48
+ def get(doc, &block)
49
49
  id = get_id(doc)
50
50
  @operations << {
51
51
  path: @base_path + "/" + CGI::escape(id),
52
52
  method: "GET",
53
- callback: block_given? && Proc.new
53
+ callback: block_given? && block
54
54
  }
55
55
  end
56
56
 
57
- def update(doc)
57
+ def update(doc, &block)
58
58
  id = get_id(doc)
59
59
  body = get_body(doc)
60
60
  @operations << {
61
61
  path: @base_path + "/" + CGI::escape(id),
62
62
  method: "PATCH",
63
63
  body: body,
64
- callback: block_given? && Proc.new
64
+ callback: block_given? && block
65
65
  }
66
66
  end
67
67
 
68
- def upsert(doc)
68
+ def upsert(doc, &block)
69
69
  id = get_id(doc)
70
70
  body = get_body(doc)
71
71
  @operations << {
72
72
  path: @base_path + "/" + CGI::escape(id),
73
73
  method: "POST",
74
74
  body: body,
75
- callback: block_given? && Proc.new
75
+ callback: block_given? && block
76
76
  }
77
77
  end
78
78
 
79
- def delete(doc)
79
+ def delete(doc, &block)
80
80
  id = get_id(doc)
81
81
  @operations << {
82
82
  path: @base_path + "/" + CGI::escape(id),
83
83
  method: "DELETE",
84
- callback: block_given? && Proc.new
84
+ callback: block_given? && block
85
85
  }
86
86
  end
87
87
 
88
- def create(doc)
88
+ def create(doc, &block)
89
89
  body = get_body(doc)
90
90
  @operations << {
91
91
  path: @base_path,
92
92
  method: "POST",
93
93
  body: body,
94
- callback: block_given? && Proc.new
94
+ callback: block_given? && block
95
95
  }
96
96
  end
97
97
 
@@ -1,5 +1,5 @@
1
1
  module Ecoportal
2
2
  module API
3
- VERSION = "0.9.5"
3
+ VERSION = "0.9.6"
4
4
  end
5
5
  end
data/lib/ecoportal/api.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require "cgi"
2
2
  require "logger"
3
- require "hash-polyfill"
4
3
  require "ecoportal/api/version"
5
4
  require "dotenv/load"
6
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecoportal-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tapio Saarinen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-05 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.4.9
19
+ version: 2.4.12
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '3'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 2.4.9
29
+ version: 2.4.12
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '3'
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 3.10.0
39
+ version: 3.12.0
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '4'
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.10.0
49
+ version: 3.12.0
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '4'
@@ -56,7 +56,7 @@ dependencies:
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 13.0.3
59
+ version: 13.1.0
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '14'
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 13.0.3
69
+ version: 13.1.0
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '14'
@@ -76,7 +76,7 @@ dependencies:
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 0.9.26
79
+ version: 0.9.34
80
80
  - - "<"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1'
@@ -86,7 +86,7 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.26
89
+ version: 0.9.34
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: '1'
@@ -96,7 +96,7 @@ dependencies:
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 3.5.1
99
+ version: 3.6.0
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '4'
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: 3.5.1
109
+ version: 3.6.0
110
110
  - - "<"
111
111
  - !ruby/object:Gem::Version
112
112
  version: '4'
@@ -130,27 +130,27 @@ dependencies:
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: 4.4.1
133
+ version: '5.1'
134
134
  - - "<"
135
135
  - !ruby/object:Gem::Version
136
- version: '5'
136
+ version: '6'
137
137
  type: :runtime
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: 4.4.1
143
+ version: '5.1'
144
144
  - - "<"
145
145
  - !ruby/object:Gem::Version
146
- version: '5'
146
+ version: '6'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: dotenv
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: 2.7.6
153
+ version: '2.8'
154
154
  - - "<"
155
155
  - !ruby/object:Gem::Version
156
156
  version: '3'
@@ -160,7 +160,7 @@ dependencies:
160
160
  requirements:
161
161
  - - ">="
162
162
  - !ruby/object:Gem::Version
163
- version: 2.7.6
163
+ version: '2.8'
164
164
  - - "<"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '3'
@@ -170,7 +170,7 @@ dependencies:
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: 4.0.0
173
+ version: '4.7'
174
174
  - - "<"
175
175
  - !ruby/object:Gem::Version
176
176
  version: '5'
@@ -180,24 +180,10 @@ dependencies:
180
180
  requirements:
181
181
  - - ">="
182
182
  - !ruby/object:Gem::Version
183
- version: 4.0.0
183
+ version: '4.7'
184
184
  - - "<"
185
185
  - !ruby/object:Gem::Version
186
186
  version: '5'
187
- - !ruby/object:Gem::Dependency
188
- name: hash-polyfill
189
- requirement: !ruby/object:Gem::Requirement
190
- requirements:
191
- - - "~>"
192
- - !ruby/object:Gem::Version
193
- version: '0'
194
- type: :runtime
195
- prerelease: false
196
- version_requirements: !ruby/object:Gem::Requirement
197
- requirements:
198
- - - "~>"
199
- - !ruby/object:Gem::Version
200
- version: '0'
201
187
  description:
202
188
  email:
203
189
  - tapio@ecoportal.co.nz