rex 0.0.4 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/CHANGELOG.rdoc +7 -0
  2. data/DOCUMENTATION.en.rdoc +215 -0
  3. data/DOCUMENTATION.ja.rdoc +205 -0
  4. data/Manifest.txt +37 -0
  5. data/README.ja +73 -0
  6. data/README.rdoc +53 -0
  7. data/Rakefile +28 -0
  8. data/bin/rex +18 -0
  9. data/lib/rex.rb +3 -23
  10. data/lib/rex/generator.rb +523 -0
  11. data/lib/rex/info.rb +16 -0
  12. data/lib/rex/rexcmd.rb +136 -0
  13. data/sample/a.cmd +1 -0
  14. data/sample/b.cmd +1 -0
  15. data/sample/c.cmd +4 -0
  16. data/sample/calc3.racc +47 -0
  17. data/sample/calc3.rex +15 -0
  18. data/sample/calc3.rex.rb +94 -0
  19. data/sample/calc3.tab.rb +188 -0
  20. data/sample/error1.rex +15 -0
  21. data/sample/error2.rex +15 -0
  22. data/sample/sample.html +32 -0
  23. data/sample/sample.rex +15 -0
  24. data/sample/sample.rex.rb +100 -0
  25. data/sample/sample.xhtml +32 -0
  26. data/sample/sample1.c +9 -0
  27. data/sample/sample1.rex +43 -0
  28. data/sample/sample2.bas +4 -0
  29. data/sample/sample2.rex +33 -0
  30. data/sample/simple.html +7 -0
  31. data/sample/simple.xhtml +10 -0
  32. data/sample/xhtmlparser.racc +66 -0
  33. data/sample/xhtmlparser.rex +72 -0
  34. data/test/assets/test.rex +12 -0
  35. data/test/rex-20060125.rb +152 -0
  36. data/test/rex-20060511.rb +143 -0
  37. data/test/test_generator.rb +184 -0
  38. metadata +74 -57
  39. data/README +0 -50
  40. data/lib/rex/array.rb +0 -13
  41. data/lib/rex/kernel.rb +0 -11
  42. data/lib/rex/modules/boolean.rb +0 -14
  43. data/lib/rex/modules/caller_name.rb +0 -15
  44. data/lib/rex/modules/ordinal.rb +0 -35
  45. data/lib/rex/modules/propercase.rb +0 -15
  46. data/lib/rex/modules/roman.rb +0 -41
  47. data/lib/rex/modules/scrub.rb +0 -66
  48. data/lib/rex/modules/stacktrace.rb +0 -31
  49. data/lib/rex/modules/swap.rb +0 -13
  50. data/lib/rex/modules/to_proc.rb +0 -13
  51. data/lib/rex/modules/tuple.rb +0 -14
  52. data/lib/rex/modules/wrap.rb +0 -15
  53. data/lib/rex/numeric.rb +0 -19
  54. data/lib/rex/string.rb +0 -21
  55. data/lib/rex/symbol.rb +0 -13
  56. data/test/boolean.rb +0 -64
  57. data/test/caller_name.rb +0 -26
  58. data/test/ordinal.rb +0 -609
  59. data/test/propercase.rb +0 -40
  60. data/test/roman.rb +0 -335
  61. data/test/scrub.rb +0 -27
  62. data/test/stacktrace.rb +0 -24
  63. data/test/swap.rb +0 -44
  64. data/test/to_proc.rb +0 -24
  65. data/test/tuple.rb +0 -26
  66. data/test/wrap.rb +0 -44
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # to_proc.rb
4
- # Symbol#to_proc unit tests
5
-
6
- require 'test/unit'
7
- require 'pathname'
8
- dir = Pathname.new(File.expand_path(__FILE__)).realpath
9
- require File.join(File.dirname(dir.to_s), '../lib/rex')
10
-
11
- class ToProcTests < Test::Unit::TestCase
12
- def test_to_proc
13
- expected = 5050
14
- actual = nil
15
-
16
- assert_nothing_raised do
17
- actual = (1..100).inject(&:+)
18
- end
19
-
20
- assert_not_nil(actual)
21
- assert_equal(Fixnum, actual.class)
22
- assert_equal(expected, actual)
23
- end
24
- end
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # tuple.rb
4
- # Kernel#Tuple unit tests
5
-
6
- require 'test/unit'
7
-
8
- require 'pathname'
9
- dir = Pathname.new(File.expand_path(__FILE__)).realpath
10
- require File.join(File.dirname(dir.to_s), '../lib/rex')
11
-
12
- class TupleTests < Test::Unit::TestCase
13
- def test_tuple
14
- expected = true
15
- actual = false
16
-
17
- assert_nothing_raised do
18
- t1 = Tuple([1,2,3])
19
- t2 = Tuple(1, 3, 4)
20
- actual = t1 < t2
21
- end
22
-
23
- assert_instance_of(TrueClass, actual)
24
- assert_equal(expected, actual)
25
- end
26
- end
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # wrap.rb
4
- # String#wrap unit tests
5
-
6
- require 'test/unit'
7
- require 'pathname'
8
- dir = Pathname.new(File.expand_path(__FILE__)).realpath
9
- require File.join(File.dirname(dir.to_s), '../lib/rex')
10
-
11
- class WrapTests < Test::Unit::TestCase
12
- def test_wrap_empty
13
- expected = ''
14
- actual = nil
15
-
16
- assert_nothing_raised do
17
- actual = ''.wrap
18
- end
19
-
20
- assert_not_nil(actual)
21
- assert_equal(String, actual.class)
22
- assert_equal(true, actual.empty?)
23
- end
24
-
25
- def test_wrap_data
26
- expected_size = 1097
27
- actual = nil
28
-
29
- assert_nothing_raised do
30
- begin
31
- f = File.open("#{File.dirname(__FILE__)}/data/wrap_in.txt", 'r')
32
- s = f.readline
33
- actual = s.wrap
34
- ensure
35
- f.close if !f.nil?
36
- end
37
- end
38
-
39
- assert_not_nil(actual)
40
- assert_instance_of(String, actual)
41
- assert_equal(false, actual.empty?)
42
- assert_equal(expected_size, actual.size)
43
- end
44
- end