api-auth 1.5.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +10 -44
  3. data/.rubocop.yml +102 -0
  4. data/.travis.yml +1 -0
  5. data/Appraisals +8 -0
  6. data/CHANGELOG.md +8 -1
  7. data/Gemfile +3 -0
  8. data/README.md +33 -5
  9. data/VERSION +1 -1
  10. data/api_auth.gemspec +17 -17
  11. data/gemfiles/rails_23.gemfile +3 -0
  12. data/gemfiles/rails_30.gemfile +3 -0
  13. data/gemfiles/rails_31.gemfile +5 -0
  14. data/gemfiles/rails_32.gemfile +5 -0
  15. data/gemfiles/rails_4.gemfile +2 -0
  16. data/gemfiles/rails_41.gemfile +2 -0
  17. data/gemfiles/rails_42.gemfile +2 -0
  18. data/lib/api-auth.rb +1 -1
  19. data/lib/api_auth/base.rb +21 -25
  20. data/lib/api_auth/errors.rb +4 -3
  21. data/lib/api_auth/headers.rb +11 -27
  22. data/lib/api_auth/helpers.rb +2 -6
  23. data/lib/api_auth/railtie.rb +5 -50
  24. data/lib/api_auth/request_drivers/action_controller.rb +7 -13
  25. data/lib/api_auth/request_drivers/action_dispatch.rb +0 -6
  26. data/lib/api_auth/request_drivers/curb.rb +8 -14
  27. data/lib/api_auth/request_drivers/faraday.rb +11 -21
  28. data/lib/api_auth/request_drivers/httpi.rb +8 -14
  29. data/lib/api_auth/request_drivers/net_http.rb +8 -14
  30. data/lib/api_auth/request_drivers/rack.rb +10 -16
  31. data/lib/api_auth/request_drivers/rest_client.rb +9 -15
  32. data/spec/api_auth_spec.rb +90 -88
  33. data/spec/headers_spec.rb +69 -84
  34. data/spec/helpers_spec.rb +7 -9
  35. data/spec/railtie_spec.rb +42 -72
  36. data/spec/request_drivers/action_controller_spec.rb +53 -55
  37. data/spec/request_drivers/action_dispatch_spec.rb +52 -55
  38. data/spec/request_drivers/curb_spec.rb +25 -28
  39. data/spec/request_drivers/faraday_spec.rb +54 -56
  40. data/spec/request_drivers/httpi_spec.rb +42 -48
  41. data/spec/request_drivers/net_http_spec.rb +51 -53
  42. data/spec/request_drivers/rack_spec.rb +58 -60
  43. data/spec/request_drivers/rest_client_spec.rb +86 -89
  44. data/spec/spec_helper.rb +9 -9
  45. metadata +4 -11
  46. data/Gemfile.lock +0 -115
  47. data/gemfiles/rails_23.gemfile.lock +0 -70
  48. data/gemfiles/rails_30.gemfile.lock +0 -92
  49. data/gemfiles/rails_31.gemfile.lock +0 -98
  50. data/gemfiles/rails_32.gemfile.lock +0 -97
  51. data/gemfiles/rails_4.gemfile.lock +0 -94
  52. data/gemfiles/rails_41.gemfile.lock +0 -98
  53. data/gemfiles/rails_42.gemfile.lock +0 -115
@@ -1,115 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- api-auth (1.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionpack (4.2.5)
10
- actionview (= 4.2.5)
11
- activesupport (= 4.2.5)
12
- rack (~> 1.6)
13
- rack-test (~> 0.6.2)
14
- rails-dom-testing (~> 1.0, >= 1.0.5)
15
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
16
- actionview (4.2.5)
17
- activesupport (= 4.2.5)
18
- builder (~> 3.1)
19
- erubis (~> 2.7.0)
20
- rails-dom-testing (~> 1.0, >= 1.0.5)
21
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
22
- activemodel (4.2.5)
23
- activesupport (= 4.2.5)
24
- builder (~> 3.1)
25
- activeresource (4.0.0)
26
- activemodel (~> 4.0)
27
- activesupport (~> 4.0)
28
- rails-observers (~> 0.1.1)
29
- activesupport (4.2.5)
30
- i18n (~> 0.7)
31
- json (~> 1.7, >= 1.7.7)
32
- minitest (~> 5.1)
33
- thread_safe (~> 0.3, >= 0.3.4)
34
- tzinfo (~> 1.1)
35
- amatch (0.2.10)
36
- tins (~> 0.3)
37
- appraisal (2.1.0)
38
- bundler
39
- rake
40
- thor (>= 0.14.0)
41
- builder (3.2.2)
42
- curb (0.8.6)
43
- diff-lcs (1.2.5)
44
- erubis (2.7.0)
45
- faraday (0.9.1)
46
- multipart-post (>= 1.2, < 3)
47
- httpi (2.1.0)
48
- rack
49
- rubyntlm (~> 0.3.2)
50
- i18n (0.7.0)
51
- json (1.8.3)
52
- loofah (2.0.3)
53
- nokogiri (>= 1.5.9)
54
- mime-types (1.17.2)
55
- mini_portile (0.6.2)
56
- minitest (5.8.2)
57
- multipart-post (2.0.0)
58
- nokogiri (1.6.6.2)
59
- mini_portile (~> 0.6.0)
60
- rack (1.6.4)
61
- rack-test (0.6.3)
62
- rack (>= 1.0)
63
- rails-deprecated_sanitizer (1.0.3)
64
- activesupport (>= 4.2.0.alpha)
65
- rails-dom-testing (1.0.7)
66
- activesupport (>= 4.2.0.beta, < 5.0)
67
- nokogiri (~> 1.6.0)
68
- rails-deprecated_sanitizer (>= 1.0.1)
69
- rails-html-sanitizer (1.0.2)
70
- loofah (~> 2.0)
71
- rails-observers (0.1.2)
72
- activemodel (~> 4.0)
73
- rake (10.4.2)
74
- rest-client (1.6.7)
75
- mime-types (>= 1.16)
76
- rspec (3.4.0)
77
- rspec-core (~> 3.4.0)
78
- rspec-expectations (~> 3.4.0)
79
- rspec-mocks (~> 3.4.0)
80
- rspec-core (3.4.0)
81
- rspec-support (~> 3.4.0)
82
- rspec-expectations (3.4.0)
83
- diff-lcs (>= 1.2.0, < 2.0)
84
- rspec-support (~> 3.4.0)
85
- rspec-mocks (3.4.0)
86
- diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.4.0)
88
- rspec-support (3.4.0)
89
- rubyntlm (0.3.4)
90
- thor (0.19.1)
91
- thread_safe (0.3.5)
92
- tins (0.5.5)
93
- tzinfo (1.2.2)
94
- thread_safe (~> 0.1)
95
-
96
- PLATFORMS
97
- ruby
98
-
99
- DEPENDENCIES
100
- actionpack (> 2.3.2, < 5.0)
101
- activeresource (~> 4.0)
102
- activesupport (> 2.3.2, < 5.0)
103
- amatch
104
- api-auth!
105
- appraisal
106
- curb (~> 0.8.1)
107
- faraday
108
- httpi
109
- multipart-post (~> 2.0)
110
- rake
111
- rest-client (~> 1.6.0)
112
- rspec (~> 3.4)
113
-
114
- BUNDLED WITH
115
- 1.10.6
@@ -1,70 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- api-auth (1.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionpack (2.3.18)
10
- activesupport (= 2.3.18)
11
- rack (~> 1.1.0)
12
- activeresource (2.3.18)
13
- activesupport (= 2.3.18)
14
- activesupport (2.3.18)
15
- amatch (0.3.0)
16
- tins (~> 1.0)
17
- appraisal (1.0.0)
18
- bundler
19
- rake
20
- thor (>= 0.14.0)
21
- curb (0.8.6)
22
- diff-lcs (1.2.5)
23
- faraday (0.9.1)
24
- multipart-post (>= 1.2, < 3)
25
- httpi (2.1.0)
26
- rack
27
- rubyntlm (~> 0.3.2)
28
- mime-types (1.25.1)
29
- multipart-post (2.0.0)
30
- rack (1.1.6)
31
- rake (10.3.1)
32
- rest-client (1.6.7)
33
- mime-types (>= 1.16)
34
- rspec (3.4.0)
35
- rspec-core (~> 3.4.0)
36
- rspec-expectations (~> 3.4.0)
37
- rspec-mocks (~> 3.4.0)
38
- rspec-core (3.4.0)
39
- rspec-support (~> 3.4.0)
40
- rspec-expectations (3.4.0)
41
- diff-lcs (>= 1.2.0, < 2.0)
42
- rspec-support (~> 3.4.0)
43
- rspec-mocks (3.4.0)
44
- diff-lcs (>= 1.2.0, < 2.0)
45
- rspec-support (~> 3.4.0)
46
- rspec-support (3.4.0)
47
- rubyntlm (0.3.4)
48
- thor (0.19.1)
49
- tins (1.3.0)
50
-
51
- PLATFORMS
52
- ruby
53
-
54
- DEPENDENCIES
55
- actionpack (~> 2.3.2)
56
- activeresource (~> 2.3.2)
57
- activesupport (~> 2.3.2)
58
- amatch
59
- api-auth!
60
- appraisal
61
- curb (~> 0.8.1)
62
- faraday
63
- httpi
64
- multipart-post (~> 2.0)
65
- rake
66
- rest-client (~> 1.6.0)
67
- rspec (~> 3.4)
68
-
69
- BUNDLED WITH
70
- 1.10.6
@@ -1,92 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- api-auth (1.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- abstract (1.0.0)
10
- actionpack (3.0.20)
11
- activemodel (= 3.0.20)
12
- activesupport (= 3.0.20)
13
- builder (~> 2.1.2)
14
- erubis (~> 2.6.6)
15
- i18n (~> 0.5.0)
16
- rack (~> 1.2.5)
17
- rack-mount (~> 0.6.14)
18
- rack-test (~> 0.5.7)
19
- tzinfo (~> 0.3.23)
20
- activemodel (3.0.20)
21
- activesupport (= 3.0.20)
22
- builder (~> 2.1.2)
23
- i18n (~> 0.5.0)
24
- activeresource (3.0.20)
25
- activemodel (= 3.0.20)
26
- activesupport (= 3.0.20)
27
- activesupport (3.0.20)
28
- amatch (0.3.0)
29
- tins (~> 1.0)
30
- appraisal (1.0.0)
31
- bundler
32
- rake
33
- thor (>= 0.14.0)
34
- builder (2.1.2)
35
- curb (0.8.6)
36
- diff-lcs (1.2.5)
37
- erubis (2.6.6)
38
- abstract (>= 1.0.0)
39
- faraday (0.9.1)
40
- multipart-post (>= 1.2, < 3)
41
- httpi (2.1.0)
42
- rack
43
- rubyntlm (~> 0.3.2)
44
- i18n (0.5.3)
45
- mime-types (1.25.1)
46
- multipart-post (2.0.0)
47
- rack (1.2.8)
48
- rack-mount (0.6.14)
49
- rack (>= 1.0.0)
50
- rack-test (0.5.7)
51
- rack (>= 1.0)
52
- rake (10.3.1)
53
- rest-client (1.6.7)
54
- mime-types (>= 1.16)
55
- rspec (3.4.0)
56
- rspec-core (~> 3.4.0)
57
- rspec-expectations (~> 3.4.0)
58
- rspec-mocks (~> 3.4.0)
59
- rspec-core (3.4.0)
60
- rspec-support (~> 3.4.0)
61
- rspec-expectations (3.4.0)
62
- diff-lcs (>= 1.2.0, < 2.0)
63
- rspec-support (~> 3.4.0)
64
- rspec-mocks (3.4.0)
65
- diff-lcs (>= 1.2.0, < 2.0)
66
- rspec-support (~> 3.4.0)
67
- rspec-support (3.4.0)
68
- rubyntlm (0.3.4)
69
- thor (0.19.1)
70
- tins (1.3.0)
71
- tzinfo (0.3.39)
72
-
73
- PLATFORMS
74
- ruby
75
-
76
- DEPENDENCIES
77
- actionpack (~> 3.0.20)
78
- activeresource (~> 3.0.20)
79
- activesupport (~> 3.0.20)
80
- amatch
81
- api-auth!
82
- appraisal
83
- curb (~> 0.8.1)
84
- faraday
85
- httpi
86
- multipart-post (~> 2.0)
87
- rake
88
- rest-client (~> 1.6.0)
89
- rspec (~> 3.4)
90
-
91
- BUNDLED WITH
92
- 1.10.6
@@ -1,98 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- api-auth (1.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionpack (3.1.12)
10
- activemodel (= 3.1.12)
11
- activesupport (= 3.1.12)
12
- builder (~> 3.0.0)
13
- erubis (~> 2.7.0)
14
- i18n (~> 0.6)
15
- rack (~> 1.3.6)
16
- rack-cache (~> 1.2)
17
- rack-mount (~> 0.8.2)
18
- rack-test (~> 0.6.1)
19
- sprockets (~> 2.0.4)
20
- activemodel (3.1.12)
21
- activesupport (= 3.1.12)
22
- builder (~> 3.0.0)
23
- i18n (~> 0.6)
24
- activeresource (3.1.12)
25
- activemodel (= 3.1.12)
26
- activesupport (= 3.1.12)
27
- activesupport (3.1.12)
28
- multi_json (~> 1.0)
29
- amatch (0.2.11)
30
- tins (~> 0.3)
31
- appraisal (0.5.2)
32
- bundler
33
- rake
34
- builder (3.0.4)
35
- curb (0.8.6)
36
- diff-lcs (1.2.5)
37
- erubis (2.7.0)
38
- faraday (0.9.1)
39
- multipart-post (>= 1.2, < 3)
40
- hike (1.2.3)
41
- httpi (2.1.0)
42
- rack
43
- rubyntlm (~> 0.3.2)
44
- i18n (0.6.9)
45
- mime-types (1.25.1)
46
- multi_json (1.9.2)
47
- multipart-post (2.0.0)
48
- rack (1.3.10)
49
- rack-cache (1.2)
50
- rack (>= 0.4)
51
- rack-mount (0.8.3)
52
- rack (>= 1.0.0)
53
- rack-test (0.6.2)
54
- rack (>= 1.0)
55
- rake (10.1.1)
56
- rest-client (1.6.7)
57
- mime-types (>= 1.16)
58
- rspec (3.4.0)
59
- rspec-core (~> 3.4.0)
60
- rspec-expectations (~> 3.4.0)
61
- rspec-mocks (~> 3.4.0)
62
- rspec-core (3.4.0)
63
- rspec-support (~> 3.4.0)
64
- rspec-expectations (3.4.0)
65
- diff-lcs (>= 1.2.0, < 2.0)
66
- rspec-support (~> 3.4.0)
67
- rspec-mocks (3.4.0)
68
- diff-lcs (>= 1.2.0, < 2.0)
69
- rspec-support (~> 3.4.0)
70
- rspec-support (3.4.0)
71
- rubyntlm (0.3.4)
72
- sprockets (2.0.4)
73
- hike (~> 1.2)
74
- rack (~> 1.0)
75
- tilt (~> 1.1, != 1.3.0)
76
- tilt (1.4.1)
77
- tins (0.13.2)
78
-
79
- PLATFORMS
80
- ruby
81
-
82
- DEPENDENCIES
83
- actionpack (~> 3.1.0)
84
- activeresource (~> 3.1.0)
85
- activesupport (~> 3.1.0)
86
- amatch
87
- api-auth!
88
- appraisal
89
- curb (~> 0.8.1)
90
- faraday
91
- httpi
92
- multipart-post (~> 2.0)
93
- rake
94
- rest-client (~> 1.6.0)
95
- rspec (~> 3.4)
96
-
97
- BUNDLED WITH
98
- 1.10.6
@@ -1,97 +0,0 @@
1
- PATH
2
- remote: ../
3
- specs:
4
- api-auth (1.5.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- actionpack (3.2.17)
10
- activemodel (= 3.2.17)
11
- activesupport (= 3.2.17)
12
- builder (~> 3.0.0)
13
- erubis (~> 2.7.0)
14
- journey (~> 1.0.4)
15
- rack (~> 1.4.5)
16
- rack-cache (~> 1.2)
17
- rack-test (~> 0.6.1)
18
- sprockets (~> 2.2.1)
19
- activemodel (3.2.17)
20
- activesupport (= 3.2.17)
21
- builder (~> 3.0.0)
22
- activeresource (3.2.17)
23
- activemodel (= 3.2.17)
24
- activesupport (= 3.2.17)
25
- activesupport (3.2.17)
26
- i18n (~> 0.6, >= 0.6.4)
27
- multi_json (~> 1.0)
28
- amatch (0.2.11)
29
- tins (~> 0.3)
30
- appraisal (0.5.2)
31
- bundler
32
- rake
33
- builder (3.0.4)
34
- curb (0.8.6)
35
- diff-lcs (1.2.5)
36
- erubis (2.7.0)
37
- faraday (0.9.1)
38
- multipart-post (>= 1.2, < 3)
39
- hike (1.2.3)
40
- httpi (2.1.0)
41
- rack
42
- rubyntlm (~> 0.3.2)
43
- i18n (0.6.9)
44
- journey (1.0.4)
45
- mime-types (1.25.1)
46
- multi_json (1.9.2)
47
- multipart-post (2.0.0)
48
- rack (1.4.5)
49
- rack-cache (1.2)
50
- rack (>= 0.4)
51
- rack-test (0.6.2)
52
- rack (>= 1.0)
53
- rake (10.1.1)
54
- rest-client (1.6.7)
55
- mime-types (>= 1.16)
56
- rspec (3.4.0)
57
- rspec-core (~> 3.4.0)
58
- rspec-expectations (~> 3.4.0)
59
- rspec-mocks (~> 3.4.0)
60
- rspec-core (3.4.0)
61
- rspec-support (~> 3.4.0)
62
- rspec-expectations (3.4.0)
63
- diff-lcs (>= 1.2.0, < 2.0)
64
- rspec-support (~> 3.4.0)
65
- rspec-mocks (3.4.0)
66
- diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.4.0)
68
- rspec-support (3.4.0)
69
- rubyntlm (0.3.4)
70
- sprockets (2.2.2)
71
- hike (~> 1.2)
72
- multi_json (~> 1.0)
73
- rack (~> 1.0)
74
- tilt (~> 1.1, != 1.3.0)
75
- tilt (1.4.1)
76
- tins (0.13.2)
77
-
78
- PLATFORMS
79
- ruby
80
-
81
- DEPENDENCIES
82
- actionpack (~> 3.2.17)
83
- activeresource (~> 3.2.17)
84
- activesupport (~> 3.2.17)
85
- amatch
86
- api-auth!
87
- appraisal
88
- curb (~> 0.8.1)
89
- faraday
90
- httpi
91
- multipart-post (~> 2.0)
92
- rake
93
- rest-client (~> 1.6.0)
94
- rspec (~> 3.4)
95
-
96
- BUNDLED WITH
97
- 1.10.6