hairtrigger 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -283,7 +283,7 @@ you want to support.
283
283
  * MySQL 5.0.10+
284
284
  * SQLite 3.3.8+
285
285
 
286
- ## [Changelog](blob/master/CHANGELOG.md)
286
+ ## [Changelog](CHANGELOG.md)
287
287
 
288
288
  ## Copyright
289
289
 
@@ -152,6 +152,7 @@ module HairTrigger
152
152
  @actions.inject({}){ |hash, (key, value)| hash[key] = interpolate(value).rstrip; hash } :
153
153
  interpolate(@actions).rstrip
154
154
  end
155
+ all_names # ensure (component) trigger names are all cached
155
156
  end
156
157
 
157
158
  def validate!(direction = :down)
@@ -1,5 +1,5 @@
1
1
  module HairTrigger
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
 
4
4
  def VERSION.<=>(other)
5
5
  split(/\./).map(&:to_i) <=> other.split(/\./).map(&:to_i)
data/spec/builder_spec.rb CHANGED
@@ -1,6 +1,4 @@
1
- require 'rspec'
2
- require 'active_record'
3
- require 'hair_trigger'
1
+ require 'spec_helper'
4
2
 
5
3
  HairTrigger::Builder.show_warnings = false
6
4
 
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+
3
+ # for this spec to work, you need to have postgres and mysql installed (in
4
+ # addition to the gems), and you should make sure that you have set up
5
+ # appropriate users and permissions. see database.yml for more info
6
+
7
+ describe "migrations" do
8
+ include_context "hairtrigger utils"
9
+
10
+ describe "migrations_current?" do
11
+ let(:adapter) { :sqlite3 }
12
+
13
+ it "should return false if there are pending model triggers" do
14
+ reset_tmp(:migration_glob => "*initial_tables*")
15
+ initialize_db
16
+ HairTrigger.should_not be_migrations_current
17
+ end
18
+
19
+ it "should return true if migrations are current" do
20
+ # just one trigger migration
21
+ reset_tmp(:migration_glob => "20110331212*")
22
+ initialize_db
23
+ migrate_db
24
+ HairTrigger.should be_migrations_current
25
+
26
+ # or multiple
27
+ reset_tmp
28
+ initialize_db
29
+ migrate_db
30
+ HairTrigger.should be_migrations_current
31
+ end
32
+
33
+ it "should return true even if migrations haven't run" do
34
+ reset_tmp
35
+ initialize_db
36
+ migrate_db
37
+ HairTrigger.should be_migrations_current
38
+ end
39
+ end
40
+ end
@@ -1,125 +1,84 @@
1
- require 'active_record'
2
- require 'logger'
3
- require 'active_record/connection_adapters/postgresql_adapter'
4
- require 'active_record/connection_adapters/mysql_adapter'
5
- require 'active_record/connection_adapters/sqlite3_adapter'
6
- require 'mysql2'
7
- require 'rspec'
8
- require 'hair_trigger'
9
- require 'yaml'
1
+ require 'spec_helper'
10
2
 
11
3
  # for this spec to work, you need to have postgres and mysql installed (in
12
4
  # addition to the gems), and you should make sure that you have set up
13
5
  # appropriate users and permissions. see database.yml for more info
14
6
 
15
- describe "schema" do
16
- def reset_tmp
17
- HairTrigger.model_path = 'tmp/models'
18
- HairTrigger.migration_path = 'tmp/migrations'
19
- FileUtils.rm_rf('tmp') if File.directory?('tmp')
20
- FileUtils.mkdir_p(HairTrigger.model_path)
21
- FileUtils.mkdir_p(HairTrigger.migration_path)
22
- FileUtils.cp_r('spec/models', 'tmp')
23
- FileUtils.cp_r(Dir.glob("spec/migrations#{ActiveRecord::VERSION::STRING < "3.1." ? "-pre-3.1" : ""}/*"), HairTrigger.migration_path)
24
- end
25
-
26
- def initialize_db(adapter)
27
- reset_tmp
28
- config = @configs[adapter.to_s].merge({:adapter => adapter.to_s})
29
- case adapter
30
- when :mysql, :mysql2
31
- ret = `echo "drop database if exists #{config['database']}; create database #{config['database']};" | mysql -u #{config['username']}`
32
- raise "error creating database: #{ret}" unless $?.exitstatus == 0
33
- when :postgresql
34
- `dropdb -U #{config['username']} #{config['database']} &>/dev/null`
35
- ret = `createdb -U #{config['username']} #{config['database']} 2>&1`
36
- raise "error creating database: #{ret}" unless $?.exitstatus == 0
7
+ describe "schema dumping" do
8
+ include_context "hairtrigger utils"
9
+
10
+ each_adapter do
11
+ before do
12
+ reset_tmp
13
+ initialize_db
14
+ migrate_db
15
+ db_triggers.grep(/bob_count \+ 1/).size.should eql(1)
37
16
  end
38
- # Arel has an issue in that it keeps using original connection for quoting,
39
- # etc. (which breaks stuff) unless you do this:
40
- Arel::Visitors::ENGINE_VISITORS.delete(ActiveRecord::Base) if defined?(Arel)
41
- ActiveRecord::Base.establish_connection(config)
42
- ActiveRecord::Base.logger = Logger.new('/dev/null')
43
- ActiveRecord::Migrator.migrate(HairTrigger.migration_path)
44
- end
45
17
 
46
- before :all do
47
- @configs = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/../database.yml'))
48
- @configs = @configs[ENV["DB_CONFIG"] || "test"]
49
- end
18
+ context "without schema.rb" do
19
+ it "should work" do
20
+ schema_rb = dump_schema
21
+ schema_rb.should match(/create_trigger\("users_after_insert_row_when_new_name_bob__tr", :generated => true, :compatibility => 1\)/)
22
+ schema_rb.should match(/create_trigger\("users_after_update_row_when_new_name_joe__tr", :compatibility => 1\)/)
23
+ end
50
24
 
51
- [:mysql, :mysql2, :postgresql, :sqlite3].each do |adapter|
52
- it "should correctly dump #{adapter}" do
53
- ActiveRecord::Migration.verbose = false
54
- initialize_db(adapter)
55
- ActiveRecord::Base.connection.triggers.values.grep(/bob_count \+ 1/).size.should eql(1)
25
+ it "should create adapter-specific triggers if no migrations exist" do
26
+ FileUtils.rm_rf(Dir.glob('tmp/migrations/*rb'))
27
+ schema_rb = dump_schema
28
+ schema_rb.should_not match(/create_trigger\(/)
29
+ schema_rb.should match(/no candidate create_trigger statement could be found, creating an adapter-specific one/)
30
+ end
31
+
32
+ it "should not dump triggers in migrations that haven't run" do
33
+ # edit our model trigger, generate a new migration
34
+ replace_file_contents HairTrigger.model_path + '/user.rb',
35
+ '"UPDATE groups SET bob_count = bob_count + 1"',
36
+ '{:default => "UPDATE groups SET bob_count = bob_count + 2"}'
37
+ reset_models
38
+
39
+ HairTrigger.should_not be_migrations_current
40
+ migration = HairTrigger.generate_migration
41
+ HairTrigger.should be_migrations_current
42
+
43
+ schema_rb = dump_schema
44
+ schema_rb.should match(/bob_count \+ 1/)
45
+ schema_rb.should_not match(/bob_count \+ 2/)
46
+ end
47
+ end
56
48
 
57
- # schema dump w/o previous schema.rb
58
- ActiveRecord::SchemaDumper.previous_schema = nil
59
- io = StringIO.new
60
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
61
- io.rewind
62
- schema_rb = io.read
63
- schema_rb.should match(/create_trigger\("users_after_insert_row_when_new_name_bob__tr", :generated => true, :compatibility => 1\)/)
64
- schema_rb.should match(/create_trigger\("users_after_update_row_when_new_name_joe__tr", :compatibility => 1\)/)
49
+ context "without schema.rb" do
50
+ before do
51
+ ActiveRecord::SchemaDumper.previous_schema = dump_schema
52
+ end
65
53
 
66
- # schema dump w/ schema.rb
67
- ActiveRecord::SchemaDumper.previous_schema = schema_rb
68
- io = StringIO.new
69
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
70
- io.rewind
71
- schema_rb2 = io.read
72
- schema_rb2.should eql(schema_rb)
54
+ it "should work" do
55
+ schema_rb = dump_schema
56
+ schema_rb.should match(/create_trigger\("users_after_insert_row_when_new_name_bob__tr", :generated => true, :compatibility => 1\)/)
57
+ schema_rb.should match(/create_trigger\("users_after_update_row_when_new_name_joe__tr", :compatibility => 1\)/)
58
+ end
73
59
 
74
- # edit our model trigger, generate and apply a new migration
75
- user_model = File.read(HairTrigger.model_path + '/user.rb')
76
- File.open(HairTrigger.model_path + '/user.rb', 'w') { |f|
77
- f.write user_model.sub('"UPDATE groups SET bob_count = bob_count + 1"', '{:default => "UPDATE groups SET bob_count = bob_count + 2"}')
78
- }
79
- migration = HairTrigger.generate_migration
80
- ActiveRecord::Migrator.migrate(HairTrigger.migration_path)
81
- HairTrigger.should be_migrations_current
82
- ActiveRecord::Base.connection.triggers.values.grep(/bob_count \+ 1/).size.should eql(0)
83
- ActiveRecord::Base.connection.triggers.values.grep(/bob_count \+ 2/).size.should eql(1)
84
-
85
- # schema dump, should have the updated trigger
86
- ActiveRecord::SchemaDumper.previous_schema = schema_rb2
87
- io = StringIO.new
88
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
89
- io.rewind
90
- schema_rb3 = io.read
91
- schema_rb3.should_not eql(schema_rb2)
92
- schema_rb3.should match(/create_trigger\("users_after_insert_row_when_new_name_bob__tr", :generated => true, :compatibility => 1\)/)
93
- schema_rb3.should match(/UPDATE groups SET bob_count = bob_count \+ 2/)
60
+ it "should still work even if migrations have been deleted" do
61
+ FileUtils.rm_rf(Dir.glob('tmp/migrations/*rb'))
62
+ schema_rb = dump_schema
63
+ schema_rb.should match(/create_trigger\("users_after_insert_row_when_new_name_bob__tr", :generated => true, :compatibility => 1\)/)
64
+ schema_rb.should match(/create_trigger\("users_after_update_row_when_new_name_joe__tr", :compatibility => 1\)/)
65
+ end
94
66
 
95
- # undo migration, schema dump should be back to previous version
96
- ActiveRecord::Migrator.rollback(HairTrigger.migration_path)
97
- ActiveRecord::SchemaDumper.previous_schema = schema_rb3
98
- io = StringIO.new
99
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
100
- io.rewind
101
- schema_rb4 = io.read
102
- schema_rb4.should_not eql(schema_rb3)
103
- schema_rb4.should eql(schema_rb2)
104
- ActiveRecord::Base.connection.triggers.values.grep(/bob_count \+ 1/).size.should eql(1)
67
+ it "should evaluate all migrations even if they haven't run" do
68
+ # edit our model trigger, generate a new migration
69
+ replace_file_contents HairTrigger.model_path + '/user.rb',
70
+ '"UPDATE groups SET bob_count = bob_count + 1"',
71
+ '{:default => "UPDATE groups SET bob_count = bob_count + 2"}'
72
+ reset_models
105
73
 
106
- # delete our migrations, it should still dump correctly
107
- FileUtils.rm_rf(Dir.glob('tmp/migrations/*rb'))
108
- ActiveRecord::SchemaDumper.previous_schema = schema_rb4
109
- io = StringIO.new
110
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
111
- io.rewind
112
- schema_rb5 = io.read
113
- schema_rb5.should eql(schema_rb4)
74
+ HairTrigger.should_not be_migrations_current
75
+ migration = HairTrigger.generate_migration
76
+ HairTrigger.should be_migrations_current
114
77
 
115
- # "delete" schema.rb too, now it should have adapter-specific triggers
116
- ActiveRecord::SchemaDumper.previous_schema = nil
117
- io = StringIO.new
118
- ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
119
- io.rewind
120
- schema_rb6 = io.read
121
- schema_rb6.should_not match(/create_trigger\(/)
122
- schema_rb6.should match(/no candidate create_trigger statement could be found, creating an adapter-specific one/)
78
+ schema_rb = dump_schema
79
+ schema_rb.should match(/bob_count \+ 1/)
80
+ schema_rb.should_not match(/bob_count \+ 2/)
81
+ end
123
82
  end
124
83
  end
125
- end
84
+ end
@@ -0,0 +1,83 @@
1
+ require 'rspec'
2
+ require 'active_record'
3
+ require 'logger'
4
+ require 'hair_trigger'
5
+ require 'yaml'
6
+
7
+ CONFIGS = YAML.load_file(File.expand_path(File.dirname(__FILE__) + '/../database.yml'))[ENV["DB_CONFIG"] || "test"]
8
+ ADAPTERS = [:mysql, :mysql2, :postgresql, :sqlite3]
9
+
10
+ def each_adapter
11
+ require 'active_record/connection_adapters/postgresql_adapter'
12
+ require 'active_record/connection_adapters/mysql_adapter'
13
+ require 'active_record/connection_adapters/sqlite3_adapter'
14
+ require 'mysql2'
15
+
16
+ ADAPTERS.each do |adapter_name|
17
+ context "under #{adapter_name}" do
18
+ let(:adapter) { adapter_name }
19
+ instance_eval &Proc.new
20
+ end
21
+ end
22
+ end
23
+
24
+ shared_context "hairtrigger utils" do
25
+
26
+ def reset_models
27
+ User.send :remove_instance_variable, :@triggers if Object.const_defined?('User')
28
+ load './tmp/models/user.rb' # since some tests modify it
29
+ end
30
+
31
+ def reset_tmp(options = {})
32
+ options[:migration_glob] ||= '*'
33
+ HairTrigger.model_path = 'tmp/models'
34
+ HairTrigger.migration_path = 'tmp/migrations'
35
+ FileUtils.rm_rf('tmp') if File.directory?('tmp')
36
+ FileUtils.mkdir_p(HairTrigger.model_path)
37
+ FileUtils.mkdir_p(HairTrigger.migration_path)
38
+ FileUtils.cp_r('spec/models', 'tmp')
39
+ reset_models
40
+ FileUtils.cp_r(Dir.glob("spec/migrations#{ActiveRecord::VERSION::STRING < "3.1." ? "-pre-3.1" : ""}/#{options[:migration_glob]}"), HairTrigger.migration_path)
41
+ end
42
+
43
+ def initialize_db
44
+ ActiveRecord::Base.clear_all_connections!
45
+ config = CONFIGS[adapter.to_s].merge({:adapter => adapter.to_s})
46
+ case adapter
47
+ when :mysql, :mysql2
48
+ ret = `echo "drop database if exists #{config['database']}; create database #{config['database']};" | mysql -u #{config['username']}`
49
+ raise "error creating database: #{ret}" unless $?.exitstatus == 0
50
+ when :postgresql
51
+ `dropdb -U #{config['username']} #{config['database']} &>/dev/null`
52
+ ret = `createdb -U #{config['username']} #{config['database']} 2>&1`
53
+ raise "error creating database: #{ret}" unless $?.exitstatus == 0
54
+ end
55
+ # Arel has an issue in that it keeps using original connection for quoting,
56
+ # etc. (which breaks stuff) unless you do this:
57
+ Arel::Visitors::ENGINE_VISITORS.delete(ActiveRecord::Base) if defined?(Arel)
58
+ ActiveRecord::Base.establish_connection(config)
59
+ ActiveRecord::Base.logger = Logger.new('/dev/null')
60
+ ActiveRecord::SchemaDumper.previous_schema = nil
61
+ end
62
+
63
+ def migrate_db
64
+ ActiveRecord::Migration.verbose = false
65
+ ActiveRecord::Migrator.migrate(HairTrigger.migration_path)
66
+ end
67
+
68
+ def dump_schema
69
+ io = StringIO.new
70
+ ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, io)
71
+ io.rewind
72
+ io.read
73
+ end
74
+
75
+ def db_triggers
76
+ ActiveRecord::Base.connection.triggers.values
77
+ end
78
+
79
+ def replace_file_contents(path, source, replacement)
80
+ contents = File.read(path)
81
+ File.open(path, 'w') { |f| f.write contents.sub(source, replacement) }
82
+ end
83
+ end
metadata CHANGED
@@ -1,167 +1,172 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hairtrigger
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.5
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 6
10
+ version: 0.2.6
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jon Jensen
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2014-03-13 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2014-03-25 00:00:00 -06:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: activerecord
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '2.3'
22
- type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '2.3'
30
- - !ruby/object:Gem::Dependency
31
- name: ruby_parser
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '3.4'
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 5
30
+ segments:
31
+ - 2
32
+ - 3
33
+ version: "2.3"
38
34
  type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: ruby_parser
39
38
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '3.4'
46
- - !ruby/object:Gem::Dependency
47
- name: ruby2ruby
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 2.0.6
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 13
45
+ segments:
46
+ - 3
47
+ - 5
48
+ version: "3.5"
54
49
  type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: ruby2ruby
55
53
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
- requirements:
56
+ requirements:
59
57
  - - ~>
60
- - !ruby/object:Gem::Version
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 2
62
+ - 0
63
+ - 6
61
64
  version: 2.0.6
62
- - !ruby/object:Gem::Dependency
65
+ type: :runtime
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
63
68
  name: rake
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :development
71
69
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: rspec
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 2.12.0
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
78
+ version: "0"
86
79
  type: :development
80
+ version_requirements: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec
87
83
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
84
+ requirement: &id005 !ruby/object:Gem::Requirement
89
85
  none: false
90
- requirements:
86
+ requirements:
91
87
  - - ~>
92
- - !ruby/object:Gem::Version
88
+ - !ruby/object:Gem::Version
89
+ hash: 63
90
+ segments:
91
+ - 2
92
+ - 12
93
+ - 0
93
94
  version: 2.12.0
94
- - !ruby/object:Gem::Dependency
95
- name: mysql
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: 2.9.1
102
95
  type: :development
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
98
+ name: mysql
103
99
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
100
+ requirement: &id006 !ruby/object:Gem::Requirement
105
101
  none: false
106
- requirements:
102
+ requirements:
107
103
  - - ~>
108
- - !ruby/object:Gem::Version
104
+ - !ruby/object:Gem::Version
105
+ hash: 41
106
+ segments:
107
+ - 2
108
+ - 9
109
+ - 1
109
110
  version: 2.9.1
110
- - !ruby/object:Gem::Dependency
111
- name: mysql2
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: 0.3.11
118
111
  type: :development
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
114
+ name: mysql2
119
115
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
116
+ requirement: &id007 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ hash: 5
122
+ segments:
123
+ - 0
124
+ - 3
125
+ - 11
125
126
  version: 0.3.11
126
- - !ruby/object:Gem::Dependency
127
- name: pg
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: 0.15.1
134
127
  type: :development
128
+ version_requirements: *id007
129
+ - !ruby/object:Gem::Dependency
130
+ name: pg
135
131
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
132
+ requirement: &id008 !ruby/object:Gem::Requirement
133
+ none: false
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ hash: 33
138
+ segments:
139
+ - 0
140
+ - 15
141
+ - 1
141
142
  version: 0.15.1
142
- - !ruby/object:Gem::Dependency
143
- name: sqlite3
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: 1.3.7
150
143
  type: :development
144
+ version_requirements: *id008
145
+ - !ruby/object:Gem::Dependency
146
+ name: sqlite3
151
147
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
148
+ requirement: &id009 !ruby/object:Gem::Requirement
149
+ none: false
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ hash: 21
154
+ segments:
155
+ - 1
156
+ - 3
157
+ - 7
157
158
  version: 1.3.7
158
- description: allows you to declare database triggers in ruby in your models, and then
159
- generate appropriate migrations as they change
159
+ type: :development
160
+ version_requirements: *id009
161
+ description: allows you to declare database triggers in ruby in your models, and then generate appropriate migrations as they change
160
162
  email: jenseng@gmail.com
161
163
  executables: []
164
+
162
165
  extensions: []
166
+
163
167
  extra_rdoc_files: []
164
- files:
168
+
169
+ files:
165
170
  - LICENSE.txt
166
171
  - Rakefile
167
172
  - README.md
@@ -183,33 +188,48 @@ files:
183
188
  - spec/migrations-pre-3.1/20110331212003_initial_tables.rb
184
189
  - spec/migrations-pre-3.1/20110331212631_user_trigger.rb
185
190
  - spec/migrations-pre-3.1/20110417185102_manual_user_trigger.rb
191
+ - spec/migrations_spec.rb
186
192
  - spec/models/group.rb
187
193
  - spec/models/user.rb
188
194
  - spec/schema_dumper_spec.rb
195
+ - spec/spec_helper.rb
196
+ has_rdoc: true
189
197
  homepage: http://github.com/jenseng/hair_trigger
190
- licenses:
198
+ licenses:
191
199
  - MIT
192
200
  post_install_message:
193
201
  rdoc_options: []
194
- require_paths:
202
+
203
+ require_paths:
195
204
  - lib
196
- required_ruby_version: !ruby/object:Gem::Requirement
205
+ required_ruby_version: !ruby/object:Gem::Requirement
197
206
  none: false
198
- requirements:
199
- - - ! '>='
200
- - !ruby/object:Gem::Version
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ hash: 57
211
+ segments:
212
+ - 1
213
+ - 8
214
+ - 7
201
215
  version: 1.8.7
202
- required_rubygems_version: !ruby/object:Gem::Requirement
216
+ required_rubygems_version: !ruby/object:Gem::Requirement
203
217
  none: false
204
- requirements:
205
- - - ! '>='
206
- - !ruby/object:Gem::Version
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ hash: 17
222
+ segments:
223
+ - 1
224
+ - 3
225
+ - 5
207
226
  version: 1.3.5
208
227
  requirements: []
228
+
209
229
  rubyforge_project:
210
- rubygems_version: 1.8.23
230
+ rubygems_version: 1.6.2
211
231
  signing_key:
212
232
  specification_version: 3
213
233
  summary: easy database triggers for active record
214
234
  test_files: []
215
- has_rdoc:
235
+