arcadex 1.1.3 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20141020173616_add_max_uses_to_arcadex_tokens.rb +5 -0
- data/lib/arcadex/authentication.rb +45 -51
- data/lib/arcadex/create.rb +2 -1
- data/lib/arcadex/header.rb +8 -21
- data/lib/arcadex/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/schema.rb +2 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +15 -0
- data/test/dummy/log/test.log +35 -0
- data/test/test_app/Gemfile +77 -0
- data/test/test_app/Gemfile.lock +281 -0
- data/test/test_app/README.md +1 -0
- data/test/test_app/Rakefile +6 -0
- data/test/test_app/app/admin/arcadex_token.rb +94 -0
- data/test/test_app/app/admin/dashboard.rb +69 -0
- data/test/test_app/app/admin/defcon_admin_user.rb +99 -0
- data/test/test_app/app/admin/people_user.rb +83 -0
- data/test/test_app/app/assets/javascripts/active_admin.js.coffee +1 -0
- data/test/test_app/app/assets/javascripts/application.js +16 -0
- data/test/test_app/app/assets/stylesheets/active_admin.css.scss +17 -0
- data/test/test_app/app/assets/stylesheets/application.css +13 -0
- data/test/test_app/app/controllers/api/v1/api_controller.rb +71 -0
- data/test/test_app/app/controllers/app_index_controller.rb +4 -0
- data/test/test_app/app/controllers/application_controller.rb +21 -0
- data/test/test_app/app/helpers/application_helper.rb +2 -0
- data/test/test_app/app/views/app_index/app.html.erb +0 -0
- data/test/test_app/app/views/layouts/app_index.html.erb +9 -0
- data/test/test_app/app/views/layouts/application.html.erb +14 -0
- data/test/test_app/bin/bundle +3 -0
- data/test/test_app/bin/rails +4 -0
- data/test/test_app/bin/rake +4 -0
- data/test/test_app/config.ru +4 -0
- data/test/test_app/config/application.rb +27 -0
- data/test/test_app/config/boot.rb +4 -0
- data/test/test_app/config/database.yml +25 -0
- data/test/test_app/config/environment.rb +5 -0
- data/test/test_app/config/environments/development.rb +29 -0
- data/test/test_app/config/environments/production.rb +80 -0
- data/test/test_app/config/environments/test.rb +36 -0
- data/test/test_app/config/initializers/active_admin.rb +252 -0
- data/test/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/test_app/config/initializers/inflections.rb +16 -0
- data/test/test_app/config/initializers/mime_types.rb +5 -0
- data/test/test_app/config/initializers/secret_token.rb +12 -0
- data/test/test_app/config/initializers/session_store.rb +3 -0
- data/test/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/test/test_app/config/locales/en.yml +23 -0
- data/test/test_app/config/routes.rb +66 -0
- data/test/test_app/config/schedule.rb +20 -0
- data/test/test_app/db/development.sqlite3 +0 -0
- data/test/test_app/db/migrate/20141016225515_create_active_admin_comments.rb +19 -0
- data/test/test_app/db/migrate/20141016225555_create_people_users.people.rb +14 -0
- data/test/test_app/db/migrate/20141016225556_create_arcadex_tokens.arcadex.rb +12 -0
- data/test/test_app/db/migrate/20141016225557_add_index_to_token.arcadex.rb +6 -0
- data/test/test_app/db/migrate/20141016225558_add_first_ip_address_to_arcadex_tokens.arcadex.rb +6 -0
- data/test/test_app/db/migrate/20141016225559_add_current_ip_address_to_arcadex_tokens.arcadex.rb +6 -0
- data/test/test_app/db/migrate/20141016225560_add_times_used_to_arcadex_tokens.arcadex.rb +6 -0
- data/test/test_app/db/migrate/20141016225561_add_expiration_minutes_to_arcadex_tokens.arcadex.rb +6 -0
- data/test/test_app/db/migrate/20141016225562_create_defcon_admin_users.defcon.rb +16 -0
- data/test/test_app/db/migrate/20141016225563_add_index_to_defcon_admin_users.defcon.rb +6 -0
- data/test/test_app/db/migrate/20141016225564_add_email_to_defcon_admin_users.defcon.rb +7 -0
- data/test/test_app/db/migrate/20141020173805_add_max_uses_to_arcadex_tokens.arcadex.rb +6 -0
- data/test/test_app/db/production.sqlite3 +0 -0
- data/test/test_app/db/schema.rb +73 -0
- data/test/test_app/db/seeds.rb +10 -0
- data/test/test_app/db/test.sqlite3 +0 -0
- data/test/test_app/engines/people/Gemfile +14 -0
- data/test/test_app/engines/people/Gemfile.lock +81 -0
- data/test/test_app/engines/people/MIT-LICENSE +20 -0
- data/test/test_app/engines/people/README.md +1 -0
- data/test/test_app/engines/people/Rakefile +34 -0
- data/test/test_app/engines/people/app/assets/javascripts/people/application.js +13 -0
- data/test/test_app/engines/people/app/assets/javascripts/people/users.js +2 -0
- data/test/test_app/engines/people/app/assets/stylesheets/people/application.css +13 -0
- data/test/test_app/engines/people/app/assets/stylesheets/people/users.css +4 -0
- data/test/test_app/engines/people/app/assets/stylesheets/scaffold.css +56 -0
- data/test/test_app/engines/people/app/controllers/people/api/v1/application_controller.rb +5 -0
- data/test/test_app/engines/people/app/controllers/people/api/v1/users_controller.rb +169 -0
- data/test/test_app/engines/people/app/controllers/people/application_controller.rb +4 -0
- data/test/test_app/engines/people/app/controllers/people/users_controller.rb +62 -0
- data/test/test_app/engines/people/app/helpers/people/application_helper.rb +4 -0
- data/test/test_app/engines/people/app/helpers/people/users_helper.rb +4 -0
- data/test/test_app/engines/people/app/models/people/user.rb +9 -0
- data/test/test_app/engines/people/app/models/people/v1/user.rb +32 -0
- data/test/test_app/engines/people/app/serializers/people/v1/user_serializer.rb +43 -0
- data/test/test_app/engines/people/app/views/layouts/people/default/application.html.erb +14 -0
- data/test/test_app/engines/people/app/views/people/users/_form.html.erb +29 -0
- data/test/test_app/engines/people/app/views/people/users/edit.html.erb +6 -0
- data/test/test_app/engines/people/app/views/people/users/index.html.erb +31 -0
- data/test/test_app/engines/people/app/views/people/users/new.html.erb +5 -0
- data/test/test_app/engines/people/app/views/people/users/show.html.erb +19 -0
- data/test/test_app/engines/people/bin/rails +12 -0
- data/test/test_app/engines/people/config/routes.rb +28 -0
- data/test/test_app/engines/people/db/migrate/20141016225548_create_people_users.rb +13 -0
- data/test/test_app/engines/people/lib/people.rb +4 -0
- data/test/test_app/engines/people/lib/people/engine.rb +5 -0
- data/test/test_app/engines/people/lib/people/version.rb +3 -0
- data/test/test_app/engines/people/lib/tasks/people_tasks.rake +4 -0
- data/test/test_app/engines/people/people.gemspec +33 -0
- data/test/test_app/engines/people/test/controllers/people/users_controller_test.rb +51 -0
- data/test/test_app/engines/people/test/dummy/README.rdoc +28 -0
- data/test/test_app/engines/people/test/dummy/Rakefile +6 -0
- data/test/test_app/engines/people/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/test_app/engines/people/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/test_app/engines/people/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/test_app/engines/people/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/test_app/engines/people/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/test_app/engines/people/test/dummy/bin/bundle +3 -0
- data/test/test_app/engines/people/test/dummy/bin/rails +4 -0
- data/test/test_app/engines/people/test/dummy/bin/rake +4 -0
- data/test/test_app/engines/people/test/dummy/config.ru +4 -0
- data/test/test_app/engines/people/test/dummy/config/application.rb +23 -0
- data/test/test_app/engines/people/test/dummy/config/boot.rb +5 -0
- data/test/test_app/engines/people/test/dummy/config/database.yml +25 -0
- data/test/test_app/engines/people/test/dummy/config/environment.rb +5 -0
- data/test/test_app/engines/people/test/dummy/config/environments/development.rb +29 -0
- data/test/test_app/engines/people/test/dummy/config/environments/production.rb +80 -0
- data/test/test_app/engines/people/test/dummy/config/environments/test.rb +36 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/test_app/engines/people/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/test_app/engines/people/test/dummy/config/locales/en.yml +23 -0
- data/test/test_app/engines/people/test/dummy/config/routes.rb +4 -0
- data/test/test_app/engines/people/test/dummy/public/404.html +58 -0
- data/test/test_app/engines/people/test/dummy/public/422.html +58 -0
- data/test/test_app/engines/people/test/dummy/public/500.html +57 -0
- data/test/test_app/engines/people/test/dummy/public/favicon.ico +0 -0
- data/test/test_app/engines/people/test/fixtures/people/users.yml +11 -0
- data/test/test_app/engines/people/test/helpers/people/users_helper_test.rb +6 -0
- data/test/test_app/engines/people/test/integration/navigation_test.rb +10 -0
- data/test/test_app/engines/people/test/models/people/user_test.rb +9 -0
- data/test/test_app/engines/people/test/people_test.rb +7 -0
- data/test/test_app/engines/people/test/test_helper.rb +15 -0
- data/test/test_app/gems/authorization/Gemfile +14 -0
- data/test/test_app/gems/authorization/Gemfile.lock +81 -0
- data/test/test_app/gems/authorization/MIT-LICENSE +20 -0
- data/test/test_app/gems/authorization/README.rdoc +3 -0
- data/test/test_app/gems/authorization/Rakefile +32 -0
- data/test/test_app/gems/authorization/authorization.gemspec +22 -0
- data/test/test_app/gems/authorization/lib/authorization.rb +4 -0
- data/test/test_app/gems/authorization/lib/authorization/people/v1/user.rb +90 -0
- data/test/test_app/gems/authorization/lib/authorization/version.rb +3 -0
- data/test/test_app/gems/authorization/lib/tasks/authorization_tasks.rake +4 -0
- data/test/test_app/gems/authorization/test/authorization_test.rb +7 -0
- data/test/test_app/gems/authorization/test/dummy/README.rdoc +28 -0
- data/test/test_app/gems/authorization/test/dummy/Rakefile +6 -0
- data/test/test_app/gems/authorization/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/test_app/gems/authorization/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/test_app/gems/authorization/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/test_app/gems/authorization/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/test_app/gems/authorization/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/test_app/gems/authorization/test/dummy/bin/bundle +3 -0
- data/test/test_app/gems/authorization/test/dummy/bin/rails +4 -0
- data/test/test_app/gems/authorization/test/dummy/bin/rake +4 -0
- data/test/test_app/gems/authorization/test/dummy/config.ru +4 -0
- data/test/test_app/gems/authorization/test/dummy/config/application.rb +23 -0
- data/test/test_app/gems/authorization/test/dummy/config/boot.rb +5 -0
- data/test/test_app/gems/authorization/test/dummy/config/database.yml +25 -0
- data/test/test_app/gems/authorization/test/dummy/config/environment.rb +5 -0
- data/test/test_app/gems/authorization/test/dummy/config/environments/development.rb +29 -0
- data/test/test_app/gems/authorization/test/dummy/config/environments/production.rb +80 -0
- data/test/test_app/gems/authorization/test/dummy/config/environments/test.rb +36 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/test_app/gems/authorization/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/test_app/gems/authorization/test/dummy/config/locales/en.yml +23 -0
- data/test/test_app/gems/authorization/test/dummy/config/routes.rb +56 -0
- data/test/test_app/gems/authorization/test/dummy/public/404.html +58 -0
- data/test/test_app/gems/authorization/test/dummy/public/422.html +58 -0
- data/test/test_app/gems/authorization/test/dummy/public/500.html +57 -0
- data/test/test_app/gems/authorization/test/dummy/public/favicon.ico +0 -0
- data/test/test_app/gems/authorization/test/test_helper.rb +15 -0
- data/test/test_app/log/development.log +79 -0
- data/test/test_app/log/production.log +12 -0
- data/test/test_app/log/test.log +13884 -0
- data/test/test_app/public/404.html +58 -0
- data/test/test_app/public/422.html +58 -0
- data/test/test_app/public/500.html +57 -0
- data/test/test_app/public/favicon.ico +0 -0
- data/test/test_app/public/robots.txt +5 -0
- data/test/test_app/spec/controllers/app_index_controller_spec.rb +12 -0
- data/test/test_app/spec/engines/people/api/v1/models/user_spec.rb +61 -0
- data/test/test_app/spec/engines/people/api/v1/requests/user_spec.rb +244 -0
- data/test/test_app/spec/engines/people/api/v1/routing/user_spec.rb +91 -0
- data/test/test_app/spec/factories/people_user_1_factory.rb +14 -0
- data/test/test_app/spec/rails_helper.rb +47 -0
- data/test/test_app/spec/spec_helper.rb +78 -0
- data/test/test_app/spec/support/factory_girl.rb +16 -0
- data/test/test_app/spec/support/request_helpers.rb +7 -0
- metadata +381 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 08653438dc3f283525e507f24af8f06306f14f22
|
4
|
+
data.tar.gz: efd18717b4d8a29d2f5055f5fac4a8aa48d3afcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63961c7a9793f9d04162b67d454221b1e63b49c8838ad973ad31e67a6da584c2bd301cfcae24d140390cfdf1ad0692875a4a38ac9d7d5918056ff4e492401441
|
7
|
+
data.tar.gz: cff8b2bf4cb36663cc15609dc049f6f3dccb8e9428facebc4cdecce9b47a94cd93ac99390b57eb2e74acbe2f8dac43d18f5e01b76c8bd1a1b1ae351249d984d0
|
@@ -3,67 +3,61 @@ module Arcadex
|
|
3
3
|
|
4
4
|
################Below are authentication methods###########################
|
5
5
|
############This should be called by the user##############################
|
6
|
-
def self.
|
7
|
-
|
8
|
-
|
9
|
-
instance_hash
|
10
|
-
|
11
|
-
instance_hash = ::Arcadex::Authentication.authenticate_with_email_token(auth_token,email)
|
12
|
-
else
|
13
|
-
instance_hash = ::Arcadex::Authentication.authenticate_with_only_token(auth_token)
|
6
|
+
def self.authenticate_owner_with_index(params,request,auth_key,index_key,index_attr)
|
7
|
+
instance_hash = ::Arcadex::Authentication.get_instance(params,request,auth_key)
|
8
|
+
index = ::Arcadex::Header.grab_param_header(params,request,index_key)
|
9
|
+
if instance_hash.nil? || index.nil?
|
10
|
+
return nil
|
14
11
|
end
|
15
|
-
|
12
|
+
token = instance_hash["current_token"]
|
13
|
+
owner = instance_hash["current_owner"]
|
14
|
+
owner_from_index = ::Object.const_get(token.imageable_type).find_by(index_attr.to_sym => index)
|
15
|
+
if owner_from_index.nil?
|
16
|
+
return nil
|
17
|
+
end
|
18
|
+
if owner.id != owner_from_index.id
|
16
19
|
return nil
|
17
|
-
else
|
18
|
-
token = instance_hash["current_token"]
|
19
|
-
if token.first_ip_address.nil?
|
20
|
-
token.first_ip_address = request.remote_ip
|
21
|
-
end
|
22
|
-
token.current_ip_address = request.remote_ip
|
23
|
-
if token.times_used.nil?
|
24
|
-
token.times_used = 0;
|
25
|
-
end
|
26
|
-
token.times_used = token.times_used + 1
|
27
|
-
token.save
|
28
|
-
return instance_hash
|
29
20
|
end
|
21
|
+
return instance_hash
|
30
22
|
end
|
31
23
|
|
32
|
-
#
|
33
|
-
def self.
|
34
|
-
|
35
|
-
|
24
|
+
#Returns the object that is mapped to the key. The key is in the params or heaaders
|
25
|
+
def self.get_instance(params,request,key)
|
26
|
+
auth_token = ::Arcadex::Header.grab_param_header(params,request,key)
|
27
|
+
if auth_token.nil?
|
28
|
+
return nil
|
29
|
+
end
|
30
|
+
token = ::Arcadex::Find.find_token_by_auth_token(auth_token)
|
36
31
|
owner = ::Arcadex::Find.find_owner_by_token(token)
|
37
|
-
#This
|
38
|
-
if !token.nil?
|
39
|
-
user = ::Object.const_get(token.imageable_type).find_by(email: email)
|
40
|
-
#user = ::People::User.find_by(email: email)
|
41
|
-
end
|
42
|
-
#This is to mitigate timing attacks
|
32
|
+
#This is to mitigate timing attacks
|
43
33
|
::Devise.secure_compare(auth_token,auth_token)
|
44
|
-
if
|
45
|
-
|
46
|
-
else
|
47
|
-
#These are the variables available to every controller that inherits
|
48
|
-
instance_hash = {"current_user" => owner, "current_token" => token}
|
49
|
-
return instance_hash
|
34
|
+
if token.nil? || owner.nil?
|
35
|
+
return nil
|
50
36
|
end
|
37
|
+
if !::Arcadex::Authentication.update_token(token,request)
|
38
|
+
return nil
|
39
|
+
end
|
40
|
+
instance_hash = {"current_owner" => owner, "current_token" => token}
|
41
|
+
return instance_hash
|
51
42
|
end
|
52
43
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
44
|
+
def self.update_token(token,request)
|
45
|
+
if token.first_ip_address.nil?
|
46
|
+
token.first_ip_address = request.remote_ip
|
47
|
+
end
|
48
|
+
token.current_ip_address = request.remote_ip
|
49
|
+
if token.times_used.nil?
|
50
|
+
token.times_used = 0;
|
51
|
+
end
|
52
|
+
token.times_used = token.times_used + 1
|
53
|
+
if !token.max_uses.nil?
|
54
|
+
if token.max_uses > token.times_used
|
55
|
+
::Arcadex::Authentication.destroy_token(token)
|
56
|
+
return false
|
57
|
+
end
|
58
|
+
end
|
59
|
+
token.save
|
60
|
+
return true
|
67
61
|
end
|
68
62
|
|
69
63
|
end
|
data/lib/arcadex/create.rb
CHANGED
@@ -11,11 +11,12 @@ module Arcadex
|
|
11
11
|
|
12
12
|
#Arcadex.create_token(instance.tokens.new,exp_minutes,request)
|
13
13
|
#Put any token in here to set it's values. Usually when its first created
|
14
|
-
def self.set_token(token,exp_minutes,request)
|
14
|
+
def self.set_token(token,exp_minutes,request,max_uses)
|
15
15
|
token.first_ip_address = request.remote_ip
|
16
16
|
token.current_ip_address = request.remote_ip
|
17
17
|
token.times_used = 0
|
18
18
|
token.expiration_minutes = exp_minutes
|
19
|
+
token.max_uses = max_uses
|
19
20
|
token.save
|
20
21
|
return token
|
21
22
|
end
|
data/lib/arcadex/header.rb
CHANGED
@@ -1,29 +1,16 @@
|
|
1
1
|
module Arcadex
|
2
2
|
module Header
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
auth_token = params["auth_token"]
|
4
|
+
def self.grab_param_header(params,request,key)
|
5
|
+
#Values in the headers have preference
|
6
|
+
if !params[key].blank?
|
7
|
+
value = params[key]
|
9
8
|
end
|
10
|
-
if !request.headers[
|
11
|
-
|
9
|
+
if !request.headers[key].blank?
|
10
|
+
value = request.headers[key]
|
12
11
|
end
|
13
|
-
return
|
14
|
-
|
15
|
-
|
16
|
-
#Gets the email from either the url or header
|
17
|
-
def self.grab_email(params,request)
|
18
|
-
#Header email has preference
|
19
|
-
if !params["email"].blank?
|
20
|
-
email = params["email"]
|
21
|
-
end
|
22
|
-
if !request.headers["Email"].blank?
|
23
|
-
email = request.headers["Email"]
|
24
|
-
end
|
25
|
-
return email
|
26
|
-
end
|
12
|
+
return value
|
13
|
+
end
|
27
14
|
|
28
15
|
end
|
29
16
|
end
|
data/lib/arcadex/version.rb
CHANGED
Binary file
|
data/test/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20141020173616) do
|
15
15
|
|
16
16
|
create_table "arcadex_tokens", force: true do |t|
|
17
17
|
t.integer "imageable_id"
|
@@ -23,6 +23,7 @@ ActiveRecord::Schema.define(version: 20140910215147) do
|
|
23
23
|
t.string "current_ip_address"
|
24
24
|
t.integer "times_used"
|
25
25
|
t.integer "expiration_minutes"
|
26
|
+
t.integer "max_uses"
|
26
27
|
end
|
27
28
|
|
28
29
|
add_index "arcadex_tokens", ["auth_token"], name: "index_arcadex_tokens_on_auth_token", unique: true
|
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -43,4 +43,19 @@ Migrating to AddExpirationMinutesToArcadexTokens (20140910215147)
|
|
43
43
|
SELECT sql
|
44
44
|
FROM sqlite_temp_master
|
45
45
|
WHERE name='index_arcadex_tokens_on_auth_token' AND type='index'
|
46
|
+
[0m
|
47
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
48
|
+
Migrating to AddMaxUsesToArcadexTokens (20141020173616)
|
49
|
+
[1m[35m (0.1ms)[0m begin transaction
|
50
|
+
[1m[36m (18.7ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "max_uses" integer[0m
|
51
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141020173616"]]
|
52
|
+
[1m[36m (121.5ms)[0m [1mcommit transaction[0m
|
53
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
54
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
55
|
+
FROM sqlite_master
|
56
|
+
WHERE name='index_arcadex_tokens_on_auth_token' AND type='index'
|
57
|
+
UNION ALL
|
58
|
+
SELECT sql
|
59
|
+
FROM sqlite_temp_master
|
60
|
+
WHERE name='index_arcadex_tokens_on_auth_token' AND type='index'
|
46
61
|
[0m
|
data/test/dummy/log/test.log
CHANGED
@@ -20,3 +20,38 @@ Migrating to AddIndexToToken (20140806202340)
|
|
20
20
|
[1m[35mSQL (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140806202340"]]
|
21
21
|
[1m[36m (99.7ms)[0m [1mcommit transaction[0m
|
22
22
|
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
23
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
24
|
+
Migrating to AddFirstIpAddressToArcadexTokens (20140910215044)
|
25
|
+
[1m[35m (0.1ms)[0m begin transaction
|
26
|
+
[1m[36m (0.7ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "first_ip_address" varchar(255)[0m
|
27
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140910215044"]]
|
28
|
+
[1m[36m (140.5ms)[0m [1mcommit transaction[0m
|
29
|
+
Migrating to AddCurrentIpAddressToArcadexTokens (20140910215118)
|
30
|
+
[1m[35m (0.1ms)[0m begin transaction
|
31
|
+
[1m[36m (0.6ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "current_ip_address" varchar(255)[0m
|
32
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140910215118"]]
|
33
|
+
[1m[36m (141.4ms)[0m [1mcommit transaction[0m
|
34
|
+
Migrating to AddTimesUsedToArcadexTokens (20140910215136)
|
35
|
+
[1m[35m (0.2ms)[0m begin transaction
|
36
|
+
[1m[36m (2.4ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "times_used" integer[0m
|
37
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140910215136"]]
|
38
|
+
[1m[36m (124.5ms)[0m [1mcommit transaction[0m
|
39
|
+
Migrating to AddExpirationMinutesToArcadexTokens (20140910215147)
|
40
|
+
[1m[35m (0.2ms)[0m begin transaction
|
41
|
+
[1m[36m (1.5ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "expiration_minutes" integer[0m
|
42
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140910215147"]]
|
43
|
+
[1m[36m (125.1ms)[0m [1mcommit transaction[0m
|
44
|
+
Migrating to AddMaxUsesToArcadexTokens (20141020173616)
|
45
|
+
[1m[35m (0.1ms)[0m begin transaction
|
46
|
+
[1m[36m (0.7ms)[0m [1mALTER TABLE "arcadex_tokens" ADD "max_uses" integer[0m
|
47
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141020173616"]]
|
48
|
+
[1m[36m (140.5ms)[0m [1mcommit transaction[0m
|
49
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
50
|
+
[1m[36m (0.1ms)[0m [1m SELECT sql
|
51
|
+
FROM sqlite_master
|
52
|
+
WHERE name='index_arcadex_tokens_on_auth_token' AND type='index'
|
53
|
+
UNION ALL
|
54
|
+
SELECT sql
|
55
|
+
FROM sqlite_temp_master
|
56
|
+
WHERE name='index_arcadex_tokens_on_auth_token' AND type='index'
|
57
|
+
[0m
|
@@ -0,0 +1,77 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'people', :path => "engines/people"
|
4
|
+
|
5
|
+
|
6
|
+
gem "json_voorhees"
|
7
|
+
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
8
|
+
gem 'rails', '4.0.4'
|
9
|
+
|
10
|
+
# Use sqlite3 as the database for Active Record
|
11
|
+
gem 'sqlite3'
|
12
|
+
|
13
|
+
# Use SCSS for stylesheets
|
14
|
+
gem 'sass-rails', '~> 4.0.2'
|
15
|
+
|
16
|
+
# Use Uglifier as compressor for JavaScript assets
|
17
|
+
gem 'uglifier', '>= 1.3.0'
|
18
|
+
|
19
|
+
# Use CoffeeScript for .js.coffee assets and views
|
20
|
+
gem 'coffee-rails', '~> 4.0.0'
|
21
|
+
|
22
|
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
23
|
+
# gem 'therubyracer', platforms: :ruby
|
24
|
+
|
25
|
+
# Use jquery as the JavaScript library
|
26
|
+
gem 'jquery-rails'
|
27
|
+
|
28
|
+
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
29
|
+
gem 'turbolinks'
|
30
|
+
|
31
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
32
|
+
gem 'jbuilder', '~> 1.2'
|
33
|
+
|
34
|
+
group :doc do
|
35
|
+
# bundle exec rake doc:rails generates the API under doc/api.
|
36
|
+
gem 'sdoc', require: false
|
37
|
+
end
|
38
|
+
|
39
|
+
# Use ActiveModel has_secure_password
|
40
|
+
# gem 'bcrypt', '~> 3.1.7'
|
41
|
+
|
42
|
+
# Use unicorn as the app server
|
43
|
+
# gem 'unicorn'
|
44
|
+
|
45
|
+
# Use Capistrano for deployment
|
46
|
+
# gem 'capistrano', group: :development
|
47
|
+
|
48
|
+
# Use debugger
|
49
|
+
# gem 'debugger', group: [:development, :test]
|
50
|
+
|
51
|
+
group :development, :test do
|
52
|
+
gem "figaro", "~> 0.7.0"
|
53
|
+
gem "annotate", ">=2.6.0"
|
54
|
+
gem "rspec-rails", "~> 3.0.0"
|
55
|
+
gem "byebug", "~> 3.2.0"
|
56
|
+
gem "factory_girl_rails", "~> 4.0"
|
57
|
+
gem "database_cleaner", "~> 1.3.0"
|
58
|
+
end
|
59
|
+
|
60
|
+
group :development do
|
61
|
+
gem "better_errors", "~> 1.1.0"
|
62
|
+
gem "binding_of_caller", "~> 0.7.1"
|
63
|
+
end
|
64
|
+
|
65
|
+
gem "active_model_serializers", "~> 0.8.0"
|
66
|
+
gem "rails-api"
|
67
|
+
gem "kaminari"
|
68
|
+
gem "bcrypt", "~> 3.1.7"
|
69
|
+
gem "type_cartographer"
|
70
|
+
gem "devise", "~> 3.2.4"
|
71
|
+
gem "arcadex", path: "../../../arcadex"
|
72
|
+
gem "autoprefixer-rails"
|
73
|
+
gem "bootstrap-sass", "~> 3.2.0"
|
74
|
+
gem "activeadmin", git: "https://github.com/activeadmin/activeadmin.git", branch: "master"
|
75
|
+
gem "defcon", "~> 1.2.3"
|
76
|
+
gem "authorization", path: "gems/authorization"
|
77
|
+
gem "whenever", require: false
|
@@ -0,0 +1,281 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/activeadmin/activeadmin.git
|
3
|
+
revision: 05778f4b7c8e821d584c7b4b08bcd79c02a0db76
|
4
|
+
branch: master
|
5
|
+
specs:
|
6
|
+
activeadmin (1.0.0.pre)
|
7
|
+
arbre (~> 1.0, >= 1.0.2)
|
8
|
+
bourbon
|
9
|
+
coffee-rails
|
10
|
+
formtastic (~> 3.0)
|
11
|
+
inherited_resources (~> 1.4.1)
|
12
|
+
jquery-rails
|
13
|
+
jquery-ui-rails (~> 5.0)
|
14
|
+
kaminari (~> 0.15)
|
15
|
+
rails (>= 3.2, < 4.2)
|
16
|
+
ransack (~> 1.3)
|
17
|
+
sass-rails
|
18
|
+
|
19
|
+
PATH
|
20
|
+
remote: ../../../arcadex
|
21
|
+
specs:
|
22
|
+
arcadex (1.1.3)
|
23
|
+
devise (>= 3.2.4)
|
24
|
+
rails (>= 4.0.0)
|
25
|
+
|
26
|
+
PATH
|
27
|
+
remote: engines/people
|
28
|
+
specs:
|
29
|
+
people (0.0.1)
|
30
|
+
active_model_serializers (~> 0.8.0)
|
31
|
+
arcadex
|
32
|
+
bcrypt (~> 3.1.7)
|
33
|
+
rails (~> 4.0.4)
|
34
|
+
rails-api
|
35
|
+
type_cartographer
|
36
|
+
|
37
|
+
PATH
|
38
|
+
remote: gems/authorization
|
39
|
+
specs:
|
40
|
+
authorization (0.0.1)
|
41
|
+
rails (~> 4.0.4)
|
42
|
+
|
43
|
+
GEM
|
44
|
+
remote: https://rubygems.org/
|
45
|
+
specs:
|
46
|
+
actionmailer (4.0.4)
|
47
|
+
actionpack (= 4.0.4)
|
48
|
+
mail (~> 2.5.4)
|
49
|
+
actionpack (4.0.4)
|
50
|
+
activesupport (= 4.0.4)
|
51
|
+
builder (~> 3.1.0)
|
52
|
+
erubis (~> 2.7.0)
|
53
|
+
rack (~> 1.5.2)
|
54
|
+
rack-test (~> 0.6.2)
|
55
|
+
active_model_serializers (0.8.2)
|
56
|
+
activemodel (>= 3.0)
|
57
|
+
activemodel (4.0.4)
|
58
|
+
activesupport (= 4.0.4)
|
59
|
+
builder (~> 3.1.0)
|
60
|
+
activerecord (4.0.4)
|
61
|
+
activemodel (= 4.0.4)
|
62
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
63
|
+
activesupport (= 4.0.4)
|
64
|
+
arel (~> 4.0.0)
|
65
|
+
activerecord-deprecated_finders (1.0.3)
|
66
|
+
activesupport (4.0.4)
|
67
|
+
i18n (~> 0.6, >= 0.6.9)
|
68
|
+
minitest (~> 4.2)
|
69
|
+
multi_json (~> 1.3)
|
70
|
+
thread_safe (~> 0.1)
|
71
|
+
tzinfo (~> 0.3.37)
|
72
|
+
annotate (2.6.5)
|
73
|
+
activerecord (>= 2.3.0)
|
74
|
+
rake (>= 0.8.7)
|
75
|
+
arbre (1.0.2)
|
76
|
+
activesupport (>= 3.0.0)
|
77
|
+
arel (4.0.2)
|
78
|
+
autoprefixer-rails (3.1.2.20141016)
|
79
|
+
execjs
|
80
|
+
bcrypt (3.1.7)
|
81
|
+
better_errors (1.1.0)
|
82
|
+
coderay (>= 1.0.0)
|
83
|
+
erubis (>= 2.6.6)
|
84
|
+
binding_of_caller (0.7.2)
|
85
|
+
debug_inspector (>= 0.0.1)
|
86
|
+
bootstrap-sass (3.2.0.2)
|
87
|
+
sass (~> 3.2)
|
88
|
+
bourbon (3.2.3)
|
89
|
+
sass (~> 3.2)
|
90
|
+
thor
|
91
|
+
builder (3.1.4)
|
92
|
+
byebug (3.2.0)
|
93
|
+
columnize (~> 0.8)
|
94
|
+
debugger-linecache (~> 1.2)
|
95
|
+
chronic (0.10.2)
|
96
|
+
coderay (1.1.0)
|
97
|
+
coffee-rails (4.0.1)
|
98
|
+
coffee-script (>= 2.2.0)
|
99
|
+
railties (>= 4.0.0, < 5.0)
|
100
|
+
coffee-script (2.3.0)
|
101
|
+
coffee-script-source
|
102
|
+
execjs
|
103
|
+
coffee-script-source (1.8.0)
|
104
|
+
columnize (0.8.9)
|
105
|
+
database_cleaner (1.3.0)
|
106
|
+
debug_inspector (0.0.2)
|
107
|
+
debugger-linecache (1.2.0)
|
108
|
+
defcon (1.2.3)
|
109
|
+
bcrypt (>= 3.1.7)
|
110
|
+
rails (>= 4.0.0)
|
111
|
+
devise (3.2.4)
|
112
|
+
bcrypt (~> 3.0)
|
113
|
+
orm_adapter (~> 0.1)
|
114
|
+
railties (>= 3.2.6, < 5)
|
115
|
+
thread_safe (~> 0.1)
|
116
|
+
warden (~> 1.2.3)
|
117
|
+
diff-lcs (1.2.5)
|
118
|
+
erubis (2.7.0)
|
119
|
+
execjs (2.2.2)
|
120
|
+
factory_girl (4.4.0)
|
121
|
+
activesupport (>= 3.0.0)
|
122
|
+
factory_girl_rails (4.4.1)
|
123
|
+
factory_girl (~> 4.4.0)
|
124
|
+
railties (>= 3.0.0)
|
125
|
+
figaro (0.7.0)
|
126
|
+
bundler (~> 1.0)
|
127
|
+
rails (>= 3, < 5)
|
128
|
+
formtastic (3.0.0)
|
129
|
+
actionpack (>= 3.2.13)
|
130
|
+
has_scope (0.6.0.rc)
|
131
|
+
actionpack (>= 3.2, < 5)
|
132
|
+
activesupport (>= 3.2, < 5)
|
133
|
+
hike (1.2.3)
|
134
|
+
i18n (0.6.11)
|
135
|
+
inherited_resources (1.4.1)
|
136
|
+
has_scope (~> 0.6.0.rc)
|
137
|
+
responders (~> 1.0.0.rc)
|
138
|
+
jbuilder (1.5.3)
|
139
|
+
activesupport (>= 3.0.0)
|
140
|
+
multi_json (>= 1.2.0)
|
141
|
+
jquery-rails (3.1.2)
|
142
|
+
railties (>= 3.0, < 5.0)
|
143
|
+
thor (>= 0.14, < 2.0)
|
144
|
+
jquery-ui-rails (5.0.1)
|
145
|
+
railties (>= 3.2.16)
|
146
|
+
json (1.8.1)
|
147
|
+
json_voorhees (0.5.4)
|
148
|
+
rails (>= 4.0.0)
|
149
|
+
kaminari (0.16.1)
|
150
|
+
actionpack (>= 3.0.0)
|
151
|
+
activesupport (>= 3.0.0)
|
152
|
+
mail (2.5.4)
|
153
|
+
mime-types (~> 1.16)
|
154
|
+
treetop (~> 1.4.8)
|
155
|
+
mime-types (1.25.1)
|
156
|
+
minitest (4.7.5)
|
157
|
+
multi_json (1.10.1)
|
158
|
+
orm_adapter (0.5.0)
|
159
|
+
polyamorous (1.1.0)
|
160
|
+
activerecord (>= 3.0)
|
161
|
+
polyglot (0.3.5)
|
162
|
+
rack (1.5.2)
|
163
|
+
rack-test (0.6.2)
|
164
|
+
rack (>= 1.0)
|
165
|
+
rails (4.0.4)
|
166
|
+
actionmailer (= 4.0.4)
|
167
|
+
actionpack (= 4.0.4)
|
168
|
+
activerecord (= 4.0.4)
|
169
|
+
activesupport (= 4.0.4)
|
170
|
+
bundler (>= 1.3.0, < 2.0)
|
171
|
+
railties (= 4.0.4)
|
172
|
+
sprockets-rails (~> 2.0.0)
|
173
|
+
rails-api (0.3.0)
|
174
|
+
actionpack (>= 3.2.11)
|
175
|
+
railties (>= 3.2.11)
|
176
|
+
railties (4.0.4)
|
177
|
+
actionpack (= 4.0.4)
|
178
|
+
activesupport (= 4.0.4)
|
179
|
+
rake (>= 0.8.7)
|
180
|
+
thor (>= 0.18.1, < 2.0)
|
181
|
+
rake (10.3.2)
|
182
|
+
ransack (1.4.1)
|
183
|
+
actionpack (>= 3.0)
|
184
|
+
activerecord (>= 3.0)
|
185
|
+
activesupport (>= 3.0)
|
186
|
+
i18n
|
187
|
+
polyamorous (~> 1.1)
|
188
|
+
rdoc (4.1.2)
|
189
|
+
json (~> 1.4)
|
190
|
+
responders (1.0.0)
|
191
|
+
railties (>= 3.2, < 5)
|
192
|
+
rspec-core (3.0.4)
|
193
|
+
rspec-support (~> 3.0.0)
|
194
|
+
rspec-expectations (3.0.4)
|
195
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
196
|
+
rspec-support (~> 3.0.0)
|
197
|
+
rspec-mocks (3.0.4)
|
198
|
+
rspec-support (~> 3.0.0)
|
199
|
+
rspec-rails (3.0.2)
|
200
|
+
actionpack (>= 3.0)
|
201
|
+
activesupport (>= 3.0)
|
202
|
+
railties (>= 3.0)
|
203
|
+
rspec-core (~> 3.0.0)
|
204
|
+
rspec-expectations (~> 3.0.0)
|
205
|
+
rspec-mocks (~> 3.0.0)
|
206
|
+
rspec-support (~> 3.0.0)
|
207
|
+
rspec-support (3.0.4)
|
208
|
+
sass (3.2.19)
|
209
|
+
sass-rails (4.0.3)
|
210
|
+
railties (>= 4.0.0, < 5.0)
|
211
|
+
sass (~> 3.2.0)
|
212
|
+
sprockets (~> 2.8, <= 2.11.0)
|
213
|
+
sprockets-rails (~> 2.0)
|
214
|
+
sdoc (0.4.1)
|
215
|
+
json (~> 1.7, >= 1.7.7)
|
216
|
+
rdoc (~> 4.0)
|
217
|
+
sprockets (2.11.0)
|
218
|
+
hike (~> 1.2)
|
219
|
+
multi_json (~> 1.0)
|
220
|
+
rack (~> 1.0)
|
221
|
+
tilt (~> 1.1, != 1.3.0)
|
222
|
+
sprockets-rails (2.0.1)
|
223
|
+
actionpack (>= 3.0)
|
224
|
+
activesupport (>= 3.0)
|
225
|
+
sprockets (~> 2.8)
|
226
|
+
sqlite3 (1.3.9)
|
227
|
+
thor (0.19.1)
|
228
|
+
thread_safe (0.3.4)
|
229
|
+
tilt (1.4.1)
|
230
|
+
treetop (1.4.15)
|
231
|
+
polyglot
|
232
|
+
polyglot (>= 0.3.1)
|
233
|
+
turbolinks (2.4.0)
|
234
|
+
coffee-rails
|
235
|
+
type_cartographer (1.0.0)
|
236
|
+
rails (>= 4.0.0)
|
237
|
+
tzinfo (0.3.41)
|
238
|
+
uglifier (2.5.3)
|
239
|
+
execjs (>= 0.3.0)
|
240
|
+
json (>= 1.8.0)
|
241
|
+
warden (1.2.3)
|
242
|
+
rack (>= 1.0)
|
243
|
+
whenever (0.9.3)
|
244
|
+
chronic (>= 0.6.3)
|
245
|
+
|
246
|
+
PLATFORMS
|
247
|
+
ruby
|
248
|
+
|
249
|
+
DEPENDENCIES
|
250
|
+
active_model_serializers (~> 0.8.0)
|
251
|
+
activeadmin!
|
252
|
+
annotate (>= 2.6.0)
|
253
|
+
arcadex!
|
254
|
+
authorization!
|
255
|
+
autoprefixer-rails
|
256
|
+
bcrypt (~> 3.1.7)
|
257
|
+
better_errors (~> 1.1.0)
|
258
|
+
binding_of_caller (~> 0.7.1)
|
259
|
+
bootstrap-sass (~> 3.2.0)
|
260
|
+
byebug (~> 3.2.0)
|
261
|
+
coffee-rails (~> 4.0.0)
|
262
|
+
database_cleaner (~> 1.3.0)
|
263
|
+
defcon (~> 1.2.3)
|
264
|
+
devise (~> 3.2.4)
|
265
|
+
factory_girl_rails (~> 4.0)
|
266
|
+
figaro (~> 0.7.0)
|
267
|
+
jbuilder (~> 1.2)
|
268
|
+
jquery-rails
|
269
|
+
json_voorhees
|
270
|
+
kaminari
|
271
|
+
people!
|
272
|
+
rails (= 4.0.4)
|
273
|
+
rails-api
|
274
|
+
rspec-rails (~> 3.0.0)
|
275
|
+
sass-rails (~> 4.0.2)
|
276
|
+
sdoc
|
277
|
+
sqlite3
|
278
|
+
turbolinks
|
279
|
+
type_cartographer
|
280
|
+
uglifier (>= 1.3.0)
|
281
|
+
whenever
|