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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e0b5fcf037dc7e01207fafb01cdc9ac268c36be010510b7fd6018cd17060e47
|
4
|
+
data.tar.gz: 79a0f7f98a831f37b788261c683fe419d6d748dae9433880868134d60bc1b128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d67a932a075f5e3e5d71baef9df2b29aa4ee47ce0077bef2fe46e5fd923353ba8d2a70d9a8a787543eb81fee522417b83dea7c5e85fff80a2d2ae2174629f13
|
7
|
+
data.tar.gz: b3d719aa2e7e5aee044ca239d06f3647bfc198a0079ef4d3f458bdfd52dae00fbe5f37f655b7bc662852ff88dd332bf7104fe2e7f67dc3fe6b191f3aba65afba
|
data/lib/cropio/resource/base.rb
CHANGED
@@ -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
|
data/lib/cropio/resources.rb
CHANGED
@@ -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'
|
data/lib/cropio/version.rb
CHANGED
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.
|
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-
|
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
|