imagery 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/imagery.gemspec +4 -4
- data/lib/imagery.rb +1 -1
- data/lib/imagery/model.rb +2 -2
- data/test/test_imagery.rb +4 -0
- metadata +10 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.4
|
data/imagery.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{imagery}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Cyril David"]
|
12
|
-
s.date = %q{2010-06-
|
12
|
+
s.date = %q{2010-06-14}
|
13
13
|
s.description = %q{Uses ImageMagick directly underneath. Nuff said.}
|
14
14
|
s.email = %q{cyx.ucron@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.homepage = %q{http://github.com/sinefunc/imagery}
|
40
40
|
s.rdoc_options = ["--charset=UTF-8"]
|
41
41
|
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = %q{1.3.
|
42
|
+
s.rubygems_version = %q{1.3.7}
|
43
43
|
s.summary = %q{Image resizing without all the bloat}
|
44
44
|
s.test_files = [
|
45
45
|
"test/helper.rb",
|
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
|
|
52
52
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
53
53
|
s.specification_version = 3
|
54
54
|
|
55
|
-
if Gem::Version.new(Gem::
|
55
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
56
|
s.add_runtime_dependency(%q<escape>, [">= 0"])
|
57
57
|
s.add_development_dependency(%q<contest>, [">= 0"])
|
58
58
|
s.add_development_dependency(%q<aws-s3>, [">= 0"])
|
data/lib/imagery.rb
CHANGED
data/lib/imagery/model.rb
CHANGED
@@ -36,10 +36,10 @@ module Imagery
|
|
36
36
|
# @param [#to_s] key typically the database ID of a model. But you may also
|
37
37
|
# use anything here just as long as its unique across the
|
38
38
|
# namespace.
|
39
|
-
# @param [
|
39
|
+
# @param [#to_s] namespace used as a grouping mechanism for your images.
|
40
40
|
def initialize(model, key = model.id, namespace = namespace_for(model.class))
|
41
41
|
@key = key.to_s
|
42
|
-
@namespace = namespace
|
42
|
+
@namespace = namespace.to_s
|
43
43
|
@default = @@default
|
44
44
|
@directory = @@directory
|
45
45
|
@sizes = {}
|
data/test/test_imagery.rb
CHANGED
@@ -12,6 +12,10 @@ class TestImagery < Test::Unit::TestCase
|
|
12
12
|
assert_equal 'photo', Imagery.new(Photo.new(1001)).namespace
|
13
13
|
end
|
14
14
|
|
15
|
+
test "using a Symbol as a namespace" do
|
16
|
+
assert_equal 'photo', Imagery.new(Photo.new(1001), 1001, :photo).namespace
|
17
|
+
end
|
18
|
+
|
15
19
|
test "key" do
|
16
20
|
assert_equal '1001', Imagery.new(Photo.new(1001)).key
|
17
21
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Cyril David
|
@@ -14,13 +14,14 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-14 00:00:00 +08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: escape
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
26
|
- - ">="
|
26
27
|
- !ruby/object:Gem::Version
|
@@ -33,6 +34,7 @@ dependencies:
|
|
33
34
|
name: contest
|
34
35
|
prerelease: false
|
35
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
36
38
|
requirements:
|
37
39
|
- - ">="
|
38
40
|
- !ruby/object:Gem::Version
|
@@ -45,6 +47,7 @@ dependencies:
|
|
45
47
|
name: aws-s3
|
46
48
|
prerelease: false
|
47
49
|
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
48
51
|
requirements:
|
49
52
|
- - ">="
|
50
53
|
- !ruby/object:Gem::Version
|
@@ -57,6 +60,7 @@ dependencies:
|
|
57
60
|
name: mocha
|
58
61
|
prerelease: false
|
59
62
|
requirement: &id004 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
60
64
|
requirements:
|
61
65
|
- - ">="
|
62
66
|
- !ruby/object:Gem::Version
|
@@ -103,6 +107,7 @@ rdoc_options:
|
|
103
107
|
require_paths:
|
104
108
|
- lib
|
105
109
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
106
111
|
requirements:
|
107
112
|
- - ">="
|
108
113
|
- !ruby/object:Gem::Version
|
@@ -110,6 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
115
|
- 0
|
111
116
|
version: "0"
|
112
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
113
119
|
requirements:
|
114
120
|
- - ">="
|
115
121
|
- !ruby/object:Gem::Version
|
@@ -119,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
125
|
requirements: []
|
120
126
|
|
121
127
|
rubyforge_project:
|
122
|
-
rubygems_version: 1.3.
|
128
|
+
rubygems_version: 1.3.7
|
123
129
|
signing_key:
|
124
130
|
specification_version: 3
|
125
131
|
summary: Image resizing without all the bloat
|