hairtrigger 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -4
- data/lib/hair_trigger.rb +9 -2
- data/lib/hair_trigger/version.rb +1 -1
- metadata +14 -14
data/README.rdoc
CHANGED
@@ -7,9 +7,9 @@ and a simple rake task does all the dirty work for you.
|
|
7
7
|
|
8
8
|
== Installation
|
9
9
|
|
10
|
-
=== Rails 3
|
10
|
+
=== Rails 3 or 4
|
11
11
|
|
12
|
-
If you are using Rails 3, just put hairtrigger in your Gemfile.
|
12
|
+
If you are using Rails 3 or 4, just put hairtrigger in your Gemfile.
|
13
13
|
|
14
14
|
=== Rails 2
|
15
15
|
|
@@ -23,7 +23,7 @@ Put hairtrigger in your Gemfile, or if you're not using bundler, you can
|
|
23
23
|
Create lib/tasks/hair_trigger.rake with the following:
|
24
24
|
|
25
25
|
$VERBOSE = nil
|
26
|
-
Dir["#{Gem.
|
26
|
+
Dir["#{Gem::Specification.find_by_name('hairtrigger').full_gem_path}/lib/tasks/*.rake"].each { |ext| load ext }
|
27
27
|
|
28
28
|
This will give you the db:generate_trigger_migration task, and will ensure
|
29
29
|
that hairtrigger hooks into db:schema:dump.
|
@@ -256,6 +256,7 @@ you want to support.
|
|
256
256
|
|
257
257
|
== Compatibility
|
258
258
|
|
259
|
+
* Ruby 1.8.7+
|
259
260
|
* Rails 2.3+
|
260
261
|
* Postgres 8.0+
|
261
262
|
* MySQL 5.0.10+
|
@@ -263,6 +264,7 @@ you want to support.
|
|
263
264
|
|
264
265
|
== Version History
|
265
266
|
|
267
|
+
* 0.2.4 Rails 4 and Ruby 2 support
|
266
268
|
* 0.2.3 Better 1.9 support, update parsing gems
|
267
269
|
* 0.2.2 PostGIS support
|
268
270
|
* 0.2.1 Bugfix for adapter-specific warnings, loosen parser dependencies
|
@@ -284,4 +286,4 @@ you want to support.
|
|
284
286
|
|
285
287
|
== Copyright
|
286
288
|
|
287
|
-
Copyright (c)
|
289
|
+
Copyright (c) 2011-2013 Jon Jensen. See LICENSE.txt for further details.
|
data/lib/hair_trigger.rb
CHANGED
@@ -36,6 +36,13 @@ module HairTrigger
|
|
36
36
|
ActiveRecord::Base.descendants
|
37
37
|
end
|
38
38
|
|
39
|
+
def migrator
|
40
|
+
migrations = ActiveRecord::VERSION::STRING >= "4.0." ?
|
41
|
+
ActiveRecord::Migrator.migrations(migration_path) :
|
42
|
+
migration_path
|
43
|
+
ActiveRecord::Migrator.new(:up, migrations)
|
44
|
+
end
|
45
|
+
|
39
46
|
def current_migrations(options = {})
|
40
47
|
if options[:in_rake_task]
|
41
48
|
options[:include_manual_triggers] = true
|
@@ -51,7 +58,7 @@ module HairTrigger
|
|
51
58
|
# if we're not in such a rake task (i.e. we just want to know what
|
52
59
|
# triggers are defined, whether or not they are applied in the db), we
|
53
60
|
# evaluate all migrations along with schema.rb, ordered by version
|
54
|
-
migrator =
|
61
|
+
migrator = self.migrator
|
55
62
|
migrated = migrator.migrated rescue []
|
56
63
|
migrations = []
|
57
64
|
migrator.migrations.each do |migration|
|
@@ -196,4 +203,4 @@ end
|
|
196
203
|
ActiveRecord::Base.send :extend, HairTrigger::Base
|
197
204
|
ActiveRecord::Migrator.send :extend, HairTrigger::Migrator
|
198
205
|
ActiveRecord::ConnectionAdapters::AbstractAdapter.class_eval { include HairTrigger::Adapter }
|
199
|
-
ActiveRecord::SchemaDumper.class_eval { include HairTrigger::SchemaDumper }
|
206
|
+
ActiveRecord::SchemaDumper.class_eval { include HairTrigger::SchemaDumper }
|
data/lib/hair_trigger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hairtrigger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
37
|
+
version: 3.2.2
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 3.2.2
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: ruby2ruby
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 2.0.
|
53
|
+
version: 2.0.6
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.0.
|
61
|
+
version: 2.0.6
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rake
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ~>
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 2.
|
101
|
+
version: 2.9.1
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 2.
|
109
|
+
version: 2.9.1
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: mysql2
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.3.11
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.
|
125
|
+
version: 0.3.11
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: pg
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.
|
133
|
+
version: 0.15.1
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.
|
141
|
+
version: 0.15.1
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: sqlite3
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ! '>='
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 1.3.
|
149
|
+
version: 1.3.7
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -154,7 +154,7 @@ dependencies:
|
|
154
154
|
requirements:
|
155
155
|
- - ! '>='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 1.3.
|
157
|
+
version: 1.3.7
|
158
158
|
description: allows you to declare database triggers in ruby in your models, and then
|
159
159
|
generate appropriate migrations as they change
|
160
160
|
email: jenseng@gmail.com
|