hamfinder 0.2.3 → 0.2.4
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/Gemfile.lock +4 -4
- data/README.md +20 -26
- data/hamfinder.gemspec +1 -1
- data/lib/hamfinder/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: 4e8689362d1ba33252671c96c88cd6a46a643c6b
|
|
4
|
+
data.tar.gz: d4f1f0969b495a4da1828e5008a0b491689116cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8138e0e5d49ab5109f26262bdfa3ae4670b140fc1d3ecbfd99bff8eb4582eb74622255d2f8af1dead358017a35228d2dcf567aaf7d9461665d630448efaaf834
|
|
7
|
+
data.tar.gz: dda6a08467f3130a278b444567da8f162b918b76e84ea05140ed6588837640145a0bb78e4c099eb8ed53f2fcd99b321d19bc3d284454ec22e557aec75534392f
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hamfinder (0.2.
|
|
5
|
-
json (~>
|
|
6
|
-
nokogiri (~> 1.6)
|
|
4
|
+
hamfinder (0.2.4)
|
|
5
|
+
json (~> 2.0.2)
|
|
6
|
+
nokogiri (~> 1.6.8.1)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
@@ -14,7 +14,7 @@ GEM
|
|
|
14
14
|
url
|
|
15
15
|
diff-lcs (1.2.5)
|
|
16
16
|
docile (1.1.5)
|
|
17
|
-
json (
|
|
17
|
+
json (2.0.2)
|
|
18
18
|
mini_portile2 (2.1.0)
|
|
19
19
|
nokogiri (1.6.8.1)
|
|
20
20
|
mini_portile2 (~> 2.1.0)
|
data/README.md
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
HAMfinder is a Ruby gem built to make developing Ruby on Rails-based amateur radio programs easier to develop.
|
|
6
6
|
|
|
7
|
-
Querying [Repeaterbook.com's](http://www.repeaterbook.com) data using application-defined criteria, this gem returns a collection of repeaters matching the criteria
|
|
7
|
+
Querying [Repeaterbook.com's](http://www.repeaterbook.com) data using application-defined criteria, this gem returns a collection of repeaters matching the criteria in JSON format - conveniently named sequentially, sorted by ascending proximity! For example, here is a record for a 2 meter band repeater near me in Washington, DC:
|
|
8
8
|
|
|
9
9
|
```ruby
|
|
10
|
-
{
|
|
10
|
+
{"1" =>
|
|
11
11
|
{:frequency=>"145.1100",
|
|
12
12
|
:offset=>"-0.6MHz",
|
|
13
13
|
:tone=>"CC1",
|
|
@@ -39,16 +39,10 @@ Or install it yourself as:
|
|
|
39
39
|
|
|
40
40
|
## Usage
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Now you can use your HAMFinder's query method to retrieve data according to your provided parameters.
|
|
43
43
|
|
|
44
44
|
```ruby
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Now you can use your parser's query method to retrieve data according to your provided parameters.
|
|
49
|
-
|
|
50
|
-
```ruby
|
|
51
|
-
@results = parser.query( zip:"11232", radius:5, band:"2m" )
|
|
45
|
+
@results = Hamfinder::Parser.query( zip:"11232", radius:5, band:"2m" )
|
|
52
46
|
```
|
|
53
47
|
|
|
54
48
|
The `.query()` method accepts the following options:
|
|
@@ -73,27 +67,27 @@ The `band` parameter specifies the frequency band you wish to query, and must be
|
|
|
73
67
|
Examples of output:
|
|
74
68
|
```ruby
|
|
75
69
|
#10m band repeaters within 5 miles of 20009, Washington DC
|
|
76
|
-
puts
|
|
70
|
+
puts Hamfinder::Parser.query( zip:"20009", band:"10m", radius:5 )
|
|
77
71
|
=> ["NO REPEATERS FOUND WITHIN 5 MILES of 38.9191485, -77.0362967."]
|
|
78
72
|
|
|
79
73
|
#2m band repeaters within 2 miles of 20009, Washington DC
|
|
80
|
-
puts
|
|
81
|
-
=> {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
puts Hamfinder::Parser.query( zip:"20009", radius:2 )
|
|
75
|
+
=> { "1" =>{:frequency=>"145.1100", :offset=>"-0.6MHz", :tone=>"CC1", :call=>"K4DCA",
|
|
76
|
+
:location=>"Washington", :state=>"DC", :usage=>"OPEN",
|
|
77
|
+
:voip=>"", :distance=>"0.8", :direction=>"S"},
|
|
78
|
+
"2" =>{:frequency=>"145.1900", :offset=>"-0.6MHz", :tone=>"151.4", :call=>"W3DOS",
|
|
79
|
+
:location=>"Washington,HarryS.TrumanBuilding", :state=>"DC", :usage=>"OPEN",
|
|
80
|
+
:voip=>"", :distance=>"1.7", :direction=>"S"},
|
|
81
|
+
"3" =>{:frequency=>"147.3600", :offset=>"+0.6MHz", :tone=>"", :call=>"W3AGB",
|
|
82
|
+
:location=>"Washington", :state=>"DC", :usage=>"OPEN",
|
|
83
|
+
:voip=>"", :distance=>"1.7", :direction=>"S"},
|
|
84
|
+
"4" =>{:frequency=>"145.4300", :offset=>"-0.6MHz", :tone=>"114.8", :call=>"K3MRC",
|
|
85
|
+
:location=>"Washington,D.C.", :state=>"DC", :usage=>"OPEN",
|
|
86
|
+
:voip=>"", :distance=>"1.7", :direction=>"S"} }
|
|
93
87
|
|
|
94
88
|
#2m band repeaters within a default 10 miles of 20009, Washington DC
|
|
95
|
-
puts
|
|
96
|
-
=> {
|
|
89
|
+
puts Hamfinder::Parser.query( zip:"20009" )
|
|
90
|
+
=> { "1" =>{:frequency=>"147.3150", :offset=>"+0.6MHz", :tone=>"107.2", :call=>"W4HFH",
|
|
97
91
|
...
|
|
98
92
|
```
|
|
99
93
|
|
data/hamfinder.gemspec
CHANGED
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
31
31
|
spec.require_paths = ["lib"]
|
|
32
32
|
|
|
33
|
-
spec.add_dependency("json", "~>
|
|
33
|
+
spec.add_dependency("json", "~> 2.0.2")
|
|
34
34
|
spec.add_dependency("nokogiri", "~> 1.6.8.1")
|
|
35
35
|
spec.add_development_dependency "bundler", "~> 1.13"
|
|
36
36
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/hamfinder/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hamfinder
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Allen
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 2.0.2
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 2.0.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: nokogiri
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|