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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11fd35de47a6190e050a58bd4acc30dda0e749ee
4
- data.tar.gz: e04eecad096358dfdeba110dbfa3f84fc5b1c7bd
3
+ metadata.gz: 4e8689362d1ba33252671c96c88cd6a46a643c6b
4
+ data.tar.gz: d4f1f0969b495a4da1828e5008a0b491689116cd
5
5
  SHA512:
6
- metadata.gz: a62ca62887d70ab4d0e54467053a78f27bdfbe0ce7d146cd32d17a023cff9eeee8dd117838f7041b8e0290612b6f2848b88b08c2033df5cc19f9d6793604c0db
7
- data.tar.gz: fbeb8c1634f2b4a1ff40c908cd12e2ecbd7522510dfa4ab42c42c45cfade61e83a13a07d7374547287337030dd53adbae3323a2a115bcaf85cd48680c26487fa
6
+ metadata.gz: 8138e0e5d49ab5109f26262bdfa3ae4670b140fc1d3ecbfd99bff8eb4582eb74622255d2f8af1dead358017a35228d2dcf567aaf7d9461665d630448efaaf834
7
+ data.tar.gz: dda6a08467f3130a278b444567da8f162b918b76e84ea05140ed6588837640145a0bb78e4c099eb8ed53f2fcd99b321d19bc3d284454ec22e557aec75534392f
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hamfinder (0.2.2)
5
- json (~> 1.8)
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 (1.8.3)
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 as JSON objects - conveniently named by their callsigns! For example, here is a record for a 2 meter band repeater near me in Washington, DC:
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
- {:K4DCA=>
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
- When using HAMfinder, you must first instantiate a new parser in your application:
42
+ Now you can use your HAMFinder's query method to retrieve data according to your provided parameters.
43
43
 
44
44
  ```ruby
45
- parser = Hamfinder::Parser.new
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 parser.query( zip:"20009", band:"10m", radius:5 )
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 parser.query( zip:"20009", radius:2 )
81
- => { :W3DOS=>{:frequency=>"145.1900", :offset=>"-0.6MHz", :tone=>"151.4", :call=>"W3DOS",
82
- :location=>"Washington,HarryS.TrumanBuilding", :state=>"DC", :usage=>"OPEN",
83
- :voip=>"", :distance=>"1.7", :direction=>"S"},
84
- :W3AGB=>{:frequency=>"147.3600", :offset=>"+0.6MHz", :tone=>"", :call=>"W3AGB",
85
- :location=>"Washington", :state=>"DC", :usage=>"OPEN",
86
- :voip=>"", :distance=>"1.7", :direction=>"S"},
87
- :K4DCA=>{:frequency=>"145.1100", :offset=>"-0.6MHz", :tone=>"CC1", :call=>"K4DCA",
88
- :location=>"Washington", :state=>"DC", :usage=>"OPEN",
89
- :voip=>"", :distance=>"0.8", :direction=>"S"},
90
- :K3MRC=>{:frequency=>"145.4300", :offset=>"-0.6MHz", :tone=>"114.8", :call=>"K3MRC",
91
- :location=>"Washington,D.C.", :state=>"DC", :usage=>"OPEN",
92
- :voip=>"", :distance=>"1.7", :direction=>"S"} }
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 parser.query( zip:"20009" )
96
- => {:W4HFH=>{:frequency=>"147.3150", :offset=>"+0.6MHz", :tone=>"107.2", :call=>"W4HFH",
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
 
@@ -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", "~> 1.8.3")
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"
@@ -1,3 +1,3 @@
1
1
  module Hamfinder
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
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.3
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: 1.8.3
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: 1.8.3
26
+ version: 2.0.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement