bulldog 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.11 2009-12-03
2
+
3
+ * Make Attachment::Base#process! take options like #process.
4
+
1
5
  == 0.0.10 2009-12-01
2
6
 
3
7
  * Fix recording video frame when frame attachment already exists.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.10
1
+ 0.0.11
data/bulldog.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{bulldog}
8
- s.version = "0.0.10"
8
+ s.version = "0.0.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["George Ogata"]
12
- s.date = %q{2009-12-01}
12
+ s.date = %q{2009-12-03}
13
13
  s.description = %q{= Bulldog
14
14
 
15
15
  Flexible file attachments for active record.
@@ -43,8 +43,8 @@ module Bulldog
43
43
  # Like #process, but raise ActiveRecord::RecordInvalid if there
44
44
  # are any errors.
45
45
  #
46
- def process!(event_name, &block)
47
- process(event_name, &block) or
46
+ def process!(event_name, options={}, &block)
47
+ process(event_name, options, &block) or
48
48
  raise ActiveRecord::RecordInvalid, record
49
49
  end
50
50
 
@@ -339,6 +339,22 @@ describe Attachment::Base do
339
339
  lambda{thing.attachment.process!(:event)}.should_not raise_error(ActiveRecord::RecordInvalid)
340
340
  end
341
341
  end
342
+
343
+ it "should pass the given options to #process" do
344
+ with_test_processor(:error => false) do
345
+ styles = nil
346
+ Thing.has_attachment :attachment do
347
+ style :one
348
+ style :two
349
+ process :on => :event, :with => :base do
350
+ styles = self.styles.map(&:name)
351
+ end
352
+ end
353
+ thing = Thing.new(:attachment => test_empty_file)
354
+ thing.attachment.process!(:event, :styles => [:one])
355
+ styles.should == [:one]
356
+ end
357
+ end
342
358
  end
343
359
 
344
360
  describe "storable attributes" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulldog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Ogata
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-01 00:00:00 -05:00
12
+ date: 2009-12-03 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency