rucy 0.1.2 → 0.1.3
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/.doc/ext/rucy/tester.cpp +222 -0
- data/ChangeLog +5 -0
- data/README +28 -1
- data/Rakefile +13 -38
- data/VERSION +1 -1
- data/bin/rucy2rdoc +113 -0
- data/ext/rucy/extconf.rb +23 -14
- data/ext/rucy/tester.cpp +153 -17
- data/include/rucy/class.h +0 -3
- data/include/rucy/defs.h +4 -0
- data/include/rucy/defs.h.erb +4 -1
- data/include/rucy/exception.h +31 -35
- data/include/rucy/function.h.erb +0 -1
- data/include/rucy/module.h +4 -2
- data/include/rucy/module.h.erb +4 -3
- data/include/rucy/rucy.h +12 -4
- data/include/rucy/value.h.erb +0 -1
- data/include/rucy.h +4 -4
- data/lib/rucy/module.rb +10 -2
- data/rucy.gemspec +23 -9
- data/src/class.cpp +0 -7
- data/src/exception.cpp +28 -52
- data/src/function.cpp +1 -0
- data/src/function.cpp.erb +1 -1
- data/src/module.cpp +8 -4
- data/src/module.cpp.erb +8 -5
- data/src/rucy.cpp +38 -17
- data/src/value.cpp.erb +0 -1
- data/task/ext.rake +74 -15
- data/test/test_rucy.rb +13 -0
- metadata +28 -20
- data/include/rucy/string.h +0 -28
- data/src/string.cpp +0 -78
- data/support.rb +0 -64
- data/task/gem.rake +0 -33
- data/task/git.rake +0 -22
- data/task/lib.rake +0 -62
data/task/gem.rake
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
|
-
namespace :gem do
|
5
|
-
|
6
|
-
name = NAME
|
7
|
-
|
8
|
-
gemspec = "#{name}.gemspec"
|
9
|
-
gem = "#{name}-#{MODULE.version}.gem"
|
10
|
-
|
11
|
-
task :build => gem
|
12
|
-
|
13
|
-
task :install => gem do
|
14
|
-
sh %( #{GEM} install #{gem} )
|
15
|
-
end
|
16
|
-
|
17
|
-
task :uninstall do
|
18
|
-
sh %( #{GEM} uninstall #{name} )
|
19
|
-
end
|
20
|
-
|
21
|
-
task :clean do
|
22
|
-
sh %( rm -f #{gem} )
|
23
|
-
end
|
24
|
-
|
25
|
-
task :upload => gem do
|
26
|
-
sh %( #{GEM} push #{gem} )
|
27
|
-
end
|
28
|
-
|
29
|
-
file gem => "lib:build" do
|
30
|
-
sh %( #{GEM} build #{gemspec} )
|
31
|
-
end
|
32
|
-
|
33
|
-
end# :gem
|
data/task/git.rake
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
|
-
namespace :git do
|
5
|
-
|
6
|
-
task :status do
|
7
|
-
sh %( #{GIT} status )
|
8
|
-
end
|
9
|
-
|
10
|
-
task :diff do
|
11
|
-
sh %( #{GIT} diff | cat )
|
12
|
-
end
|
13
|
-
|
14
|
-
task :push do
|
15
|
-
sh %( #{GIT} push )
|
16
|
-
end
|
17
|
-
|
18
|
-
task :pull do
|
19
|
-
sh %( #{GIT} pull )
|
20
|
-
end
|
21
|
-
|
22
|
-
end# :git
|
data/task/lib.rake
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
# -*- mode: ruby; coding: utf-8 -*-
|
2
|
-
|
3
|
-
|
4
|
-
require 'rake/loaders/makefile'
|
5
|
-
|
6
|
-
|
7
|
-
namespace :lib do
|
8
|
-
|
9
|
-
name = NAME
|
10
|
-
outname = "lib#{name}.a"
|
11
|
-
out = File.join LIBDIR, outname
|
12
|
-
|
13
|
-
erbs = convertions glob("**/*.erb"), {".erb" => ""}
|
14
|
-
headers = glob("include/**/*.h") | erbs.values.grep(/\.h$/)
|
15
|
-
srcs = glob("src/**/*.cpp") | erbs.values.grep(/\.cpp$/)
|
16
|
-
|
17
|
-
depend = 'depend.mf'
|
18
|
-
objs = convertions srcs, {".cpp" => ".o"}
|
19
|
-
tmps = (objs.values | erbs.values) + [depend]
|
20
|
-
|
21
|
-
cflags = CFLAGS.dup
|
22
|
-
cflags << INCDIRS.map{|s| " -I#{s}"}.join
|
23
|
-
|
24
|
-
task :build => out
|
25
|
-
|
26
|
-
task :compile => objs.values
|
27
|
-
|
28
|
-
task :erb => erbs.values
|
29
|
-
|
30
|
-
task :clean do
|
31
|
-
sh %( rm -rf #{tmps.join " "} #{out} )
|
32
|
-
end
|
33
|
-
|
34
|
-
file out => objs.values do
|
35
|
-
sh %( #{AR} #{ARFLAGS} #{out} #{objs.values.join " "} )
|
36
|
-
end
|
37
|
-
|
38
|
-
file depend => 'lib:erb' do
|
39
|
-
sh %( #{CC} -M #{cflags} #{srcs.join ' '} > #{depend} )
|
40
|
-
input = open(depend) {|f| f.read}
|
41
|
-
open(depend, 'w') do |output|
|
42
|
-
output << input.gsub(/\w+\.o/, SRCDIR + '/\0')
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
import depend if File.exist? depend
|
47
|
-
|
48
|
-
objs.each do |(src, obj)|
|
49
|
-
file obj => [depend, src] + erbs.values do
|
50
|
-
sh %( #{CC} -c #{cflags} -o #{obj} #{src} )
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
erbs.each do |(erb, out)|
|
55
|
-
file out => [erb] + RBS do
|
56
|
-
print "#{erb}: compiling to #{out}..."
|
57
|
-
compile erb, out
|
58
|
-
puts "ok"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
end# :lib
|