string-to 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ require 'test/unit'
2
+ require File.dirname(__FILE__) + '/../lib/string_to'
3
+ begin
4
+ require 'rubygems'
5
+ require 'redgreen'
6
+ rescue Exception
7
+ end
@@ -0,0 +1,24 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+ require 'date'
3
+ require 'uri'
4
+
5
+ class StringToTest < Test::Unit::TestCase
6
+ TEST_DATE = '2007-2-13'
7
+ TEST_URI = 'http://rubyforge.org/'
8
+ class Foo
9
+ def self.parse(string) :foo end
10
+ end
11
+
12
+ def test_date_conversion
13
+ assert_equal Date.parse(TEST_DATE), TEST_DATE.to_date
14
+ end
15
+
16
+ def test_nested_class_conversion
17
+ assert_equal :foo, "Test".to_string_to_test__foo
18
+ end
19
+
20
+ def test_uri_conversion
21
+ assert_equal URI.parse(TEST_URI), TEST_URI.to_URI
22
+ assert_equal URI.parse(TEST_URI), TEST_URI.to_u_r_i
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,55 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: string-to
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.0.1
7
+ date: 2007-02-11 00:00:00 +09:00
8
+ summary: This package installs method_missing handler to String class which handles to_xxxx_xxxx message to parse itself and convert into XxxxXxxx by sending parse message to XxxxXxxx class.
9
+ require_paths:
10
+ - lib
11
+ email: takiuchi@drecom.co.jp
12
+ homepage: http://string-to.rubyforge.org
13
+ rubyforge_project: string-to
14
+ description: This package installs method_missing handler to String class which handles to_xxxx_xxxx message to parse itself and convert into XxxxXxxx by sending parse message to XxxxXxxx class.
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - takiuchi
31
+ files:
32
+ - Rakefile
33
+ - README.txt
34
+ - CHANGELOG.txt
35
+ - Manifest.txt
36
+ - setup.rb
37
+ - lib/string_to/version.rb
38
+ - lib/string_to.rb
39
+ - test/test_helper.rb
40
+ - test/test_string_to.rb
41
+ test_files:
42
+ - test/test_helper.rb
43
+ - test/test_string_to.rb
44
+ rdoc_options: []
45
+
46
+ extra_rdoc_files: []
47
+
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ requirements: []
53
+
54
+ dependencies: []
55
+