ruby_ex 0.5.6.1 → 0.5.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,26 @@
1
+ 2007-08-15 Nicolas Pouillard <nicolas.pouillard@gmail.com>
2
+
3
+ Bump to dev-ruby/ruby_ex-0.5_p2.
4
+
5
+ * NEWS: Update.
6
+ * Rakefile: Use gem instead require_gem.
7
+ * SPEC.yml: Require core_ex 0.6.6.
8
+ * lib/o_hash.rb: Rename the test class.
9
+
10
+ 2007-03-20 Nicolas Pouillard <nicolas.pouillard@gmail.com>
11
+
12
+ Apply the second part of Roland's patch.
13
+
14
+ * lib/sendmail.rb: Use the correct encoding/charset for the signed part.
15
+
16
+ 2007-02-09 Roland Levillain <roland@lrde.epita.fr>
17
+
18
+ * lib/sendmail.rb (Sendmail::parse_mail_options): Add two fields
19
+ in the options, `charset' and `encoding', selecting plain 7-bit
20
+ ASCII by default, that the user can override.
21
+ Add two options corresponding to these fields.
22
+ Typos.
23
+
1
24
  2006-02-23 Nicolas Despr�s <nicolas.despres@gmail.com>
2
25
 
3
26
  Update the NEWS file.
data/NEWS CHANGED
@@ -1,3 +1,10 @@
1
+ = New in 0.5_p2, 2007-08-15:
2
+
3
+ * Update to core_ex 0.6_p3.
4
+ * Sendmail:
5
+ Add two options: `charset' and `encoding' (the default is still
6
+ plain 7-bit ASCII).
7
+
1
8
  = New in 0.5_p1, 2007-02-03:
2
9
 
3
10
  * Fix a bug in core_ex initialization.
@@ -66,7 +73,7 @@
66
73
  Provides an object oriented way to manage, combine and run your commands.
67
74
 
68
75
  Example:
69
- require 'rubygems' ; require_gem 'ruby_ex' ; require 'ruby_ex'
76
+ require 'rubygems' ; gem 'ruby_ex' ; require 'ruby_ex'
70
77
  Commands.import!
71
78
  ls, wc, out = 'ls'.to_cmd, 'wc'.to_cmd, 'out'.to_path
72
79
 
data/Rakefile CHANGED
@@ -4,5 +4,5 @@
4
4
  # Revision:: $Id$
5
5
 
6
6
  require 'rubygems'
7
- require_gem 'core_ex'
7
+ gem 'core_ex'
8
8
  load 'core_ex/rakefile_base.rf'
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{ruby_ex}
3
- s.version = "0.5.6.1"
4
- s.date = %q{2007-02-03}
3
+ s.version = "0.5.6.2"
4
+ s.date = %q{2007-08-15}
5
5
  s.summary = %q{RubyEx contains general purpose Ruby extensions.}
6
6
  s.email = ["nicolas.despres@gmail.com", "ertai@feydakins.org"]
7
7
  s.homepage = %q{http://api.feydakins.org/ruby_ex}
@@ -10,5 +10,5 @@ Gem::Specification.new do |s|
10
10
  s.authors = ["Nicolas Despr\350s", "Nicolas Pouillard"]
11
11
  s.files = ["lib/abstract.rb", "lib/abstract_node.rb", "lib/attributed_class.rb", "lib/auto_object.rb", "lib/blank_slate.rb", "lib/cache.rb", "lib/choose.rb", "lib/concrete.rb", "lib/config_file.rb", "lib/const_regexp.rb", "lib/d_logger.rb", "lib/daemon.rb", "lib/diff.rb", "lib/diff_tools.rb", "lib/drb_ex.rb", "lib/exp_mod.rb", "lib/file_type.rb", "lib/generate_id.rb", "lib/genpasswd.rb", "lib/hash_eval.rb", "lib/histogram.rb", "lib/html_encode.rb", "lib/indexed_node.rb", "lib/io_marshal.rb", "lib/ioo.rb", "lib/kill_all.rb", "lib/labeled_node.rb", "lib/logger_observer.rb", "lib/md5sum.rb", "lib/meta_factory.rb", "lib/method_call.rb", "lib/mocks.rb", "lib/node.rb", "lib/o_hash.rb", "lib/object_monitor.rb", "lib/object_monitor_activity.rb", "lib/observable.rb", "lib/observable_pool.rb", "lib/pp_hierarchy.rb", "lib/r_path.rb", "lib/random_generators.rb", "lib/regex_list.rb", "lib/regex_path.rb", "lib/ruby_ex.rb", "lib/safe_eval.rb", "lib/sendmail.rb", "lib/service_manager.rb", "lib/shuffle.rb", "lib/spring.rb", "lib/spring_set.rb", "lib/sym_tbl.rb", "lib/sym_tbl_gsub.rb", "lib/syn_flow.rb", "lib/text.rb", "lib/timeout_ex.rb", "lib/trace.rb", "lib/verbose_object.rb", "lib/algorithms/simulated_annealing.rb", "lib/drb/insecure_protected_methods.rb", "lib/drb/observable.rb", "lib/drb/observable_pool.rb", "lib/drb/service.rb", "lib/drb/undumped_attributes.rb", "lib/drb/undumped_indexed_object.rb", "lib/mocks/assertions.rb", "lib/mocks/method_logger.rb", "lib/mocks/mock.rb", "lib/mocks/object.rb", "lib/mocks/observer.rb", "lib/module_extensions/autoload_tree.rb", "lib/module_extensions/hierarchy.rb", "lib/module_extensions/instance_method_visibility.rb", "lib/probability_distributions/gaussian_distribution.rb", "lib/probability_distributions/probability_distribution.rb", "lib/probability_distributions/uniform_distribution.rb", "lib/random_generators/random_generator.rb", "lib/random_generators/ruby.rb", "lib/uri/druby.rb", "lib/uri/file.rb", "lib/uri/ftp_ex.rb", "lib/uri/generic_ex.rb", "lib/uri/http_ex.rb", "lib/uri/mysql.rb", "lib/uri/pgsql.rb", "lib/uri/rsync.rb", "lib/uri/ssh.rb", "lib/uri/svn.rb", "lib/yaml_extensions/chop_header.rb", "lib/yaml_extensions/transform.rb", "lib/yaml_extensions/yregexpath.rb", "test/algorithms", "test/check-pkg-ruby_ex.yml", "test/check-ruby_ex.yml", "test/fixtures", "test/functional", "test/sanity", "test/sanity-suite.yml", "test/stress-tests", "test/unit-suite.yml", "test/algorithms/simulated_annealing_test.rb", "test/fixtures/autoload_tree", "test/fixtures/foo.bz2", "test/fixtures/foo.gz.zip", "test/fixtures/foo.rb.gz", "test/fixtures/foo.tar", "test/fixtures/foo.tar.bz2", "test/fixtures/foo.tar.gz", "test/fixtures/foo.txt", "test/fixtures/my_diff.patch", "test/fixtures/tar.gz.log", "test/fixtures/autoload_tree/A.rb", "test/fixtures/autoload_tree/B.rb", "test/fixtures/autoload_tree/foo", "test/fixtures/autoload_tree/foo/C.rb", "test/sanity/multiple-requires.yml", "test/sanity/single-requires.yml", "test/stress-tests/threads_and_exceptions.yml", "AUTHORS", "ChangeLog", "NEWS", "Rakefile", "README", "SPEC.gemspec", "SPEC.yml"]
12
12
  s.add_dependency(%q<highline>, [">= 1.0.1"])
13
- s.add_dependency(%q<core_ex>, ["~> 0.6.5"])
13
+ s.add_dependency(%q<core_ex>, ["~> 0.6.6"])
14
14
  end
data/SPEC.yml CHANGED
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  Author: The Uttk Team.
3
3
  License: Ruby License
4
- Revision: '$Id: /w/fey/ruby_ex/trunk/SPEC.yml 53944 2007-01-14T12:13:14.937281Z ertai $'
4
+ Revision: '$Id: /w/fey/ruby_ex/trunk/SPEC.yml 62606 2007-08-15T18:43:41.632042Z ertai $'
5
5
 
6
- version: !feydakins.org,2006/version dev-ruby/ruby_ex-0.5_p1
6
+ version: !feydakins.org,2006/version dev-ruby/ruby_ex-0.5_p2
7
7
 
8
8
  # See also lib/ruby_ex.rb
9
9
 
@@ -34,8 +34,8 @@ pkg_files: !filelist
34
34
 
35
35
  dependencies:
36
36
  core_ex:
37
- gem: ~> 0.6.5
38
- tarball: http://rubyforge.iasi.roedu.net/files/ttk/core_ex-0.6.tar.gz
37
+ gem: ~> 0.6.6
38
+ tarball: http://rubyforge.iasi.roedu.net/files/ttk/core_ex-0.6_p3.tar.gz
39
39
  vcs: svn://svn.feydakins.org/ruby_ex/trunk/core_ex
40
40
  highline:
41
41
  - >= 1.0.1
@@ -13,7 +13,7 @@
13
13
  # merge, to_a, inspect and shift
14
14
  #
15
15
  # $LastChangedBy$
16
- # $Id: /w/fey/ruby_ex/trunk/lib/o_hash.rb 24384 2006-07-09T16:59:08.734236Z ertai $
16
+ # $Id: /w/fey/ruby_ex/trunk/lib/o_hash.rb 62606 2007-08-15T18:43:41.632042Z ertai $
17
17
 
18
18
 
19
19
  module OHashMixIn
@@ -222,7 +222,7 @@ end # class Hash
222
222
 
223
223
 
224
224
  test_section __FILE__ do
225
- class OrderedHashTest < Test::Unit::TestCase
225
+ class OHashTest < Test::Unit::TestCase
226
226
 
227
227
  def check_ordered ( h, ref )
228
228
  h.store(4,3)
@@ -305,6 +305,6 @@ test_section __FILE__ do
305
305
  def test_yaml_dump ( anObject, ref, options={} )
306
306
  end
307
307
 
308
- end # OrderedHashTest
308
+ end # OHashTest
309
309
 
310
310
  end
@@ -1,7 +1,7 @@
1
1
  # Copyright:: Copyright (c) 2005 Nicolas Pouillard. All rights reserved.
2
2
  # Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
3
3
  # License:: Gnu General Public License.
4
- # Revision:: $Id: /w/fey/ruby_ex/trunk/lib/ruby_ex.rb 53944 2007-01-14T12:13:14.937281Z ertai $
4
+ # Revision:: $Id: /w/fey/ruby_ex/trunk/lib/ruby_ex.rb 55621 2007-03-07T13:46:07.387732Z ertai $
5
5
 
6
6
  require 'pathname'
7
7
 
@@ -43,7 +43,7 @@ module RubyEx
43
43
  require file.to_s
44
44
  else
45
45
  require 'rubygems' unless ENV['NO_GEM']
46
- require_gem 'core_ex'
46
+ gem 'core_ex'
47
47
  require 'core_ex'
48
48
  end
49
49
  end
@@ -57,7 +57,7 @@ module RubyEx
57
57
  i.fixed_cases 'URI', 'DRuby', 'MySQL', 'PgSQL', 'FTP', 'HTTP', 'DRb'
58
58
  end
59
59
 
60
- VersionId = ::Version.parse("dev-ruby/ruby_ex-0.5_p1")
60
+ VersionId = ::Version.parse("dev-ruby/ruby_ex-0.5_p2")
61
61
 
62
62
  dir.load_path!
63
63
  (dir + 'module_extensions').load_path!
@@ -20,7 +20,9 @@ class Sendmail
20
20
  :to => [],
21
21
  :server => ENV['SMTPSERVER'] || 'localhost:25',
22
22
  :header => {},
23
- :body => STDIN
23
+ :body => STDIN,
24
+ :charset => 'us-ascii',
25
+ :encoding => '7bit'
24
26
  )
25
27
  string_args, hash_args = args.partition { |x| x.is_a?(String) }
26
28
  hash_args.each do |hash|
@@ -75,9 +77,17 @@ class Sendmail
75
77
  opts.on('--header STRING', 'Add some header fields (Yaml syntax)') do |s|
76
78
  options.header.merge! YAML.load(s)
77
79
  end
78
- opts.on('-m', '--[no-]mime', 'Choose the mime protocole') do |mime|
80
+ opts.on('-m', '--[no-]mime', 'Choose the MIME protocol') do |mime|
79
81
  options.mime = mime
80
82
  end
83
+ opts.on('--charset STRING',
84
+ 'Choose a charset for the encoding') do |aCharset|
85
+ options.charset = aCharset
86
+ end
87
+ opts.on('--encoding STRING',
88
+ 'Choose an encoding') do |anEncoding|
89
+ options.encoding = anEncoding
90
+ end
81
91
  opts.on_tail('-h', '--help', 'Show this message') do
82
92
  puts opts
83
93
  exit
@@ -156,11 +166,11 @@ class Sendmail
156
166
  TempPath.new do |mail_body|
157
167
  mail_body.open('w') do |out|
158
168
  if opts.mime
159
- out.puts '
160
- |Content-Type: text/plain; charset="us-ascii"
161
- |Content-Transfer-Encoding: 7bit
169
+ out.puts "
170
+ |Content-Type: text/plain; charset=\"#{opts.charset}\"
171
+ |Content-Transfer-Encoding: #{opts.encoding}
162
172
  |
163
- |'.head_cut!
173
+ |".head_cut!
164
174
  end
165
175
  out.print body
166
176
  end
@@ -191,8 +201,8 @@ class Sendmail
191
201
  |Content-Type: multipart/signed; micalg=pgp-sha1;
192
202
  | protocol="application/pgp-signature";
193
203
  | boundary="#{id}";
194
- | charset="us-ascii"
195
- |Content-Transfer-Encoding: 7bit
204
+ | charset="#{opts.charset}"
205
+ |Content-Transfer-Encoding: #{opts.encoding}
196
206
  |
197
207
  |This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
198
208
  |--#{id}
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: ruby_ex
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.6.1
7
- date: 2007-02-03 00:00:00 +01:00
6
+ version: 0.5.6.2
7
+ date: 2007-08-15 00:00:00 +02:00
8
8
  summary: RubyEx contains general purpose Ruby extensions.
9
9
  require_paths:
10
10
  - lib
@@ -185,5 +185,5 @@ dependencies:
185
185
  requirements:
186
186
  - - ~>
187
187
  - !ruby/object:Gem::Version
188
- version: 0.6.5
188
+ version: 0.6.6
189
189
  version: