rubypp 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.
- data/README.markdown +15 -0
- data/bin/rubypp +11 -0
- data/test/test_rubypp.rb +15 -0
- data.tar.gz.sum +1 -0
- metadata +69 -0
- metadata.gz.sum +1 -0
data/README.markdown
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
Rubypp is a preprocessor that uses ruby to transform text. Syntax is
|
2
|
+
similar to the C preprocessor, e.g.:
|
3
|
+
|
4
|
+
#include <stdio.h>
|
5
|
+
|
6
|
+
#ruby <<END
|
7
|
+
a = 42
|
8
|
+
nil # the last value of the block gets inserted into the output stream
|
9
|
+
END
|
10
|
+
|
11
|
+
int main()
|
12
|
+
{
|
13
|
+
printf("The answer is: #{a}\n");
|
14
|
+
}
|
15
|
+
|
data/bin/rubypp
ADDED
data/test/test_rubypp.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rubypp'
|
2
|
+
require 'stringio'
|
3
|
+
require 'test/unit'
|
4
|
+
|
5
|
+
class RubyPPTest < Test::Unit::TestCase
|
6
|
+
def test_preprocess
|
7
|
+
input = File.open('test.cpp.rpp')
|
8
|
+
output = StringIO.new()
|
9
|
+
preprocessor = RubyPP.new(input, output, 'test.cpp.rpp')
|
10
|
+
preprocessor.preprocess
|
11
|
+
expected = File.read('test.cpp.expected')
|
12
|
+
assert_equal expected, output.string
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
data.tar.gz.sum
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
SHA1 b9d6fb9613127054a91fb221fd4815fa08ca1880
|
metadata
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubypp
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Paul Brannan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2012-05-03 00:00:00 Z
|
13
|
+
dependencies: []
|
14
|
+
|
15
|
+
description: |
|
16
|
+
Rubypp is a preprocessor that uses ruby to transform text. Syntax is
|
17
|
+
similar to the C preprocessor, e.g.:
|
18
|
+
|
19
|
+
#include <stdio.h>
|
20
|
+
|
21
|
+
#ruby <<END
|
22
|
+
a = 42
|
23
|
+
nil # the last value of the block gets inserted into the output stream
|
24
|
+
END
|
25
|
+
|
26
|
+
int main()
|
27
|
+
{
|
28
|
+
printf("The answer is: #{a}\n");
|
29
|
+
}
|
30
|
+
|
31
|
+
email: curlypaul924@gmail.com
|
32
|
+
executables:
|
33
|
+
- rubypp
|
34
|
+
extensions: []
|
35
|
+
|
36
|
+
extra_rdoc_files:
|
37
|
+
- README.markdown
|
38
|
+
files:
|
39
|
+
- README.markdown
|
40
|
+
- test/test_rubypp.rb
|
41
|
+
- bin/rubypp
|
42
|
+
homepage: http://github.com/cout/rubypp/
|
43
|
+
licenses: []
|
44
|
+
|
45
|
+
metadata: {}
|
46
|
+
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
|
50
|
+
require_paths:
|
51
|
+
- lib
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- &id001
|
55
|
+
- ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: "0"
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- *id001
|
61
|
+
requirements: []
|
62
|
+
|
63
|
+
rubyforge_project:
|
64
|
+
rubygems_version: 2.0.a
|
65
|
+
signing_key:
|
66
|
+
specification_version: 4
|
67
|
+
summary: A preprocessor that uses ruby to transform text
|
68
|
+
test_files:
|
69
|
+
- test/test_rubypp.rb
|
metadata.gz.sum
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
SHA1 7758beb87d47c9c5c133d9cb0dfb90bd7f09744f
|