file_column 0.3.2
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 +69 -0
- data/Gemfile +10 -0
- data/README +54 -0
- data/Rakefile +50 -0
- data/TODO +6 -0
- data/VERSION +1 -0
- data/init.rb +12 -0
- data/lib/file_column.rb +721 -0
- data/lib/file_column_helper.rb +150 -0
- data/lib/file_compat.rb +28 -0
- data/lib/magick_file_column.rb +265 -0
- data/lib/rails_file_column.rb +19 -0
- data/lib/test_case.rb +124 -0
- data/lib/validations.rb +112 -0
- data/test/abstract_unit.rb +63 -0
- data/test/connection.rb +17 -0
- data/test/file_column_helper_test.rb +97 -0
- data/test/file_column_test.rb +650 -0
- data/test/fixtures/entry.rb +32 -0
- data/test/fixtures/invalid-image.jpg +1 -0
- data/test/fixtures/kerb.jpg +0 -0
- data/test/fixtures/mysql.sql +25 -0
- data/test/fixtures/schema.rb +10 -0
- data/test/fixtures/skanthak.png +0 -0
- data/test/magick_test.rb +380 -0
- data/test/magick_view_only_test.rb +21 -0
- metadata +86 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/abstract_unit'
|
2
|
+
require File.dirname(__FILE__) + '/fixtures/entry'
|
3
|
+
|
4
|
+
class RMagickViewOnlyTest < Test::Unit::TestCase
|
5
|
+
include FileColumnHelper
|
6
|
+
|
7
|
+
def setup
|
8
|
+
Entry.file_column :image
|
9
|
+
@request = RequestMock.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def teardown
|
13
|
+
FileUtils.rm_rf File.dirname(__FILE__)+"/public/entry/"
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_url_for_image_column_without_model_versions
|
17
|
+
e = Entry.new(:image => upload(f("skanthak.png")))
|
18
|
+
|
19
|
+
assert_nothing_raised { url_for_image_column e, "image", "50x50" }
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: file_column
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Sebastian Kanthak
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-09-26 00:00:00.000000000 -04:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: jeweler
|
17
|
+
requirement: &80861120 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.6.4
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *80861120
|
26
|
+
description: file upload and rmagick image resizing
|
27
|
+
email: sebastian.kanthak@muehlheim.de
|
28
|
+
executables: []
|
29
|
+
extensions: []
|
30
|
+
extra_rdoc_files:
|
31
|
+
- README
|
32
|
+
- TODO
|
33
|
+
files:
|
34
|
+
- CHANGELOG
|
35
|
+
- Gemfile
|
36
|
+
- README
|
37
|
+
- Rakefile
|
38
|
+
- TODO
|
39
|
+
- VERSION
|
40
|
+
- init.rb
|
41
|
+
- lib/file_column.rb
|
42
|
+
- lib/file_column_helper.rb
|
43
|
+
- lib/file_compat.rb
|
44
|
+
- lib/magick_file_column.rb
|
45
|
+
- lib/rails_file_column.rb
|
46
|
+
- lib/test_case.rb
|
47
|
+
- lib/validations.rb
|
48
|
+
- test/abstract_unit.rb
|
49
|
+
- test/connection.rb
|
50
|
+
- test/file_column_helper_test.rb
|
51
|
+
- test/file_column_test.rb
|
52
|
+
- test/fixtures/entry.rb
|
53
|
+
- test/fixtures/invalid-image.jpg
|
54
|
+
- test/fixtures/kerb.jpg
|
55
|
+
- test/fixtures/mysql.sql
|
56
|
+
- test/fixtures/schema.rb
|
57
|
+
- test/fixtures/skanthak.png
|
58
|
+
- test/magick_test.rb
|
59
|
+
- test/magick_view_only_test.rb
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://github.com/tekin/file_column
|
62
|
+
licenses:
|
63
|
+
- MIT
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ! '>='
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 1.6.2
|
83
|
+
signing_key:
|
84
|
+
specification_version: 3
|
85
|
+
summary: file upload and rmagick image resizing
|
86
|
+
test_files: []
|