farfugl 0.1.0 → 0.2.0

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: 7e7eae9a98201dbf54895a58854a6f9d7b61ceea
4
- data.tar.gz: 243ee00b2b218d84720e2fff823e27165998c381
3
+ metadata.gz: 3d7bbf96ed47e8f048230f4d27cb4a2945b75391
4
+ data.tar.gz: c16721350b74eb31300af2b74862c7469cf52791
5
5
  SHA512:
6
- metadata.gz: 7748bb323b3d5aa374747ea56ce97a3b5a05cb3032f096632d3a786bc7649d0612a8ef5c4be9e552eff4228df323c118197860e621189e9c61967ff529537dbc
7
- data.tar.gz: 100449961c40d176268d11aa890917d1a4a9b982f7eb9cd2bc0f3096fbe137322b9516e9e041d3988bcf3ec1d89abc13309d4f6bc88f83c99a8f0f76ae9e9923
6
+ metadata.gz: a5a997180325a6606cfb75687c5e1b84cff20af97d3949963b53148a21ca974ef80ad6f3ecef6315c95aa1f5d1161c8ce6ac935c7e29a2467ed4e1471773f259
7
+ data.tar.gz: 1c76403f6f32abaf3b9cef569412b634235108e5c1087ee921c93c9ccbb929f9d0d75f482fc76fc34ce6f3657d7c528d4c244ea7025f1ae81e47331c050bb016
data/README.md CHANGED
@@ -3,14 +3,26 @@ Farfugl
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/farfugl.png)](http://badge.fury.io/rb/farfugl)
5
5
 
6
- Migrating an old database with old migrations can be a pain because the
7
- migrations often depend on code that doesn't exist in the latest version of the
8
- application. The simplest solution is to checkout to the commit where each
9
- migration was introduced (or last modified) and run each migration from there,
10
- but this can be time-consuming and tedious. **Farfugl** automates this process.
6
+ Running old data migrations will fail if they depend on code that no longer
7
+ exists in the latest version of an application. This can be remedied by running
8
+ the migrations in the environment where they were created. **Farfugl**
9
+ automates this process.
11
10
 
12
11
  ### Setup
13
12
 
13
+ Update your Gemfile:
14
+ ```ruby
15
+ source 'https://rubygems.org'
16
+ ruby '2.1.0'
17
+
18
+ gem 'rails'
19
+ # ...
20
+ gem 'farfugl'
21
+ # ...
22
+ ```
23
+ Now run `bundle` to install **Farfugl**.
24
+
25
+ You may either add `gem 'farfugl' to your Gemfile
14
26
  You can install **Farfugl** on your system like any other gem:
15
27
 
16
28
  gem install farfugl
@@ -25,4 +37,4 @@ completely stable; always create backups of your database before using it.
25
37
 
26
38
  Running **Farfugl** is simple:
27
39
 
28
- rake farfugl
40
+ rake farfugl:migrate
data/farfugl.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'farfugl'
3
- s.version = '0.1.0'
3
+ s.version = '0.2.0'
4
4
  s.date = '2014-01-21'
5
5
  s.summary = 'Run old Rails migrations without code dependence problems'
6
6
  s.description = 'Run old Rails migrations without code dependence problems'
@@ -4,11 +4,11 @@ module Git
4
4
  end
5
5
 
6
6
  def self.stash
7
- `git stash -u`
7
+ `git stash -u -q`
8
8
  end
9
9
 
10
10
  def self.unstash
11
- `git stash pop`
11
+ `git stash pop -q`
12
12
  end
13
13
 
14
14
  def self.current_branch
@@ -16,6 +16,6 @@ module Git
16
16
  end
17
17
 
18
18
  def self.checkout(destination)
19
- `git checkout -f #{destination}`
19
+ `git checkout -f -q #{destination}`
20
20
  end
21
21
  end
@@ -0,0 +1,10 @@
1
+ require 'rake'
2
+
3
+ task default: :farfugl
4
+
5
+ namespace :farfugl do
6
+ desc 'Run migrations one by one, checked out to the correct environment'
7
+ task migrate: :environment do
8
+ Farfugl.migrate
9
+ end
10
+ end
data/lib/farfugl.rb CHANGED
@@ -1,5 +1,5 @@
1
- require 'railtie' if defined? Rails
2
- require 'git'
1
+ require 'farfugl/git'
2
+ require 'farfugl/tasks'
3
3
 
4
4
  module Farfugl
5
5
  def self.schema_versions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farfugl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Haukur Páll Hallvarðsson
@@ -20,9 +20,8 @@ files:
20
20
  - README.md
21
21
  - farfugl.gemspec
22
22
  - lib/farfugl.rb
23
- - lib/git.rb
24
- - lib/railtie.rb
25
- - lib/tasks.rb
23
+ - lib/farfugl/git.rb
24
+ - lib/farfugl/tasks.rb
26
25
  homepage: https://github.com/hph/farfugl
27
26
  licenses:
28
27
  - MIT
data/lib/railtie.rb DELETED
@@ -1,5 +0,0 @@
1
- module Farfugl
2
- class Railtie < Rails::Railtie
3
- require 'tasks'
4
- end
5
- end
data/lib/tasks.rb DELETED
@@ -1,8 +0,0 @@
1
- require 'rake'
2
-
3
- task default: :farfugl
4
-
5
- desc 'Run migrations one by one, checked out to the correct environment'
6
- task farfugl: :environment do
7
- Farfugl.migrate
8
- end