api_warden 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8b41e9b94e6932031e8b6dd5dee860e6f085ba13
4
- data.tar.gz: 2ab96024d26761aab7e9dea22bff800dadf7b961
2
+ SHA256:
3
+ metadata.gz: fb14151c418b72224b050b406facd9de817d5408f00b24e792ed312294dbc772
4
+ data.tar.gz: 253eea6dc13f078aebccf86134eb8913e70410bfbdce1b018123054f0d5f6306
5
5
  SHA512:
6
- metadata.gz: 3e72487c65e8ca5eb194125ce795e52761b327fcda8e92ac4b29036549d5a546b741d5a4008cedb16b90e2aa6e053b5dc4f762512d623ef582df2e85c7370301
7
- data.tar.gz: 5a4263cba41c1983d48542899bc12a9fc29c94c0af3e580c713d28492baa443907f260770591dd6fecb4296cab7c46d4a346976c6c0d61b83357e7f65f4c1f73
6
+ metadata.gz: 530023d4dbd736c0d075ab243a862aed389f96d915ecaa8a82be0702ebd9a0f38e92d9ebb7a18c989e8720acdfea1d0617d8b4499ded3c94074995fb80bdcf73
7
+ data.tar.gz: 4f63cfd3ad844364456c40acdd86ee87619242b852b0b04625516ecc5d38c0af3458f2de8135f3b9bdefd2a1bc5b1746b62546d1ffbf6c2b556c7f82e9ef34c9
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ main:
11
+ name: >-
12
+ ${{ matrix.os }} ${{ matrix.ruby }}
13
+ runs-on: ${{ matrix.os }}-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os: [ubuntu]
18
+ ruby: ['2.7', '3.0', 'head']
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - name: Set up ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - name: Install dependencies
26
+ run: bundle install
27
+ - name: Run tests
28
+ run: bundle exec rake spec
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.2
data/Gemfile CHANGED
@@ -1,11 +1,13 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  gemspec
6
6
 
7
- gem "rails", "4.2.10"
7
+ gem 'rails', '~> 6.1.4'
8
+
9
+ gem 'rubocop', '~> 1.18', require: false
8
10
 
9
11
  group :test do
10
12
  gem 'rspec-rails', '~> 3.6'
11
- end
13
+ end
data/Gemfile.lock CHANGED
@@ -1,148 +1,201 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_warden (0.1.0)
5
- connection_pool (~> 2.2, >= 2.2.0)
6
- redis (~> 3.2, >= 3.2.1)
4
+ api_warden (0.3.0)
5
+ connection_pool (~> 2.2)
6
+ redis (~> 4.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.2.10)
12
- actionpack (= 4.2.10)
13
- actionview (= 4.2.10)
14
- activejob (= 4.2.10)
11
+ actioncable (6.1.4)
12
+ actionpack (= 6.1.4)
13
+ activesupport (= 6.1.4)
14
+ nio4r (~> 2.0)
15
+ websocket-driver (>= 0.6.1)
16
+ actionmailbox (6.1.4)
17
+ actionpack (= 6.1.4)
18
+ activejob (= 6.1.4)
19
+ activerecord (= 6.1.4)
20
+ activestorage (= 6.1.4)
21
+ activesupport (= 6.1.4)
22
+ mail (>= 2.7.1)
23
+ actionmailer (6.1.4)
24
+ actionpack (= 6.1.4)
25
+ actionview (= 6.1.4)
26
+ activejob (= 6.1.4)
27
+ activesupport (= 6.1.4)
15
28
  mail (~> 2.5, >= 2.5.4)
16
- rails-dom-testing (~> 1.0, >= 1.0.5)
17
- actionpack (4.2.10)
18
- actionview (= 4.2.10)
19
- activesupport (= 4.2.10)
20
- rack (~> 1.6)
21
- rack-test (~> 0.6.2)
22
- rails-dom-testing (~> 1.0, >= 1.0.5)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
24
- actionview (4.2.10)
25
- activesupport (= 4.2.10)
29
+ rails-dom-testing (~> 2.0)
30
+ actionpack (6.1.4)
31
+ actionview (= 6.1.4)
32
+ activesupport (= 6.1.4)
33
+ rack (~> 2.0, >= 2.0.9)
34
+ rack-test (>= 0.6.3)
35
+ rails-dom-testing (~> 2.0)
36
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
+ actiontext (6.1.4)
38
+ actionpack (= 6.1.4)
39
+ activerecord (= 6.1.4)
40
+ activestorage (= 6.1.4)
41
+ activesupport (= 6.1.4)
42
+ nokogiri (>= 1.8.5)
43
+ actionview (6.1.4)
44
+ activesupport (= 6.1.4)
26
45
  builder (~> 3.1)
27
- erubis (~> 2.7.0)
28
- rails-dom-testing (~> 1.0, >= 1.0.5)
29
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
30
- activejob (4.2.10)
31
- activesupport (= 4.2.10)
32
- globalid (>= 0.3.0)
33
- activemodel (4.2.10)
34
- activesupport (= 4.2.10)
35
- builder (~> 3.1)
36
- activerecord (4.2.10)
37
- activemodel (= 4.2.10)
38
- activesupport (= 4.2.10)
39
- arel (~> 6.0)
40
- activesupport (4.2.10)
41
- i18n (~> 0.7)
42
- minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
- tzinfo (~> 1.1)
45
- arel (6.0.4)
46
- builder (3.2.3)
47
- concurrent-ruby (1.0.5)
48
- connection_pool (2.2.1)
49
- crass (1.0.3)
50
- diff-lcs (1.3)
51
- erubis (2.7.0)
52
- fakeredis (0.6.0)
53
- redis (~> 3.2)
54
- globalid (0.4.1)
55
- activesupport (>= 4.2.0)
56
- i18n (0.9.1)
46
+ erubi (~> 1.4)
47
+ rails-dom-testing (~> 2.0)
48
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
+ activejob (6.1.4)
50
+ activesupport (= 6.1.4)
51
+ globalid (>= 0.3.6)
52
+ activemodel (6.1.4)
53
+ activesupport (= 6.1.4)
54
+ activerecord (6.1.4)
55
+ activemodel (= 6.1.4)
56
+ activesupport (= 6.1.4)
57
+ activestorage (6.1.4)
58
+ actionpack (= 6.1.4)
59
+ activejob (= 6.1.4)
60
+ activerecord (= 6.1.4)
61
+ activesupport (= 6.1.4)
62
+ marcel (~> 1.0.0)
63
+ mini_mime (>= 1.1.0)
64
+ activesupport (6.1.4)
65
+ concurrent-ruby (~> 1.0, >= 1.0.2)
66
+ i18n (>= 1.6, < 2)
67
+ minitest (>= 5.1)
68
+ tzinfo (~> 2.0)
69
+ zeitwerk (~> 2.3)
70
+ ast (2.4.2)
71
+ builder (3.2.4)
72
+ concurrent-ruby (1.1.9)
73
+ connection_pool (2.2.5)
74
+ crass (1.0.6)
75
+ diff-lcs (1.4.4)
76
+ erubi (1.10.0)
77
+ fakeredis (0.7.0)
78
+ redis (>= 3.2, < 5.0)
79
+ globalid (0.5.2)
80
+ activesupport (>= 5.0)
81
+ i18n (1.8.10)
57
82
  concurrent-ruby (~> 1.0)
58
- loofah (2.1.1)
83
+ loofah (2.11.0)
59
84
  crass (~> 1.0.2)
60
85
  nokogiri (>= 1.5.9)
61
- mail (2.7.0)
86
+ mail (2.7.1)
62
87
  mini_mime (>= 0.1.1)
63
- mini_mime (1.0.0)
64
- mini_portile2 (2.3.0)
65
- minitest (5.10.3)
66
- nokogiri (1.8.1)
67
- mini_portile2 (~> 2.3.0)
68
- rack (1.6.8)
69
- rack-test (0.6.3)
70
- rack (>= 1.0)
71
- rails (4.2.10)
72
- actionmailer (= 4.2.10)
73
- actionpack (= 4.2.10)
74
- actionview (= 4.2.10)
75
- activejob (= 4.2.10)
76
- activemodel (= 4.2.10)
77
- activerecord (= 4.2.10)
78
- activesupport (= 4.2.10)
79
- bundler (>= 1.3.0, < 2.0)
80
- railties (= 4.2.10)
81
- sprockets-rails
82
- rails-deprecated_sanitizer (1.0.3)
83
- activesupport (>= 4.2.0.alpha)
84
- rails-dom-testing (1.0.9)
85
- activesupport (>= 4.2.0, < 5.0)
86
- nokogiri (~> 1.6)
87
- rails-deprecated_sanitizer (>= 1.0.1)
88
- rails-html-sanitizer (1.0.3)
89
- loofah (~> 2.0)
90
- railties (4.2.10)
91
- actionpack (= 4.2.10)
92
- activesupport (= 4.2.10)
93
- rake (>= 0.8.7)
94
- thor (>= 0.18.1, < 2.0)
95
- rake (10.4.2)
96
- redis (3.3.5)
97
- redis-namespace (1.6.0)
88
+ marcel (1.0.1)
89
+ method_source (1.0.0)
90
+ mini_mime (1.1.0)
91
+ minitest (5.14.4)
92
+ nio4r (2.5.8)
93
+ nokogiri (1.12.2-x86_64-darwin)
94
+ racc (~> 1.4)
95
+ parallel (1.20.1)
96
+ parser (3.0.2.0)
97
+ ast (~> 2.4.1)
98
+ racc (1.5.2)
99
+ rack (2.2.3)
100
+ rack-test (1.1.0)
101
+ rack (>= 1.0, < 3)
102
+ rails (6.1.4)
103
+ actioncable (= 6.1.4)
104
+ actionmailbox (= 6.1.4)
105
+ actionmailer (= 6.1.4)
106
+ actionpack (= 6.1.4)
107
+ actiontext (= 6.1.4)
108
+ actionview (= 6.1.4)
109
+ activejob (= 6.1.4)
110
+ activemodel (= 6.1.4)
111
+ activerecord (= 6.1.4)
112
+ activestorage (= 6.1.4)
113
+ activesupport (= 6.1.4)
114
+ bundler (>= 1.15.0)
115
+ railties (= 6.1.4)
116
+ sprockets-rails (>= 2.0.0)
117
+ rails-dom-testing (2.0.3)
118
+ activesupport (>= 4.2.0)
119
+ nokogiri (>= 1.6)
120
+ rails-html-sanitizer (1.3.0)
121
+ loofah (~> 2.3)
122
+ railties (6.1.4)
123
+ actionpack (= 6.1.4)
124
+ activesupport (= 6.1.4)
125
+ method_source
126
+ rake (>= 0.13)
127
+ thor (~> 1.0)
128
+ rainbow (3.0.0)
129
+ rake (13.0.6)
130
+ redis (4.4.0)
131
+ redis-namespace (1.8.1)
98
132
  redis (>= 3.0.4)
99
- rspec (3.6.0)
100
- rspec-core (~> 3.6.0)
101
- rspec-expectations (~> 3.6.0)
102
- rspec-mocks (~> 3.6.0)
103
- rspec-core (3.6.0)
104
- rspec-support (~> 3.6.0)
105
- rspec-expectations (3.6.0)
133
+ regexp_parser (2.1.1)
134
+ rexml (3.2.5)
135
+ rspec (3.9.0)
136
+ rspec-core (~> 3.9.0)
137
+ rspec-expectations (~> 3.9.0)
138
+ rspec-mocks (~> 3.9.0)
139
+ rspec-core (3.9.3)
140
+ rspec-support (~> 3.9.3)
141
+ rspec-expectations (3.9.4)
106
142
  diff-lcs (>= 1.2.0, < 2.0)
107
- rspec-support (~> 3.6.0)
108
- rspec-json_expectations (2.1.0)
109
- rspec-mocks (3.6.0)
143
+ rspec-support (~> 3.9.0)
144
+ rspec-json_expectations (2.2.0)
145
+ rspec-mocks (3.9.1)
110
146
  diff-lcs (>= 1.2.0, < 2.0)
111
- rspec-support (~> 3.6.0)
112
- rspec-rails (3.6.1)
147
+ rspec-support (~> 3.9.0)
148
+ rspec-rails (3.9.1)
113
149
  actionpack (>= 3.0)
114
150
  activesupport (>= 3.0)
115
151
  railties (>= 3.0)
116
- rspec-core (~> 3.6.0)
117
- rspec-expectations (~> 3.6.0)
118
- rspec-mocks (~> 3.6.0)
119
- rspec-support (~> 3.6.0)
120
- rspec-support (3.6.0)
121
- sprockets (3.7.1)
152
+ rspec-core (~> 3.9.0)
153
+ rspec-expectations (~> 3.9.0)
154
+ rspec-mocks (~> 3.9.0)
155
+ rspec-support (~> 3.9.0)
156
+ rspec-support (3.9.4)
157
+ rubocop (1.18.4)
158
+ parallel (~> 1.10)
159
+ parser (>= 3.0.0.0)
160
+ rainbow (>= 2.2.2, < 4.0)
161
+ regexp_parser (>= 1.8, < 3.0)
162
+ rexml
163
+ rubocop-ast (>= 1.8.0, < 2.0)
164
+ ruby-progressbar (~> 1.7)
165
+ unicode-display_width (>= 1.4.0, < 3.0)
166
+ rubocop-ast (1.9.0)
167
+ parser (>= 3.0.1.1)
168
+ ruby-progressbar (1.11.0)
169
+ sprockets (4.0.2)
122
170
  concurrent-ruby (~> 1.0)
123
171
  rack (> 1, < 3)
124
- sprockets-rails (3.2.1)
172
+ sprockets-rails (3.2.2)
125
173
  actionpack (>= 4.0)
126
174
  activesupport (>= 4.0)
127
175
  sprockets (>= 3.0.0)
128
- thor (0.20.0)
129
- thread_safe (0.3.6)
130
- tzinfo (1.2.4)
131
- thread_safe (~> 0.1)
176
+ thor (1.1.0)
177
+ tzinfo (2.0.4)
178
+ concurrent-ruby (~> 1.0)
179
+ unicode-display_width (2.0.0)
180
+ websocket-driver (0.7.5)
181
+ websocket-extensions (>= 0.1.0)
182
+ websocket-extensions (0.1.5)
183
+ zeitwerk (2.4.2)
132
184
 
133
185
  PLATFORMS
134
- ruby
186
+ x86_64-darwin-20
135
187
 
136
188
  DEPENDENCIES
137
189
  api_warden!
138
- bundler (~> 1.16)
190
+ bundler (~> 2.2)
139
191
  fakeredis
140
- rails (= 4.2.10)
141
- rake (~> 10.0)
192
+ rails (~> 6.1.4)
193
+ rake (~> 13.0)
142
194
  redis-namespace (~> 1.5, >= 1.5.2)
143
195
  rspec (~> 3.0)
144
196
  rspec-json_expectations
145
197
  rspec-rails (~> 3.6)
198
+ rubocop (~> 1.18)
146
199
 
147
200
  BUNDLED WITH
148
- 1.16.0
201
+ 2.2.25
data/README.md CHANGED
@@ -1,19 +1,22 @@
1
- # ApiWarden
1
+ # api_warden
2
2
 
3
- This is a gem that you can use to protect your API in rails. By default it uses access token to authenticate the requests, and uses refresh token to get new access token when access token expires.
3
+ This is a gem that you can use to protect your API in rails. By default it uses
4
+ access token to authenticate the requests, and uses refresh token to get new
5
+ access token before access token expires.
4
6
 
5
- ## Examples
7
+ ## Usage
6
8
 
7
- https://github.com/UzxMx/api_warden_examples
9
+ See [here](https://github.com/uzxmx/api_warden_examples) for a working example
10
+ project.
8
11
 
9
- ## Usage
12
+ * Add the gem to your application's Gemfile. And execute `bundle install`.
10
13
 
11
- * Add the gem to your application's Gemfile. And execute `bundle install`
12
14
  ```
13
15
  gem 'api_warden'
14
16
  ```
15
17
 
16
- * Create a file config/initializers/api_warden.rb. And add the below codes.
18
+ * Create file `config/initializers/api_warden.rb`. And add the below codes.
19
+
17
20
  ```
18
21
  ApiWarden.configure do |config|
19
22
  config.redis = {
@@ -26,14 +29,16 @@ end
26
29
  ApiWarden.ward_by('users')
27
30
  ```
28
31
 
29
- * Create app/controllers/base_controller.rb. And add the below codes.
32
+ * Create file `app/controllers/base_controller.rb`. And add the below codes.
33
+
30
34
  ```
31
- class BaseController < ActionController::Base
35
+ class BaseController < ActionController::API
32
36
  before_action :ward_by_user!
33
37
  end
34
38
  ```
35
39
 
36
- * Create app/controllers/users_controller.rb. And add the below codes.
40
+ * Create file `app/controllers/users_controller.rb`. And add the below codes.
41
+
37
42
  ```
38
43
  class UsersController < BaseController
39
44
  skip_before_action :ward_by_user!, only: [:sign_in]
@@ -50,13 +55,16 @@ class UsersController < BaseController
50
55
  end
51
56
  ```
52
57
 
53
- * In client side, you need to add below http headers to access the server protected resources.
58
+ * On client side, you need to specify below http headers to access the server protected resources.
59
+
54
60
  ```
55
61
  X-User-Id: <the user id rendered in sign in api>
56
62
  X-User-Access-Token: <the access token rendered in sign in api>
57
63
  ```
58
64
 
59
- * If the access token expires, you need to use the refresh token to get a new pair of access and refresh token. Modify the users_controller.rb.
65
+ * If the access token expires, you can use the refresh token to get a new
66
+ pair of access and refresh token. Update `users_controller.rb` as below.
67
+
60
68
  ```
61
69
  class UsersController < BaseController
62
70
  skip_before_action :ward_by_user!, only: [:sign_in, :refresh_token]
@@ -79,13 +87,14 @@ class UsersController < BaseController
79
87
  user_id: user_id,
80
88
  access_token: access_token,
81
89
  refresh_token: refresh_token
82
- }
83
- end
90
+ }
91
+ end
84
92
  end
85
93
  end
86
94
  ```
87
95
 
88
- * In client side, when requesting the refresh token api, you need to add below http headers.
96
+ * On client side, when requesting the refresh token api, you need to specify below http headers.
97
+
89
98
  ```
90
99
  X-User-Id: <the user id rendered in sign in api>
91
100
  X-User-Refresh-Token: <the refresh token rendered in sign in api>
@@ -93,13 +102,28 @@ X-User-Refresh-Token: <the refresh token rendered in sign in api>
93
102
 
94
103
  ## Development
95
104
 
96
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
105
+ ### Install dependencies
106
+
107
+ ```
108
+ bundle install
109
+ ```
110
+
111
+ ### Run tests
112
+
113
+ ```
114
+ bundle exec rake spec
115
+ ```
116
+
117
+ ### Release a new version
97
118
 
98
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
119
+ To release a new version, update the version number in `version.rb`, and then
120
+ run `bundle exec rake release`, which will create a git tag for the version,
121
+ push git commits and tags, and push the `.gem` file to
122
+ [rubygems.org](https://rubygems.org).
99
123
 
100
124
  ## Contributing
101
125
 
102
- Bug reports and pull requests are welcome on GitHub at https://github.com/UzxMx/api_warden. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
126
+ Bug reports and pull requests are welcome on GitHub at https://github.com/uzxmx/api_warden. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
103
127
 
104
128
  ## License
105
129
 
@@ -107,4 +131,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
107
131
 
108
132
  ## Code of Conduct
109
133
 
110
- Everyone interacting in the ApiWarden project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/UzxMx/api_warden/blob/master/CODE_OF_CONDUCT.md).
134
+ Everyone interacting in the api_warden project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/uzxmx/api_warden/blob/master/CODE_OF_CONDUCT.md).
data/api_warden.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = 'Use access token to protect your API in rails.'
12
12
  spec.description = 'Use access token to protect your API in rails.'
13
- spec.homepage = 'https://github.com/UzxMx/api_warden'
13
+ spec.homepage = 'https://github.com/uzxmx/api_warden'
14
14
  spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -18,13 +18,13 @@ Gem::Specification.new do |spec|
18
18
  end
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency 'redis', '~> 3.2', '>= 3.2.1'
22
- spec.add_dependency 'connection_pool', '~> 2.2', '>= 2.2.0'
21
+ spec.add_dependency 'redis', '~> 4.0'
22
+ spec.add_dependency 'connection_pool', '~> 2.2'
23
23
 
24
24
  spec.add_development_dependency 'redis-namespace', '~> 1.5', '>= 1.5.2'
25
25
  spec.add_development_dependency 'fakeredis'
26
- spec.add_development_dependency 'bundler', '~> 1.16'
27
- spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'bundler', '~> 2.2'
27
+ spec.add_development_dependency 'rake', '~> 13.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.0'
29
29
  spec.add_development_dependency 'rspec-json_expectations'
30
30
  end
@@ -60,7 +60,7 @@ module ApiWarden
60
60
 
61
61
  unless @value_for_access_token
62
62
  @authenticated = false
63
- raise AuthenticationError
63
+ raise AuthenticationError
64
64
  end
65
65
 
66
66
  @authenticated = true
@@ -94,7 +94,7 @@ module ApiWarden
94
94
 
95
95
  @refreshable = true
96
96
  @id = id
97
- self
97
+ self
98
98
  end
99
99
 
100
100
  # TODO remove refresh token as well
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ApiWarden
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_warden
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mingxiang Xue
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-22 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 3.2.1
19
+ version: '4.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.2'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 3.2.1
26
+ version: '4.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: connection_pool
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -37,9 +31,6 @@ dependencies:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
33
  version: '2.2'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 2.2.0
43
34
  type: :runtime
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,9 +38,6 @@ dependencies:
47
38
  - - "~>"
48
39
  - !ruby/object:Gem::Version
49
40
  version: '2.2'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 2.2.0
53
41
  - !ruby/object:Gem::Dependency
54
42
  name: redis-namespace
55
43
  requirement: !ruby/object:Gem::Requirement
@@ -90,28 +78,28 @@ dependencies:
90
78
  requirements:
91
79
  - - "~>"
92
80
  - !ruby/object:Gem::Version
93
- version: '1.16'
81
+ version: '2.2'
94
82
  type: :development
95
83
  prerelease: false
96
84
  version_requirements: !ruby/object:Gem::Requirement
97
85
  requirements:
98
86
  - - "~>"
99
87
  - !ruby/object:Gem::Version
100
- version: '1.16'
88
+ version: '2.2'
101
89
  - !ruby/object:Gem::Dependency
102
90
  name: rake
103
91
  requirement: !ruby/object:Gem::Requirement
104
92
  requirements:
105
93
  - - "~>"
106
94
  - !ruby/object:Gem::Version
107
- version: '10.0'
95
+ version: '13.0'
108
96
  type: :development
109
97
  prerelease: false
110
98
  version_requirements: !ruby/object:Gem::Requirement
111
99
  requirements:
112
100
  - - "~>"
113
101
  - !ruby/object:Gem::Version
114
- version: '10.0'
102
+ version: '13.0'
115
103
  - !ruby/object:Gem::Dependency
116
104
  name: rspec
117
105
  requirement: !ruby/object:Gem::Requirement
@@ -147,9 +135,10 @@ executables: []
147
135
  extensions: []
148
136
  extra_rdoc_files: []
149
137
  files:
138
+ - ".github/workflows/ci.yml"
150
139
  - ".gitignore"
151
140
  - ".rspec"
152
- - ".travis.yml"
141
+ - ".ruby-version"
153
142
  - CODE_OF_CONDUCT.md
154
143
  - Gemfile
155
144
  - Gemfile.lock
@@ -169,11 +158,11 @@ files:
169
158
  - lib/api_warden/redis_connection.rb
170
159
  - lib/api_warden/scope.rb
171
160
  - lib/api_warden/version.rb
172
- homepage: https://github.com/UzxMx/api_warden
161
+ homepage: https://github.com/uzxmx/api_warden
173
162
  licenses:
174
163
  - MIT
175
164
  metadata: {}
176
- post_install_message:
165
+ post_install_message:
177
166
  rdoc_options: []
178
167
  require_paths:
179
168
  - lib
@@ -188,9 +177,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
177
  - !ruby/object:Gem::Version
189
178
  version: '0'
190
179
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.6.14
193
- signing_key:
180
+ rubygems_version: 3.2.22
181
+ signing_key:
194
182
  specification_version: 4
195
183
  summary: Use access token to protect your API in rails.
196
184
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.5
5
- before_install: gem install bundler -v 1.16.0