rails_api_auth 0.0.7 → 0.0.8

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
2
  SHA1:
3
- metadata.gz: 643e8f86cbe69072c9b057c1dae39e24fd49982d
4
- data.tar.gz: ad2a2f90465fbeed37877dde1f758d5bf4ff7f77
3
+ metadata.gz: 5d0b7ae4fd9d87b7e8c46bc340021b799a5cb573
4
+ data.tar.gz: cffacdb178138d081f4200ef380b2151503f5237
5
5
  SHA512:
6
- metadata.gz: '0589164744d500bf57b6cd115e617bab91b1929e036b2fc0889330dd9f2548fa12341b701119ead95eec6c274f5edb23cc75aa1b00e79bb0035ebf6efa1195b9'
7
- data.tar.gz: a0d1c552c7081eb31516b95b719938563f55f4688bec551878a66d78db096075d9df5c30d1576be4a82df68116392fca076a44d8f9864bdfd27d77ec6099c9b3
6
+ metadata.gz: a5604e3aa7352dcd1eaab660762f59e15fdc485acc80b4b59d0bbfbefeddb498c12e3ac58230618d43e34712355b9e92e8aafa4d4a0f24057977a6669e3f29d6
7
+ data.tar.gz: 6eb2bf72a1d4789a4e4c97265382dcd1a091f76744d7de0f2d79e2bb8fb0ad82031f7bfa47ea65a47b05ea9299a9c8681b5ed17ae4a44f1e0cf20cd3beed9db5
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2016 simplabs GmbH
3
+ Copyright (c) 2015-2017 simplabs GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,6 @@
1
- class CreateLogins < ActiveRecord::Migration
1
+ require_relative 'rails_api_auth_migration'
2
+
3
+ class CreateLogins < RailsAPIAuthMigration
2
4
 
3
5
  def change
4
6
  create_table :logins, primary_key_options(:id) do |t|
@@ -1,4 +1,6 @@
1
- class AddProviderToLogin < ActiveRecord::Migration
1
+ require_relative 'rails_api_auth_migration'
2
+
3
+ class AddProviderToLogin < RailsAPIAuthMigration
2
4
 
3
5
  def change
4
6
  add_column :logins, :provider, :string
@@ -0,0 +1,10 @@
1
+ private def migration_parent_class
2
+ if Rails.version >= '5.0.0'
3
+ ActiveRecord::Migration["#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}"]
4
+ else
5
+ ActiveRecord::Migration
6
+ end
7
+ end
8
+
9
+ class RailsAPIAuthMigration < migration_parent_class
10
+ end
@@ -1,5 +1,5 @@
1
1
  module RailsApiAuth
2
2
 
3
- VERSION = '0.0.7'.freeze
3
+ VERSION = '0.0.8'.freeze
4
4
 
5
5
  end
@@ -1,4 +1,6 @@
1
- class CreateAccounts < ActiveRecord::Migration
1
+ require_relative '../../../../db/migrate/rails_api_auth_migration'
2
+
3
+ class CreateAccounts < RailsAPIAuthMigration
2
4
 
3
5
  def change
4
6
  create_table :accounts do |t|
@@ -9,27 +9,37 @@
9
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
11
11
  #
12
- # It's strongly recommended that you check this file into your version control system.
12
+ # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20150904110438) do
14
+ ActiveRecord::Schema.define(:version => 20150904110438) do
15
15
 
16
- create_table "accounts", force: :cascade do |t|
17
- t.string "first_name", null: false
18
- t.string "last_name"
19
- t.datetime "created_at"
20
- t.datetime "updated_at"
16
+ create_table "accounts", :force => true do |t|
17
+ t.string "first_name", :limit => nil, :null => false
18
+ t.string "last_name", :limit => nil
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
21
  end
22
22
 
23
- create_table "logins", force: :cascade do |t|
24
- t.string "identification", null: false
25
- t.string "password_digest"
26
- t.string "oauth2_token", null: false
27
- t.string "uid"
28
- t.string "single_use_oauth2_token"
23
+ create_table "ar_internal_metadata", :primary_key => "key", :force => true do |t|
24
+ t.string "value", :limit => nil
25
+ t.datetime "created_at", :null => false
26
+ t.datetime "updated_at", :null => false
27
+ end
28
+
29
+ add_index "ar_internal_metadata", ["key"], :name => "sqlite_autoindex_ar_internal_metadata_1", :unique => true
30
+
31
+ create_table "logins", :force => true do |t|
32
+ t.string "identification", :limit => nil, :null => false
33
+ t.string "password_digest", :limit => nil
34
+ t.string "oauth2_token", :limit => nil, :null => false
35
+ t.string "uid", :limit => nil
36
+ t.string "single_use_oauth2_token", :limit => nil
29
37
  t.integer "user_id"
30
- t.datetime "created_at"
31
- t.datetime "updated_at"
32
- t.string "provider"
38
+ t.datetime "created_at", :null => false
39
+ t.datetime "updated_at", :null => false
40
+ t.string "provider", :limit => nil
33
41
  end
34
42
 
43
+ add_index "logins", ["user_id"], :name => "index_logins_on_user_id"
44
+
35
45
  end
@@ -1,7 +1,7 @@
1
1
  ENV['RAILS_ENV'] ||= 'test'
2
2
 
3
3
  require 'simplecov'
4
- SimpleCov.start do ||
4
+ SimpleCov.start do
5
5
  unless defined?(JRUBY_VERSION) || defined?(JRuby)
6
6
  minimum_coverage 95
7
7
  refuse_coverage_drop
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Otte-Witte
@@ -9,56 +9,56 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-26 00:00:00.000000000 Z
12
+ date: 2018-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: bcrypt
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
19
- - !ruby/object:Gem::Version
20
- version: 3.2.6
21
- - - "<"
18
+ - - "~>"
22
19
  - !ruby/object:Gem::Version
23
- version: '6'
20
+ version: 3.1.7
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- version: 3.2.6
31
- - - "<"
25
+ - - "~>"
32
26
  - !ruby/object:Gem::Version
33
- version: '6'
27
+ version: 3.1.7
34
28
  - !ruby/object:Gem::Dependency
35
- name: bcrypt
29
+ name: httparty
36
30
  requirement: !ruby/object:Gem::Requirement
37
31
  requirements:
38
32
  - - "~>"
39
33
  - !ruby/object:Gem::Version
40
- version: 3.1.7
34
+ version: 0.13.3
41
35
  type: :runtime
42
36
  prerelease: false
43
37
  version_requirements: !ruby/object:Gem::Requirement
44
38
  requirements:
45
39
  - - "~>"
46
40
  - !ruby/object:Gem::Version
47
- version: 3.1.7
41
+ version: 0.13.3
48
42
  - !ruby/object:Gem::Dependency
49
- name: httparty
43
+ name: rails
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
- - - "~>"
46
+ - - ">="
53
47
  - !ruby/object:Gem::Version
54
- version: 0.13.3
48
+ version: 3.2.6
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '6'
55
52
  type: :runtime
56
53
  prerelease: false
57
54
  version_requirements: !ruby/object:Gem::Requirement
58
55
  requirements:
59
- - - "~>"
56
+ - - ">="
60
57
  - !ruby/object:Gem::Version
61
- version: 0.13.3
58
+ version: 3.2.6
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '6'
62
62
  description: Rails API Auth is a Rails Engine that implements the "Resource Owner
63
63
  Password Credentials Grant" OAuth 2.0 flow as well as Facebook authentication for
64
64
  API projects.
@@ -81,6 +81,7 @@ files:
81
81
  - config/routes.rb
82
82
  - db/migrate/20150709221755_create_logins.rb
83
83
  - db/migrate/20150904110438_add_provider_to_login.rb
84
+ - db/migrate/rails_api_auth_migration.rb
84
85
  - lib/rails_api_auth.rb
85
86
  - lib/rails_api_auth/authentication.rb
86
87
  - lib/rails_api_auth/engine.rb
@@ -170,63 +171,63 @@ signing_key:
170
171
  specification_version: 4
171
172
  summary: Engine that implements OAuth 2.0 and Facebook authentication for API projects
172
173
  test_files:
173
- - spec/config/force_ssl_spec.rb
174
- - spec/dummy/app/assets/javascripts/application.js
175
- - spec/dummy/app/assets/stylesheets/application.css
176
- - spec/dummy/app/controllers/access_once_controller.rb
174
+ - spec/spec_helper.rb
175
+ - spec/dummy/app/models/account.rb
177
176
  - spec/dummy/app/controllers/application_controller.rb
178
177
  - spec/dummy/app/controllers/authenticated_controller.rb
178
+ - spec/dummy/app/controllers/access_once_controller.rb
179
179
  - spec/dummy/app/controllers/custom_authenticated_controller.rb
180
- - spec/dummy/app/models/account.rb
181
- - spec/dummy/bin/bundle
182
- - spec/dummy/bin/rails
180
+ - spec/dummy/app/assets/javascripts/application.js
181
+ - spec/dummy/app/assets/stylesheets/application.css
183
182
  - spec/dummy/bin/rake
184
183
  - spec/dummy/bin/setup
185
- - spec/dummy/config/application.rb
186
- - spec/dummy/config/boot.rb
187
- - spec/dummy/config/database.yml
188
- - spec/dummy/config/environment.rb
189
- - spec/dummy/config/environments/development.rb
184
+ - spec/dummy/bin/bundle
185
+ - spec/dummy/bin/rails
186
+ - spec/dummy/config/secrets.yml
187
+ - spec/dummy/config/routes.rb
188
+ - spec/dummy/config/locales/en.yml
190
189
  - spec/dummy/config/environments/production.rb
190
+ - spec/dummy/config/environments/development.rb
191
191
  - spec/dummy/config/environments/test.rb
192
- - spec/dummy/config/initializers/assets.rb
192
+ - spec/dummy/config/environment.rb
193
+ - spec/dummy/config/application.rb
194
+ - spec/dummy/config/database.yml
195
+ - spec/dummy/config/boot.rb
193
196
  - spec/dummy/config/initializers/backtrace_silencers.rb
194
- - spec/dummy/config/initializers/cookies_serializer.rb
195
- - spec/dummy/config/initializers/filter_parameter_logging.rb
196
- - spec/dummy/config/initializers/inflections.rb
197
197
  - spec/dummy/config/initializers/mime_types.rb
198
- - spec/dummy/config/initializers/rails_api_auth.rb
199
- - spec/dummy/config/initializers/secret_token.rb
198
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
200
199
  - spec/dummy/config/initializers/session_store.rb
201
200
  - spec/dummy/config/initializers/wrap_parameters.rb
202
- - spec/dummy/config/locales/en.yml
203
- - spec/dummy/config/routes.rb
204
- - spec/dummy/config/secrets.yml
201
+ - spec/dummy/config/initializers/assets.rb
202
+ - spec/dummy/config/initializers/cookies_serializer.rb
203
+ - spec/dummy/config/initializers/rails_api_auth.rb
204
+ - spec/dummy/config/initializers/secret_token.rb
205
+ - spec/dummy/config/initializers/inflections.rb
205
206
  - spec/dummy/config.ru
206
- - spec/dummy/db/migrate/20150803185817_create_accounts.rb
207
- - spec/dummy/db/schema.rb
208
- - spec/dummy/public/404.html
207
+ - spec/dummy/Rakefile
208
+ - spec/dummy/public/favicon.ico
209
209
  - spec/dummy/public/422.html
210
210
  - spec/dummy/public/500.html
211
- - spec/dummy/public/favicon.ico
212
- - spec/dummy/Rakefile
211
+ - spec/dummy/public/404.html
212
+ - spec/dummy/db/schema.rb
213
+ - spec/dummy/db/migrate/20150803185817_create_accounts.rb
213
214
  - spec/dummy/README.rdoc
214
- - spec/factories/accounts.rb
215
- - spec/factories/logins.rb
215
+ - spec/config/force_ssl_spec.rb
216
216
  - spec/models/login_spec.rb
217
- - spec/requests/access_once_spec.rb
217
+ - spec/requests/oauth2_spec.rb
218
218
  - spec/requests/authenticated_spec.rb
219
+ - spec/requests/access_once_spec.rb
219
220
  - spec/requests/custom_authenticated_spec.rb
220
- - spec/requests/oauth2_spec.rb
221
- - spec/services/edx_authenticator_spec.rb
222
- - spec/services/facebook_authenticator_spec.rb
223
- - spec/services/google_authenticator_spec.rb
224
- - spec/spec_helper.rb
225
- - spec/support/factory_girl.rb
226
221
  - spec/support/shared_contexts/force_ssl.rb
227
- - spec/support/shared_contexts/stubbed_edx_requests.rb
228
222
  - spec/support/shared_contexts/stubbed_facebook_requests.rb
223
+ - spec/support/shared_contexts/stubbed_edx_requests.rb
229
224
  - spec/support/shared_contexts/stubbed_google_requests.rb
230
225
  - spec/support/shared_examples/authenticator_shared_requests.rb
231
- - spec/support/shared_examples/oauth2_edx_shared_requests.rb
232
226
  - spec/support/shared_examples/oauth2_shared_requests.rb
227
+ - spec/support/shared_examples/oauth2_edx_shared_requests.rb
228
+ - spec/support/factory_girl.rb
229
+ - spec/factories/logins.rb
230
+ - spec/factories/accounts.rb
231
+ - spec/services/google_authenticator_spec.rb
232
+ - spec/services/edx_authenticator_spec.rb
233
+ - spec/services/facebook_authenticator_spec.rb