farmsense_wrapper 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +44 -3
- data/farmsense_wrapper.gemspec +1 -1
- data/lib/farmsense_wrapper/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e99c8e9baa43dcc0f13ffc60b3c557b5362773
|
4
|
+
data.tar.gz: 3d1c74d098aba8d7657be062becfe8f625d6cbbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d25962b19944b00acad38d1809f40e390ccd85ae8055760d988ac34366d1cc2596252516cb864ea1f7935b10cfd951bdf1812c9b6d7405d3914f1789f2d990c
|
7
|
+
data.tar.gz: 481575d97b4b87bff92780e84c93f62c790ed83e67204ccd10be9204f7477e97d2fb138aaecbbbb2e55142ba8f09922de640abfd2c801e4eb5b2bb0069131035
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# FarmsenseWrapper
|
2
2
|
|
3
|
-
|
3
|
+
This gem is a lightweight wrapper for the Farmsense API [Farmsense.net]. This wrapper returns a JSON object of nearest weather stations to the input latitude and longitude and a JSON object of frost probabilities for spring or fall.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,11 +18,52 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
FarmSenseWrapper.stations(latitude, longitude)
|
22
|
+
|
23
|
+
Return's a JSON object of closest stations. To find the probabilities of frost for a station use the id provided.
|
24
|
+
|
25
|
+
|
26
|
+
```
|
27
|
+
$FarmSenseWrapper.stations(42, -112)
|
28
|
+
|
29
|
+
> [{
|
30
|
+
"id" => "506586",
|
31
|
+
"name" => "NORTHW AY AP",
|
32
|
+
"elevation" => "1",
|
33
|
+
"lat" => "62.966667",
|
34
|
+
"lon" => "-141.933334",
|
35
|
+
"distance" => "664.584783026827"
|
36
|
+
}]
|
37
|
+
```
|
38
|
+
|
39
|
+
FarmSenseWrapper.dates(id, season)
|
40
|
+
- spring: 1
|
41
|
+
- fall: 2
|
42
|
+
|
43
|
+
```
|
44
|
+
FarmSenseWrapper.dates(506586, 2)
|
45
|
+
|
46
|
+
> [{
|
47
|
+
"season_id" => "2",
|
48
|
+
"temperature_threshold" => "36",
|
49
|
+
"prob_90" => "1016",
|
50
|
+
"prob_80" => "1012",
|
51
|
+
"prob_70" => "1008",
|
52
|
+
"prob_60" => "1005",
|
53
|
+
"prob_50" => "1003",
|
54
|
+
"prob_40" => "0930",
|
55
|
+
"prob_30" => "0927",
|
56
|
+
"prob_20" => "0924",
|
57
|
+
"prob_10" => "0919"
|
58
|
+
}]
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
22
63
|
|
23
64
|
## Contributing
|
24
65
|
|
25
|
-
1. Fork it
|
66
|
+
1. Fork it
|
26
67
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
68
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
69
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/farmsense_wrapper.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["cohart"]
|
10
10
|
spec.email = ["me@colin-hart.com"]
|
11
11
|
spec.summary = %q{A wrapper for the Farmsense API, which provides day lengths, frost dates, and moon phases}
|
12
|
-
spec.description = %q{This wrapper currently only provides methods for
|
12
|
+
spec.description = %q{This wrapper currently only provides methods for returning nearest weather stations and frostdates for said stations in json format}
|
13
13
|
spec.homepage = "https://github.com/cohart/farmsense_wrapper"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: farmsense_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cohart
|
@@ -80,8 +80,8 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
description: This wrapper currently only provides methods for
|
84
|
-
stations and frostdates in json format
|
83
|
+
description: This wrapper currently only provides methods for returning nearest weather
|
84
|
+
stations and frostdates for said stations in json format
|
85
85
|
email:
|
86
86
|
- me@colin-hart.com
|
87
87
|
executables: []
|