hairtrigger 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/lib/hair_trigger/migration_reader.rb +3 -3
- data/lib/hair_trigger/version.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -263,6 +263,7 @@ you want to support.
|
|
263
263
|
|
264
264
|
== Version History
|
265
265
|
|
266
|
+
* 0.2.3 Better 1.9 support, update parsing gems
|
266
267
|
* 0.2.2 PostGIS support
|
267
268
|
* 0.2.1 Bugfix for adapter-specific warnings, loosen parser dependencies
|
268
269
|
* 0.2.0 Rails 3.1+ support, easier installation, ruby 1.9 fix, travis-ci
|
@@ -16,13 +16,13 @@ module HairTrigger
|
|
16
16
|
else
|
17
17
|
contents = File.read(source.filename)
|
18
18
|
return [] unless contents =~ /(create|drop)_trigger/
|
19
|
-
sexps = RubyParser.
|
19
|
+
sexps = RubyParser.for_current_ruby.parse(contents)
|
20
20
|
# find the migration class
|
21
21
|
sexps = [sexps] unless sexps[0] == :block
|
22
|
-
sexps = sexps.detect{ |s| s.is_a?(Sexp) && s[0] == :class && s[1] == source.name.to_sym }
|
22
|
+
sexps = sexps.detect{ |s| s.is_a?(Sexp) && s[0] == :class && s[1] == source.name.to_sym }
|
23
23
|
# find the block of the up method
|
24
24
|
sexps = sexps.last if sexps.last.is_a?(Sexp) && sexps.last[0] == :block
|
25
|
-
sexps = sexps.detect{ |s| s.is_a?(Sexp) && (s[0] == :defs && s[1] && s[1][0] == :self && s[2] == :up || s[0] == :defn && s[1] == :up) }
|
25
|
+
sexps = sexps.detect{ |s| s.is_a?(Sexp) && (s[0] == :defs && s[1] && s[1][0] == :self && s[2] == :up || s[0] == :defn && s[1] == :up) }
|
26
26
|
sexps.each do |sexp|
|
27
27
|
next unless (method = extract_method_call(sexp)) && [:create_trigger, :drop_trigger].include?(method)
|
28
28
|
trigger = instance_eval("generate_" + generator.process(sexp))
|
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.3
|
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-04-17 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.0'
|
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.0'
|
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:
|
53
|
+
version: 2.0.4
|
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:
|
61
|
+
version: 2.0.4
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: rake
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|