yellow-api-wrapper 0.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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +1 -0
  3. data/.gitignore +42 -0
  4. data/.travis.yml +29 -0
  5. data/Appraisals +30 -0
  6. data/Gemfile +5 -0
  7. data/LICENSE.md +20 -0
  8. data/README.md +54 -0
  9. data/Rakefile +20 -0
  10. data/gemfiles/rails_3.0.gemfile +8 -0
  11. data/gemfiles/rails_3.0.gemfile.lock +150 -0
  12. data/gemfiles/rails_3.1.gemfile +8 -0
  13. data/gemfiles/rails_3.1.gemfile.lock +161 -0
  14. data/gemfiles/rails_3.2.gemfile +8 -0
  15. data/gemfiles/rails_3.2.gemfile.lock +159 -0
  16. data/gemfiles/rails_4.0.gemfile +8 -0
  17. data/gemfiles/rails_4.0.gemfile.lock +147 -0
  18. data/gemfiles/rails_4.1.gemfile +8 -0
  19. data/gemfiles/rails_4.1.gemfile.lock +151 -0
  20. data/gemfiles/rails_4.2.gemfile +8 -0
  21. data/gemfiles/rails_4.2.gemfile.lock +176 -0
  22. data/gemfiles/rails_5.0.gemfile +8 -0
  23. data/gemfiles/rails_5.0.gemfile.lock +185 -0
  24. data/gemfiles/ruby.gemfile +7 -0
  25. data/gemfiles/ruby.gemfile.lock +96 -0
  26. data/lib/yellow_api.rb +25 -0
  27. data/lib/yellow_api/client.rb +33 -0
  28. data/lib/yellow_api/client/connection.rb +22 -0
  29. data/lib/yellow_api/client/find_business.rb +31 -0
  30. data/lib/yellow_api/client/find_dealer.rb +27 -0
  31. data/lib/yellow_api/client/get_business_details.rb +67 -0
  32. data/lib/yellow_api/client/get_type_ahead.rb +28 -0
  33. data/lib/yellow_api/client/request.rb +24 -0
  34. data/lib/yellow_api/config.rb +71 -0
  35. data/lib/yellow_api/version.rb +3 -0
  36. data/spec/fixtures/find_business.json +1 -0
  37. data/spec/fixtures/find_dealer.json +1 -0
  38. data/spec/fixtures/get_business_details.json +1 -0
  39. data/spec/fixtures/get_type_ahead.json +1 -0
  40. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business.yml +207 -0
  41. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_format_for_businesses.yml +209 -0
  42. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/returns_the_correct_number_of_businesses.yml +209 -0
  43. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_format_for_businesses.yml +178 -0
  44. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_lat_lon_where_returns_the_correct_number_of_businesses.yml +178 -0
  45. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_gets_the_language.yml +738 -0
  46. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_options_returns_the_correct_number_of_businesses.yml +81 -0
  47. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_parses_the_special_characters.yml +213 -0
  48. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_format_for_businesses.yml +211 -0
  49. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_business/find_business/with_special_characters_returns_the_correct_number_of_businesses.yml +213 -0
  50. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer.yml +45 -0
  51. data/spec/fixtures/vcr_cassettes/yellow_api/client/find_dealer/find_dealer/should_return_the_correct_parent_business.yml +43 -0
  52. data/spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_business.yml +52 -0
  53. data/spec/fixtures/vcr_cassettes/yellow_api/client/get_business_details/get_business_details/returns_the_correct_format.yml +52 -0
  54. data/spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead.yml +50 -0
  55. data/spec/fixtures/vcr_cassettes/yellow_api/client/get_type_ahead/get_type_ahead/should_return_suggestions.yml +50 -0
  56. data/spec/helper.rb +45 -0
  57. data/spec/yellow_api/client_spec.rb +15 -0
  58. data/spec/yellow_api/find_business_spec.rb +89 -0
  59. data/spec/yellow_api/find_dealer_spec.rb +20 -0
  60. data/spec/yellow_api/get_business_details_spec.rb +21 -0
  61. data/spec/yellow_api/get_type_ahead_spec.rb +19 -0
  62. data/spec/yellow_api_spec.rb +9 -0
  63. data/yellow_api.gemspec +29 -0
  64. metadata +289 -0
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "~> 3.2.21"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,159 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ yellow-api-wrapper (0.0.5)
5
+ activesupport (>= 3.0.0)
6
+ faraday_middleware (>= 0.7.0)
7
+ rash (~> 0.4.0)
8
+ uuid (~> 2.3.5)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ actionmailer (3.2.22.2)
14
+ actionpack (= 3.2.22.2)
15
+ mail (~> 2.5.4)
16
+ actionpack (3.2.22.2)
17
+ activemodel (= 3.2.22.2)
18
+ activesupport (= 3.2.22.2)
19
+ builder (~> 3.0.0)
20
+ erubis (~> 2.7.0)
21
+ journey (~> 1.0.4)
22
+ rack (~> 1.4.5)
23
+ rack-cache (~> 1.2)
24
+ rack-test (~> 0.6.1)
25
+ sprockets (~> 2.2.1)
26
+ activemodel (3.2.22.2)
27
+ activesupport (= 3.2.22.2)
28
+ builder (~> 3.0.0)
29
+ activerecord (3.2.22.2)
30
+ activemodel (= 3.2.22.2)
31
+ activesupport (= 3.2.22.2)
32
+ arel (~> 3.0.2)
33
+ tzinfo (~> 0.3.29)
34
+ activeresource (3.2.22.2)
35
+ activemodel (= 3.2.22.2)
36
+ activesupport (= 3.2.22.2)
37
+ activesupport (3.2.22.2)
38
+ i18n (~> 0.6, >= 0.6.4)
39
+ multi_json (~> 1.0)
40
+ addressable (2.4.0)
41
+ appraisal (2.1.0)
42
+ bundler
43
+ rake
44
+ thor (>= 0.14.0)
45
+ arel (3.0.3)
46
+ builder (3.0.4)
47
+ coderay (1.1.1)
48
+ crack (0.4.3)
49
+ safe_yaml (~> 1.0.0)
50
+ diff-lcs (1.2.5)
51
+ docile (1.1.5)
52
+ erubis (2.7.0)
53
+ faraday (0.9.2)
54
+ multipart-post (>= 1.2, < 3)
55
+ faraday_middleware (0.10.0)
56
+ faraday (>= 0.7.4, < 0.10)
57
+ hashie (2.0.5)
58
+ hike (1.2.3)
59
+ i18n (0.7.0)
60
+ journey (1.0.4)
61
+ json (1.8.3)
62
+ macaddr (1.7.1)
63
+ systemu (~> 2.6.2)
64
+ mail (2.5.4)
65
+ mime-types (~> 1.16)
66
+ treetop (~> 1.4.8)
67
+ method_source (0.8.2)
68
+ mime-types (1.25.1)
69
+ multi_json (1.11.3)
70
+ multipart-post (2.0.0)
71
+ polyglot (0.3.5)
72
+ pry (0.10.3)
73
+ coderay (~> 1.1.0)
74
+ method_source (~> 0.8.1)
75
+ slop (~> 3.4)
76
+ rack (1.4.7)
77
+ rack-cache (1.6.1)
78
+ rack (>= 0.4)
79
+ rack-ssl (1.3.4)
80
+ rack
81
+ rack-test (0.6.3)
82
+ rack (>= 1.0)
83
+ rails (3.2.22.2)
84
+ actionmailer (= 3.2.22.2)
85
+ actionpack (= 3.2.22.2)
86
+ activerecord (= 3.2.22.2)
87
+ activeresource (= 3.2.22.2)
88
+ activesupport (= 3.2.22.2)
89
+ bundler (~> 1.0)
90
+ railties (= 3.2.22.2)
91
+ railties (3.2.22.2)
92
+ actionpack (= 3.2.22.2)
93
+ activesupport (= 3.2.22.2)
94
+ rack-ssl (~> 1.3.2)
95
+ rake (>= 0.8.7)
96
+ rdoc (~> 3.4)
97
+ thor (>= 0.14.6, < 2.0)
98
+ rake (0.9.6)
99
+ rash (0.4.0)
100
+ hashie (~> 2.0.0)
101
+ rdoc (3.12.2)
102
+ json (~> 1.4)
103
+ rspec (3.4.0)
104
+ rspec-core (~> 3.4.0)
105
+ rspec-expectations (~> 3.4.0)
106
+ rspec-mocks (~> 3.4.0)
107
+ rspec-core (3.4.4)
108
+ rspec-support (~> 3.4.0)
109
+ rspec-expectations (3.4.0)
110
+ diff-lcs (>= 1.2.0, < 2.0)
111
+ rspec-support (~> 3.4.0)
112
+ rspec-mocks (3.4.1)
113
+ diff-lcs (>= 1.2.0, < 2.0)
114
+ rspec-support (~> 3.4.0)
115
+ rspec-support (3.4.1)
116
+ safe_yaml (1.0.4)
117
+ simplecov (0.11.2)
118
+ docile (~> 1.1.0)
119
+ json (~> 1.8)
120
+ simplecov-html (~> 0.10.0)
121
+ simplecov-html (0.10.0)
122
+ slop (3.6.0)
123
+ sprockets (2.2.3)
124
+ hike (~> 1.2)
125
+ multi_json (~> 1.0)
126
+ rack (~> 1.0)
127
+ tilt (~> 1.1, != 1.3.0)
128
+ systemu (2.6.5)
129
+ thor (0.19.1)
130
+ tilt (1.4.1)
131
+ treetop (1.4.15)
132
+ polyglot
133
+ polyglot (>= 0.3.1)
134
+ tzinfo (0.3.49)
135
+ uuid (2.3.8)
136
+ macaddr (~> 1.0)
137
+ vcr (3.0.1)
138
+ webmock (1.8.11)
139
+ addressable (>= 2.2.7)
140
+ crack (>= 0.1.7)
141
+ yard (0.8.7.6)
142
+
143
+ PLATFORMS
144
+ ruby
145
+
146
+ DEPENDENCIES
147
+ appraisal
148
+ pry (~> 0.10.3)
149
+ rails (~> 3.2.21)
150
+ rake (~> 0.9)
151
+ rspec (~> 3.4)
152
+ simplecov (>= 0.5.0)
153
+ vcr (~> 3.0)
154
+ webmock (~> 1.8.0)
155
+ yard (~> 0.7)
156
+ yellow-api-wrapper!
157
+
158
+ BUNDLED WITH
159
+ 1.12.1
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "~> 4.0.13"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,147 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ yellow-api-wrapper (0.0.5)
5
+ activesupport (>= 3.0.0)
6
+ faraday_middleware (>= 0.7.0)
7
+ rash (~> 0.4.0)
8
+ uuid (~> 2.3.5)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ actionmailer (4.0.13)
14
+ actionpack (= 4.0.13)
15
+ mail (~> 2.5, >= 2.5.4)
16
+ actionpack (4.0.13)
17
+ activesupport (= 4.0.13)
18
+ builder (~> 3.1.0)
19
+ erubis (~> 2.7.0)
20
+ rack (~> 1.5.2)
21
+ rack-test (~> 0.6.2)
22
+ activemodel (4.0.13)
23
+ activesupport (= 4.0.13)
24
+ builder (~> 3.1.0)
25
+ activerecord (4.0.13)
26
+ activemodel (= 4.0.13)
27
+ activerecord-deprecated_finders (~> 1.0.2)
28
+ activesupport (= 4.0.13)
29
+ arel (~> 4.0.0)
30
+ activerecord-deprecated_finders (1.0.4)
31
+ activesupport (4.0.13)
32
+ i18n (~> 0.6, >= 0.6.9)
33
+ minitest (~> 4.2)
34
+ multi_json (~> 1.3)
35
+ thread_safe (~> 0.1)
36
+ tzinfo (~> 0.3.37)
37
+ addressable (2.4.0)
38
+ appraisal (2.1.0)
39
+ bundler
40
+ rake
41
+ thor (>= 0.14.0)
42
+ arel (4.0.2)
43
+ builder (3.1.4)
44
+ coderay (1.1.1)
45
+ concurrent-ruby (1.0.2)
46
+ crack (0.4.3)
47
+ safe_yaml (~> 1.0.0)
48
+ diff-lcs (1.2.5)
49
+ docile (1.1.5)
50
+ erubis (2.7.0)
51
+ faraday (0.9.2)
52
+ multipart-post (>= 1.2, < 3)
53
+ faraday_middleware (0.10.0)
54
+ faraday (>= 0.7.4, < 0.10)
55
+ hashie (2.0.5)
56
+ i18n (0.7.0)
57
+ json (1.8.3)
58
+ macaddr (1.7.1)
59
+ systemu (~> 2.6.2)
60
+ mail (2.6.4)
61
+ mime-types (>= 1.16, < 4)
62
+ method_source (0.8.2)
63
+ mime-types (3.0)
64
+ mime-types-data (~> 3.2015)
65
+ mime-types-data (3.2016.0221)
66
+ minitest (4.7.5)
67
+ multi_json (1.11.3)
68
+ multipart-post (2.0.0)
69
+ pry (0.10.3)
70
+ coderay (~> 1.1.0)
71
+ method_source (~> 0.8.1)
72
+ slop (~> 3.4)
73
+ rack (1.5.5)
74
+ rack-test (0.6.3)
75
+ rack (>= 1.0)
76
+ rails (4.0.13)
77
+ actionmailer (= 4.0.13)
78
+ actionpack (= 4.0.13)
79
+ activerecord (= 4.0.13)
80
+ activesupport (= 4.0.13)
81
+ bundler (>= 1.3.0, < 2.0)
82
+ railties (= 4.0.13)
83
+ sprockets-rails (~> 2.0)
84
+ railties (4.0.13)
85
+ actionpack (= 4.0.13)
86
+ activesupport (= 4.0.13)
87
+ rake (>= 0.8.7)
88
+ thor (>= 0.18.1, < 2.0)
89
+ rake (0.9.6)
90
+ rash (0.4.0)
91
+ hashie (~> 2.0.0)
92
+ rspec (3.4.0)
93
+ rspec-core (~> 3.4.0)
94
+ rspec-expectations (~> 3.4.0)
95
+ rspec-mocks (~> 3.4.0)
96
+ rspec-core (3.4.4)
97
+ rspec-support (~> 3.4.0)
98
+ rspec-expectations (3.4.0)
99
+ diff-lcs (>= 1.2.0, < 2.0)
100
+ rspec-support (~> 3.4.0)
101
+ rspec-mocks (3.4.1)
102
+ diff-lcs (>= 1.2.0, < 2.0)
103
+ rspec-support (~> 3.4.0)
104
+ rspec-support (3.4.1)
105
+ safe_yaml (1.0.4)
106
+ simplecov (0.11.2)
107
+ docile (~> 1.1.0)
108
+ json (~> 1.8)
109
+ simplecov-html (~> 0.10.0)
110
+ simplecov-html (0.10.0)
111
+ slop (3.6.0)
112
+ sprockets (3.6.0)
113
+ concurrent-ruby (~> 1.0)
114
+ rack (> 1, < 3)
115
+ sprockets-rails (2.3.3)
116
+ actionpack (>= 3.0)
117
+ activesupport (>= 3.0)
118
+ sprockets (>= 2.8, < 4.0)
119
+ systemu (2.6.5)
120
+ thor (0.19.1)
121
+ thread_safe (0.3.5)
122
+ tzinfo (0.3.49)
123
+ uuid (2.3.8)
124
+ macaddr (~> 1.0)
125
+ vcr (3.0.1)
126
+ webmock (1.8.11)
127
+ addressable (>= 2.2.7)
128
+ crack (>= 0.1.7)
129
+ yard (0.8.7.6)
130
+
131
+ PLATFORMS
132
+ ruby
133
+
134
+ DEPENDENCIES
135
+ appraisal
136
+ pry (~> 0.10.3)
137
+ rails (~> 4.0.13)
138
+ rake (~> 0.9)
139
+ rspec (~> 3.4)
140
+ simplecov (>= 0.5.0)
141
+ vcr (~> 3.0)
142
+ webmock (~> 1.8.0)
143
+ yard (~> 0.7)
144
+ yellow-api-wrapper!
145
+
146
+ BUNDLED WITH
147
+ 1.12.1
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem "appraisal"
6
+ gem "rails", "~> 4.1.15"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,151 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ yellow-api-wrapper (0.0.5)
5
+ activesupport (>= 3.0.0)
6
+ faraday_middleware (>= 0.7.0)
7
+ rash (~> 0.4.0)
8
+ uuid (~> 2.3.5)
9
+
10
+ GEM
11
+ remote: http://rubygems.org/
12
+ specs:
13
+ actionmailer (4.1.15)
14
+ actionpack (= 4.1.15)
15
+ actionview (= 4.1.15)
16
+ mail (~> 2.5, >= 2.5.4)
17
+ actionpack (4.1.15)
18
+ actionview (= 4.1.15)
19
+ activesupport (= 4.1.15)
20
+ rack (~> 1.5.2)
21
+ rack-test (~> 0.6.2)
22
+ actionview (4.1.15)
23
+ activesupport (= 4.1.15)
24
+ builder (~> 3.1)
25
+ erubis (~> 2.7.0)
26
+ activemodel (4.1.15)
27
+ activesupport (= 4.1.15)
28
+ builder (~> 3.1)
29
+ activerecord (4.1.15)
30
+ activemodel (= 4.1.15)
31
+ activesupport (= 4.1.15)
32
+ arel (~> 5.0.0)
33
+ activesupport (4.1.15)
34
+ i18n (~> 0.6, >= 0.6.9)
35
+ json (~> 1.7, >= 1.7.7)
36
+ minitest (~> 5.1)
37
+ thread_safe (~> 0.1)
38
+ tzinfo (~> 1.1)
39
+ addressable (2.4.0)
40
+ appraisal (2.1.0)
41
+ bundler
42
+ rake
43
+ thor (>= 0.14.0)
44
+ arel (5.0.1.20140414130214)
45
+ builder (3.2.2)
46
+ coderay (1.1.1)
47
+ concurrent-ruby (1.0.2)
48
+ crack (0.4.3)
49
+ safe_yaml (~> 1.0.0)
50
+ diff-lcs (1.2.5)
51
+ docile (1.1.5)
52
+ erubis (2.7.0)
53
+ faraday (0.9.2)
54
+ multipart-post (>= 1.2, < 3)
55
+ faraday_middleware (0.10.0)
56
+ faraday (>= 0.7.4, < 0.10)
57
+ hashie (2.0.5)
58
+ i18n (0.7.0)
59
+ json (1.8.3)
60
+ macaddr (1.7.1)
61
+ systemu (~> 2.6.2)
62
+ mail (2.6.4)
63
+ mime-types (>= 1.16, < 4)
64
+ method_source (0.8.2)
65
+ mime-types (3.0)
66
+ mime-types-data (~> 3.2015)
67
+ mime-types-data (3.2016.0221)
68
+ minitest (5.8.4)
69
+ multipart-post (2.0.0)
70
+ pry (0.10.3)
71
+ coderay (~> 1.1.0)
72
+ method_source (~> 0.8.1)
73
+ slop (~> 3.4)
74
+ rack (1.5.5)
75
+ rack-test (0.6.3)
76
+ rack (>= 1.0)
77
+ rails (4.1.15)
78
+ actionmailer (= 4.1.15)
79
+ actionpack (= 4.1.15)
80
+ actionview (= 4.1.15)
81
+ activemodel (= 4.1.15)
82
+ activerecord (= 4.1.15)
83
+ activesupport (= 4.1.15)
84
+ bundler (>= 1.3.0, < 2.0)
85
+ railties (= 4.1.15)
86
+ sprockets-rails (~> 2.0)
87
+ railties (4.1.15)
88
+ actionpack (= 4.1.15)
89
+ activesupport (= 4.1.15)
90
+ rake (>= 0.8.7)
91
+ thor (>= 0.18.1, < 2.0)
92
+ rake (0.9.6)
93
+ rash (0.4.0)
94
+ hashie (~> 2.0.0)
95
+ rspec (3.4.0)
96
+ rspec-core (~> 3.4.0)
97
+ rspec-expectations (~> 3.4.0)
98
+ rspec-mocks (~> 3.4.0)
99
+ rspec-core (3.4.4)
100
+ rspec-support (~> 3.4.0)
101
+ rspec-expectations (3.4.0)
102
+ diff-lcs (>= 1.2.0, < 2.0)
103
+ rspec-support (~> 3.4.0)
104
+ rspec-mocks (3.4.1)
105
+ diff-lcs (>= 1.2.0, < 2.0)
106
+ rspec-support (~> 3.4.0)
107
+ rspec-support (3.4.1)
108
+ safe_yaml (1.0.4)
109
+ simplecov (0.11.2)
110
+ docile (~> 1.1.0)
111
+ json (~> 1.8)
112
+ simplecov-html (~> 0.10.0)
113
+ simplecov-html (0.10.0)
114
+ slop (3.6.0)
115
+ sprockets (3.6.0)
116
+ concurrent-ruby (~> 1.0)
117
+ rack (> 1, < 3)
118
+ sprockets-rails (2.3.3)
119
+ actionpack (>= 3.0)
120
+ activesupport (>= 3.0)
121
+ sprockets (>= 2.8, < 4.0)
122
+ systemu (2.6.5)
123
+ thor (0.19.1)
124
+ thread_safe (0.3.5)
125
+ tzinfo (1.2.2)
126
+ thread_safe (~> 0.1)
127
+ uuid (2.3.8)
128
+ macaddr (~> 1.0)
129
+ vcr (3.0.1)
130
+ webmock (1.8.11)
131
+ addressable (>= 2.2.7)
132
+ crack (>= 0.1.7)
133
+ yard (0.8.7.6)
134
+
135
+ PLATFORMS
136
+ ruby
137
+
138
+ DEPENDENCIES
139
+ appraisal
140
+ pry (~> 0.10.3)
141
+ rails (~> 4.1.15)
142
+ rake (~> 0.9)
143
+ rspec (~> 3.4)
144
+ simplecov (>= 0.5.0)
145
+ vcr (~> 3.0)
146
+ webmock (~> 1.8.0)
147
+ yard (~> 0.7)
148
+ yellow-api-wrapper!
149
+
150
+ BUNDLED WITH
151
+ 1.12.1