systematize 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +69 -0
- data/lib/systematize/railtie.rb +11 -0
- data/lib/systematize/runner.rb +30 -0
- data/lib/systematize/version.rb +3 -0
- data/lib/systematize.rb +4 -0
- data/lib/tasks/migrations.rake +27 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/support/db/data/20161117152453_mark_deleted_posts_with_timestamp.rb +15 -0
- data/spec/support/db/migrate/20161117151622_create_posts_table.rb +12 -0
- data/spec/support/db/migrate/20161117152138_add_deleted_at_timestamp.rb +9 -0
- data/spec/support/db/migrate/20161117152655_remove_deleted_column.rb +9 -0
- data/spec/systematize/runner_spec.rb +60 -0
- data/spec/testapp/Gemfile +41 -0
- data/spec/testapp/Gemfile.lock +128 -0
- data/spec/testapp/README.rdoc +261 -0
- data/spec/testapp/Rakefile +7 -0
- data/spec/testapp/app/assets/images/rails.png +0 -0
- data/spec/testapp/app/assets/javascripts/application.js +15 -0
- data/spec/testapp/app/assets/stylesheets/application.css +13 -0
- data/spec/testapp/app/controllers/application_controller.rb +3 -0
- data/spec/testapp/app/helpers/application_helper.rb +2 -0
- data/spec/testapp/app/models/post.rb +4 -0
- data/spec/testapp/app/views/layouts/application.html.erb +14 -0
- data/spec/testapp/config/application.rb +59 -0
- data/spec/testapp/config/boot.rb +6 -0
- data/spec/testapp/config/database.yml +25 -0
- data/spec/testapp/config/environment.rb +5 -0
- data/spec/testapp/config/environments/development.rb +37 -0
- data/spec/testapp/config/environments/production.rb +67 -0
- data/spec/testapp/config/environments/test.rb +37 -0
- data/spec/testapp/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/testapp/config/initializers/inflections.rb +15 -0
- data/spec/testapp/config/initializers/mime_types.rb +5 -0
- data/spec/testapp/config/initializers/secret_token.rb +7 -0
- data/spec/testapp/config/initializers/session_store.rb +8 -0
- data/spec/testapp/config/initializers/wrap_parameters.rb +14 -0
- data/spec/testapp/config/locales/en.yml +5 -0
- data/spec/testapp/config/routes.rb +58 -0
- data/spec/testapp/config.ru +4 -0
- data/spec/testapp/db/data/20161117152453_mark_deleted_posts_with_timestamp.rb +15 -0
- data/spec/testapp/db/development.sqlite3 +0 -0
- data/spec/testapp/db/migrate/20161117151622_create_posts_table.rb +12 -0
- data/spec/testapp/db/migrate/20161117152138_add_deleted_at_timestamp.rb +9 -0
- data/spec/testapp/db/migrate/20161117152655_remove_deleted_column.rb +9 -0
- data/spec/testapp/db/seeds.rb +7 -0
- data/spec/testapp/db/test.sqlite3 +0 -0
- data/spec/testapp/doc/README_FOR_APP +2 -0
- data/spec/testapp/log/development.log +953 -0
- data/spec/testapp/public/404.html +26 -0
- data/spec/testapp/public/422.html +26 -0
- data/spec/testapp/public/500.html +25 -0
- data/spec/testapp/public/favicon.ico +0 -0
- data/spec/testapp/public/index.html +241 -0
- data/spec/testapp/public/robots.txt +5 -0
- data/spec/testapp/script/rails +6 -0
- data/spec/testapp/test/performance/browsing_test.rb +12 -0
- data/spec/testapp/test/test_helper.rb +13 -0
- metadata +209 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
Testapp::Application.routes.draw do
|
2
|
+
# The priority is based upon order of creation:
|
3
|
+
# first created -> highest priority.
|
4
|
+
|
5
|
+
# Sample of regular route:
|
6
|
+
# match 'products/:id' => 'catalog#view'
|
7
|
+
# Keep in mind you can assign values other than :controller and :action
|
8
|
+
|
9
|
+
# Sample of named route:
|
10
|
+
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
|
11
|
+
# This route can be invoked with purchase_url(:id => product.id)
|
12
|
+
|
13
|
+
# Sample resource route (maps HTTP verbs to controller actions automatically):
|
14
|
+
# resources :products
|
15
|
+
|
16
|
+
# Sample resource route with options:
|
17
|
+
# resources :products do
|
18
|
+
# member do
|
19
|
+
# get 'short'
|
20
|
+
# post 'toggle'
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# collection do
|
24
|
+
# get 'sold'
|
25
|
+
# end
|
26
|
+
# end
|
27
|
+
|
28
|
+
# Sample resource route with sub-resources:
|
29
|
+
# resources :products do
|
30
|
+
# resources :comments, :sales
|
31
|
+
# resource :seller
|
32
|
+
# end
|
33
|
+
|
34
|
+
# Sample resource route with more complex sub-resources
|
35
|
+
# resources :products do
|
36
|
+
# resources :comments
|
37
|
+
# resources :sales do
|
38
|
+
# get 'recent', :on => :collection
|
39
|
+
# end
|
40
|
+
# end
|
41
|
+
|
42
|
+
# Sample resource route within a namespace:
|
43
|
+
# namespace :admin do
|
44
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
45
|
+
# # (app/controllers/admin/products_controller.rb)
|
46
|
+
# resources :products
|
47
|
+
# end
|
48
|
+
|
49
|
+
# You can have the root of your site routed with "root"
|
50
|
+
# just remember to delete public/index.html.
|
51
|
+
# root :to => 'welcome#index'
|
52
|
+
|
53
|
+
# See how all your routes lay out with "rake routes"
|
54
|
+
|
55
|
+
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
56
|
+
# Note: This route will make all actions in every controller accessible via GET requests.
|
57
|
+
# match ':controller(/:action(/:id))(.:format)'
|
58
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class MarkDeletedPostsWithTimestamp < ActiveRecord::Migration
|
2
|
+
def up
|
3
|
+
Post.where(deleted: true).each do |post|
|
4
|
+
post.deleted_at = Time.now
|
5
|
+
post.save
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def down
|
10
|
+
Post.where("deleted_at != ?", nil).each do |post|
|
11
|
+
post.deleted = true
|
12
|
+
post.save
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
Binary file
|
@@ -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
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|
File without changes
|