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
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure your secret_key_base is kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
TestApp::Application.config.secret_key_base = '29f232ab8efec1789f4c5ba430c4777d3ca3740e1e3c3f5da22191b3348a837767e0c216252d73f5ff5cf61e47d153be0c8d08cf4b96146c4d818d9d4612c477'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,66 @@
|
|
1
|
+
TestApp::Application.routes.draw do
|
2
|
+
get "app_index/app"
|
3
|
+
root to: "app_index#app"
|
4
|
+
mount Defcon::Engine, at: '/'
|
5
|
+
mount Arcadex::Engine, at: '/'
|
6
|
+
mount People::Engine, at: '/'
|
7
|
+
ActiveAdmin.routes(self)
|
8
|
+
#This is to handle the CORS preflight request, it only catches the options action.
|
9
|
+
controller 'api/v1/api' do
|
10
|
+
match '*unmatched_route', :to => 'api/v1/api#route_options', via: [:options]
|
11
|
+
end
|
12
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
13
|
+
# See how all your routes lay out with "rake routes".
|
14
|
+
|
15
|
+
# You can have the root of your site routed with "root"
|
16
|
+
# root 'welcome#index'
|
17
|
+
|
18
|
+
# Example of regular route:
|
19
|
+
# get 'products/:id' => 'catalog#view'
|
20
|
+
|
21
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
22
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
23
|
+
|
24
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
25
|
+
# resources :products
|
26
|
+
|
27
|
+
# Example resource route with options:
|
28
|
+
# resources :products do
|
29
|
+
# member do
|
30
|
+
# get 'short'
|
31
|
+
# post 'toggle'
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# collection do
|
35
|
+
# get 'sold'
|
36
|
+
# end
|
37
|
+
# end
|
38
|
+
|
39
|
+
# Example resource route with sub-resources:
|
40
|
+
# resources :products do
|
41
|
+
# resources :comments, :sales
|
42
|
+
# resource :seller
|
43
|
+
# end
|
44
|
+
|
45
|
+
# Example resource route with more complex sub-resources:
|
46
|
+
# resources :products do
|
47
|
+
# resources :comments
|
48
|
+
# resources :sales do
|
49
|
+
# get 'recent', on: :collection
|
50
|
+
# end
|
51
|
+
# end
|
52
|
+
|
53
|
+
# Example resource route with concerns:
|
54
|
+
# concern :toggleable do
|
55
|
+
# post 'toggle'
|
56
|
+
# end
|
57
|
+
# resources :posts, concerns: :toggleable
|
58
|
+
# resources :photos, concerns: :toggleable
|
59
|
+
|
60
|
+
# Example resource route within a namespace:
|
61
|
+
# namespace :admin do
|
62
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
63
|
+
# # (app/controllers/admin/products_controller.rb)
|
64
|
+
# resources :products
|
65
|
+
# end
|
66
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Use this file to easily define all of your cron jobs.
|
2
|
+
#
|
3
|
+
# It's helpful, but not entirely necessary to understand cron before proceeding.
|
4
|
+
# http://en.wikipedia.org/wiki/Cron
|
5
|
+
|
6
|
+
# Example:
|
7
|
+
#
|
8
|
+
# set :output, "/path/to/my/cron_log.log"
|
9
|
+
#
|
10
|
+
# every 2.hours do
|
11
|
+
# command "/usr/bin/some_great_command"
|
12
|
+
# runner "MyModel.some_method"
|
13
|
+
# rake "some:great:rake:task"
|
14
|
+
# end
|
15
|
+
#
|
16
|
+
# every 4.days do
|
17
|
+
# runner "AnotherModel.prune_old_records"
|
18
|
+
# end
|
19
|
+
|
20
|
+
# Learn more: http://github.com/javan/whenever
|
Binary file
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateActiveAdminComments < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :active_admin_comments do |t|
|
4
|
+
t.string :namespace
|
5
|
+
t.text :body
|
6
|
+
t.string :resource_id, null: false
|
7
|
+
t.string :resource_type, null: false
|
8
|
+
t.references :author, polymorphic: true
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :active_admin_comments, [:namespace]
|
12
|
+
add_index :active_admin_comments, [:author_type, :author_id]
|
13
|
+
add_index :active_admin_comments, [:resource_type, :resource_id]
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.down
|
17
|
+
drop_table :active_admin_comments
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from people (originally 20141016225548)
|
2
|
+
class CreatePeopleUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :people_users do |t|
|
5
|
+
t.string :username
|
6
|
+
t.string :email
|
7
|
+
t.string :password_digest
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :people_users, :username, unique: true
|
12
|
+
add_index :people_users, :email, unique: true
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This migration comes from arcadex (originally 20140806194834)
|
2
|
+
class CreateArcadexTokens < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :arcadex_tokens do |t|
|
5
|
+
t.integer :imageable_id
|
6
|
+
t.string :imageable_type
|
7
|
+
t.string :auth_token
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This migration comes from defcon (originally 20141008173352)
|
2
|
+
class CreateDefconAdminUsers < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :defcon_admin_users do |t|
|
5
|
+
t.string :username
|
6
|
+
t.string :password_digest
|
7
|
+
t.boolean :read_only
|
8
|
+
t.integer :attempts
|
9
|
+
t.integer :max_attempts
|
10
|
+
t.boolean :master
|
11
|
+
t.integer :priority
|
12
|
+
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
Binary file
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(version: 20141020173805) do
|
15
|
+
|
16
|
+
create_table "active_admin_comments", force: true do |t|
|
17
|
+
t.string "namespace"
|
18
|
+
t.text "body"
|
19
|
+
t.string "resource_id", null: false
|
20
|
+
t.string "resource_type", null: false
|
21
|
+
t.integer "author_id"
|
22
|
+
t.string "author_type"
|
23
|
+
t.datetime "created_at"
|
24
|
+
t.datetime "updated_at"
|
25
|
+
end
|
26
|
+
|
27
|
+
add_index "active_admin_comments", ["author_type", "author_id"], name: "index_active_admin_comments_on_author_type_and_author_id"
|
28
|
+
add_index "active_admin_comments", ["namespace"], name: "index_active_admin_comments_on_namespace"
|
29
|
+
add_index "active_admin_comments", ["resource_type", "resource_id"], name: "index_active_admin_comments_on_resource_type_and_resource_id"
|
30
|
+
|
31
|
+
create_table "arcadex_tokens", force: true do |t|
|
32
|
+
t.integer "imageable_id"
|
33
|
+
t.string "imageable_type"
|
34
|
+
t.string "auth_token"
|
35
|
+
t.datetime "created_at"
|
36
|
+
t.datetime "updated_at"
|
37
|
+
t.string "first_ip_address"
|
38
|
+
t.string "current_ip_address"
|
39
|
+
t.integer "times_used"
|
40
|
+
t.integer "expiration_minutes"
|
41
|
+
t.integer "max_uses"
|
42
|
+
end
|
43
|
+
|
44
|
+
add_index "arcadex_tokens", ["auth_token"], name: "index_arcadex_tokens_on_auth_token", unique: true
|
45
|
+
|
46
|
+
create_table "defcon_admin_users", force: true do |t|
|
47
|
+
t.string "username"
|
48
|
+
t.string "password_digest"
|
49
|
+
t.boolean "read_only"
|
50
|
+
t.integer "attempts"
|
51
|
+
t.integer "max_attempts"
|
52
|
+
t.boolean "master"
|
53
|
+
t.integer "priority"
|
54
|
+
t.datetime "created_at"
|
55
|
+
t.datetime "updated_at"
|
56
|
+
t.string "email"
|
57
|
+
end
|
58
|
+
|
59
|
+
add_index "defcon_admin_users", ["email"], name: "index_defcon_admin_users_on_email", unique: true
|
60
|
+
add_index "defcon_admin_users", ["username"], name: "index_defcon_admin_users_on_username", unique: true
|
61
|
+
|
62
|
+
create_table "people_users", force: true do |t|
|
63
|
+
t.string "username"
|
64
|
+
t.string "email"
|
65
|
+
t.string "password_digest"
|
66
|
+
t.datetime "created_at"
|
67
|
+
t.datetime "updated_at"
|
68
|
+
end
|
69
|
+
|
70
|
+
add_index "people_users", ["email"], name: "index_people_users_on_email", unique: true
|
71
|
+
add_index "people_users", ["username"], name: "index_people_users_on_username", unique: true
|
72
|
+
|
73
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
+
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
+
#
|
4
|
+
# Examples:
|
5
|
+
#
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
8
|
+
|
9
|
+
::Defcon::AdminUser.create({username: "admin", password: "password", password_confirmation: "password"})
|
10
|
+
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in people.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use debugger
|
14
|
+
# gem 'debugger'
|
@@ -0,0 +1,81 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
people (0.0.1)
|
5
|
+
rails (~> 4.0.4)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.0.10)
|
11
|
+
actionpack (= 4.0.10)
|
12
|
+
mail (~> 2.5, >= 2.5.4)
|
13
|
+
actionpack (4.0.10)
|
14
|
+
activesupport (= 4.0.10)
|
15
|
+
builder (~> 3.1.0)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
rack (~> 1.5.2)
|
18
|
+
rack-test (~> 0.6.2)
|
19
|
+
activemodel (4.0.10)
|
20
|
+
activesupport (= 4.0.10)
|
21
|
+
builder (~> 3.1.0)
|
22
|
+
activerecord (4.0.10)
|
23
|
+
activemodel (= 4.0.10)
|
24
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
25
|
+
activesupport (= 4.0.10)
|
26
|
+
arel (~> 4.0.0)
|
27
|
+
activerecord-deprecated_finders (1.0.3)
|
28
|
+
activesupport (4.0.10)
|
29
|
+
i18n (~> 0.6, >= 0.6.9)
|
30
|
+
minitest (~> 4.2)
|
31
|
+
multi_json (~> 1.3)
|
32
|
+
thread_safe (~> 0.1)
|
33
|
+
tzinfo (~> 0.3.37)
|
34
|
+
arel (4.0.2)
|
35
|
+
builder (3.1.4)
|
36
|
+
erubis (2.7.0)
|
37
|
+
hike (1.2.3)
|
38
|
+
i18n (0.6.11)
|
39
|
+
mail (2.6.1)
|
40
|
+
mime-types (>= 1.16, < 3)
|
41
|
+
mime-types (2.4.2)
|
42
|
+
minitest (4.7.5)
|
43
|
+
multi_json (1.10.1)
|
44
|
+
rack (1.5.2)
|
45
|
+
rack-test (0.6.2)
|
46
|
+
rack (>= 1.0)
|
47
|
+
rails (4.0.10)
|
48
|
+
actionmailer (= 4.0.10)
|
49
|
+
actionpack (= 4.0.10)
|
50
|
+
activerecord (= 4.0.10)
|
51
|
+
activesupport (= 4.0.10)
|
52
|
+
bundler (>= 1.3.0, < 2.0)
|
53
|
+
railties (= 4.0.10)
|
54
|
+
sprockets-rails (~> 2.0)
|
55
|
+
railties (4.0.10)
|
56
|
+
actionpack (= 4.0.10)
|
57
|
+
activesupport (= 4.0.10)
|
58
|
+
rake (>= 0.8.7)
|
59
|
+
thor (>= 0.18.1, < 2.0)
|
60
|
+
rake (10.3.2)
|
61
|
+
sprockets (2.12.2)
|
62
|
+
hike (~> 1.2)
|
63
|
+
multi_json (~> 1.0)
|
64
|
+
rack (~> 1.0)
|
65
|
+
tilt (~> 1.1, != 1.3.0)
|
66
|
+
sprockets-rails (2.2.0)
|
67
|
+
actionpack (>= 3.0)
|
68
|
+
activesupport (>= 3.0)
|
69
|
+
sprockets (>= 2.8, < 4.0)
|
70
|
+
sqlite3 (1.3.9)
|
71
|
+
thor (0.19.1)
|
72
|
+
thread_safe (0.3.4)
|
73
|
+
tilt (1.4.1)
|
74
|
+
tzinfo (0.3.41)
|
75
|
+
|
76
|
+
PLATFORMS
|
77
|
+
ruby
|
78
|
+
|
79
|
+
DEPENDENCIES
|
80
|
+
people!
|
81
|
+
sqlite3
|