bulldog 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.2.3 2011-01-06
2
+
3
+ * #process accepts an :input_file option.
4
+
1
5
  == 0.2.2 2010-07-26
2
6
 
3
7
  * Support for assigning one attachment to another.
@@ -27,7 +27,7 @@ module Bulldog
27
27
  end
28
28
  processor_type = event.processor_type || default_processor_type
29
29
  processor_class = Processor.const_get(processor_type.to_s.camelize)
30
- processor = processor_class.new(self, stream.path)
30
+ processor = processor_class.new(self, options[:input] || stream.path)
31
31
  styles = reflection.styles
32
32
  names = options[:styles] || event.styles and
33
33
  styles = reflection.styles.slice(*names)
@@ -1,5 +1,5 @@
1
1
  module Bulldog
2
- VERSION = [0, 2, 2]
2
+ VERSION = [0, 2, 3]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
@@ -0,0 +1,5 @@
1
+ module Matchers
2
+ def log(expected)
3
+ Log
4
+ end
5
+ end
@@ -293,6 +293,19 @@ describe Attachment::Base do
293
293
  thing.attachment.process(:event).should be_false
294
294
  end
295
295
  end
296
+
297
+ it "should use the given input path, if any" do
298
+ input_file = nil
299
+ Thing.has_attachment :attachment do
300
+ style :normal
301
+ process :on => :test_event do
302
+ input_file = self.input_file
303
+ end
304
+ end
305
+ thing = Thing.new(:attachment => uploaded_file('test.jpg'))
306
+ thing.attachment.process(:test_event, :input => '/path/to/file')
307
+ input_file.should == '/path/to/file'
308
+ end
296
309
  end
297
310
 
298
311
  describe "#process!" do
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulldog
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 2
8
- - 2
9
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
10
11
  platform: ruby
11
12
  authors:
12
13
  - George Ogata
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-07-26 00:00:00 -04:00
18
+ date: 2011-01-06 00:00:00 -05:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: rspec
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 27
27
30
  segments:
28
31
  - 1
29
32
  - 3
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: rspec_outlines
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - "="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 29
41
46
  segments:
42
47
  - 0
43
48
  - 0
@@ -49,9 +54,11 @@ dependencies:
49
54
  name: mocha
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - "="
54
60
  - !ruby/object:Gem::Version
61
+ hash: 43
55
62
  segments:
56
63
  - 0
57
64
  - 9
@@ -137,6 +144,7 @@ files:
137
144
  - spec/integration/saving_an_attachment_spec.rb
138
145
  - spec/macros/attachment/has_dimensions_spec.rb
139
146
  - spec/matchers/file_operations.rb
147
+ - spec/matchers/logging.rb
140
148
  - spec/spec_helper.rb
141
149
  - spec/unit/attachment/base_spec.rb
142
150
  - spec/unit/attachment/image_spec.rb
@@ -167,16 +175,20 @@ rdoc_options:
167
175
  require_paths:
168
176
  - lib
169
177
  required_ruby_version: !ruby/object:Gem::Requirement
178
+ none: false
170
179
  requirements:
171
180
  - - ">="
172
181
  - !ruby/object:Gem::Version
182
+ hash: 3
173
183
  segments:
174
184
  - 0
175
185
  version: "0"
176
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
+ none: false
177
188
  requirements:
178
189
  - - ">="
179
190
  - !ruby/object:Gem::Version
191
+ hash: 23
180
192
  segments:
181
193
  - 1
182
194
  - 3
@@ -185,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
197
  requirements: []
186
198
 
187
199
  rubyforge_project:
188
- rubygems_version: 1.3.6
200
+ rubygems_version: 1.3.7
189
201
  signing_key:
190
202
  specification_version: 3
191
203
  summary: A heavy-duty paperclip. File attachments for ActiveRecord.
@@ -219,6 +231,7 @@ test_files:
219
231
  - spec/integration/saving_an_attachment_spec.rb
220
232
  - spec/macros/attachment/has_dimensions_spec.rb
221
233
  - spec/matchers/file_operations.rb
234
+ - spec/matchers/logging.rb
222
235
  - spec/spec_helper.rb
223
236
  - spec/unit/attachment/base_spec.rb
224
237
  - spec/unit/attachment/image_spec.rb