mini_magick 2.0.1 → 2.0.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.
Potentially problematic release.
This version of mini_magick might be problematic. Click here for more details.
- data/VERSION +1 -1
- data/lib/mini_magick.rb +2 -8
- data/test/command_builder_test.rb +2 -11
- data/test/image_test.rb +1 -0
- metadata +7 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/lib/mini_magick.rb
CHANGED
@@ -250,14 +250,8 @@ module MiniMagick
|
|
250
250
|
def method_missing(symbol, *args)
|
251
251
|
guessed_command_name = symbol.to_s.gsub('_','-')
|
252
252
|
if MOGRIFY_COMMANDS.include?(guessed_command_name)
|
253
|
-
|
254
|
-
|
255
|
-
if (args.size == 1) && (args.first.to_s.include?(' ') || args.first.to_s.include?('#'))
|
256
|
-
push("-#{guessed_command_name}")
|
257
|
-
push(args.join(" "))
|
258
|
-
else
|
259
|
-
push("-#{guessed_command_name} #{args.join(" ")}")
|
260
|
-
end
|
253
|
+
push("-#{guessed_command_name}")
|
254
|
+
push(args.join(" ")) if args.any?
|
261
255
|
else
|
262
256
|
super(symbol, *args)
|
263
257
|
end
|
@@ -8,7 +8,7 @@ class CommandBuilderTest < Test::Unit::TestCase
|
|
8
8
|
def test_basic
|
9
9
|
c = CommandBuilder.new("test")
|
10
10
|
c.resize "30x40"
|
11
|
-
assert_equal "-resize 30x40", c.args.join(" ")
|
11
|
+
assert_equal "-resize \"30x40\"", c.args.join(" ")
|
12
12
|
end
|
13
13
|
|
14
14
|
def test_complicated
|
@@ -16,7 +16,7 @@ class CommandBuilderTest < Test::Unit::TestCase
|
|
16
16
|
c.resize "30x40"
|
17
17
|
c.alpha 1, 3, 4
|
18
18
|
c.resize "mome fingo"
|
19
|
-
assert_equal "-resize 30x40 -alpha 1 3 4 -resize \"mome fingo\"", c.args.join(" ")
|
19
|
+
assert_equal "-resize \"30x40\" -alpha \"1 3 4\" -resize \"mome fingo\"", c.args.join(" ")
|
20
20
|
end
|
21
21
|
|
22
22
|
def test_valid_command
|
@@ -28,15 +28,6 @@ class CommandBuilderTest < Test::Unit::TestCase
|
|
28
28
|
assert true
|
29
29
|
end
|
30
30
|
end
|
31
|
-
|
32
|
-
def test_full_command
|
33
|
-
c = CommandBuilder.new("test")
|
34
|
-
c.resize "30x40"
|
35
|
-
c.alpha 1, 3, 4
|
36
|
-
c.resize "mome fingo"
|
37
|
-
c.background "#000000"
|
38
|
-
assert_equal "test -resize 30x40 -alpha 1 3 4 -resize \"mome fingo\" -background \"#000000\"", c.command
|
39
|
-
end
|
40
31
|
|
41
32
|
def test_dashed
|
42
33
|
c = CommandBuilder.new("test")
|
data/test/image_test.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_magick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 11
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 2
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
version: 2.0.
|
9
|
+
- 2
|
10
|
+
version: 2.0.2
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Corey Johnson
|
@@ -16,7 +17,7 @@ autorequire:
|
|
16
17
|
bindir: bin
|
17
18
|
cert_chain: []
|
18
19
|
|
19
|
-
date: 2010-08-
|
20
|
+
date: 2010-08-28 00:00:00 -04:00
|
20
21
|
default_executable:
|
21
22
|
dependencies:
|
22
23
|
- !ruby/object:Gem::Dependency
|
@@ -27,6 +28,7 @@ dependencies:
|
|
27
28
|
requirements:
|
28
29
|
- - ~>
|
29
30
|
- !ruby/object:Gem::Version
|
31
|
+
hash: 23
|
30
32
|
segments:
|
31
33
|
- 0
|
32
34
|
- 0
|
@@ -76,6 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
78
|
requirements:
|
77
79
|
- - ">="
|
78
80
|
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
79
82
|
segments:
|
80
83
|
- 0
|
81
84
|
version: "0"
|
@@ -84,6 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
87
|
requirements:
|
85
88
|
- - ">="
|
86
89
|
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
87
91
|
segments:
|
88
92
|
- 0
|
89
93
|
version: "0"
|