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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd5c0b0659f114baf943c91a9a2bf4a38c255f1a
4
- data.tar.gz: cea63ac2678319df2f8dcc85b0874892751bfc17
3
+ metadata.gz: f92125ce4b359fd50f0451bc0d87698540e8cbe9
4
+ data.tar.gz: f1f63add9a70d0541bfff52da4b08fdfb2ca9709
5
5
  SHA512:
6
- metadata.gz: 884b4ddf2e107c5b1391133fc26139687b9a23c48d5c305e91ef095ed4c30864053ae1c2587f725618fe2398e64ffec1e0fba71768155fd9d947db04882e3b3d
7
- data.tar.gz: 976f29be93ac59ef3769342e37be708d6e9e781c518675d23d248810ad9616125dee1c5b57d252fc2014050fcb2da76685b4ce1816c8344b35c8c9209d3d3cf2
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/brazunisdelamancha/milagre/issues) first, before filing an issue.
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
@@ -1,4 +1,4 @@
1
1
  module Systematize
2
- require 'systematize/railtie'
2
+ require 'systematize/loader'
3
3
  require 'systematize/runner'
4
4
  end
@@ -0,0 +1,2 @@
1
+ require 'rake'
2
+ load 'tasks/migrations.rake'
@@ -1,7 +1,7 @@
1
1
  module Systematize
2
2
  class Runner
3
3
 
4
- DB_FOLDER_PATH = "#{Rack::Directory.new('').root}/db"
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"
@@ -1,3 +1,3 @@
1
1
  module Systematize
2
- VERSION = "0.0.2"
2
+ VERSION = "0.1.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'rspec'
2
- require 'rails'
3
2
  require 'active_record'
4
3
  require 'systematize'
5
4
  require 'pry'
@@ -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
   (0.3ms) DROP TABLE "altered_posts"
1034
1034
   (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')
1035
1035
   (1.9ms) commit transaction
1036
+  (0.2ms) begin transaction
1037
+  (0.1ms) select sqlite_version(*)
1038
+  (0.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
1039
+  (0.0ms) PRAGMA index_list("schema_migrations")
1040
+  (0.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1041
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
1042
+ Migrating to CreatePostsTable (20161117151622)
1043
+  (0.1ms) CREATE 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) 
1044
+  (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20161117151622')
1045
+ Migrating to AddDeletedAtTimestamp (20161117152138)
1046
+  (0.1ms) ALTER TABLE "posts" ADD "deleted_at" time
1047
+  (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20161117152138')
1048
+ Migrating to MarkDeletedPostsWithTimestamp (20161117152453)
1049
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."deleted" = 't'
1050
+  (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20161117152453')
1051
+ Migrating to RemoveDeletedColumn (20161117152655)
1052
+  (0.4ms) CREATE 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) 
1053
+  (0.0ms) PRAGMA index_list("posts")
1054
+  (0.0ms) SELECT * FROM "posts"
1055
+  (0.1ms) DROP TABLE "posts"
1056
+  (0.1ms) CREATE 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) 
1057
+  (0.0ms) PRAGMA index_list("altered_posts")
1058
+  (0.0ms) SELECT * FROM "altered_posts"
1059
+  (0.2ms) DROP TABLE "altered_posts"
1060
+  (0.0ms) INSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')
1061
+  (0.8ms) 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.2
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-07 00:00:00.000000000 Z
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: railties
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.2'
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: '3.2'
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/railtie.rb
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
@@ -1,11 +0,0 @@
1
- require 'systematize'
2
-
3
- module Systematize
4
- class Railtie < Rails::Railtie
5
- railtie_name :systematize
6
-
7
- rake_tasks do
8
- load 'tasks/migrations.rake'
9
- end
10
- end
11
- end