table_renamable 0.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -32
- data/lib/table_renamable/connection_adapters/mysql2_adapter.rb +29 -21
- data/lib/table_renamable/connection_adapters.rb +2 -8
- data/lib/table_renamable/model.rb +3 -5
- data/lib/table_renamable/version.rb +1 -1
- data/lib/table_renamable.rb +15 -6
- data/spec/dummy/README +243 -0
- data/spec/dummy/Rakefile +6 -3
- data/spec/dummy/app/controllers/application_controller.rb +8 -1
- data/spec/dummy/app/helpers/application_helper.rb +1 -0
- data/spec/dummy/app/models/post.rb +3 -1
- data/spec/dummy/config/boot.rb +111 -7
- data/spec/dummy/config/database.yml +3 -3
- data/spec/dummy/config/environment.rb +40 -4
- data/spec/dummy/config/environments/development.rb +13 -33
- data/spec/dummy/config/environments/production.rb +20 -59
- data/spec/dummy/config/environments/test.rb +28 -37
- data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -2
- data/spec/dummy/config/initializers/{secret_token.rb → cookie_verification_secret.rb} +2 -2
- data/spec/dummy/config/initializers/inflections.rb +1 -6
- data/spec/dummy/config/initializers/new_rails_defaults.rb +21 -0
- data/spec/dummy/config/initializers/session_store.rb +10 -3
- data/spec/dummy/config/locales/en.yml +2 -2
- data/spec/dummy/config/routes.rb +41 -2
- data/spec/dummy/db/seeds.rb +7 -0
- data/spec/dummy/doc/README_FOR_APP +2 -0
- data/spec/dummy/log/production.log +0 -0
- data/spec/dummy/log/server.log +0 -0
- data/spec/dummy/log/test.log +100 -1158
- data/spec/dummy/public/404.html +19 -15
- data/spec/dummy/public/422.html +19 -15
- data/spec/dummy/public/500.html +19 -14
- data/spec/dummy/public/images/rails.png +0 -0
- data/spec/dummy/public/index.html +275 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +963 -0
- data/spec/dummy/public/javascripts/dragdrop.js +973 -0
- data/spec/dummy/public/javascripts/effects.js +1128 -0
- data/spec/dummy/public/javascripts/prototype.js +4320 -0
- data/spec/dummy/public/robots.txt +5 -0
- data/spec/dummy/script/about +4 -0
- data/spec/dummy/script/console +3 -0
- data/spec/dummy/script/dbconsole +3 -0
- data/spec/dummy/script/destroy +3 -0
- data/spec/dummy/script/generate +3 -0
- data/spec/dummy/script/performance/benchmarker +3 -0
- data/spec/dummy/script/performance/profiler +3 -0
- data/spec/dummy/script/plugin +3 -0
- data/spec/dummy/script/runner +3 -0
- data/spec/dummy/script/server +3 -0
- data/spec/dummy/test/performance/browsing_test.rb +9 -0
- data/spec/dummy/test/test_helper.rb +38 -0
- data/spec/spec_helper.rb +3 -29
- metadata +83 -37
- checksums.yaml +0 -7
- data/lib/table_renamable/connection_adapters/sqlite3_adapter.rb +0 -62
- data/lib/table_renamable/engine.rb +0 -22
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config/application.rb +0 -65
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/script/rails +0 -6
- /data/spec/dummy/{db/test.sqlite3 → log/development.log} +0 -0
@@ -1,37 +1,17 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
# In the development environment your application's code is reloaded on
|
4
|
+
# every request. This slows down response time but is perfect for development
|
5
|
+
# since you don't have to restart the webserver when you make code changes.
|
6
|
+
config.cache_classes = false
|
8
7
|
|
9
|
-
|
10
|
-
|
8
|
+
# Log error messages when you accidentally call methods on nil.
|
9
|
+
config.whiny_nils = true
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
# Show full error reports and disable caching
|
12
|
+
config.action_controller.consider_all_requests_local = true
|
13
|
+
config.action_view.debug_rjs = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
# Print deprecation notices to the Rails logger
|
20
|
-
config.active_support.deprecation = :log
|
21
|
-
|
22
|
-
# Only use best-standards-support built into browsers
|
23
|
-
config.action_dispatch.best_standards_support = :builtin
|
24
|
-
|
25
|
-
# Raise exception on mass assignment protection for Active Record models
|
26
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
-
|
28
|
-
# Log the query plan for queries taking more than this (works
|
29
|
-
# with SQLite, MySQL, and PostgreSQL)
|
30
|
-
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
-
|
32
|
-
# Do not compress assets
|
33
|
-
config.assets.compress = false
|
34
|
-
|
35
|
-
# Expands the lines which load the assets
|
36
|
-
config.assets.debug = true
|
37
|
-
end
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
@@ -1,67 +1,28 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
# The production environment is meant for finished, "live" apps.
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.action_controller.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
config.action_view.cache_template_loading = true
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
# See everything in the log (default is :info)
|
13
|
+
# config.log_level = :debug
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
# Use a different logger for distributed setups
|
16
|
+
# config.logger = SyslogLogger.new
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
# Use a different cache store in production
|
19
|
+
# config.cache_store = :mem_cache_store
|
19
20
|
|
20
|
-
|
21
|
-
|
21
|
+
# Enable serving of images, stylesheets, and javascripts from an asset server
|
22
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
22
23
|
|
23
|
-
|
24
|
-
|
24
|
+
# Disable delivery errors, bad email addresses will be ignored
|
25
|
+
# config.action_mailer.raise_delivery_errors = false
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
-
|
30
|
-
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
-
# config.force_ssl = true
|
32
|
-
|
33
|
-
# See everything in the log (default is :info)
|
34
|
-
# config.log_level = :debug
|
35
|
-
|
36
|
-
# Prepend all log lines with the following tags
|
37
|
-
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
-
|
39
|
-
# Use a different logger for distributed setups
|
40
|
-
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
-
|
42
|
-
# Use a different cache store in production
|
43
|
-
# config.cache_store = :mem_cache_store
|
44
|
-
|
45
|
-
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
-
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
-
|
48
|
-
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
-
# config.assets.precompile += %w( search.js )
|
50
|
-
|
51
|
-
# Disable delivery errors, bad email addresses will be ignored
|
52
|
-
# config.action_mailer.raise_delivery_errors = false
|
53
|
-
|
54
|
-
# Enable threaded mode
|
55
|
-
# config.threadsafe!
|
56
|
-
|
57
|
-
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
-
# the I18n.default_locale when a translation can not be found)
|
59
|
-
config.i18n.fallbacks = true
|
60
|
-
|
61
|
-
# Send deprecation notices to registered listeners
|
62
|
-
config.active_support.deprecation = :notify
|
63
|
-
|
64
|
-
# Log the query plan for queries taking more than this (works
|
65
|
-
# with SQLite, MySQL, and PostgreSQL)
|
66
|
-
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
-
end
|
27
|
+
# Enable threaded mode
|
28
|
+
# config.threadsafe!
|
@@ -1,37 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
# ActionMailer::Base.deliveries array.
|
30
|
-
config.action_mailer.delivery_method = :test
|
31
|
-
|
32
|
-
# Raise exception on mass assignment protection for Active Record models
|
33
|
-
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
-
|
35
|
-
# Print deprecation notices to the stderr
|
36
|
-
config.active_support.deprecation = :stderr
|
37
|
-
end
|
1
|
+
# Settings specified here will take precedence over those in config/environment.rb
|
2
|
+
|
3
|
+
# The test environment is used exclusively to run your application's
|
4
|
+
# test suite. You never need to work with it otherwise. Remember that
|
5
|
+
# your test database is "scratch space" for the test suite and is wiped
|
6
|
+
# and recreated between test runs. Don't rely on the data there!
|
7
|
+
config.cache_classes = true
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.action_controller.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
config.action_view.cache_template_loading = true
|
16
|
+
|
17
|
+
# Disable request forgery protection in test environment
|
18
|
+
config.action_controller.allow_forgery_protection = false
|
19
|
+
|
20
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
21
|
+
# The :test delivery method accumulates sent emails in the
|
22
|
+
# ActionMailer::Base.deliveries array.
|
23
|
+
config.action_mailer.delivery_method = :test
|
24
|
+
|
25
|
+
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
26
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
27
|
+
# like if you have constraints or database-specific column types
|
28
|
+
# config.active_record.schema_format = :sql
|
@@ -3,5 +3,5 @@
|
|
3
3
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
4
|
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
5
|
|
6
|
-
# You can also remove all the silencers if you're trying
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
6
|
+
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -2,6 +2,6 @@
|
|
2
2
|
|
3
3
|
# Your secret key for verifying the integrity of signed cookies.
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
7
|
+
ActionController::Base.cookie_verifier_secret = '21ef0b887bfcff2fd4895a9c9399346165e0c2e0e4e897eef388381d250b45d58bf173d66dfdd6e9281d8783c9c09260bc9e2615fb5872bcb13789c475e6a5d1';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Add new inflection rules using the following format
|
3
|
+
# Add new inflection rules using the following format
|
4
4
|
# (all these examples are active by default):
|
5
5
|
# ActiveSupport::Inflector.inflections do |inflect|
|
6
6
|
# inflect.plural /^(ox)$/i, '\1en'
|
@@ -8,8 +8,3 @@
|
|
8
8
|
# inflect.irregular 'person', 'people'
|
9
9
|
# inflect.uncountable %w( fish sheep )
|
10
10
|
# end
|
11
|
-
#
|
12
|
-
# These inflection rules are supported but not enabled by default:
|
13
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
-
# inflect.acronym 'RESTful'
|
15
|
-
# end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# These settings change the behavior of Rails 2 apps and will be defaults
|
4
|
+
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
5
|
+
|
6
|
+
if defined?(ActiveRecord)
|
7
|
+
# Include Active Record class name as root for JSON serialized output.
|
8
|
+
ActiveRecord::Base.include_root_in_json = true
|
9
|
+
|
10
|
+
# Store the full class name (including module namespace) in STI type column.
|
11
|
+
ActiveRecord::Base.store_full_sti_class = true
|
12
|
+
end
|
13
|
+
|
14
|
+
ActionController::Routing.generate_best_match = false
|
15
|
+
|
16
|
+
# Use ISO 8601 format for JSON serialized times and dates.
|
17
|
+
ActiveSupport.use_standard_json_time_format = true
|
18
|
+
|
19
|
+
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
20
|
+
# if you're including raw json in an HTML page.
|
21
|
+
ActiveSupport.escape_html_entities_in_json = false
|
@@ -1,8 +1,15 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
|
3
|
+
# Your secret key for verifying cookie session data integrity.
|
4
|
+
# If you change this key, all old sessions will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
ActionController::Base.session = {
|
8
|
+
:key => '_dummy_session',
|
9
|
+
:secret => '1081d6b765043bae662204dc1961c01fe6c150c901e69522d07527c05dc99bf2897a37850efed536530f5a60ef5718c536e21913665f5606e91ca1170fe406ce'
|
10
|
+
}
|
4
11
|
|
5
12
|
# Use the database for sessions instead of the cookie-based default,
|
6
13
|
# which shouldn't be used to store highly confidential information
|
7
|
-
# (create the session table with "
|
8
|
-
#
|
14
|
+
# (create the session table with "rake db:sessions:create")
|
15
|
+
# ActionController::Base.session_store = :active_record_store
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See
|
2
|
+
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
3
|
|
4
4
|
en:
|
5
|
-
hello: "Hello world"
|
5
|
+
hello: "Hello world"
|
data/spec/dummy/config/routes.rb
CHANGED
@@ -1,4 +1,43 @@
|
|
1
|
-
|
1
|
+
ActionController::Routing::Routes.draw do |map|
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
2
3
|
|
3
|
-
|
4
|
+
# Sample of regular route:
|
5
|
+
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
6
|
+
# Keep in mind you can assign values other than :controller and :action
|
7
|
+
|
8
|
+
# Sample of named route:
|
9
|
+
# map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
|
10
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
11
|
+
|
12
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
13
|
+
# map.resources :products
|
14
|
+
|
15
|
+
# Sample resource route with options:
|
16
|
+
# map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get }
|
17
|
+
|
18
|
+
# Sample resource route with sub-resources:
|
19
|
+
# map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller
|
20
|
+
|
21
|
+
# Sample resource route with more complex sub-resources
|
22
|
+
# map.resources :products do |products|
|
23
|
+
# products.resources :comments
|
24
|
+
# products.resources :sales, :collection => { :recent => :get }
|
25
|
+
# end
|
26
|
+
|
27
|
+
# Sample resource route within a namespace:
|
28
|
+
# map.namespace :admin do |admin|
|
29
|
+
# # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
|
30
|
+
# admin.resources :products
|
31
|
+
# end
|
32
|
+
|
33
|
+
# You can have the root of your site routed with map.root -- just remember to delete public/index.html.
|
34
|
+
# map.root :controller => "welcome"
|
35
|
+
|
36
|
+
# See how all your routes lay out with "rake routes"
|
37
|
+
|
38
|
+
# Install the default routes as the lowest priority.
|
39
|
+
# Note: These default routes make all actions in every controller accessible via GET requests. You should
|
40
|
+
# consider removing or commenting them out if you're using named routes and resources.
|
41
|
+
map.connect ':controller/:action/:id'
|
42
|
+
map.connect ':controller/:action/:id.:format'
|
4
43
|
end
|
@@ -0,0 +1,7 @@
|
|
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
|
+
# Major.create(:name => 'Daley', :city => cities.first)
|
File without changes
|
File without changes
|