string-to 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +0 -0
- data/Manifest.txt +9 -0
- data/README.txt +58 -0
- data/Rakefile +67 -0
- data/lib/string_to.rb +18 -0
- data/lib/string_to/version.rb +9 -0
- data/setup.rb +1585 -0
- data/test/test_helper.rb +7 -0
- data/test/test_string_to.rb +24 -0
- metadata +55 -0
data/test/test_helper.rb
ADDED
@@ -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
|
+
|