systematize 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/systematize.rb +1 -1
- data/lib/systematize/loader.rb +2 -0
- data/lib/systematize/runner.rb +1 -1
- data/lib/systematize/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/testapp/Gemfile.lock +0 -16
- data/spec/testapp/db/development.sqlite3 +0 -0
- data/spec/testapp/db/test.sqlite3 +0 -0
- data/spec/testapp/log/development.log +26 -0
- metadata +8 -6
- data/lib/systematize/railtie.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f92125ce4b359fd50f0451bc0d87698540e8cbe9
|
4
|
+
data.tar.gz: f1f63add9a70d0541bfff52da4b08fdfb2ca9709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb984fe113c54a0cda2c8f856fa2a92e26ae3cff03373edb2a00a3d9aeed1546934ee66bb5a856d68249b526ed12a178ec500d0dda7c93ce324767d1d8fee99d
|
7
|
+
data.tar.gz: dc76c2c63d912a7004cd2ef47bf6572f47c1bf0155c31d21d30b03a68dd3c2349a8770c2fdec4b96449c3e73c0eda0e72ec8fbc36e9764f29dd5ede577c12e38
|
data/README.md
CHANGED
@@ -40,6 +40,8 @@ $> bundle exec rake -T
|
|
40
40
|
rake systematize:migrate # Migrate the database
|
41
41
|
rake systematize:rollback # Rollback the database (options: STEP=x, VERBOSE=false)
|
42
42
|
rake systematize:rollback_all # Rollback all the database
|
43
|
+
rake systematize:create # Create the database
|
44
|
+
rake systematize:drop # Drop the database
|
43
45
|
```
|
44
46
|
|
45
47
|
Now if you need to migrate the database you just need to run:
|
@@ -94,7 +96,7 @@ I welcome and encourage all pull requests. It usually will take me within 24-48
|
|
94
96
|
1. If its a feature, bugfix, or anything please only change code to what you specify.
|
95
97
|
2. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
|
96
98
|
3. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.
|
97
|
-
4. Check for existing [issues](https://github.com/
|
99
|
+
4. Check for existing [issues](https://github.com/RicardoBrazao/systematize/issues) first, before filing an issue.
|
98
100
|
5. Have fun!
|
99
101
|
|
100
102
|
### Created & Maintained By
|
data/lib/systematize.rb
CHANGED
data/lib/systematize/runner.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Systematize
|
2
2
|
class Runner
|
3
3
|
|
4
|
-
DB_FOLDER_PATH = "#{
|
4
|
+
DB_FOLDER_PATH = "#{Dir.pwd}/db"
|
5
5
|
DATA_MIGRATIONS_PATH = "#{DB_FOLDER_PATH}/data"
|
6
6
|
STRUCTURE_MIGRATIONS_PATH = "#{DB_FOLDER_PATH}/migrate"
|
7
7
|
TEMP_MIGRATIONS_FOLDER_PATH = "#{DB_FOLDER_PATH}/tmp"
|
data/lib/systematize/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/testapp/Gemfile.lock
CHANGED
@@ -3,7 +3,6 @@ PATH
|
|
3
3
|
specs:
|
4
4
|
systematize (0.0.2)
|
5
5
|
activerecord (>= 3.2)
|
6
|
-
railties (>= 3.2)
|
7
6
|
|
8
7
|
GEM
|
9
8
|
remote: https://rubygems.org/
|
@@ -45,7 +44,6 @@ GEM
|
|
45
44
|
coffee-script-source
|
46
45
|
execjs
|
47
46
|
coffee-script-source (1.10.0)
|
48
|
-
diff-lcs (1.3)
|
49
47
|
erubis (2.7.0)
|
50
48
|
execjs (2.7.0)
|
51
49
|
hike (1.2.3)
|
@@ -92,19 +90,6 @@ GEM
|
|
92
90
|
rake (11.3.0)
|
93
91
|
rdoc (3.12.2)
|
94
92
|
json (~> 1.4)
|
95
|
-
rspec (3.5.0)
|
96
|
-
rspec-core (~> 3.5.0)
|
97
|
-
rspec-expectations (~> 3.5.0)
|
98
|
-
rspec-mocks (~> 3.5.0)
|
99
|
-
rspec-core (3.5.4)
|
100
|
-
rspec-support (~> 3.5.0)
|
101
|
-
rspec-expectations (3.5.0)
|
102
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
103
|
-
rspec-support (~> 3.5.0)
|
104
|
-
rspec-mocks (3.5.0)
|
105
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
106
|
-
rspec-support (~> 3.5.0)
|
107
|
-
rspec-support (3.5.0)
|
108
93
|
sass (3.4.22)
|
109
94
|
sass-rails (3.2.6)
|
110
95
|
railties (~> 3.2.0)
|
@@ -133,7 +118,6 @@ DEPENDENCIES
|
|
133
118
|
jquery-rails
|
134
119
|
pry
|
135
120
|
rails (= 3.2.0)
|
136
|
-
rspec
|
137
121
|
sass-rails (~> 3.2.3)
|
138
122
|
sqlite3
|
139
123
|
systematize!
|
Binary file
|
File without changes
|
@@ -1033,3 +1033,29 @@ Migrating to RemoveDeletedColumn (20161117152655)
|
|
1033
1033
|
[1m[35m (0.3ms)[0m DROP TABLE "altered_posts"
|
1034
1034
|
[1m[36m (0.0ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')[0m
|
1035
1035
|
[1m[35m (1.9ms)[0m commit transaction
|
1036
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1037
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
1038
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
1039
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
1040
|
+
[1m[36m (0.3ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
1041
|
+
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
1042
|
+
Migrating to CreatePostsTable (20161117151622)
|
1043
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1044
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117151622')
|
1045
|
+
Migrating to AddDeletedAtTimestamp (20161117152138)
|
1046
|
+
[1m[36m (0.1ms)[0m [1mALTER TABLE "posts" ADD "deleted_at" time[0m
|
1047
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152138')
|
1048
|
+
Migrating to MarkDeletedPostsWithTimestamp (20161117152453)
|
1049
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."deleted" = 't'[0m
|
1050
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152453')
|
1051
|
+
Migrating to RemoveDeletedColumn (20161117152655)
|
1052
|
+
[1m[36m (0.4ms)[0m [1mCREATE TEMPORARY TABLE "altered_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1053
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("posts")
|
1054
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "posts"[0m
|
1055
|
+
[1m[35m (0.1ms)[0m DROP TABLE "posts"
|
1056
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1057
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("altered_posts")
|
1058
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "altered_posts"[0m
|
1059
|
+
[1m[35m (0.2ms)[0m DROP TABLE "altered_posts"
|
1060
|
+
[1m[36m (0.0ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')[0m
|
1061
|
+
[1m[35m (0.8ms)[0m commit transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: systematize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Brazão
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -25,19 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- README.md
|
92
92
|
- lib/systematize.rb
|
93
|
-
- lib/systematize/
|
93
|
+
- lib/systematize/loader.rb
|
94
94
|
- lib/systematize/runner.rb
|
95
95
|
- lib/systematize/version.rb
|
96
96
|
- lib/tasks/migrations.rake
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- spec/testapp/db/migrate/20161117152655_remove_deleted_column.rb
|
135
135
|
- spec/testapp/db/schema.rb
|
136
136
|
- spec/testapp/db/seeds.rb
|
137
|
+
- spec/testapp/db/test.sqlite3
|
137
138
|
- spec/testapp/doc/README_FOR_APP
|
138
139
|
- spec/testapp/log/development.log
|
139
140
|
- spec/testapp/public/404.html
|
@@ -206,6 +207,7 @@ test_files:
|
|
206
207
|
- spec/testapp/db/migrate/20161117152655_remove_deleted_column.rb
|
207
208
|
- spec/testapp/db/schema.rb
|
208
209
|
- spec/testapp/db/seeds.rb
|
210
|
+
- spec/testapp/db/test.sqlite3
|
209
211
|
- spec/testapp/doc/README_FOR_APP
|
210
212
|
- spec/testapp/Gemfile
|
211
213
|
- spec/testapp/Gemfile.lock
|