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 CHANGED
@@ -1,4 +1,5 @@
1
- if RAILS_ENV == 'test'
1
+ env = defined?(RAILS_ENV) ? RAILS_ENV : Rails.env
2
+ if env == 'test'
2
3
  require 'birdbath'
3
4
  require 'test/unit'
4
5
  Test::Unit::TestCase.class_eval do
@@ -25,7 +25,8 @@ require 'test/unit/assertions'
25
25
 
26
26
  module Birdbath
27
27
  def self.migration_dir
28
- @migration_dir || File.expand_path(RAILS_ROOT + '/db/migrate')
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
  #
@@ -1,3 +1,3 @@
1
1
  module Birdbath
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
@@ -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(RAILS_ROOT + '/db/migrate'), Birdbath.migration_dir,
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
@@ -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
- plugin_path = RAILS_ROOT + "/vendor/plugins/birdbath"
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(RAILS_ROOT + "/test/migration")
33
+ File.expand_path(rails_root + "/test/migration")
34
34
  end
35
35
 
36
36
  def run_in_rails_root(command)
37
- cd RAILS_ROOT do
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
- version: 1.3.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
- date: 2011-08-09 00:00:00.000000000 -04:00
17
+
18
+ date: 2011-08-09 00:00:00 -04:00
13
19
  default_executable:
14
20
  dependencies: []
15
- description: ! "birdbath makes testing your migrations easier by \nadding helper methods
16
- to Test::Unit::TestCase for asserting the \ncurrent state of the schema and executing
17
- migrations against the \ntest database.\n"
18
- email:
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
- files:
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
- require_paths:
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
- version: '0'
66
- required_rubygems_version: !ruby/object:Gem::Requirement
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
- version: '0'
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
+