birdbath 1.3.4 → 1.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/init.rb +2 -1
- data/lib/birdbath.rb +2 -1
- data/lib/birdbath/version.rb +1 -1
- data/test/birdbath_test.rb +2 -2
- data/test/helper.rb +4 -4
- metadata +44 -21
data/init.rb
CHANGED
data/lib/birdbath.rb
CHANGED
@@ -25,7 +25,8 @@ require 'test/unit/assertions'
|
|
25
25
|
|
26
26
|
module Birdbath
|
27
27
|
def self.migration_dir
|
28
|
-
|
28
|
+
root = defined?(RAILS_ROOT) ? RAILS_ROOT : Rails.root.to_s
|
29
|
+
@migration_dir || File.expand_path(root + '/db/migrate')
|
29
30
|
end
|
30
31
|
|
31
32
|
#
|
data/lib/birdbath/version.rb
CHANGED
data/test/birdbath_test.rb
CHANGED
@@ -245,10 +245,10 @@ class BirdbathTest < Test::Unit::TestCase
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def test_should_have_default_migration_dir_set
|
248
|
+
root = defined?(RAILS_ROOT) ? RAILS_ROOT : Rails.root.to_s
|
248
249
|
Birdbath.migration_dir = nil
|
249
|
-
assert_equal File.expand_path(
|
250
|
+
assert_equal File.expand_path(root + '/db/migrate'), Birdbath.migration_dir,
|
250
251
|
"wrong default migration dir"
|
251
|
-
|
252
252
|
end
|
253
253
|
|
254
254
|
def test_should_raise_error_if_migration_fails
|
data/test/helper.rb
CHANGED
@@ -2,9 +2,9 @@ ENV["RAILS_ENV"] = "test"
|
|
2
2
|
require File.expand_path(File.dirname(__FILE__) + '/../../../../config/environment')
|
3
3
|
require 'logger'
|
4
4
|
require 'fileutils'
|
5
|
-
require 'test_help'
|
6
5
|
|
7
|
-
|
6
|
+
rails_root = defined?(RAILS_ROOT) ? RAILS_ROOT : Rails.root.to_s
|
7
|
+
plugin_path = rails_root + "/vendor/plugins/birdbath"
|
8
8
|
|
9
9
|
config_location = File.expand_path(plugin_path + "/test/config/database.yml")
|
10
10
|
|
@@ -30,11 +30,11 @@ class Test::Unit::TestCase
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def migration_test_path
|
33
|
-
File.expand_path(
|
33
|
+
File.expand_path(rails_root + "/test/migration")
|
34
34
|
end
|
35
35
|
|
36
36
|
def run_in_rails_root(command)
|
37
|
-
cd
|
37
|
+
cd rails_root do
|
38
38
|
@output = `#{command}`
|
39
39
|
end
|
40
40
|
end
|
metadata
CHANGED
@@ -1,26 +1,39 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: birdbath
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 3
|
9
|
+
- 5
|
10
|
+
version: 1.3.5
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Micah Alles
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
17
|
+
|
18
|
+
date: 2011-08-09 00:00:00 -04:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
|
-
|
16
|
-
|
17
|
-
migrations
|
18
|
-
|
21
|
+
|
22
|
+
description: |
|
23
|
+
birdbath makes testing your migrations easier by
|
24
|
+
adding helper methods to Test::Unit::TestCase for asserting the
|
25
|
+
current state of the schema and executing migrations against the
|
26
|
+
test database.
|
27
|
+
|
28
|
+
email:
|
19
29
|
- micah@atomicobject.com
|
20
30
|
executables: []
|
31
|
+
|
21
32
|
extensions: []
|
33
|
+
|
22
34
|
extra_rdoc_files: []
|
23
|
-
|
35
|
+
|
36
|
+
files:
|
24
37
|
- .bundle/config
|
25
38
|
- .gitignore
|
26
39
|
- Gemfile
|
@@ -53,26 +66,36 @@ files:
|
|
53
66
|
has_rdoc: true
|
54
67
|
homepage: http://github.com/atomicobject/birdbath
|
55
68
|
licenses: []
|
69
|
+
|
56
70
|
post_install_message:
|
57
71
|
rdoc_options: []
|
58
|
-
|
72
|
+
|
73
|
+
require_paths:
|
59
74
|
- lib
|
60
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
76
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
|
66
|
-
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
hash: 3
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
version: "0"
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
85
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
72
93
|
requirements: []
|
94
|
+
|
73
95
|
rubyforge_project: birdbath
|
74
96
|
rubygems_version: 1.6.2
|
75
97
|
signing_key:
|
76
98
|
specification_version: 3
|
77
99
|
summary: A Rails gem for testing migrations
|
78
100
|
test_files: []
|
101
|
+
|