squasher 0.2.0 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e3e107d6711573cf3fc5acd9b237fde3186c5b0
4
- data.tar.gz: 0a710e069d472696efd9802c3427b6b2f463af83
3
+ metadata.gz: 18fb9959adf3910732c16c6678f2fe13cb43647e
4
+ data.tar.gz: 3c6c9629ada41354a8c0c2d81263f45893861b3b
5
5
  SHA512:
6
- metadata.gz: d4ea404426d7555d6c0564578990be8d76140b1c27b5a96bf11c737252359b45904844df57c4f1ca5bfb8a56816e353ad7702b73b68b213d2fe89f20fd3383ce
7
- data.tar.gz: 4eea8c07ec83255821bea140e655fddebc85d03c6c10cff2d51f7a16a44e10031fc6a2487799d81f03869b5788a707dec1e48217e968d0c8b3c659c329ed5714
6
+ metadata.gz: e20446f165abc6354e04c3311931f4bd65b1c30a6f76563c20dfd819402d53acb1380c4381f3fcff017cfbd21f1f552eba4e180f6319d726c0eb420de44afe11
7
+ data.tar.gz: afb442cf5dd279dbbdc0c5e8f63b0fc166424aab3d94d9b4b754263d30f98337841240c00a5e328c5faf635881257f5ddb02e395eaf87379d6edd9a36485ee6c
@@ -1,8 +1,10 @@
1
+ before_install:
2
+ - gem update bundler
1
3
  cache: bundler
2
4
  language: ruby
3
5
  rvm:
4
6
  - ruby-head
7
+ - 2.3
5
8
  - 2.2
6
9
  - 2.1
7
10
  - 2.0
8
- - jruby
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Squasher
2
2
 
3
- [![Build Status](https://travis-ci.org/jalkoby/squasher.png?branch=master)](https://travis-ci.org/jalkoby/squasher)
4
- [![Code Climate](https://codeclimate.com/github/jalkoby/squasher.png)](https://codeclimate.com/github/jalkoby/squasher)
5
- [![Gem Version](https://badge.fury.io/rb/squasher.png)](http://badge.fury.io/rb/squasher)
3
+ [![Build Status](https://travis-ci.org/jalkoby/squasher.svg?branch=master)](https://travis-ci.org/jalkoby/squasher)
4
+ [![Code Climate](https://codeclimate.com/github/jalkoby/squasher.svg)](https://codeclimate.com/github/jalkoby/squasher)
5
+ [![Gem Version](https://badge.fury.io/rb/squasher.svg)](http://badge.fury.io/rb/squasher)
6
6
 
7
7
  Squasher compresses old migrations in a Rails application. If you work on a big project with lots of migrations, every `rake db:migrate` might take a few seconds, or creating of a new database might take a few minutes. That's because Rails loads all those migration files. Squasher removes all the migrations and creates a single migration with the final database state of the specified date (the new migration will look like a schema).
8
8
 
@@ -12,10 +12,12 @@ You should not add this to your Gemfile. Just standalone installation:
12
12
 
13
13
  $ gem install squasher
14
14
 
15
- @Note if you use Rbenv don't forget to run `rbenv rehash`.
15
+ **@note** if you use Rbenv don't forget to run `rbenv rehash`.
16
16
 
17
17
  ## Usage
18
18
 
19
+ **@note** stop all preloading systems if there are present (spring, zeus, etc)
20
+
19
21
  Suppose your application was created a few years ago. `%app_root%/db/migrate` folder looks like this:
20
22
  ```bash
21
23
  2009...._first_migration.rb
@@ -50,10 +52,12 @@ squasher will not need to create the db schema and all data from the previous mi
50
52
 
51
53
  ## Requirements
52
54
 
53
- It works and was tested on Ruby 2.0+ and Rails 3.1+. It also requires a valid configuration in `config/database.yml` and using Ruby format in `db/schema.rb` (default Rails use-case).
55
+ It works and was tested on Ruby 2.0+ and Rails 3.1+. It also requires a valid development configuration in `config/database.yml` and using Ruby format in `db/schema.rb` (default Rails use-case).
54
56
  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).
55
57
 
56
58
  ## Changelog
59
+ - 0.2.1
60
+ - support rails 5
57
61
  - 0.2.0
58
62
  - add **dry** mode and ability to reuse the previous squasher database
59
63
  - improve database config processing
@@ -27,7 +27,7 @@ module Squasher
27
27
 
28
28
  def rake(command, description = nil)
29
29
  tell(description) if description
30
- system("bundle exec rake #{ command }")
30
+ system("RAILS_ENV=development DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bundle exec rake #{ command }")
31
31
  end
32
32
 
33
33
  def ask(*args)
@@ -1,7 +1,6 @@
1
1
  require 'bundler/setup'
2
2
  Bundler.require
3
3
 
4
-
5
4
  module SpecHelpers
6
5
  def fake_root
7
6
  File.join(File.dirname(__FILE__), 'fake_app')
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "squasher"
7
- spec.version = "0.2.0"
7
+ spec.version = "0.2.1"
8
8
  spec.authors = ["Sergey Pchelintsev"]
9
9
  spec.email = ["mail@sergeyp.me"]
10
10
  spec.description = %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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Pchelintsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.4.5
111
+ rubygems_version: 2.5.2
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Squash your old migrations
@@ -125,4 +125,3 @@ test_files:
125
125
  - spec/lib/squasher_spec.rb
126
126
  - spec/lib/worker_spec.rb
127
127
  - spec/spec_helper.rb
128
- has_rdoc: