fcc 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +4 -2
- data/lib/fcc/station/cache.rb +1 -1
- data/lib/fcc/station/extended_info.rb +5 -2
- data/lib/fcc/station/index.rb +1 -1
- data/lib/fcc/station/info.rb +1 -1
- data/lib/fcc/station/parsers/extended_info.rb +6 -6
- data/lib/fcc/station/record_delegate.rb +1 -1
- data/lib/fcc/station/result.rb +2 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b1badea4f71c71fca305a42faf33d81b8d3bd790f2e3c6ffd06093887345608
|
4
|
+
data.tar.gz: ce292f11199f0415ebf887d25b51accd79d0531b9189f1c941e236e4ea5c80bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f79be5bcddfc7001c7be7c6ef0e64e26acc7e59ae773aaacebea28d9627febe56ab8fecb85a0a1ccda7277b3373999d9ffd5cc2263492e688218c597235e836
|
7
|
+
data.tar.gz: b2280ae8d3dbdaacf447f5cbe880c9220a41b92ef22d2459bf850cfc238c370b58aa921d76d4977f6b4506d744dfff308de92a43827e79e54ad102ef2ae4eafc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
fcc changelog
|
2
2
|
|
3
|
+
## [1.4.6](https://github.com/jkeen/fcc/compare/v1.4.5...v1.4.6) (2024-05-06)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Update some syntax to get things working better with some FCC changes ([9020eee](https://github.com/jkeen/fcc/commit/9020eeee85f1e9689ccff108f9438e48fcbe550c))
|
9
|
+
|
3
10
|
## [1.4.5](https://github.com/jkeen/fcc/compare/v1.4.4...v1.4.5) (2024-03-20)
|
4
11
|
|
5
12
|
## [1.4.4](https://github.com/jkeen/fcc/compare/v1.4.3...v1.4.4) (2024-03-20)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fcc (1.4.
|
4
|
+
fcc (1.4.4)
|
5
5
|
activesupport (>= 6.1)
|
6
6
|
csv
|
7
7
|
httparty (~> 0.21)
|
@@ -24,9 +24,10 @@ GEM
|
|
24
24
|
tzinfo (~> 2.0)
|
25
25
|
base64 (0.2.0)
|
26
26
|
bigdecimal (3.1.7)
|
27
|
+
byebug (11.1.3)
|
27
28
|
concurrent-ruby (1.2.3)
|
28
29
|
connection_pool (2.4.1)
|
29
|
-
csv (3.
|
30
|
+
csv (3.3.0)
|
30
31
|
diff-lcs (1.5.1)
|
31
32
|
drb (2.2.1)
|
32
33
|
httparty (0.21.0)
|
@@ -63,6 +64,7 @@ PLATFORMS
|
|
63
64
|
|
64
65
|
DEPENDENCIES
|
65
66
|
bundler
|
67
|
+
byebug
|
66
68
|
fcc!
|
67
69
|
rake (~> 12.3.3)
|
68
70
|
rspec (~> 3.9.0)
|
data/lib/fcc/station/cache.rb
CHANGED
@@ -7,7 +7,7 @@ module FCC
|
|
7
7
|
include HTTParty
|
8
8
|
attr_accessor :results, :service
|
9
9
|
|
10
|
-
base_uri 'https://fcc
|
10
|
+
base_uri 'https://transition.fcc.gov/fcc-bin/'
|
11
11
|
|
12
12
|
def initialize(service)
|
13
13
|
@service = service
|
@@ -48,7 +48,10 @@ module FCC
|
|
48
48
|
cache_key = "#{self.class.instance_variable_get('@default_options')[:base_uri]}/#{@service.to_s.downcase}q"
|
49
49
|
FCC.cache.fetch cache_key do
|
50
50
|
response = self.class.get("/#{service.to_s.downcase}q", @options.merge(query: @query))
|
51
|
-
|
51
|
+
|
52
|
+
FCC.log("Request: #{response.request.uri}")
|
53
|
+
FCC.log("Inspect: #{response.request.uri.to_s.gsub('&list=4', '&list=0')}")
|
54
|
+
|
52
55
|
response.parsed_response
|
53
56
|
end
|
54
57
|
rescue StandardError => e
|
data/lib/fcc/station/index.rb
CHANGED
@@ -29,7 +29,7 @@ module FCC
|
|
29
29
|
|
30
30
|
def results
|
31
31
|
@results ||= begin
|
32
|
-
response = self.class.get("/api/service/#{service.to_s.downcase}/facility/getall
|
32
|
+
response = self.class.get("/api/service/#{service.to_s.downcase}/facility/getall")
|
33
33
|
response.parsed_response['results']['facilityList']
|
34
34
|
end
|
35
35
|
end
|
data/lib/fcc/station/info.rb
CHANGED
@@ -19,7 +19,7 @@ module FCC
|
|
19
19
|
Station.index(service).call_sign_to_id(id_or_call_sign)
|
20
20
|
end
|
21
21
|
|
22
|
-
response = self.class.get("/api/service/#{service.to_s.downcase}/facility/id/#{id}
|
22
|
+
response = self.class.get("/api/service/#{service.to_s.downcase}/facility/id/#{id}")
|
23
23
|
|
24
24
|
begin
|
25
25
|
body = response['results']['facility']
|
@@ -12,7 +12,7 @@ module FCC
|
|
12
12
|
fields = row.split('|').slice(1...-1).collect(&:strip).map { |v| v == '-' ? "" : v }
|
13
13
|
|
14
14
|
attrs[:call_sign] = fields[0]
|
15
|
-
attrs[:frequency] = parse_frequency(fields[1])
|
15
|
+
attrs[:frequency] = parse_frequency(fields[1]) rescue nil
|
16
16
|
attrs[:band] = fields[2]
|
17
17
|
attrs[:channel] = fields[3]
|
18
18
|
attrs[:antenna_type] = fields[4] # Directional Antenna (DA) or NonDirectional (ND)
|
@@ -24,13 +24,13 @@ module FCC
|
|
24
24
|
attrs[:state] = fields[10]
|
25
25
|
attrs[:country] = fields[11]
|
26
26
|
attrs[:file_number] = fields[12] #File Number (Application, Construction Permit or License) or
|
27
|
-
attrs[:signal_strength] = parse_signal_strength(fields[13]) # Effective Radiated Power --
|
28
|
-
attrs[:effective_radiated_power] = parse_signal_strength(fields[14]) # Effective Radiated Power -- vertically polarized (maximum)
|
27
|
+
attrs[:signal_strength] = parse_signal_strength(fields[13]) rescue nil # Effective Radiated Power --
|
28
|
+
attrs[:effective_radiated_power] = parse_signal_strength(fields[14]) rescue nil # Effective Radiated Power -- vertically polarized (maximum)
|
29
29
|
attrs[:haat_horizontal] = fields[15] # Antenna Height Above Average Terrain (HAAT) -- horizontal polarization
|
30
30
|
attrs[:haat_vertical] = fields[16] # Antenna Height Above Average Terrain (HAAT) -- vertical polarization
|
31
31
|
attrs[:fcc_id] = fields[17] # Facility ID Number (unique to each station)
|
32
|
-
attrs[:latitude] = parse_latitude(fields[18], fields[19], fields[20], fields[21])
|
33
|
-
attrs[:longitude] = parse_longitude(fields[22], fields[23], fields[24], fields[25])
|
32
|
+
attrs[:latitude] = parse_latitude(fields[18], fields[19], fields[20], fields[21]) rescue nil
|
33
|
+
attrs[:longitude] = parse_longitude(fields[22], fields[23], fields[24], fields[25]) rescue nil
|
34
34
|
attrs[:licensed_to] = fields[26] # Licensee or Permittee
|
35
35
|
|
36
36
|
results << attrs
|
@@ -52,7 +52,7 @@ module FCC
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def parse_signal_strength(power_string)
|
55
|
-
return unless power_string
|
55
|
+
return unless power_string
|
56
56
|
|
57
57
|
number, unit = power_string.strip.scan(/^([0-9.]+)\s+(\w+)$?/).flatten
|
58
58
|
multiplier = case unit&.downcase
|
@@ -98,7 +98,7 @@ module FCC
|
|
98
98
|
end
|
99
99
|
|
100
100
|
def inspect
|
101
|
-
"<RecordDelegate:[#{band}] #{frequency} #{call_sign} — #{community
|
101
|
+
"<RecordDelegate:[#{band}] #{frequency} #{call_sign} — #{community&.city} #{community&.state} />"
|
102
102
|
end
|
103
103
|
|
104
104
|
private
|
data/lib/fcc/station/result.rb
CHANGED
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fcc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Keen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|