papermill 1.4.3 → 2.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,7 @@ require 'test/unit'
3
3
  require 'rubygems'
4
4
  gem 'rails'
5
5
  require 'active_record'
6
+ require 'action_controller'
6
7
  require 'action_view'
7
8
  require 'active_support'
8
9
  ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/info.log")
@@ -40,7 +41,7 @@ class Article < ActiveRecord::Base
40
41
  def self.table_name
41
42
  :articles
42
43
  end
43
- papermill
44
+ papermill :asset1
44
45
  papermill :my_assets, :class_name => "MyAsset"
45
46
  end
46
47
 
@@ -57,10 +58,8 @@ class PapermillTest < Test::Unit::TestCase
57
58
  def initialize(*args)
58
59
  super
59
60
  @file = File.new(File.join(File.dirname(__FILE__), "fixtures", "5k.png"), 'rb')
60
-
61
61
  @article = Article.find 1
62
62
  @decoy_article = Article.find 2
63
-
64
63
  @asset1 = PapermillAsset.find 1
65
64
  @asset2 = PapermillAsset.find 2
66
65
  @asset3 = PapermillAsset.find 3
@@ -70,26 +69,10 @@ class PapermillTest < Test::Unit::TestCase
70
69
 
71
70
  def test_namedscopes_for_specific_associations
72
71
  assert_equal @article.my_assets.map(&:id), [3,4]
73
- assert_equal @article.my_assets(:order => "position DESC").map(&:id), [4,3]
74
- assert_equal @article.my_assets(:order => "position DESC", :limit => 1).map(&:id), [4]
75
-
76
- assert_equal @article.assets(:my_assets).map(&:id), [3,4]
77
- assert_equal @article.assets(:my_assets, :order => "position DESC").map(&:id), [4,3]
78
- assert_equal @article.assets(:my_assets, :order => "position DESC", :limit => 1).map(&:id), [4]
79
-
80
- assert_equal @article.papermill_assets.key(:my_assets).map(&:id), [3,4]
81
- assert_equal @article.papermill_assets.key(:my_assets).all(:order => "position DESC").map(&:id), [4,3]
82
- assert_equal @article.papermill_assets.key(:my_assets).all(:order => "position DESC", :limit => 1).map(&:id), [4]
83
72
  end
84
73
 
85
74
  def test_namedscope_for_global_associations
86
- assert_equal @article.assets(:asset1).map(&:id), [2,1]
87
- assert_equal @article.assets(:asset1, :order => "position DESC").map(&:id), [1,2]
88
- assert_equal @article.assets(:asset1, :order => "position DESC", :limit => 1).map(&:id), [1]
89
-
90
- assert_equal @article.papermill_assets.key(:asset1).map(&:id), [2,1]
91
- assert_equal @article.papermill_assets.key(:asset1).all(:order => "position DESC").map(&:id), [1,2]
92
- assert_equal @article.papermill_assets.key(:asset1).all(:order => "position DESC", :limit => 1).map(&:id), [1]
75
+ assert_equal @article.asset1.map(&:id), [2,1]
93
76
  end
94
77
 
95
78
  def test_id_partition
@@ -132,21 +115,3 @@ class PapermillTest < Test::Unit::TestCase
132
115
  assert_equal PapermillAsset.compute_style("100x100"), false
133
116
  end
134
117
  end
135
-
136
- # Filedata=(data)
137
- # Filename=(name)
138
- # create_thumb_file(style_name)
139
- # basename
140
- # extension
141
- # url(style = nil)
142
- # path(style = nil)
143
- # self.papermill_options(assetable_class, assetable_key)
144
- # papermill_options
145
- # destroy_thumbnails
146
- # self.destroy_orphans
147
- # compute_url_key(style)
148
- # has_valid_url_key?(key, style)
149
- # root_directory
150
- # set_file_name
151
- # set_position
152
- # destroy_files
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papermill
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ prerelease: true
5
5
  segments:
6
- - 1
7
- - 4
8
- - 3
9
- version: 1.4.3
6
+ - 2
7
+ - 0
8
+ - 0
9
+ - pre
10
+ version: 2.0.0.pre
10
11
  platform: ruby
11
12
  authors:
12
13
  - "Benoit B\xC3\xA9n\xC3\xA9zech"
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-02 00:00:00 +01:00
18
+ date: 2010-03-24 00:00:00 +01:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -64,6 +65,7 @@ files:
64
65
  - app/views/papermill/_form.html.erb
65
66
  - app/views/papermill/_raw_asset.html.erb
66
67
  - app/views/papermill/_thumbnail_asset.html.erb
68
+ - app/views/papermill/browser.html.erb
67
69
  - app/views/papermill/crop.html.erb
68
70
  - app/views/papermill/edit.html.erb
69
71
  - config/locales/papermill.yml
@@ -85,6 +87,7 @@ files:
85
87
  - lib/papermill/form_builder.rb
86
88
  - lib/papermill/papermill.rb
87
89
  - lib/papermill/papermill_asset.rb
90
+ - lib/papermill/papermill_association.rb
88
91
  - lib/papermill/papermill_helper.rb
89
92
  - lib/papermill/papermill_options.rb
90
93
  - lib/papermill/papermill_paperclip_processor.rb
@@ -148,11 +151,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
151
  version: "0"
149
152
  required_rubygems_version: !ruby/object:Gem::Requirement
150
153
  requirements:
151
- - - ">="
154
+ - - ">"
152
155
  - !ruby/object:Gem::Version
153
156
  segments:
154
- - 0
155
- version: "0"
157
+ - 1
158
+ - 3
159
+ - 1
160
+ version: 1.3.1
156
161
  requirements: []
157
162
 
158
163
  rubyforge_project: