cropio-ruby 0.35 → 0.37

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: 6334b0aac2373e3c9568a53af9c2392bcd14faeb98cad7813f55542a80f22ad5
4
- data.tar.gz: c5421132faf518f9436d55b23b39e23a9852b7b3c2fb2469ea589f84b2b69c70
3
+ metadata.gz: 9e0b5fcf037dc7e01207fafb01cdc9ac268c36be010510b7fd6018cd17060e47
4
+ data.tar.gz: 79a0f7f98a831f37b788261c683fe419d6d748dae9433880868134d60bc1b128
5
5
  SHA512:
6
- metadata.gz: 27c270c4fd1b51657be157f984d492e25bc83f35ae994e429a6484f7c9c768ffcce04c8af09b89aa96c90b530b5b4a485a0d6be20bb404f8168d9c0e62be9027
7
- data.tar.gz: 1de7ae2af062d29b312cc83d35b2dbf2934aaff5ee4fd89eaddc820706cba4d211b7665cec8538c8bed9814e3820fe002a850bfa394cba603c45ef1fb9c3688f
6
+ metadata.gz: 3d67a932a075f5e3e5d71baef9df2b29aa4ee47ce0077bef2fe46e5fd923353ba8d2a70d9a8a787543eb81fee522417b83dea7c5e85fff80a2d2ae2174629f13
7
+ data.tar.gz: b3d719aa2e7e5aee044ca239d06f3647bfc198a0079ef4d3f458bdfd52dae00fbe5f37f655b7bc662852ff88dd332bf7104fe2e7f67dc3fe6b191f3aba65afba
@@ -117,16 +117,17 @@ module Cropio
117
117
  limit -= limit < LIMIT ? limit : LIMIT
118
118
  to_time = last_record_time(response) || from_time
119
119
 
120
- # if there is one record in time range we need to step back
121
- # for 1ms to exclude cycling
122
- if response['data'].count == 1
123
- to_time = (Time.parse(to_time) - 1/999999.0).iso8601(6)
124
- end
125
120
  buffer += response['data']
121
+
122
+ break if obtained_records_less_limit(response)
126
123
  end
127
124
  buffer
128
125
  end
129
126
 
127
+ def self.obtained_records_less_limit(response)
128
+ response['meta']["response"]["obtained_records"] < response['meta']["response"]["limit"]
129
+ end
130
+
130
131
  def self.last_record_time(response)
131
132
  response['meta']['response']['last_record_time']
132
133
  end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cropio
4
+ module Resources
5
+ class ScoutReportTemplate < 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 ScoutingTaskPoint < Cropio::Resource::Base
6
+ end
7
+ end
8
+ end
@@ -72,11 +72,13 @@ require_relative './resources/fuel_pump'
72
72
  require_relative './resources/fuel_movement'
73
73
  require_relative './resources/weather_history_item'
74
74
  require_relative './resources/scouting_task'
75
+ require_relative './resources/scouting_task_point'
75
76
  require_relative './resources/scout_report_point'
76
77
  require_relative './resources/scout_report_point_issue'
77
78
  require_relative './resources/scout_report_point_issue_plant_part'
78
79
  require_relative './resources/scout_report_point_measurement'
79
80
  require_relative './resources/scout_report_point_growth_stage_structure'
81
+ require_relative './resources/scout_report_template'
80
82
  require_relative './resources/growth_scale'
81
83
  require_relative './resources/growth_stage'
82
84
  require_relative './resources/growth_stage_group'
@@ -1,3 +1,3 @@
1
1
  module Cropio
2
- VERSION = '0.35'.freeze
2
+ VERSION = '0.37'.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.35'
4
+ version: '0.37'
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-09-13 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -195,7 +195,9 @@ files:
195
195
  - lib/cropio/resources/scout_report_point_issue.rb
196
196
  - lib/cropio/resources/scout_report_point_issue_plant_part.rb
197
197
  - lib/cropio/resources/scout_report_point_measurement.rb
198
+ - lib/cropio/resources/scout_report_template.rb
198
199
  - lib/cropio/resources/scouting_task.rb
200
+ - lib/cropio/resources/scouting_task_point.rb
199
201
  - lib/cropio/resources/seed.rb
200
202
  - lib/cropio/resources/soil_test.rb
201
203
  - lib/cropio/resources/soil_test_sample.rb