migration-spec 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -7,7 +7,8 @@ begin
7
7
  gem.email = "kmandrup@gmail.com"
8
8
  gem.homepage = "http://github.com/kristianmandrup/migration-spec"
9
9
  gem.authors = ["Kristian Mandrup"]
10
- gem.add_development_dependency "rspec", ">= 2.0.0"
10
+ gem.add_development_dependency "rspec", ">= 2.0.0"
11
+ gem.add_development_dependency "generator-spec", ">= 0.7.0"
11
12
 
12
13
  gem.add_dependency "rspec", ">= 2.0.0"
13
14
  gem.add_dependency "require_all", "~> 1.2.0"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{migration-spec}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
@@ -72,12 +72,14 @@ Gem::Specification.new do |s|
72
72
 
73
73
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
74
74
  s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
75
+ s.add_development_dependency(%q<generator-spec>, [">= 0.7.0"])
75
76
  s.add_runtime_dependency(%q<rspec>, [">= 2.0.0"])
76
77
  s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
77
78
  s.add_runtime_dependency(%q<rails3_assist>, ["~> 0.3.0"])
78
79
  s.add_runtime_dependency(%q<rails-app-spec>, ["~> 0.3.0"])
79
80
  else
80
81
  s.add_dependency(%q<rspec>, [">= 2.0.0"])
82
+ s.add_dependency(%q<generator-spec>, [">= 0.7.0"])
81
83
  s.add_dependency(%q<rspec>, [">= 2.0.0"])
82
84
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
83
85
  s.add_dependency(%q<rails3_assist>, ["~> 0.3.0"])
@@ -85,6 +87,7 @@ Gem::Specification.new do |s|
85
87
  end
86
88
  else
87
89
  s.add_dependency(%q<rspec>, [">= 2.0.0"])
90
+ s.add_dependency(%q<generator-spec>, [">= 0.7.0"])
88
91
  s.add_dependency(%q<rspec>, [">= 2.0.0"])
89
92
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
90
93
  s.add_dependency(%q<rails3_assist>, ["~> 0.3.0"])
@@ -1,18 +1,18 @@
1
1
  require 'spec_helper'
2
2
 
3
- Rails::Migration::Assist.orm = :active_record
3
+ Rails3::Migration::Assist.orm = :active_record
4
4
 
5
5
  describe 'migration' do
6
6
  # use_orm :active_record
7
7
  use_helpers :migration
8
8
 
9
9
  it "should have an create_account_migration file that contains an index method and two inserted comments" do
10
- puts read_migration(:do_columns)
10
+ read_migration(:do_columns)
11
11
 
12
- root_dir.should have_migration :do_columns
12
+ fixtures_dir.should have_migration :do_columns
13
13
 
14
- # root_dir.should generate_migration :do_columns do |migration_file|
15
- # migration_file.should have_class_method :up
16
- # end
14
+ fixtures_dir.should generate_migration :do_columns do |migration_file|
15
+ migration_file.should have_class_method :up
16
+ end
17
17
  end
18
18
  end
@@ -1,18 +1,27 @@
1
1
  require 'rspec/core'
2
2
  require 'migration-spec'
3
-
4
- # RSpec::Generator.configure do |config|
5
- # config.debug = false
6
- # config.remove_temp_dir = true
7
- # config.default_rails_root(__FILE__)
8
- # config.lib = File.dirname(__FILE__) + '/../lib'
9
- # # config.logger = :file # :stdout
10
- # end
3
+ require 'generator-spec'
11
4
 
12
5
  def fixtures_dir
13
6
  File.expand_path(File.dirname(__FILE__) + '/migration-spec/fixtures')
14
7
  end
15
8
 
9
+ RSpec::Generator.configure do |config|
10
+ config.debug = false
11
+ config.remove_temp_dir = true
12
+ config.rails_root = fixtures_dir
13
+ config.lib = File.dirname(__FILE__) + '/../lib'
14
+ # config.logger = :file # :stdout
15
+ end
16
+
17
+
18
+ module Rails
19
+ def self.root
20
+ fixtures_dir
21
+ end
22
+ end
23
+
24
+
16
25
  def project_dir
17
26
  File.dirname(__FILE__) + '/..'
18
27
  end
@@ -42,7 +51,7 @@ RSpec.configure do |config|
42
51
 
43
52
  end
44
53
 
45
- Rails::Migration::Assist.orm = :active_record
54
+ Rails3::Migration::Assist.orm = :active_record
46
55
 
47
56
 
48
57
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 5
9
- version: 0.1.5
8
+ - 6
9
+ version: 0.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -33,9 +33,24 @@ dependencies:
33
33
  type: :development
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
- name: rspec
36
+ name: generator-spec
37
37
  prerelease: false
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 0
45
+ - 7
46
+ - 0
47
+ version: 0.7.0
48
+ type: :development
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: rspec
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
39
54
  none: false
40
55
  requirements:
41
56
  - - ">="
@@ -46,11 +61,11 @@ dependencies:
46
61
  - 0
47
62
  version: 2.0.0
48
63
  type: :runtime
49
- version_requirements: *id002
64
+ version_requirements: *id003
50
65
  - !ruby/object:Gem::Dependency
51
66
  name: require_all
52
67
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
68
+ requirement: &id004 !ruby/object:Gem::Requirement
54
69
  none: false
55
70
  requirements:
56
71
  - - ~>
@@ -61,11 +76,11 @@ dependencies:
61
76
  - 0
62
77
  version: 1.2.0
63
78
  type: :runtime
64
- version_requirements: *id003
79
+ version_requirements: *id004
65
80
  - !ruby/object:Gem::Dependency
66
81
  name: rails3_assist
67
82
  prerelease: false
68
- requirement: &id004 !ruby/object:Gem::Requirement
83
+ requirement: &id005 !ruby/object:Gem::Requirement
69
84
  none: false
70
85
  requirements:
71
86
  - - ~>
@@ -76,11 +91,11 @@ dependencies:
76
91
  - 0
77
92
  version: 0.3.0
78
93
  type: :runtime
79
- version_requirements: *id004
94
+ version_requirements: *id005
80
95
  - !ruby/object:Gem::Dependency
81
96
  name: rails-app-spec
82
97
  prerelease: false
83
- requirement: &id005 !ruby/object:Gem::Requirement
98
+ requirement: &id006 !ruby/object:Gem::Requirement
84
99
  none: false
85
100
  requirements:
86
101
  - - ~>
@@ -91,7 +106,7 @@ dependencies:
91
106
  - 0
92
107
  version: 0.3.0
93
108
  type: :runtime
94
- version_requirements: *id005
109
+ version_requirements: *id006
95
110
  description: Migration RSpec 2 matchers to spec migration files, fx as generated by a Thor generator
96
111
  email: kmandrup@gmail.com
97
112
  executables: []