nhtsa 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/nhtsa.rb +1 -1
- data/lib/nhtsa/child_safety_seat_inspection_station_locator/get_by_geo_location.rb +1 -1
- data/lib/nhtsa/child_safety_seat_inspection_station_locator/get_by_state.rb +4 -4
- data/lib/nhtsa/child_safety_seat_inspection_station_locator/get_by_zip_code.rb +4 -4
- data/lib/nhtsa/civil_penalties/civil_penalties.rb +1 -1
- data/lib/nhtsa/civil_penalties/civil_penalties_by_year.rb +1 -1
- data/lib/nhtsa/complaints/complaints.rb +1 -1
- data/lib/nhtsa/complaints/complaints_by_odi_number.rb +1 -1
- data/lib/nhtsa/complaints/manufacturers.rb +1 -1
- data/lib/nhtsa/complaints/models.rb +1 -1
- data/lib/nhtsa/complaints/years.rb +1 -1
- data/lib/nhtsa/recalls/campaign_recalls.rb +1 -1
- data/lib/nhtsa/recalls/manufacturers.rb +1 -1
- data/lib/nhtsa/recalls/models.rb +1 -1
- data/lib/nhtsa/recalls/recalls.rb +1 -1
- data/lib/nhtsa/recalls/years.rb +1 -1
- data/lib/nhtsa/safety_ratings/manufacturers.rb +1 -1
- data/lib/nhtsa/safety_ratings/models.rb +1 -1
- data/lib/nhtsa/safety_ratings/ratings.rb +1 -1
- data/lib/nhtsa/safety_ratings/trims.rb +1 -1
- data/lib/nhtsa/safety_ratings/years.rb +1 -1
- data/lib/nhtsa/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d095f131e393f03af526c45c80de7ced30e24feb
|
4
|
+
data.tar.gz: e9d853daec69f541758c63335738399beba53e70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8f2559a97a2f8c4ede289c95519ab6423a3b57a37669c5a8663a782031b59a9d118e04c946fc74403ce8ff5557cac6cc7dc161824d3f91854bb2f24d45089f5
|
7
|
+
data.tar.gz: 1bcaa75ae5d3c93127af7535a2247d49d1e495dd69e6d28e04302f4d0a9136e55f4c0f848a7860dbcf759b32e964ca0ca411ec089e9530f2109d0f61a52e23e0
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Changelog #
|
2
|
+
|
3
|
+
## v0.2.1 June 11 2017 ##
|
4
|
+
|
5
|
+
### Features ###
|
6
|
+
|
7
|
+
* Moved all calls to the nhtsa api to use https instead of http
|
8
|
+
|
9
|
+
### Bug Fixes ###
|
10
|
+
|
11
|
+
* Safety Seat Inspection Station Locator was using a hardcoded URL, moving it to use the constants used everywhere else in the project.
|
12
|
+
|
13
|
+
### Misc ###
|
14
|
+
|
15
|
+
* Slightly better to read string handling when building URIs, going with `#{BASE_URI}/#{END_POINT}` over `BASE_URI + END_POINT`
|
data/lib/nhtsa.rb
CHANGED
@@ -8,7 +8,7 @@ module Nhtsa
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def url
|
11
|
-
"
|
11
|
+
"#{BASE_URI}#{END_POINT}?lat=#{@latitude}&long=#{@longitude}&miles=#{@radius}&format=json"
|
12
12
|
end
|
13
13
|
|
14
14
|
def inspection_stations
|
@@ -8,13 +8,13 @@ module Nhtsa
|
|
8
8
|
|
9
9
|
def url
|
10
10
|
if @filters[:spanish] && @filters[:cpsweek]
|
11
|
-
BASE_URI
|
11
|
+
"#{BASE_URI}#{END_POINT}/state/#{@state_abbreviation}#{CPS_WEEK}#{SPANISH}#{DEFAULT_PARAMS}"
|
12
12
|
elsif @filters[:spanish]
|
13
|
-
BASE_URI
|
13
|
+
"#{BASE_URI}#{END_POINT}/state/#{@state_abbreviation}#{SPANISH}#{DEFAULT_PARAMS}"
|
14
14
|
elsif @filters[:cpsweek]
|
15
|
-
BASE_URI
|
15
|
+
"#{BASE_URI}#{END_POINT}/state/#{@state_abbreviation}#{CPS_WEEK}#{DEFAULT_PARAMS}"
|
16
16
|
else
|
17
|
-
BASE_URI
|
17
|
+
"#{BASE_URI}#{END_POINT}/state/#{@state_abbreviation}#{DEFAULT_PARAMS}"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -8,13 +8,13 @@ module Nhtsa
|
|
8
8
|
|
9
9
|
def url
|
10
10
|
if @filters[:spanish] && @filters[:cpsweek]
|
11
|
-
BASE_URI
|
11
|
+
"#{BASE_URI}#{END_POINT}/zip/#{@zip_code}#{CPS_WEEK}#{SPANISH}#{DEFAULT_PARAMS}"
|
12
12
|
elsif @filters[:spanish]
|
13
|
-
BASE_URI
|
13
|
+
"#{BASE_URI}#{END_POINT}/zip/#{@zip_code}#{SPANISH}#{DEFAULT_PARAMS}"
|
14
14
|
elsif @filters[:cpsweek]
|
15
|
-
BASE_URI
|
15
|
+
"#{BASE_URI}#{END_POINT}/zip/#{@zip_code}#{CPS_WEEK}#{DEFAULT_PARAMS}"
|
16
16
|
else
|
17
|
-
BASE_URI
|
17
|
+
"#{BASE_URI}#{END_POINT}/zip/#{@zip_code}#{DEFAULT_PARAMS}"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/lib/nhtsa/recalls/models.rb
CHANGED
data/lib/nhtsa/recalls/years.rb
CHANGED
@@ -9,7 +9,7 @@ module Nhtsa
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def url
|
12
|
-
BASE_URI
|
12
|
+
"#{BASE_URI}#{END_POINT}/#{@year}/#{URI.encode(@manufacturer.name)}/#{URI.encode(@model.name)}#{DEFAULT_PARAMS}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def year
|
data/lib/nhtsa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nhtsa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mwaki Harri Magotswi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,6 +78,7 @@ extra_rdoc_files: []
|
|
78
78
|
files:
|
79
79
|
- ".gitignore"
|
80
80
|
- ".travis.yml"
|
81
|
+
- CHANGELOG.md
|
81
82
|
- CODE_OF_CONDUCT.md
|
82
83
|
- Gemfile
|
83
84
|
- LICENSE.txt
|