rmagick 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +9 -0
- data/README.html +13 -13
- data/README.txt +11 -11
- data/doc/comtasks.html +25 -4
- data/doc/constants.html +8 -8
- data/doc/draw.html +112 -116
- data/doc/ex/axes.rb +1 -1
- data/doc/ex/clip_path.rb +5 -4
- data/doc/ex/get_type_metrics.rb +2 -2
- data/doc/ex/resize_to_fill.rb +10 -0
- data/doc/ex/{crop_resized.rb → resize_to_fit.rb} +2 -2
- data/doc/ilist.html +79 -82
- data/doc/image1.html +213 -322
- data/doc/image2.html +123 -136
- data/doc/image3.html +340 -198
- data/doc/imageattrs.html +211 -192
- data/doc/imusage.html +6 -7
- data/doc/index.html +9 -16
- data/doc/info.html +90 -61
- data/doc/magick.html +6 -6
- data/doc/optequiv.html +26 -13
- data/doc/rvg.html +22 -23
- data/doc/rvgclip.html +15 -16
- data/doc/rvggroup.html +23 -23
- data/doc/rvgimage.html +18 -19
- data/doc/rvgpattern.html +101 -82
- data/doc/rvgshape.html +14 -21
- data/doc/rvgstyle.html +4 -4
- data/doc/rvgtext.html +10 -9
- data/doc/rvgtspan.html +12 -11
- data/doc/rvgtut.html +4 -4
- data/doc/rvguse.html +4 -4
- data/doc/rvgxform.html +9 -9
- data/doc/struct.html +193 -195
- data/doc/usage.html +12 -10
- data/examples/constitute.rb +7 -0
- data/ext/RMagick/MANIFEST +4 -4
- data/ext/RMagick/extconf.rb +54 -42
- data/ext/RMagick/rmagick.h +34 -11
- data/ext/RMagick/rmdraw.c +6 -6
- data/ext/RMagick/rmfill.c +2 -2
- data/ext/RMagick/rmilist.c +9 -9
- data/ext/RMagick/rmimage.c +110 -106
- data/ext/RMagick/rminfo.c +33 -14
- data/ext/RMagick/rmmain.c +11 -21
- data/ext/RMagick/rmutil.c +51 -11
- data/lib/RMagick.rb +25 -18
- data/post-clean.rb +3 -3
- data/post-install.rb +4 -5
- data/rmagick.gemspec +5 -3
- data/uninstall.rb +6 -6
- metadata +7 -7
- data/doc/ex/Adispatch.rb +0 -43
- data/doc/ex/Zconstitute.rb +0 -9
data/ext/RMagick/rminfo.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rminfo.c,v 1.
|
1
|
+
/* $Id: rminfo.c,v 1.70 2008/01/02 15:52:19 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
| Name: rminfo.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: Info class method definitions for RMagick.
|
@@ -187,8 +187,8 @@ Info_aref(int argc, VALUE *argv, VALUE self)
|
|
187
187
|
switch (argc)
|
188
188
|
{
|
189
189
|
case 2:
|
190
|
-
format_p =
|
191
|
-
key_p =
|
190
|
+
format_p = rm_str2cstr(argv[0], &format_l);
|
191
|
+
key_p = rm_str2cstr(argv[1], &key_l);
|
192
192
|
if (format_l > MAX_FORMAT_LEN || format_l + key_l > MaxTextExtent-1)
|
193
193
|
{
|
194
194
|
rb_raise(rb_eArgError, "can't reference %.60s:%.1024s - too long", format_p, key_p);
|
@@ -246,8 +246,8 @@ Info_aset(int argc, VALUE *argv, VALUE self)
|
|
246
246
|
switch (argc)
|
247
247
|
{
|
248
248
|
case 3:
|
249
|
-
format_p =
|
250
|
-
key_p =
|
249
|
+
format_p = rm_str2cstr(argv[0], &format_l);
|
250
|
+
key_p = rm_str2cstr(argv[1], &key_l);
|
251
251
|
|
252
252
|
if (format_l > MAX_FORMAT_LEN || format_l+key_l > MaxTextExtent-1)
|
253
253
|
{
|
@@ -331,13 +331,13 @@ Info_authenticate_eq(VALUE self, VALUE passwd)
|
|
331
331
|
{
|
332
332
|
Info *info;
|
333
333
|
char *passwd_p = NULL;
|
334
|
-
long
|
334
|
+
long passwd_l = 0;
|
335
335
|
|
336
336
|
Data_Get_Struct(self, Info, info);
|
337
337
|
|
338
338
|
if (!NIL_P(passwd))
|
339
339
|
{
|
340
|
-
passwd_p =
|
340
|
+
passwd_p = rm_str2cstr(passwd, &passwd_l);
|
341
341
|
}
|
342
342
|
|
343
343
|
if (info->authenticate)
|
@@ -345,7 +345,7 @@ Info_authenticate_eq(VALUE self, VALUE passwd)
|
|
345
345
|
magick_free(info->authenticate);
|
346
346
|
info->authenticate = NULL;
|
347
347
|
}
|
348
|
-
if (
|
348
|
+
if (passwd_l > 0)
|
349
349
|
{
|
350
350
|
magick_clone_string(&info->authenticate, passwd_p);
|
351
351
|
}
|
@@ -414,6 +414,25 @@ Info_border_color_eq(VALUE self, VALUE bc_arg)
|
|
414
414
|
|
415
415
|
|
416
416
|
|
417
|
+
/*
|
418
|
+
Method: Info#caption=<aString>
|
419
|
+
Purpose: emulate the -caption option
|
420
|
+
*/
|
421
|
+
VALUE
|
422
|
+
Info_caption(VALUE self)
|
423
|
+
{
|
424
|
+
return get_option(self, "caption");
|
425
|
+
}
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
VALUE
|
430
|
+
Info_caption_eq(VALUE self, VALUE caption)
|
431
|
+
{
|
432
|
+
return set_option(self, "caption", caption);
|
433
|
+
}
|
434
|
+
|
435
|
+
|
417
436
|
/*
|
418
437
|
Method: Info#channel(channel [, channel...])
|
419
438
|
Purpose: Set the channels
|
@@ -524,8 +543,8 @@ Info_define(int argc, VALUE *argv, VALUE self)
|
|
524
543
|
fmt_arg = rb_funcall(argv[2], rm_ID_to_s, 0);
|
525
544
|
value = StringValuePtr(fmt_arg);
|
526
545
|
case 2:
|
527
|
-
key =
|
528
|
-
format =
|
546
|
+
key = rm_str2cstr(argv[1], &key_l);
|
547
|
+
format = rm_str2cstr(argv[0], &format_l);
|
529
548
|
break;
|
530
549
|
default:
|
531
550
|
rb_raise(rb_eArgError, "wrong number of arguments (%d for 2 or 3)", argc);
|
@@ -1355,7 +1374,7 @@ Info_sampling_factor_eq(VALUE self, VALUE sampling_factor)
|
|
1355
1374
|
|
1356
1375
|
if (!NIL_P(sampling_factor))
|
1357
1376
|
{
|
1358
|
-
sampling_factor_p =
|
1377
|
+
sampling_factor_p = rm_str2cstr(sampling_factor, &sampling_factor_len);
|
1359
1378
|
}
|
1360
1379
|
|
1361
1380
|
if (info->sampling_factor)
|
@@ -1580,8 +1599,8 @@ Info_undefine(VALUE self, VALUE format, VALUE key)
|
|
1580
1599
|
long format_l, key_l;
|
1581
1600
|
char fkey[MaxTextExtent];
|
1582
1601
|
|
1583
|
-
format_p =
|
1584
|
-
key_p =
|
1602
|
+
format_p = rm_str2cstr(format, &format_l);
|
1603
|
+
key_p = rm_str2cstr(key, &key_l);
|
1585
1604
|
|
1586
1605
|
if (format_l > MAX_FORMAT_LEN || format_l + key_l > MaxTextExtent)
|
1587
1606
|
{
|
data/ext/RMagick/rmmain.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmmain.c,v 1.
|
1
|
+
/* $Id: rmmain.c,v 1.233 2008/01/02 23:06:29 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
| Name: rmmain.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: Contains all module, class, method declarations.
|
@@ -50,7 +50,7 @@ Magick_colors(VALUE class)
|
|
50
50
|
{
|
51
51
|
(void) rb_yield(Color_from_ColorInfo(color_info_list[x]));
|
52
52
|
}
|
53
|
-
magick_free(color_info_list);
|
53
|
+
magick_free((void *)color_info_list);
|
54
54
|
return class;
|
55
55
|
}
|
56
56
|
else
|
@@ -61,7 +61,7 @@ Magick_colors(VALUE class)
|
|
61
61
|
(void) rb_ary_push(ary, Color_from_ColorInfo(color_info_list[x]));
|
62
62
|
}
|
63
63
|
|
64
|
-
magick_free(color_info_list);
|
64
|
+
magick_free((void *)color_info_list);
|
65
65
|
return ary;
|
66
66
|
}
|
67
67
|
}
|
@@ -90,7 +90,7 @@ Magick_fonts(VALUE class)
|
|
90
90
|
{
|
91
91
|
(void) rb_yield(Font_from_TypeInfo((TypeInfo *)type_info[x]));
|
92
92
|
}
|
93
|
-
magick_free(type_info);
|
93
|
+
magick_free((void *)type_info);
|
94
94
|
return class;
|
95
95
|
}
|
96
96
|
else
|
@@ -100,7 +100,7 @@ Magick_fonts(VALUE class)
|
|
100
100
|
{
|
101
101
|
(void) rb_ary_push(ary, Font_from_TypeInfo((TypeInfo *)type_info[x]));
|
102
102
|
}
|
103
|
-
magick_free(type_info);
|
103
|
+
magick_free((void *)type_info);
|
104
104
|
return ary;
|
105
105
|
}
|
106
106
|
|
@@ -324,7 +324,7 @@ Init_RMagick2(void)
|
|
324
324
|
{
|
325
325
|
volatile VALUE observable;
|
326
326
|
|
327
|
-
#if defined(
|
327
|
+
#if defined(HAVE_MAGICKCOREGENESIS)
|
328
328
|
MagickCoreGenesis("RMagick", MagickFalse);
|
329
329
|
#else
|
330
330
|
InitializeMagick("RMagick");
|
@@ -854,6 +854,7 @@ Init_RMagick2(void)
|
|
854
854
|
DCL_ATTR_ACCESSOR(Info, authenticate)
|
855
855
|
DCL_ATTR_ACCESSOR(Info, background_color)
|
856
856
|
DCL_ATTR_ACCESSOR(Info, border_color)
|
857
|
+
DCL_ATTR_ACCESSOR(Info, caption)
|
857
858
|
DCL_ATTR_ACCESSOR(Info, colorspace)
|
858
859
|
DCL_ATTR_ACCESSOR(Info, comment)
|
859
860
|
DCL_ATTR_ACCESSOR(Info, compression)
|
@@ -1630,13 +1631,6 @@ static void test_Magick_version(void)
|
|
1630
1631
|
{
|
1631
1632
|
unsigned long version_number;
|
1632
1633
|
const char *version_str;
|
1633
|
-
const char *web_site =
|
1634
|
-
#if defined(MagickHomeURL)
|
1635
|
-
MagickHomeURL
|
1636
|
-
#else
|
1637
|
-
MagickWebSite
|
1638
|
-
#endif
|
1639
|
-
;
|
1640
1634
|
int x, n;
|
1641
1635
|
ID bypass = rb_intern("RMAGICK_BYPASS_VERSION_TEST");
|
1642
1636
|
|
@@ -1659,12 +1653,8 @@ static void test_Magick_version(void)
|
|
1659
1653
|
}
|
1660
1654
|
|
1661
1655
|
rb_raise(rb_eRuntimeError,
|
1662
|
-
"This version of RMagick was created to run with %s %s
|
1663
|
-
|
1664
|
-
" 1) Configure and build RMagick for %.*s, or\n"
|
1665
|
-
" 2) download %s %s from %s and install it.\n" ,
|
1666
|
-
MagickPackageName, MagickLibVersionText, x, version_str, x, version_str,
|
1667
|
-
MagickPackageName, MagickLibVersionText, web_site);
|
1656
|
+
"This version of RMagick was created to run with %s %s but %.*s is in use.\n" ,
|
1657
|
+
MagickPackageName, MagickLibVersionText, x, version_str);
|
1668
1658
|
}
|
1669
1659
|
|
1670
1660
|
}
|
@@ -1694,7 +1684,7 @@ static void version_constants(void)
|
|
1694
1684
|
rb_define_const(Module_Magick, "Version", str);
|
1695
1685
|
|
1696
1686
|
sprintf(long_version,
|
1697
|
-
"This is %s ($Date:
|
1687
|
+
"This is %s ($Date: 2008/01/02 23:06:29 $) Copyright (C) 2008 by Timothy P. Hunter\n"
|
1698
1688
|
"Built with %s\n"
|
1699
1689
|
"Built for %s\n"
|
1700
1690
|
"Web page: http://rmagick.rubyforge.org\n"
|
data/ext/RMagick/rmutil.c
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* $Id: rmutil.c,v 1.
|
1
|
+
/* $Id: rmutil.c,v 1.144 2008/01/03 15:32:00 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
|
-
| Copyright (C)
|
3
|
+
| Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
| Name: rmutil.c
|
5
5
|
| Author: Tim Hunter
|
6
6
|
| Purpose: Utility functions for RMagick
|
@@ -176,10 +176,10 @@ rm_strncasecmp(const char *s1, const char *s2, size_t n)
|
|
176
176
|
void
|
177
177
|
rm_check_ary_len(VALUE ary, long len)
|
178
178
|
{
|
179
|
-
if (
|
179
|
+
if (RARRAY_LEN(ary) < len)
|
180
180
|
{
|
181
181
|
rb_raise(rb_eIndexError, "not enough elements in array - expecting %ld, got %ld",
|
182
|
-
len, (long)
|
182
|
+
len, (long)RARRAY_LEN(ary));
|
183
183
|
}
|
184
184
|
}
|
185
185
|
|
@@ -204,11 +204,11 @@ rm_check_destroyed(VALUE obj)
|
|
204
204
|
|
205
205
|
|
206
206
|
/*
|
207
|
-
Extern:
|
207
|
+
Extern: rm_check_frozen
|
208
208
|
Purpose: raise an error if the image has been destroyed or is frozen
|
209
209
|
*/
|
210
210
|
Image *
|
211
|
-
|
211
|
+
rm_check_frozen(VALUE obj)
|
212
212
|
{
|
213
213
|
Image *image = rm_check_destroyed(obj);
|
214
214
|
rb_check_frozen(obj);
|
@@ -227,6 +227,22 @@ rm_no_freeze(VALUE obj)
|
|
227
227
|
}
|
228
228
|
|
229
229
|
|
230
|
+
/*
|
231
|
+
Extern: rm_str2cstr(str, &len);
|
232
|
+
Purpose: Supply our own version of the "obsolete" rm_str2cstr.
|
233
|
+
*/
|
234
|
+
char *
|
235
|
+
rm_str2cstr(VALUE str, long *len)
|
236
|
+
{
|
237
|
+
StringValue(str);
|
238
|
+
if (len)
|
239
|
+
{
|
240
|
+
*len = RSTRING_LEN(str);
|
241
|
+
}
|
242
|
+
return RSTRING_PTR(str);
|
243
|
+
}
|
244
|
+
|
245
|
+
|
230
246
|
/*
|
231
247
|
* Static: arg_is_number
|
232
248
|
* Purpose: Try to convert the argument to a double,
|
@@ -570,7 +586,7 @@ Pixel_to_color(int argc, VALUE *argv, VALUE self)
|
|
570
586
|
char name[MaxTextExtent];
|
571
587
|
ExceptionInfo exception;
|
572
588
|
ComplianceType compliance = AllCompliance;
|
573
|
-
unsigned int matte =
|
589
|
+
unsigned int matte = MagickFalse;
|
574
590
|
unsigned int depth = QuantumDepth;
|
575
591
|
|
576
592
|
switch (argc)
|
@@ -660,7 +676,7 @@ Pixel_from_HSL(VALUE class, VALUE hsl)
|
|
660
676
|
memset(&rgb, 0, sizeof(rgb));
|
661
677
|
|
662
678
|
hsl = rb_Array(hsl); // Ensure array
|
663
|
-
if (
|
679
|
+
if (RARRAY_LEN(hsl) < 3)
|
664
680
|
{
|
665
681
|
rb_raise(rb_eArgError, "array argument must have at least 3 elements");
|
666
682
|
}
|
@@ -2014,6 +2030,30 @@ Color_to_PixelPacket(PixelPacket *pp, VALUE color)
|
|
2014
2030
|
}
|
2015
2031
|
}
|
2016
2032
|
|
2033
|
+
|
2034
|
+
/*
|
2035
|
+
Extern: Color_to_MagickPixelPacket
|
2036
|
+
Purpose: Convert either a String color name or
|
2037
|
+
a Magick::Pixel to a MagickPixelPacket
|
2038
|
+
Notes: The channel values in a MagickPixelPacket are doubles.
|
2039
|
+
*/
|
2040
|
+
void
|
2041
|
+
Color_to_MagickPixelPacket(Image *image, MagickPixelPacket *mpp, VALUE color)
|
2042
|
+
{
|
2043
|
+
PixelPacket pp;
|
2044
|
+
|
2045
|
+
// image can be NULL
|
2046
|
+
GetMagickPixelPacket(image, mpp);
|
2047
|
+
|
2048
|
+
memset(&pp, '\0', sizeof(pp));
|
2049
|
+
Color_to_PixelPacket(&pp, color);
|
2050
|
+
mpp->red = pp.red;
|
2051
|
+
mpp->green = pp.green;
|
2052
|
+
mpp->blue = pp.blue;
|
2053
|
+
mpp->opacity = pp.opacity;
|
2054
|
+
}
|
2055
|
+
|
2056
|
+
|
2017
2057
|
/*
|
2018
2058
|
Extern: PrimaryInfo_from_PrimaryInfo(pp)
|
2019
2059
|
Purpose: Create a Magick::PrimaryInfo object from a PrimaryInfo structure.
|
@@ -2749,7 +2789,7 @@ static VALUE Enum_type_values(VALUE class)
|
|
2749
2789
|
|
2750
2790
|
if (rb_block_given_p())
|
2751
2791
|
{
|
2752
|
-
for (x = 0; x <
|
2792
|
+
for (x = 0; x < RARRAY_LEN(enumerators); x++)
|
2753
2793
|
{
|
2754
2794
|
(void) rb_yield(rb_ary_entry(enumerators, x));
|
2755
2795
|
}
|
@@ -2757,8 +2797,8 @@ static VALUE Enum_type_values(VALUE class)
|
|
2757
2797
|
}
|
2758
2798
|
else
|
2759
2799
|
{
|
2760
|
-
copy = rb_ary_new2(
|
2761
|
-
for (x = 0; x <
|
2800
|
+
copy = rb_ary_new2(RARRAY_LEN(enumerators));
|
2801
|
+
for (x = 0; x < RARRAY_LEN(enumerators); x++)
|
2762
2802
|
{
|
2763
2803
|
(void) rb_ary_push(copy, rb_ary_entry(enumerators, x));
|
2764
2804
|
}
|
data/lib/RMagick.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: RMagick.rb,v 1.
|
1
|
+
# $Id: RMagick.rb,v 1.64 2008/01/05 22:21:52 rmagick Exp $
|
2
2
|
#==============================================================================
|
3
3
|
# Copyright (C) 2007 by Timothy P. Hunter
|
4
4
|
# Name: RMagick.rb
|
@@ -750,21 +750,6 @@ class Image
|
|
750
750
|
self
|
751
751
|
end
|
752
752
|
|
753
|
-
# Force an image to exact dimensions without changing the aspect ratio.
|
754
|
-
# Resize and crop if necessary. (Thanks to Jerett Taylor!)
|
755
|
-
def crop_resized(ncols, nrows, gravity=CenterGravity)
|
756
|
-
copy.crop_resized!(ncols, nrows, gravity)
|
757
|
-
end
|
758
|
-
|
759
|
-
def crop_resized!(ncols, nrows, gravity=CenterGravity)
|
760
|
-
if ncols != columns || nrows != rows
|
761
|
-
scale = [ncols/columns.to_f, nrows/rows.to_f].max
|
762
|
-
resize!(scale*columns+0.5, scale*rows+0.5)
|
763
|
-
end
|
764
|
-
crop!(gravity, ncols, nrows, true) if ncols != columns || nrows != rows
|
765
|
-
self
|
766
|
-
end
|
767
|
-
|
768
753
|
# Used by ImageList methods - see ImageList#cur_image
|
769
754
|
def cur_image
|
770
755
|
self
|
@@ -927,15 +912,37 @@ class Image
|
|
927
912
|
resize(width, height)
|
928
913
|
end
|
929
914
|
|
915
|
+
# Force an image to exact dimensions without changing the aspect ratio.
|
916
|
+
# Resize and crop if necessary. (Thanks to Jerett Taylor!)
|
917
|
+
def resize_to_fill(ncols, nrows=nil, gravity=CenterGravity)
|
918
|
+
copy.crop_resized!(ncols, nrows, gravity)
|
919
|
+
end
|
920
|
+
|
921
|
+
def resize_to_fill!(ncols, nrows=nil, gravity=CenterGravity)
|
922
|
+
nrows ||= ncols
|
923
|
+
if ncols != columns || nrows != rows
|
924
|
+
scale = [ncols/columns.to_f, nrows/rows.to_f].max
|
925
|
+
resize!(scale*columns+0.5, scale*rows+0.5)
|
926
|
+
end
|
927
|
+
crop!(gravity, ncols, nrows, true) if ncols != columns || nrows != rows
|
928
|
+
self
|
929
|
+
end
|
930
|
+
|
931
|
+
# Preserve aliases used < RMagick 2.0.1
|
932
|
+
alias_method :crop_resized, :resize_to_fill
|
933
|
+
alias_method :crop_resized!, :resize_to_fill!
|
934
|
+
|
930
935
|
# Convenience method to resize retaining the aspect ratio.
|
931
936
|
# (Thanks to Robert Manni!)
|
932
|
-
def resize_to_fit(cols, rows)
|
937
|
+
def resize_to_fit(cols, rows=nil)
|
938
|
+
rows ||= cols
|
933
939
|
change_geometry(Geometry.new(cols, rows)) do |ncols, nrows|
|
934
940
|
resize(ncols, nrows)
|
935
941
|
end
|
936
942
|
end
|
937
943
|
|
938
|
-
def resize_to_fit!(cols, rows)
|
944
|
+
def resize_to_fit!(cols, rows=nil)
|
945
|
+
rows ||= cols
|
939
946
|
change_geometry(Geometry.new(cols, rows)) do |ncols, nrows|
|
940
947
|
resize!(ncols, nrows)
|
941
948
|
end
|
data/post-clean.rb
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# doc/*.rb.html
|
3
3
|
# doc/ex/* (!rb)
|
4
4
|
# Bug #246: Don't use chdir!
|
5
|
-
require '
|
5
|
+
require 'fileutils'
|
6
6
|
|
7
7
|
targets = Dir['doc/*.rb.html']
|
8
|
-
|
8
|
+
FileUtils.safe_unlink(targets) unless targets.empty?
|
9
9
|
|
10
10
|
targets = Dir['doc/ex/*']
|
11
11
|
targets.delete_if { |entry| File.directory?(entry) || %r{\.rb\z}.match(entry) }
|
12
|
-
|
12
|
+
FileUtils.safe_unlink(targets) unless targets.empty?
|
data/post-install.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# install RMagick documentation
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'fileutils'
|
4
4
|
require 'find'
|
5
5
|
|
6
6
|
if defined?(Installer) && self.class == Installer
|
@@ -33,13 +33,12 @@ if BUILD_HTMLDOC
|
|
33
33
|
next if FileTest.directory? file
|
34
34
|
target = file.sub(/^doc\//,docdir())
|
35
35
|
unless FileTest.exists? File.dirname(target)
|
36
|
-
|
36
|
+
FileUtils.mkdir_p(File.dirname(target), :verbose => true)
|
37
37
|
# Mark this directory as one we created so
|
38
38
|
# that uninstall.rb knows it's okay to delete
|
39
|
-
|
40
|
-
f.close
|
39
|
+
FileUtils.touch("#{File.dirname(target)}/.rmagick")
|
41
40
|
end
|
42
|
-
|
41
|
+
FileUtils.install(file, target, :mode => 0644)
|
43
42
|
end
|
44
43
|
|
45
44
|
else
|
data/rmagick.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = %q{rmagick}
|
4
|
-
s.version = "2.
|
4
|
+
s.version = "2.1.0"
|
5
5
|
s.date = Date.today.to_s
|
6
6
|
s.summary = %q{Ruby binding to ImageMagick}
|
7
7
|
s.description = %q{RMagick is an interface between Ruby and ImageMagick.}
|
@@ -9,10 +9,12 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = %q{rmagick@rubyforge.org}
|
10
10
|
s.homepage = %q{http://rubyforge.org/projects/rmagick}
|
11
11
|
s.files = Dir.glob('**/*')
|
12
|
-
s.
|
12
|
+
s.bindir = 'bin'
|
13
|
+
s.executables = Dir.glob('bin/*').collect {|f| File.basename(f)}
|
14
|
+
s.require_paths << 'ext'
|
13
15
|
s.rubyforge_project = %q{rmagick}
|
14
16
|
s.extensions = %w{ext/RMagick/extconf.rb}
|
15
17
|
s.has_rdoc = false
|
16
18
|
s.required_ruby_version = '>= 1.8.2'
|
17
|
-
s.requirements << 'ImageMagick 6.
|
19
|
+
s.requirements << 'ImageMagick 6.3.0 or later'
|
18
20
|
end
|