sandboxy 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +26 -36
- data/{examples/rails_example/app → app}/models/sandbox.rb +1 -1
- data/lib/generators/sandboxy_generator.rb +0 -4
- data/lib/generators/templates/initializer.rb +7 -7
- data/lib/generators/templates/migration.rb.erb +4 -9
- data/lib/sandboxy.rb +2 -9
- data/lib/sandboxy/configuration.rb +37 -10
- data/lib/sandboxy/engine.rb +6 -0
- data/lib/sandboxy/middleware.rb +3 -3
- data/lib/sandboxy/railtie.rb +7 -6
- data/lib/sandboxy/sandboxed.rb +69 -19
- data/lib/sandboxy/version.rb +1 -1
- metadata +5 -197
- data/.github/issue_template.md +0 -14
- data/.github/pull_request_template.md +0 -21
- data/.gitignore +0 -8
- data/.travis.yml +0 -3
- data/CODE_OF_CONDUCT.md +0 -46
- data/CONTRIBUTING.md +0 -1
- data/DEPRECATIONS.md +0 -5
- data/Gemfile +0 -9
- data/INSTALL.md +0 -3
- data/Rakefile +0 -15
- data/examples/rails_example/.gitignore +0 -23
- data/examples/rails_example/Gemfile +0 -54
- data/examples/rails_example/README.md +0 -24
- data/examples/rails_example/Rakefile +0 -6
- data/examples/rails_example/app/api/books/api.rb +0 -33
- data/examples/rails_example/app/assets/config/manifest.js +0 -3
- data/examples/rails_example/app/assets/images/.keep +0 -0
- data/examples/rails_example/app/assets/javascripts/application.js +0 -15
- data/examples/rails_example/app/assets/javascripts/applications.coffee +0 -3
- data/examples/rails_example/app/assets/javascripts/authors.coffee +0 -3
- data/examples/rails_example/app/assets/javascripts/books.coffee +0 -3
- data/examples/rails_example/app/assets/javascripts/cable.js +0 -13
- data/examples/rails_example/app/assets/javascripts/channels/.keep +0 -0
- data/examples/rails_example/app/assets/javascripts/libraries.coffee +0 -3
- data/examples/rails_example/app/assets/javascripts/sandbox.coffee +0 -3
- data/examples/rails_example/app/assets/stylesheets/application.css +0 -15
- data/examples/rails_example/app/assets/stylesheets/applications.scss +0 -3
- data/examples/rails_example/app/assets/stylesheets/authors.scss +0 -3
- data/examples/rails_example/app/assets/stylesheets/books.scss +0 -3
- data/examples/rails_example/app/assets/stylesheets/libraries.scss +0 -3
- data/examples/rails_example/app/assets/stylesheets/sandbox.scss +0 -3
- data/examples/rails_example/app/assets/stylesheets/scaffolds.scss +0 -84
- data/examples/rails_example/app/channels/application_cable/channel.rb +0 -4
- data/examples/rails_example/app/channels/application_cable/connection.rb +0 -4
- data/examples/rails_example/app/controllers/application_controller.rb +0 -7
- data/examples/rails_example/app/controllers/applications_controller.rb +0 -74
- data/examples/rails_example/app/controllers/authors_controller.rb +0 -77
- data/examples/rails_example/app/controllers/books_controller.rb +0 -77
- data/examples/rails_example/app/controllers/concerns/.keep +0 -0
- data/examples/rails_example/app/controllers/libraries_controller.rb +0 -77
- data/examples/rails_example/app/controllers/sandbox_controller.rb +0 -6
- data/examples/rails_example/app/helpers/application_helper.rb +0 -2
- data/examples/rails_example/app/helpers/applications_helper.rb +0 -2
- data/examples/rails_example/app/helpers/authors_helper.rb +0 -2
- data/examples/rails_example/app/helpers/books_helper.rb +0 -2
- data/examples/rails_example/app/helpers/libraries_helper.rb +0 -2
- data/examples/rails_example/app/helpers/sandbox_helper.rb +0 -2
- data/examples/rails_example/app/jobs/application_job.rb +0 -2
- data/examples/rails_example/app/mailers/application_mailer.rb +0 -4
- data/examples/rails_example/app/models/application.rb +0 -14
- data/examples/rails_example/app/models/application_record.rb +0 -3
- data/examples/rails_example/app/models/author.rb +0 -2
- data/examples/rails_example/app/models/book.rb +0 -2
- data/examples/rails_example/app/models/concerns/.keep +0 -0
- data/examples/rails_example/app/models/library.rb +0 -2
- data/examples/rails_example/app/views/applications/_application.json.jbuilder +0 -2
- data/examples/rails_example/app/views/applications/_form.html.erb +0 -19
- data/examples/rails_example/app/views/applications/edit.html.erb +0 -6
- data/examples/rails_example/app/views/applications/index.html.erb +0 -25
- data/examples/rails_example/app/views/applications/index.json.jbuilder +0 -1
- data/examples/rails_example/app/views/applications/new.html.erb +0 -5
- data/examples/rails_example/app/views/applications/show.html.erb +0 -7
- data/examples/rails_example/app/views/applications/show.json.jbuilder +0 -1
- data/examples/rails_example/app/views/authors/_author.json.jbuilder +0 -2
- data/examples/rails_example/app/views/authors/_form.html.erb +0 -19
- data/examples/rails_example/app/views/authors/edit.html.erb +0 -6
- data/examples/rails_example/app/views/authors/index.html.erb +0 -25
- data/examples/rails_example/app/views/authors/index.json.jbuilder +0 -1
- data/examples/rails_example/app/views/authors/new.html.erb +0 -5
- data/examples/rails_example/app/views/authors/show.html.erb +0 -4
- data/examples/rails_example/app/views/authors/show.json.jbuilder +0 -1
- data/examples/rails_example/app/views/books/_book.json.jbuilder +0 -2
- data/examples/rails_example/app/views/books/_form.html.erb +0 -19
- data/examples/rails_example/app/views/books/edit.html.erb +0 -6
- data/examples/rails_example/app/views/books/index.html.erb +0 -25
- data/examples/rails_example/app/views/books/index.json.jbuilder +0 -1
- data/examples/rails_example/app/views/books/new.html.erb +0 -5
- data/examples/rails_example/app/views/books/show.html.erb +0 -4
- data/examples/rails_example/app/views/books/show.json.jbuilder +0 -1
- data/examples/rails_example/app/views/layouts/application.html.erb +0 -14
- data/examples/rails_example/app/views/layouts/mailer.html.erb +0 -13
- data/examples/rails_example/app/views/layouts/mailer.text.erb +0 -1
- data/examples/rails_example/app/views/libraries/_form.html.erb +0 -19
- data/examples/rails_example/app/views/libraries/_library.json.jbuilder +0 -2
- data/examples/rails_example/app/views/libraries/edit.html.erb +0 -6
- data/examples/rails_example/app/views/libraries/index.html.erb +0 -25
- data/examples/rails_example/app/views/libraries/index.json.jbuilder +0 -1
- data/examples/rails_example/app/views/libraries/new.html.erb +0 -5
- data/examples/rails_example/app/views/libraries/show.html.erb +0 -4
- data/examples/rails_example/app/views/libraries/show.json.jbuilder +0 -1
- data/examples/rails_example/bin/bundle +0 -3
- data/examples/rails_example/bin/rails +0 -4
- data/examples/rails_example/bin/rake +0 -4
- data/examples/rails_example/bin/setup +0 -38
- data/examples/rails_example/bin/update +0 -29
- data/examples/rails_example/bin/yarn +0 -11
- data/examples/rails_example/config.ru +0 -5
- data/examples/rails_example/config/application.rb +0 -18
- data/examples/rails_example/config/boot.rb +0 -3
- data/examples/rails_example/config/cable.yml +0 -10
- data/examples/rails_example/config/database.yml +0 -25
- data/examples/rails_example/config/environment.rb +0 -5
- data/examples/rails_example/config/environments/development.rb +0 -54
- data/examples/rails_example/config/environments/production.rb +0 -91
- data/examples/rails_example/config/environments/test.rb +0 -42
- data/examples/rails_example/config/initializers/application_controller_renderer.rb +0 -6
- data/examples/rails_example/config/initializers/assets.rb +0 -14
- data/examples/rails_example/config/initializers/backtrace_silencers.rb +0 -7
- data/examples/rails_example/config/initializers/cookies_serializer.rb +0 -5
- data/examples/rails_example/config/initializers/filter_parameter_logging.rb +0 -4
- data/examples/rails_example/config/initializers/grape.rb +0 -2
- data/examples/rails_example/config/initializers/inflections.rb +0 -16
- data/examples/rails_example/config/initializers/mime_types.rb +0 -4
- data/examples/rails_example/config/initializers/sandboxy.rb +0 -13
- data/examples/rails_example/config/initializers/wrap_parameters.rb +0 -14
- data/examples/rails_example/config/locales/en.yml +0 -33
- data/examples/rails_example/config/puma.rb +0 -56
- data/examples/rails_example/config/routes.rb +0 -13
- data/examples/rails_example/config/secrets.yml +0 -32
- data/examples/rails_example/db/migrate/20170827184048_create_books.rb +0 -9
- data/examples/rails_example/db/migrate/20170827184054_create_authors.rb +0 -9
- data/examples/rails_example/db/migrate/20170827184106_create_libraries.rb +0 -9
- data/examples/rails_example/db/migrate/20170827184304_create_applications.rb +0 -11
- data/examples/rails_example/db/migrate/20170827190815_sandboxy_migration.rb +0 -14
- data/examples/rails_example/db/schema.rb +0 -50
- data/examples/rails_example/db/seeds.rb +0 -7
- data/examples/rails_example/lib/assets/.keep +0 -0
- data/examples/rails_example/lib/tasks/.keep +0 -0
- data/examples/rails_example/package.json +0 -5
- data/examples/rails_example/public/404.html +0 -67
- data/examples/rails_example/public/422.html +0 -67
- data/examples/rails_example/public/500.html +0 -66
- data/examples/rails_example/public/apple-touch-icon-precomposed.png +0 -0
- data/examples/rails_example/public/apple-touch-icon.png +0 -0
- data/examples/rails_example/public/favicon.ico +0 -0
- data/examples/rails_example/public/robots.txt +0 -1
- data/examples/rails_example/test/application_system_test_case.rb +0 -5
- data/examples/rails_example/test/controllers/.keep +0 -0
- data/examples/rails_example/test/controllers/applications_controller_test.rb +0 -48
- data/examples/rails_example/test/controllers/authors_controller_test.rb +0 -48
- data/examples/rails_example/test/controllers/books_controller_test.rb +0 -48
- data/examples/rails_example/test/controllers/libraries_controller_test.rb +0 -48
- data/examples/rails_example/test/controllers/sandbox_controller_test.rb +0 -7
- data/examples/rails_example/test/fixtures/.keep +0 -0
- data/examples/rails_example/test/fixtures/applications.yml +0 -11
- data/examples/rails_example/test/fixtures/authors.yml +0 -11
- data/examples/rails_example/test/fixtures/books.yml +0 -11
- data/examples/rails_example/test/fixtures/files/.keep +0 -0
- data/examples/rails_example/test/fixtures/libraries.yml +0 -11
- data/examples/rails_example/test/helpers/.keep +0 -0
- data/examples/rails_example/test/integration/.keep +0 -0
- data/examples/rails_example/test/mailers/.keep +0 -0
- data/examples/rails_example/test/models/.keep +0 -0
- data/examples/rails_example/test/models/application_test.rb +0 -7
- data/examples/rails_example/test/models/author_test.rb +0 -7
- data/examples/rails_example/test/models/book_test.rb +0 -7
- data/examples/rails_example/test/models/library_test.rb +0 -7
- data/examples/rails_example/test/system/.keep +0 -0
- data/examples/rails_example/test/system/applications_test.rb +0 -9
- data/examples/rails_example/test/system/authors_test.rb +0 -9
- data/examples/rails_example/test/system/books_test.rb +0 -9
- data/examples/rails_example/test/system/libraries_test.rb +0 -9
- data/examples/rails_example/test/test_helper.rb +0 -9
- data/examples/rails_example/tmp/.keep +0 -0
- data/examples/rails_example/vendor/.keep +0 -0
- data/init.rb +0 -1
- data/lib/generators/templates/model.rb +0 -7
- data/sandboxy.gemspec +0 -28
- data/test/dummy30/Gemfile +0 -1
- data/test/dummy30/Rakefile +0 -4
- data/test/dummy30/app/models/application_record.rb +0 -3
- data/test/dummy30/app/models/shared_sandbox.rb +0 -4
- data/test/dummy30/app/models/some.rb +0 -3
- data/test/dummy30/app/models/user.rb +0 -3
- data/test/dummy30/config.ru +0 -2
- data/test/dummy30/config/application.rb +0 -14
- data/test/dummy30/config/boot.rb +0 -10
- data/test/dummy30/config/database.yml +0 -6
- data/test/dummy30/config/environment.rb +0 -5
- data/test/dummy30/config/environments/development.rb +0 -7
- data/test/dummy30/config/environments/test.rb +0 -6
- data/test/dummy30/config/initializers/sandboxy.rb +0 -13
- data/test/dummy30/config/initializers/secret_token.rb +0 -1
- data/test/dummy30/config/initializers/session_store.rb +0 -1
- data/test/dummy30/config/locales/en.yml +0 -2
- data/test/dummy30/config/routes.rb +0 -2
- data/test/dummy30/config/sandboxy.yml +0 -1
- data/test/factories/somes.rb +0 -17
- data/test/factories/users.rb +0 -5
- data/test/sandbox_test.rb +0 -51
- data/test/sandboxed_test.rb +0 -58
- data/test/schema.rb +0 -18
- data/test/test_helper.rb +0 -20
@@ -1,7 +0,0 @@
|
|
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!
|
@@ -1,16 +0,0 @@
|
|
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
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Sandboxy.configure do |config|
|
2
|
-
|
3
|
-
# Set your environment default: Must be either `live` or `sandbox`.
|
4
|
-
# This is the environment that your app boots with.
|
5
|
-
# By default it gets refreshed with every new request to your server.
|
6
|
-
# config.environment = 'live'
|
7
|
-
|
8
|
-
# Specify whether to retain your current app environment on new requests.
|
9
|
-
# If set to true, your app will only load your environment default when starting.
|
10
|
-
# Every additional switch of your environment at runtime will then not be automatically resolved to your environment default on a new request.
|
11
|
-
# config.retain_environment = false
|
12
|
-
|
13
|
-
end
|
@@ -1,14 +0,0 @@
|
|
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]
|
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
|
@@ -1,33 +0,0 @@
|
|
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
|
-
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
-
# the default I18n backend:
|
21
|
-
#
|
22
|
-
# true, false, on, off, yes, no
|
23
|
-
#
|
24
|
-
# Instead, surround them with single quotes.
|
25
|
-
#
|
26
|
-
# en:
|
27
|
-
# 'true': 'foo'
|
28
|
-
#
|
29
|
-
# To learn more, please read the Rails Internationalization guide
|
30
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
31
|
-
|
32
|
-
en:
|
33
|
-
hello: "Hello world"
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
-
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
-
# Any libraries that use thread pools should be configured to match
|
4
|
-
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
-
# and maximum; this matches the default thread size of Active Record.
|
6
|
-
#
|
7
|
-
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
-
threads threads_count, threads_count
|
9
|
-
|
10
|
-
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
|
-
#
|
12
|
-
port ENV.fetch("PORT") { 3000 }
|
13
|
-
|
14
|
-
# Specifies the `environment` that Puma will run in.
|
15
|
-
#
|
16
|
-
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
|
-
|
18
|
-
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
-
# Workers are forked webserver processes. If using threads and workers together
|
20
|
-
# the concurrency of the application would be max `threads` * `workers`.
|
21
|
-
# Workers do not work on JRuby or Windows (both of which do not support
|
22
|
-
# processes).
|
23
|
-
#
|
24
|
-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
25
|
-
|
26
|
-
# Use the `preload_app!` method when specifying a `workers` number.
|
27
|
-
# This directive tells Puma to first boot the application and load code
|
28
|
-
# before forking the application. This takes advantage of Copy On Write
|
29
|
-
# process behavior so workers use less memory. If you use this option
|
30
|
-
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
31
|
-
# block.
|
32
|
-
#
|
33
|
-
# preload_app!
|
34
|
-
|
35
|
-
# If you are preloading your application and using Active Record, it's
|
36
|
-
# recommended that you close any connections to the database before workers
|
37
|
-
# are forked to prevent connection leakage.
|
38
|
-
#
|
39
|
-
# before_fork do
|
40
|
-
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
41
|
-
# end
|
42
|
-
|
43
|
-
# The code in the `on_worker_boot` will be called if you are using
|
44
|
-
# clustered mode by specifying a number of `workers`. After each worker
|
45
|
-
# process is booted, this block will be run. If you are using the `preload_app!`
|
46
|
-
# option, you will want to use this block to reconnect to any threads
|
47
|
-
# or connections that may have been created at application boot, as Ruby
|
48
|
-
# cannot share connections between processes.
|
49
|
-
#
|
50
|
-
# on_worker_boot do
|
51
|
-
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
|
55
|
-
# Allow puma to be restarted by `rails restart` command.
|
56
|
-
plugin :tmp_restart
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Rails.application.routes.draw do
|
2
|
-
mount Books::API => '/api'
|
3
|
-
|
4
|
-
resources :applications
|
5
|
-
resources :libraries
|
6
|
-
resources :authors
|
7
|
-
resources :books
|
8
|
-
|
9
|
-
root 'libraries#index'
|
10
|
-
|
11
|
-
get 'switch-environments', to: 'sandbox#edit'
|
12
|
-
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
13
|
-
end
|
@@ -1,32 +0,0 @@
|
|
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 `rails secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
# Shared secrets are available across all environments.
|
14
|
-
|
15
|
-
# shared:
|
16
|
-
# api_key: a1B2c3D4e5F6
|
17
|
-
|
18
|
-
# Environmental secrets are only available for that specific environment.
|
19
|
-
|
20
|
-
development:
|
21
|
-
secret_key_base: def380439341bd8d1fe444db27e4faa1626b39097220af40dd6fb6e99fff10cec00d782dda094b4ebda0f45fa9578d42110534d2e35b2240f418586e44aa12bf
|
22
|
-
|
23
|
-
test:
|
24
|
-
secret_key_base: 269bf1f079ced783a42ff334f462b938b9d704748377e180023443a761c513437c06b6c7958cb6d19bc1826ee9ced849f295cb47a6c586a85be13a67a3d9101a
|
25
|
-
|
26
|
-
# Do not keep production secrets in the unencrypted secrets file.
|
27
|
-
# Instead, either read values from the environment.
|
28
|
-
# Or, use `bin/rails secrets:setup` to configure encrypted secrets
|
29
|
-
# and move the `production:` environment over there.
|
30
|
-
|
31
|
-
production:
|
32
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class SandboxyMigration < ActiveRecord::Migration[5.1]
|
2
|
-
def self.up
|
3
|
-
create_table :sandboxy, force: true do |t|
|
4
|
-
t.references :sandboxed, polymorphic: true, null: false
|
5
|
-
t.timestamps
|
6
|
-
end
|
7
|
-
|
8
|
-
add_index :sandboxy, ['sandboxed_id', 'sandboxed_type'], name: 'sandboxy_sandboxed'
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.down
|
12
|
-
drop_table :sandboxy
|
13
|
-
end
|
14
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
-
#
|
5
|
-
# Note that this schema.rb definition is the authoritative source for your
|
6
|
-
# database schema. If you need to create the application database on another
|
7
|
-
# system, you should be using db:schema:load, not running all the migrations
|
8
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
-
#
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
12
|
-
|
13
|
-
ActiveRecord::Schema.define(version: 20170827190815) do
|
14
|
-
|
15
|
-
create_table "applications", force: :cascade do |t|
|
16
|
-
t.string "name", null: false
|
17
|
-
t.string "access_token", null: false
|
18
|
-
t.string "sandbox_access_token", null: false
|
19
|
-
t.datetime "created_at", null: false
|
20
|
-
t.datetime "updated_at", null: false
|
21
|
-
end
|
22
|
-
|
23
|
-
create_table "authors", force: :cascade do |t|
|
24
|
-
t.string "name", null: false
|
25
|
-
t.datetime "created_at", null: false
|
26
|
-
t.datetime "updated_at", null: false
|
27
|
-
end
|
28
|
-
|
29
|
-
create_table "books", force: :cascade do |t|
|
30
|
-
t.string "name", null: false
|
31
|
-
t.datetime "created_at", null: false
|
32
|
-
t.datetime "updated_at", null: false
|
33
|
-
end
|
34
|
-
|
35
|
-
create_table "libraries", force: :cascade do |t|
|
36
|
-
t.string "name", null: false
|
37
|
-
t.datetime "created_at", null: false
|
38
|
-
t.datetime "updated_at", null: false
|
39
|
-
end
|
40
|
-
|
41
|
-
create_table "sandboxy", force: :cascade do |t|
|
42
|
-
t.string "sandboxed_type", null: false
|
43
|
-
t.integer "sandboxed_id", null: false
|
44
|
-
t.datetime "created_at", null: false
|
45
|
-
t.datetime "updated_at", null: false
|
46
|
-
t.index ["sandboxed_id", "sandboxed_type"], name: "sandboxy_sandboxed"
|
47
|
-
t.index ["sandboxed_type", "sandboxed_id"], name: "index_sandboxy_on_sandboxed_type_and_sandboxed_id"
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
@@ -1,7 +0,0 @@
|
|
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 rails db:seed command (or created alongside the database with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
7
|
-
# Character.create(name: 'Luke', movie: movies.first)
|
File without changes
|
File without changes
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<style>
|
7
|
-
.rails-default-error-page {
|
8
|
-
background-color: #EFEFEF;
|
9
|
-
color: #2E2F30;
|
10
|
-
text-align: center;
|
11
|
-
font-family: arial, sans-serif;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
.rails-default-error-page div.dialog {
|
16
|
-
width: 95%;
|
17
|
-
max-width: 33em;
|
18
|
-
margin: 4em auto 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
.rails-default-error-page div.dialog > div {
|
22
|
-
border: 1px solid #CCC;
|
23
|
-
border-right-color: #999;
|
24
|
-
border-left-color: #999;
|
25
|
-
border-bottom-color: #BBB;
|
26
|
-
border-top: #B00100 solid 4px;
|
27
|
-
border-top-left-radius: 9px;
|
28
|
-
border-top-right-radius: 9px;
|
29
|
-
background-color: white;
|
30
|
-
padding: 7px 12% 0;
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
-
}
|
33
|
-
|
34
|
-
.rails-default-error-page h1 {
|
35
|
-
font-size: 100%;
|
36
|
-
color: #730E15;
|
37
|
-
line-height: 1.5em;
|
38
|
-
}
|
39
|
-
|
40
|
-
.rails-default-error-page div.dialog > p {
|
41
|
-
margin: 0 0 1em;
|
42
|
-
padding: 1em;
|
43
|
-
background-color: #F7F7F7;
|
44
|
-
border: 1px solid #CCC;
|
45
|
-
border-right-color: #999;
|
46
|
-
border-left-color: #999;
|
47
|
-
border-bottom-color: #999;
|
48
|
-
border-bottom-left-radius: 4px;
|
49
|
-
border-bottom-right-radius: 4px;
|
50
|
-
border-top-color: #DADADA;
|
51
|
-
color: #666;
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
-
}
|
54
|
-
</style>
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body class="rails-default-error-page">
|
58
|
-
<!-- This file lives in public/404.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
-
</div>
|
64
|
-
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
</div>
|
66
|
-
</body>
|
67
|
-
</html>
|
@@ -1,67 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<style>
|
7
|
-
.rails-default-error-page {
|
8
|
-
background-color: #EFEFEF;
|
9
|
-
color: #2E2F30;
|
10
|
-
text-align: center;
|
11
|
-
font-family: arial, sans-serif;
|
12
|
-
margin: 0;
|
13
|
-
}
|
14
|
-
|
15
|
-
.rails-default-error-page div.dialog {
|
16
|
-
width: 95%;
|
17
|
-
max-width: 33em;
|
18
|
-
margin: 4em auto 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
.rails-default-error-page div.dialog > div {
|
22
|
-
border: 1px solid #CCC;
|
23
|
-
border-right-color: #999;
|
24
|
-
border-left-color: #999;
|
25
|
-
border-bottom-color: #BBB;
|
26
|
-
border-top: #B00100 solid 4px;
|
27
|
-
border-top-left-radius: 9px;
|
28
|
-
border-top-right-radius: 9px;
|
29
|
-
background-color: white;
|
30
|
-
padding: 7px 12% 0;
|
31
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
-
}
|
33
|
-
|
34
|
-
.rails-default-error-page h1 {
|
35
|
-
font-size: 100%;
|
36
|
-
color: #730E15;
|
37
|
-
line-height: 1.5em;
|
38
|
-
}
|
39
|
-
|
40
|
-
.rails-default-error-page div.dialog > p {
|
41
|
-
margin: 0 0 1em;
|
42
|
-
padding: 1em;
|
43
|
-
background-color: #F7F7F7;
|
44
|
-
border: 1px solid #CCC;
|
45
|
-
border-right-color: #999;
|
46
|
-
border-left-color: #999;
|
47
|
-
border-bottom-color: #999;
|
48
|
-
border-bottom-left-radius: 4px;
|
49
|
-
border-bottom-right-radius: 4px;
|
50
|
-
border-top-color: #DADADA;
|
51
|
-
color: #666;
|
52
|
-
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
-
}
|
54
|
-
</style>
|
55
|
-
</head>
|
56
|
-
|
57
|
-
<body class="rails-default-error-page">
|
58
|
-
<!-- This file lives in public/422.html -->
|
59
|
-
<div class="dialog">
|
60
|
-
<div>
|
61
|
-
<h1>The change you wanted was rejected.</h1>
|
62
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
-
</div>
|
64
|
-
<p>If you are the application owner check the logs for more information.</p>
|
65
|
-
</div>
|
66
|
-
</body>
|
67
|
-
</html>
|