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.
Files changed (66) hide show
  1. data/Rakefile +0 -32
  2. data/lib/table_renamable/connection_adapters/mysql2_adapter.rb +29 -21
  3. data/lib/table_renamable/connection_adapters.rb +2 -8
  4. data/lib/table_renamable/model.rb +3 -5
  5. data/lib/table_renamable/version.rb +1 -1
  6. data/lib/table_renamable.rb +15 -6
  7. data/spec/dummy/README +243 -0
  8. data/spec/dummy/Rakefile +6 -3
  9. data/spec/dummy/app/controllers/application_controller.rb +8 -1
  10. data/spec/dummy/app/helpers/application_helper.rb +1 -0
  11. data/spec/dummy/app/models/post.rb +3 -1
  12. data/spec/dummy/config/boot.rb +111 -7
  13. data/spec/dummy/config/database.yml +3 -3
  14. data/spec/dummy/config/environment.rb +40 -4
  15. data/spec/dummy/config/environments/development.rb +13 -33
  16. data/spec/dummy/config/environments/production.rb +20 -59
  17. data/spec/dummy/config/environments/test.rb +28 -37
  18. data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -2
  19. data/spec/dummy/config/initializers/{secret_token.rb → cookie_verification_secret.rb} +2 -2
  20. data/spec/dummy/config/initializers/inflections.rb +1 -6
  21. data/spec/dummy/config/initializers/new_rails_defaults.rb +21 -0
  22. data/spec/dummy/config/initializers/session_store.rb +10 -3
  23. data/spec/dummy/config/locales/en.yml +2 -2
  24. data/spec/dummy/config/routes.rb +41 -2
  25. data/spec/dummy/db/seeds.rb +7 -0
  26. data/spec/dummy/doc/README_FOR_APP +2 -0
  27. data/spec/dummy/log/production.log +0 -0
  28. data/spec/dummy/log/server.log +0 -0
  29. data/spec/dummy/log/test.log +100 -1158
  30. data/spec/dummy/public/404.html +19 -15
  31. data/spec/dummy/public/422.html +19 -15
  32. data/spec/dummy/public/500.html +19 -14
  33. data/spec/dummy/public/images/rails.png +0 -0
  34. data/spec/dummy/public/index.html +275 -0
  35. data/spec/dummy/public/javascripts/application.js +2 -0
  36. data/spec/dummy/public/javascripts/controls.js +963 -0
  37. data/spec/dummy/public/javascripts/dragdrop.js +973 -0
  38. data/spec/dummy/public/javascripts/effects.js +1128 -0
  39. data/spec/dummy/public/javascripts/prototype.js +4320 -0
  40. data/spec/dummy/public/robots.txt +5 -0
  41. data/spec/dummy/script/about +4 -0
  42. data/spec/dummy/script/console +3 -0
  43. data/spec/dummy/script/dbconsole +3 -0
  44. data/spec/dummy/script/destroy +3 -0
  45. data/spec/dummy/script/generate +3 -0
  46. data/spec/dummy/script/performance/benchmarker +3 -0
  47. data/spec/dummy/script/performance/profiler +3 -0
  48. data/spec/dummy/script/plugin +3 -0
  49. data/spec/dummy/script/runner +3 -0
  50. data/spec/dummy/script/server +3 -0
  51. data/spec/dummy/test/performance/browsing_test.rb +9 -0
  52. data/spec/dummy/test/test_helper.rb +38 -0
  53. data/spec/spec_helper.rb +3 -29
  54. metadata +83 -37
  55. checksums.yaml +0 -7
  56. data/lib/table_renamable/connection_adapters/sqlite3_adapter.rb +0 -62
  57. data/lib/table_renamable/engine.rb +0 -22
  58. data/spec/dummy/README.rdoc +0 -261
  59. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  60. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  61. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  62. data/spec/dummy/config/application.rb +0 -65
  63. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  64. data/spec/dummy/config.ru +0 -4
  65. data/spec/dummy/script/rails +0 -6
  66. /data/spec/dummy/{db/test.sqlite3 → log/development.log} +0 -0
@@ -1,37 +1,17 @@
1
- Dummy::Application.configure do
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
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
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
- # Log error messages when you accidentally call methods on nil.
10
- config.whiny_nils = true
8
+ # Log error messages when you accidentally call methods on nil.
9
+ config.whiny_nils = true
11
10
 
12
- # Show full error reports and disable caching
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
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
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
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
- Dummy::Application.configure do
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
- # Code is not reloaded between requests
5
- config.cache_classes = true
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
- # Full error reports are disabled and caching is turned on
8
- config.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
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
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
12
+ # See everything in the log (default is :info)
13
+ # config.log_level = :debug
13
14
 
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
15
+ # Use a different logger for distributed setups
16
+ # config.logger = SyslogLogger.new
16
17
 
17
- # Don't fallback to assets pipeline if a precompiled asset is missed
18
- config.assets.compile = false
18
+ # Use a different cache store in production
19
+ # config.cache_store = :mem_cache_store
19
20
 
20
- # Generate digests for assets URLs
21
- config.assets.digest = true
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
- # Defaults to nil and saved in location specified by config.assets.prefix
24
- # config.assets.manifest = YOUR_PATH
24
+ # Disable delivery errors, bad email addresses will be ignored
25
+ # config.action_mailer.raise_delivery_errors = false
25
26
 
26
- # Specifies the header that your server uses for sending files
27
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
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
- Dummy::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Configure static asset server for tests with Cache-Control for performance
11
- config.serve_static_assets = true
12
- config.static_cache_control = "public, max-age=3600"
13
-
14
- # Log error messages when you accidentally call methods on nil
15
- config.whiny_nils = true
16
-
17
- # Show full error reports and disable caching
18
- config.consider_all_requests_local = true
19
- config.action_controller.perform_caching = false
20
-
21
- # Raise exceptions instead of rendering exception templates
22
- config.action_dispatch.show_exceptions = false
23
-
24
- # Disable request forgery protection in test environment
25
- config.action_controller.allow_forgery_protection = false
26
-
27
- # Tell Action Mailer not to deliver emails to the real world.
28
- # The :test delivery method accumulates sent emails in the
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 to debug a problem that might stem from framework code.
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
- Dummy::Application.config.secret_token = '379c79fbed5cfdff4bdbe7b0ef552173f64e75d498efba43c61a31e69e551f9b167b141f5627825a8921be7cda634678bb2e89f712f0a8cc9bfaba0fe4bdac8e'
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
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
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 "rails generate session_migration")
8
- # Dummy::Application.config.session_store :active_record_store
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 https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
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"
@@ -1,4 +1,43 @@
1
- Rails.application.routes.draw do
1
+ ActionController::Routing::Routes.draw do |map|
2
+ # The priority is based upon order of creation: first created -> highest priority.
2
3
 
3
- mount TableRenamable::Engine => "/table_renamable"
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)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
File without changes
File without changes