cropio-ruby 0.33 → 0.35

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: 65f27a9edbf12fd4df58d29befa1503ea0fa1f1c8d7df83a0e87e2d3c2426883
4
- data.tar.gz: d85d5795cf1453379816aaa562c89f0e7ec871701893d0ac17a770e8db89cd7d
3
+ metadata.gz: 6334b0aac2373e3c9568a53af9c2392bcd14faeb98cad7813f55542a80f22ad5
4
+ data.tar.gz: c5421132faf518f9436d55b23b39e23a9852b7b3c2fb2469ea589f84b2b69c70
5
5
  SHA512:
6
- metadata.gz: e1cc4ade1d5d1cc27d86ae87905ac3eb899eed2254426ee6d7b8b39882034a1c4d9b2f395143f4173b9d8258ec1a5582cb1708142aaa37e87f1b610e25d847bc
7
- data.tar.gz: 62e6bb41f88bca576c45982ae749656c742c36a86dfc3d71e93d310215c1ace8d71d39d455840dfd867134b50aa5dedf139d562f4a6a9a411bd98f253927f6fa
6
+ metadata.gz: 27c270c4fd1b51657be157f984d492e25bc83f35ae994e429a6484f7c9c768ffcce04c8af09b89aa96c90b530b5b4a485a0d6be20bb404f8168d9c0e62be9027
7
+ data.tar.gz: 1de7ae2af062d29b312cc83d35b2dbf2934aaff5ee4fd89eaddc820706cba4d211b7665cec8538c8bed9814e3820fe002a850bfa394cba603c45ef1fb9c3688f
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/cropio-ruby.gemspec CHANGED
@@ -29,7 +29,7 @@ STR
29
29
  spec.add_dependency 'json'
30
30
  spec.add_dependency 'rest-client', '~>2.1.0rc1'
31
31
 
32
- spec.add_development_dependency 'bundler', '~> 1.9'
32
+ spec.add_development_dependency 'bundler'
33
33
  spec.add_development_dependency 'rake', '~> 10.0'
34
34
  spec.add_development_dependency 'pry'
35
35
  spec.add_development_dependency 'byebug'
@@ -4,6 +4,8 @@ module Cropio
4
4
  module Connection
5
5
  # Contains logic of proxing calls to HTTPS requests.
6
6
  module Proxiable
7
+ V3A_RESOURCES = %w[weather_history_items growth_scales].freeze
8
+
7
9
  # Accepts resources name and params to perform HTTPS GET request.
8
10
  def get(resource, query = {})
9
11
  rmethod = extract_resource_method!(query)
@@ -38,9 +40,9 @@ module Cropio
38
40
  end
39
41
 
40
42
  def resolve_api_url(resource)
41
- Cropio::Connection::Configurable::BASE_URL +
42
- (resource == 'weather_history_items' ? 'a' : '') +
43
- "/#{resource}"
43
+ version_suffix = V3A_RESOURCES.include?(resource) ? 'a' : ''
44
+
45
+ "#{Cropio::Connection::Configurable::BASE_URL}#{version_suffix}/#{resource}"
44
46
  end
45
47
 
46
48
  def extract_resource_method!(query)
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class GrowthScale < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class GrowthStage < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class GrowthStageGroup < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class GrowthStageStructureMappingItem < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class GrowthStagesPrediction < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportPoint < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportPointGrowthStageStructure < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportPointIssue < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
9
+ 1
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportPointIssuePlantPart < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportPointMeasurement < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutingTask < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -71,6 +71,17 @@ require_relative './resources/fuel_tank'
71
71
  require_relative './resources/fuel_pump'
72
72
  require_relative './resources/fuel_movement'
73
73
  require_relative './resources/weather_history_item'
74
+ require_relative './resources/scouting_task'
75
+ require_relative './resources/scout_report_point'
76
+ require_relative './resources/scout_report_point_issue'
77
+ require_relative './resources/scout_report_point_issue_plant_part'
78
+ require_relative './resources/scout_report_point_measurement'
79
+ require_relative './resources/scout_report_point_growth_stage_structure'
80
+ require_relative './resources/growth_scale'
81
+ require_relative './resources/growth_stage'
82
+ require_relative './resources/growth_stage_group'
83
+ require_relative './resources/growth_stages_prediction'
84
+ require_relative './resources/growth_stage_structure_mapping_item'
74
85
 
75
86
  module Cropio
76
87
  module Resources
@@ -1,3 +1,3 @@
1
1
  module Cropio
2
- VERSION = '0.33'.freeze
2
+ VERSION = '0.35'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cropio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.33'
4
+ version: '0.35'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Vernidub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-05 00:00:00.000000000 Z
11
+ date: 2023-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.9'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.9'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -105,6 +105,7 @@ extra_rdoc_files: []
105
105
  files:
106
106
  - ".gitignore"
107
107
  - ".rspec"
108
+ - ".ruby-version"
108
109
  - ".travis.yml"
109
110
  - Gemfile
110
111
  - LICENSE
@@ -152,6 +153,11 @@ files:
152
153
  - lib/cropio/resources/fuel_tank.rb
153
154
  - lib/cropio/resources/fuel_type.rb
154
155
  - lib/cropio/resources/group_folder.rb
156
+ - lib/cropio/resources/growth_scale.rb
157
+ - lib/cropio/resources/growth_stage.rb
158
+ - lib/cropio/resources/growth_stage_group.rb
159
+ - lib/cropio/resources/growth_stage_structure_mapping_item.rb
160
+ - lib/cropio/resources/growth_stages_prediction.rb
155
161
  - lib/cropio/resources/harvest_weighing.rb
156
162
  - lib/cropio/resources/historical_value.rb
157
163
  - lib/cropio/resources/history_item.rb
@@ -184,6 +190,12 @@ files:
184
190
  - lib/cropio/resources/productivity_estimate_peer.rb
185
191
  - lib/cropio/resources/protected_document.rb
186
192
  - lib/cropio/resources/satellite_image.rb
193
+ - lib/cropio/resources/scout_report_point.rb
194
+ - lib/cropio/resources/scout_report_point_growth_stage_structure.rb
195
+ - lib/cropio/resources/scout_report_point_issue.rb
196
+ - lib/cropio/resources/scout_report_point_issue_plant_part.rb
197
+ - lib/cropio/resources/scout_report_point_measurement.rb
198
+ - lib/cropio/resources/scouting_task.rb
187
199
  - lib/cropio/resources/seed.rb
188
200
  - lib/cropio/resources/soil_test.rb
189
201
  - lib/cropio/resources/soil_test_sample.rb
@@ -219,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
231
  - !ruby/object:Gem::Version
220
232
  version: '0'
221
233
  requirements: []
222
- rubygems_version: 3.2.15
234
+ rubygems_version: 3.4.10
223
235
  signing_key:
224
236
  specification_version: 4
225
237
  summary: Cropio API bindings for Ruby