squasher 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/squasher.rb +1 -1
- data/lib/squasher/templates/squasher_clean.rb.erb +2 -2
- data/squasher.gemspec +2 -3
- metadata +3 -5
- data/lib/squasher/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bf39c604130d794f42f29a6a71328154c55c60e
|
4
|
+
data.tar.gz: 448ea347111fe23d91f500c43a9f1ecc86047f17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8960b288cfc369f217f51705a7c8827f3d223343f3c055eafb030a48887657a2dbd90d9bbe50e7b5f2a8a915cd585bb8365e99f6ad2f4b49f6126c0a9b47967
|
7
|
+
data.tar.gz: 05e4a577fb8b698713b1c181f65e8ae3316608acb1e6dbe604eafce00030f423a02960bc632e497365623ad0128baf4366be81706fe013d40c6053be00fb43ac
|
data/README.md
CHANGED
@@ -42,8 +42,11 @@ It works and was tested on Ruby 1.9.3+ and Rails 3.1+. It also requires a valid
|
|
42
42
|
If an old migration inserted data (created ActiveRecord model records) you will lose this code in the squashed migration, **BUT** `squasher` will ask you to leave a tmp database which will have all data that was inserted while migrating. Using this database you could add that data as another migration, or into `config/seed.rb` (the expected place for this stuff).
|
43
43
|
|
44
44
|
## Changelog
|
45
|
+
- 0.1.7
|
46
|
+
- a regression fix of the log output ([@lime](https://github.com/lime))
|
47
|
+
- improve a multi-platform support ([@johncarney](https://github.com/johncarney))
|
45
48
|
- 0.1.6
|
46
|
-
|
49
|
+
- support multiple database settings ([@ppworks](https://github.com/ppworks))
|
47
50
|
|
48
51
|
## Contributing
|
49
52
|
|
data/lib/squasher.rb
CHANGED
@@ -3,8 +3,8 @@ class SquasherClean < ActiveRecord::Migration
|
|
3
3
|
end
|
4
4
|
|
5
5
|
def up
|
6
|
-
migrations = Dir.glob(File.join(File.dirname(__FILE__), '
|
7
|
-
versions = migrations.map { |file|
|
6
|
+
migrations = Dir.glob(File.join(File.dirname(__FILE__), '*.rb'))
|
7
|
+
versions = migrations.map { |file| File.basename(file)[/\A\d+/] }
|
8
8
|
SchemaMigration.where("version NOT IN (?)", versions).delete_all
|
9
9
|
end
|
10
10
|
|
data/squasher.gemspec
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'squasher/version'
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = "squasher"
|
8
|
-
spec.version =
|
9
|
-
spec.authors = ["Sergey
|
7
|
+
spec.version = "0.1.7"
|
8
|
+
spec.authors = ["Sergey Pchelintsev"]
|
10
9
|
spec.email = ["mail@sergeyp.me"]
|
11
10
|
spec.description = %q{Squash your old migrations}
|
12
11
|
spec.summary = %q{Squash your old migrations}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squasher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Sergey
|
7
|
+
- Sergey Pchelintsev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,7 +74,6 @@ files:
|
|
74
74
|
- lib/squasher/render.rb
|
75
75
|
- lib/squasher/templates/init_schema.rb.erb
|
76
76
|
- lib/squasher/templates/squasher_clean.rb.erb
|
77
|
-
- lib/squasher/version.rb
|
78
77
|
- lib/squasher/worker.rb
|
79
78
|
- spec/fake_app/config/database.yml
|
80
79
|
- spec/fake_app/config/invalid_database.yml
|
@@ -126,4 +125,3 @@ test_files:
|
|
126
125
|
- spec/lib/squasher/worker_spec.rb
|
127
126
|
- spec/lib/squasher_spec.rb
|
128
127
|
- spec/spec_helper.rb
|
129
|
-
has_rdoc:
|
data/lib/squasher/version.rb
DELETED