hairtrigger 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -258,6 +258,7 @@ you want to support.
258
258
 
259
259
  == Version History
260
260
 
261
+ * 0.1.13 drop_trigger fix
261
262
  * 0.1.12 DB-specific trigger body support, bugfixes
262
263
  * 0.1.11 Safer migration loading, some speedups
263
264
  * 0.1.10 Sped up migration evaluation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.12
1
+ 0.1.13
@@ -195,7 +195,9 @@ module HairTrigger
195
195
  def to_ruby(indent = '', always_generated = true)
196
196
  prepare!
197
197
  if options[:drop]
198
- "#{indent}drop_trigger(#{prepared_name.inspect}, #{options[:table].inspect})"
198
+ str = "#{indent}drop_trigger(#{prepared_name.inspect}, #{options[:table].inspect}"
199
+ str << ", :generated => true" if always_generated || options[:generated]
200
+ str << ")"
199
201
  else
200
202
  if @trigger_group
201
203
  str = "t." + chained_calls_to_ruby + " do\n"
@@ -53,7 +53,8 @@ module HairTrigger
53
53
  end
54
54
 
55
55
  def generate_drop_trigger(*arguments)
56
- ::HairTrigger::Builder.new(arguments[0], {:table => arguments[1], :drop => true})
56
+ options = arguments[2] || {}
57
+ ::HairTrigger::Builder.new(arguments[0], options.update({:table => arguments[1], :drop => true}))
57
58
  end
58
59
 
59
60
  def generator
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hairtrigger
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 12
10
- version: 0.1.12
9
+ - 13
10
+ version: 0.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jon Jensen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-08 00:00:00 -07:00
18
+ date: 2012-01-16 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency