papermill 0.10.4 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,9 @@ Asset management made easy.
4
4
 
5
5
  == Install the gem!
6
6
 
7
+ # Add github as a source for latest release of thoughtbot-paperclip gem who will be installed as a dependency and remove rubyforge's paperclip if needed (old 2.1.0 version)
8
+ $ sudo gem source -a http://gems.github.com
9
+ $ sudo gem uninstall paperclip
7
10
  $ sudo gem install papermill
8
11
 
9
12
  == Try the demo!
data/Rakefile CHANGED
@@ -31,7 +31,7 @@ begin
31
31
  gemspec.email = "benoit.benezech@gmail.com"
32
32
  gemspec.homepage = "http://github.com/bbenezech/papermill"
33
33
  gemspec.authors = ["Benoit Bénézech"]
34
- gemspec.add_dependency('paperclip', '>= 2.1.2')
34
+ gemspec.add_dependency('thoughtbot-paperclip', '>= 2.3.1')
35
35
  gemspec.add_dependency('mime-types', '>= 1.16')
36
36
  gemspec.add_dependency('acts_as_list', '>= 0.1.2')
37
37
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.4
1
+ 0.11.0
@@ -9,7 +9,8 @@ class PapermillController < ApplicationController
9
9
  raise if asset.nil? || params[:style] == "original"
10
10
  style = Papermill::PAPERMILL_DEFAULTS[:aliases][params[:style]] || !Papermill::PAPERMILL_DEFAULTS[:alias_only] && params[:style]
11
11
  raise unless style
12
-
12
+ style = {:geometry => style} unless style.is_a? Hash # new Paperclip API
13
+
13
14
  if asset.image?
14
15
  temp_thumbnail = Paperclip::Thumbnail.make(asset_file = asset.file, style)
15
16
  new_parent_folder_path = File.dirname(new_image_path = asset_file.path(params[:style]))
@@ -61,8 +61,9 @@ module Papermill
61
61
 
62
62
  :base_association_name => 'assets',
63
63
  :alias_only => false, # set to true so that only aliases are authorized in url/path
64
+ # aliases name must be strings!
64
65
  :aliases => {
65
- # "example" => "100x100#",
66
+ # 'example' => "100x100#",
66
67
  },
67
68
  # path to the root of your public directory
68
69
  :public_root => ":rails_root/public",
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{papermill}
8
- s.version = "0.10.4"
8
+ s.version = "0.11.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Benoit B\303\251n\303\251zech"]
@@ -73,16 +73,16 @@ Gem::Specification.new do |s|
73
73
  s.specification_version = 3
74
74
 
75
75
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
76
- s.add_runtime_dependency(%q<paperclip>, [">= 2.1.2"])
76
+ s.add_runtime_dependency(%q<thoughtbot-paperclip>, [">= 2.3.1"])
77
77
  s.add_runtime_dependency(%q<mime-types>, [">= 1.16"])
78
78
  s.add_runtime_dependency(%q<acts_as_list>, [">= 0.1.2"])
79
79
  else
80
- s.add_dependency(%q<paperclip>, [">= 2.1.2"])
80
+ s.add_dependency(%q<thoughtbot-paperclip>, [">= 2.3.1"])
81
81
  s.add_dependency(%q<mime-types>, [">= 1.16"])
82
82
  s.add_dependency(%q<acts_as_list>, [">= 0.1.2"])
83
83
  end
84
84
  else
85
- s.add_dependency(%q<paperclip>, [">= 2.1.2"])
85
+ s.add_dependency(%q<thoughtbot-paperclip>, [">= 2.3.1"])
86
86
  s.add_dependency(%q<mime-types>, [">= 1.16"])
87
87
  s.add_dependency(%q<acts_as_list>, [">= 0.1.2"])
88
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papermill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.4
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Benoit B\xC3\xA9n\xC3\xA9zech"
@@ -13,14 +13,14 @@ date: 2009-10-04 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: paperclip
16
+ name: thoughtbot-paperclip
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.2
23
+ version: 2.3.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mime-types