cropio-ruby 0.33 → 0.34

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: 514089bb440f38ca6b6fc984d3e48662b33bd827df4c05385121904a76d9f84e
4
+ data.tar.gz: 8c89dd1f3ad2491b08ec6afa53a1ff03436e9ad81929c037ac5e8328147e55f6
5
5
  SHA512:
6
- metadata.gz: e1cc4ade1d5d1cc27d86ae87905ac3eb899eed2254426ee6d7b8b39882034a1c4d9b2f395143f4173b9d8258ec1a5582cb1708142aaa37e87f1b610e25d847bc
7
- data.tar.gz: 62e6bb41f88bca576c45982ae749656c742c36a86dfc3d71e93d310215c1ace8d71d39d455840dfd867134b50aa5dedf139d562f4a6a9a411bd98f253927f6fa
6
+ metadata.gz: 4eab719f31115566c5e67d5aa37ee39bf74cef1f529e18b1b2a7ea230ed84d5cd263e88c17a2685e459b37befd322657ccbaa4dec22f66bafd1ee3d8dc1c1bb3
7
+ data.tar.gz: bdb2f4b555f76faca34acad8053c4dd052a66658ec3c3c08d8a50f40ff5158050d09dc1416b71d02c28e924048781a155ef1e33a240d1ad02e8a44ed91c338b6
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
Binary file
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 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,16 @@ 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'
74
84
 
75
85
  module Cropio
76
86
  module Resources
@@ -1,3 +1,3 @@
1
1
  module Cropio
2
- VERSION = '0.33'.freeze
2
+ VERSION = '0.34'.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.34'
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-12 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
@@ -113,6 +114,7 @@ files:
113
114
  - bin/console
114
115
  - bin/login
115
116
  - bin/setup
117
+ - cropio-ruby-0.33.gem
116
118
  - cropio-ruby.gemspec
117
119
  - lib/cropio.rb
118
120
  - lib/cropio/connection.rb
@@ -152,6 +154,10 @@ files:
152
154
  - lib/cropio/resources/fuel_tank.rb
153
155
  - lib/cropio/resources/fuel_type.rb
154
156
  - lib/cropio/resources/group_folder.rb
157
+ - lib/cropio/resources/growth_scale.rb
158
+ - lib/cropio/resources/growth_stage.rb
159
+ - lib/cropio/resources/growth_stage_group.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