seed_loader 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Gemfile +8 -0
- data/MIT-LICENSE +21 -0
- data/README +0 -0
- data/README.rdoc +55 -0
- data/Rakefile +30 -0
- data/lib/seed_loader/active_record_methods.rb +49 -0
- data/lib/seed_loader/loader.rb +76 -0
- data/lib/seed_loader/version.rb +3 -0
- data/lib/seed_loader.rb +5 -0
- data/seed_loader.gemspec +26 -0
- data/test/dummy/Gemfile +7 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/dummy_table.rb +5 -0
- data/test/dummy/app/models/dummy_user.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +13 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +30 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/.DS_Store +0 -0
- data/test/dummy/db/migrate/.DS_Store +0 -0
- data/test/dummy/db/migrate/20111027142111_create_dummy_tables.rb +11 -0
- data/test/dummy/db/migrate/20111027142236_create_dummy_users.rb +9 -0
- data/test/dummy/db/schema.rb +29 -0
- data/test/dummy/db/seeds/dummy_tables.yml +12 -0
- data/test/dummy/db/seeds/dummy_users.yml +10 -0
- data/test/dummy/dummy_development +0 -0
- data/test/dummy/dummy_test +0 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/log/development.log +37 -0
- data/test/dummy/log/test.log +2025 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/fixtures/dummy_tables.yml +11 -0
- data/test/dummy/test/fixtures/dummy_users.yml +7 -0
- data/test/dummy/test/fixtures/positions.yml +9 -0
- data/test/dummy/test/unit/dummy_table_test.rb +7 -0
- data/test/dummy/test/unit/dummy_user_test.rb +7 -0
- data/test/dummy/test/unit/position_test.rb +7 -0
- data/test/seed_loader_test.rb +99 -0
- data/test/seeds/dummy_tables.yml +12 -0
- data/test/seeds/dummy_users.yml +10 -0
- data/test/test_helper.rb +10 -0
- metadata +242 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
Dummy::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
|
Binary file
|
Binary file
|
@@ -0,0 +1,29 @@
|
|
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 to check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(:version => 20111027142236) do
|
14
|
+
|
15
|
+
create_table "dummy_tables", :force => true do |t|
|
16
|
+
t.string "field1"
|
17
|
+
t.integer "field2"
|
18
|
+
t.integer "dummy_user_id"
|
19
|
+
t.datetime "created_at"
|
20
|
+
t.datetime "updated_at"
|
21
|
+
end
|
22
|
+
|
23
|
+
create_table "dummy_users", :force => true do |t|
|
24
|
+
t.string "name"
|
25
|
+
t.datetime "created_at"
|
26
|
+
t.datetime "updated_at"
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
@@ -0,0 +1,37 @@
|
|
1
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
2
|
+
[1m[35m (2.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
3
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
4
|
+
[1m[35m (1.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
5
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
6
|
+
Migrating to CreateDummyTables (20111027142111)
|
7
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "dummy_tables" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field1" varchar(255), "field2" integer, "dummy_user_id" integer, "created_at" datetime, "updated_at" datetime)
|
8
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20111027142111')[0m
|
9
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
10
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
11
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("dummy_tables")
|
12
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
13
|
+
Migrating to CreateDummyTables (20111027142111)
|
14
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
15
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
16
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("dummy_tables")
|
17
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
18
|
+
Migrating to CreateDummyTables (20111027142111)
|
19
|
+
Migrating to CreateDummyUsers (20111027142236)
|
20
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
21
|
+
[1m[36m (0.4ms)[0m [1mCREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) [0m
|
22
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20111027142236')
|
23
|
+
[1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
|
24
|
+
[1m[35m (0.2ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
25
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("dummy_tables")[0m
|
26
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("dummy_users")
|
27
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
28
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
29
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
30
|
+
[1m[36m (12.8ms)[0m [1mCREATE TABLE "dummy_tables" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "field1" varchar(255), "field2" integer, "dummy_user_id" integer, "created_at" datetime, "updated_at" datetime) [0m
|
31
|
+
[1m[35m (1.2ms)[0m CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)
|
32
|
+
[1m[36m (1.1ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
33
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
34
|
+
[1m[36m (1.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
35
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
36
|
+
[1m[36m (1.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20111027142236')[0m
|
37
|
+
[1m[35m (1.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20111027142111')
|