dragonfly 0.7.3 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dragonfly might be problematic. Click here for more details.

data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.7.3 (2010-08-27)
2
+ ==================
3
+ Fixes
4
+ -----
5
+ - Seems as though inserting after Rails' Rack::Lock was worth it after all
6
+
1
7
  0.7.2 (2010-08-27)
2
8
  ==================
3
9
  Fixes
data/README.md CHANGED
@@ -11,7 +11,7 @@ For the lazy Rails user...
11
11
 
12
12
  gem 'rmagick', :require => 'RMagick'
13
13
  gem 'rack-cache', :require => 'rack/cache'
14
- gem 'dragonfly', '~>0.7.2'
14
+ gem 'dragonfly', '~>0.7.3'
15
15
 
16
16
  **Initializer** (e.g. config/initializers/dragonfly.rb):
17
17
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.3
1
+ 0.7.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dragonfly}
8
- s.version = "0.7.3"
8
+ s.version = "0.7.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark Evans"]
12
- s.date = %q{2010-08-27}
12
+ s.date = %q{2010-08-28}
13
13
  s.email = %q{mark@new-bamboo.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -34,7 +34,7 @@ Gems
34
34
  ----
35
35
  environment.rb
36
36
 
37
- config.gem 'dragonfly', '~>0.7.2'
37
+ config.gem 'dragonfly', '~>0.7.3'
38
38
  config.gem 'rmagick', :lib => 'RMagick'
39
39
  config.gem 'rack-cache', :lib => 'rack/cache'
40
40
 
@@ -33,7 +33,7 @@ application.rb:
33
33
  Gemfile
34
34
  -------
35
35
 
36
- gem 'dragonfly', '~>0.7.2'
36
+ gem 'dragonfly', '~>0.7.3'
37
37
  gem 'rmagick', :require => 'RMagick'
38
38
  gem 'rack-cache', :require => 'rack/cache'
39
39
 
data/irbrc.rb CHANGED
@@ -1,21 +1,15 @@
1
1
  require File.dirname(__FILE__) + '/lib/dragonfly'
2
2
  APP = Dragonfly[:images].configure_with(:rmagick)
3
3
 
4
- available_uids = `find #{APP.datastore.root_path} ! -type d`.split("\n").map do |file|
5
- file.sub("#{APP.datastore.root_path}/", '')
6
- end
7
-
8
- def new_image
9
- APP.create_object(File.new(Dir['samples/*'].first))
10
- end
4
+ # available_uids = `find #{APP.datastore.root_path} ! -type d`.split("\n").map do |file|
5
+ # file.sub("#{APP.datastore.root_path}/", '')
6
+ # end
11
7
 
12
8
  puts "Loaded stuff from dragonfly irbrc"
13
- puts "\nAvailable uids:\n"
14
- puts available_uids
9
+ # puts "\nAvailable uids:\n"
10
+ # puts available_uids
15
11
  puts "\nAvailable sample images:\n"
16
12
  puts Dir['samples/*']
17
- puts "\nAvailable methods:\n"
18
- puts "new_image"
19
13
  puts "\nAvailable constants:\n"
20
14
  puts "APP"
21
15
  puts
@@ -63,6 +63,16 @@ module Dragonfly
63
63
  end
64
64
  end
65
65
 
66
+ def process!(*args)
67
+ assign(process(*args))
68
+ self
69
+ end
70
+
71
+ def encode!(*args)
72
+ assign(encode(*args))
73
+ self
74
+ end
75
+
66
76
  protected
67
77
 
68
78
  attr_reader :job
@@ -299,6 +299,35 @@ describe Item do
299
299
  @item.other_image.data.should == 'eggheads'
300
300
  end
301
301
  end
302
+
303
+ describe "assigning by means of a bang method" do
304
+ before(:each) do
305
+ @app.processor.add :double do |temp_object|
306
+ temp_object.data * 2
307
+ end
308
+ @app.encoder.add do |temp_object, format|
309
+ temp_object.data.downcase + format.to_s
310
+ end
311
+ @item.preview_image = "HELLO"
312
+ end
313
+ it "should modify as if being assigned again" do
314
+ @item.preview_image.process!(:double)
315
+ @item.preview_image.data.should == 'HELLOHELLO'
316
+ end
317
+ it "should update the magic attributes" do
318
+ @item.preview_image.process!(:double)
319
+ @item.preview_image_size.should == 10
320
+ end
321
+ it "should work for encode" do
322
+ @item.preview_image.encode!(:egg)
323
+ @item.preview_image.data.should == 'helloegg'
324
+ end
325
+ it "should work repeatedly" do
326
+ @item.preview_image.process!(:double).encode!(:egg)
327
+ @item.preview_image.data.should == 'hellohelloegg'
328
+ @item.preview_image_size.should == 13
329
+ end
330
+ end
302
331
  end
303
332
 
304
333
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 3
10
- version: 0.7.3
9
+ - 4
10
+ version: 0.7.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mark Evans
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-27 00:00:00 +01:00
18
+ date: 2010-08-28 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency