nendo 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gemtest ADDED
@@ -0,0 +1 @@
1
+
data/History.txt ADDED
@@ -0,0 +1,32 @@
1
+ === 0.6.2 / 2012-02-10
2
+
3
+ * Supported testable gem
4
+ Please install rubygems-test and "gem test".
5
+
6
+ * Modified Rakefile to build the debian package.
7
+ to invoke rspec with "ruby `which rspec` ..." instead of "rspec ..."
8
+
9
+ * Changed dependency rules of gemspec.
10
+
11
+
12
+ === 0.6.1 / 2011-11-06
13
+
14
+ * Fixed some bugs.
15
+
16
+
17
+ === 0.6.0 / 2011-10-28
18
+
19
+ * Refactored nendo.rb file.
20
+
21
+ * It was divided into these files.
22
+ ruby/types.rb
23
+ ruby/reader.rb
24
+ ruby/builtin_functions.rb
25
+ ruby/evaluator.rb
26
+ ruby/printer.rb
27
+ ruby/core.rb
28
+ ruby/out_of_module.rb
29
+
30
+ More older History is here in Japanese
31
+
32
+ * http://oldtype.sumibi.org/show-page/Nendo.ReleaseNote
data/Rakefile ADDED
@@ -0,0 +1,161 @@
1
+ # -*- mode: ruby; -*-
2
+ # Rakefile for Nendo
3
+ # Release Engineering
4
+ # 1. edit the VERSION.yml file
5
+ # 2. rake compile && rake test
6
+ # 3. rake gemspec && rake build
7
+ # to generate nendo-x.x.x.gem
8
+ # 4. install nendo-x.x.x.gem to clean environment and test
9
+ # 5. rake release
10
+ # 6. gem push pkg/nendo-x.x.x.gem ( need gem version 1.3.6 or higer. Please "gem update --system" to update )
11
+
12
+ require 'rake'
13
+ begin
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gemspec|
16
+ gemspec.name = "nendo"
17
+ gemspec.summary = "Nendo is a dialect of Lisp."
18
+ gemspec.description = "Nendo is a programming language written in Ruby."
19
+ gemspec.email = "kiyoka@sumibi.org"
20
+ gemspec.homepage = "http://github.com/kiyoka/nendo"
21
+ gemspec.authors = ["Kiyoka Nishiyama"]
22
+ gemspec.files = FileList['Rakefile',
23
+ '.gemtest',
24
+ 'History.txt',
25
+ 'VERSION.yml',
26
+ 'lib/**/*.rb',
27
+ 'lib/**/*.nnd',
28
+ 'lib/**/*.nndc',
29
+ 'bin/*',
30
+ 'test/*',
31
+ 'example/*.rb',
32
+ 'example/*.nnd',
33
+ 'example/cgi/*',
34
+ 'example/KyotoCabinet/*.nnd',
35
+ 'example/KyotoCabinet/*.rb',
36
+ 'emacs/*.el',
37
+ 'benchmark/*.rb',
38
+ 'benchmark/*.nnd'].to_a
39
+ gemspec.add_dependency "rspec"
40
+ gemspec.add_dependency "json"
41
+ gemspec.add_dependency "rake"
42
+ gemspec.add_development_dependency "jeweler"
43
+ gemspec.add_development_dependency "ruby-prof"
44
+ end
45
+ rescue LoadError
46
+ puts 'Jeweler not available. If you want to build a gemfile, please install with "sudo gem install jeweler"'
47
+ end
48
+
49
+ printf( "Info: NENDO_CLEAN_TEST is [%s]\n", ENV[ 'NENDO_CLEAN_TEST' ] )
50
+
51
+ task :default => [:condition_clean, :test, :condition_test2] do
52
+ end
53
+
54
+ task :test do
55
+ stage1 = []
56
+ stage1 << "time ruby -I ./lib `which rspec` -b ./test/nendo_spec.rb -r ./test/rspec_formatter_for_emacs.rb -f CustomFormatter"
57
+ stage1 << "time ruby -I ./lib `which rspec` -b ./test/syntax_spec.rb -r ./test/rspec_formatter_for_emacs.rb -f CustomFormatter"
58
+ stage1 << "time ruby -I ./lib `which rspec` -b ./test/testframework_spec.rb -r ./test/rspec_formatter_for_emacs.rb -f CustomFormatter"
59
+ stage1 << "time ruby -I ./lib ./bin/nendo ./test/srfi-1-test.nnd"
60
+ stage2 = []
61
+ stage2 << "/bin/rm -f test.record"
62
+ stage2 << "echo "" > test.log"
63
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/textlib-test.nnd >> test.log"
64
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/nendo-util-test.nnd >> test.log"
65
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/json-test.nnd >> test.log"
66
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/srfi-2-test.nnd >> test.log"
67
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/srfi-26-test.nnd >> test.log"
68
+ stage2 << "time ruby -I ./lib ./bin/nendo ./test/util-list-test.nnd >> test.log"
69
+ stage2 << "cat test.record"
70
+ arr = []
71
+ arr += stage1
72
+ arr += stage2
73
+ arr.each {|str|
74
+ sh str
75
+ }
76
+ end
77
+
78
+ task :test2 do
79
+ stage1 = []
80
+ stage1 << "/bin/rm -f test.record"
81
+ stage1 << "echo "" > test2.log"
82
+ stage1 << "time ruby -I ./lib ./bin/nendo ./test/match-test.nnd | tee -a test2.log"
83
+ stage1 << "time ruby -I ./lib ./bin/nendo ./test/util-combinations-test.nnd | tee -a test2.log"
84
+ stage1 << "cat test.record"
85
+ arr = []
86
+ arr += stage1
87
+ arr.each {|str|
88
+ sh str
89
+ }
90
+ end
91
+
92
+ task :condition_test2 do
93
+ if 1 == ENV[ 'NENDO_CLEAN_TEST' ].to_i
94
+ puts "Info: test2 is passed with NENDO_CLEAN_TEST=1 env. because test2 takes too much cpu time."
95
+ else
96
+ Rake::Task["test2"].execute
97
+ end
98
+ end
99
+
100
+ task :compile do
101
+ # Replace Version Number
102
+ targetFile = "./lib/ruby/core.rb"
103
+ vh = Jeweler::VersionHelper.new "."
104
+ (original, modified) = open( targetFile ) {|f|
105
+ lines = f.readlines
106
+ [ lines,
107
+ lines.map {|line|
108
+ if line.match( /##NENDO-VERSION/ )
109
+ sprintf( ' "%s" ##NENDO-VERSION', vh.to_s ) + "\n"
110
+ else
111
+ line
112
+ end
113
+ } ]
114
+ }
115
+ if original.join != modified.join
116
+ puts "Info: " + targetFile + " was updated."
117
+ open( targetFile, "w" ) {|f|
118
+ f.write( modified.join )
119
+ }
120
+ end
121
+
122
+ # Compile
123
+ sh "/bin/rm -f ./lib/*.nndc* ./lib/**/*.nndc*"
124
+ files = []
125
+ files << "./lib/init.nnd"
126
+ files << "./lib/srfi-1.nnd"
127
+ files << "./lib/srfi-2.nnd"
128
+ files << "./lib/srfi-26.nnd"
129
+ files << "./lib/util/list.nnd"
130
+ files << "./lib/text/html-lite.nnd"
131
+ files << "./lib/text/tree.nnd"
132
+ files << "./lib/debug/syslog.nnd"
133
+ files << "./lib/nendo/test.nnd"
134
+ files << "./lib/rfc/json.nnd"
135
+ files << "./lib/util/match.nnd"
136
+ files << "./lib/util/combinations.nnd"
137
+ files << "./lib/nendo/experimental.nnd"
138
+ files.each {|fn|
139
+ sh sprintf( "time ruby -I ./lib ./bin/nendo -c %s > %s", fn, fn + "c" )
140
+ }
141
+ end
142
+
143
+ task :bench do
144
+ sh "ruby --version"
145
+ sh "ruby -I ./lib ./bin/nendo ./benchmark/benchmark.nnd"
146
+ sh " nendo ./benchmark/benchmark.nnd"
147
+ end
148
+
149
+ task :clean_nndc do
150
+ sh "/bin/rm -f ./lib/*.nndc* ./lib/**/*.nndc*"
151
+ end
152
+
153
+ task :condition_clean do
154
+ if 1 == ENV[ 'NENDO_CLEAN_TEST' ].to_i
155
+ Rake::Task["clean_nndc"].execute
156
+ end
157
+ end
158
+
159
+ task :repl do
160
+ sh "ruby -I ./lib ./bin/nendo"
161
+ end
data/VERSION.yml ADDED
@@ -0,0 +1,4 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 6
4
+ :patch: 2
data/lib/ruby/core.rb CHANGED
@@ -42,7 +42,7 @@ module Nendo
42
42
  end
43
43
 
44
44
  def self.version
45
- "0.6.1" ##NENDO-VERSION
45
+ "0.6.2" ##NENDO-VERSION
46
46
  end
47
47
 
48
48
  attr_reader :evaluator
data/test/nendo_spec.rb CHANGED
@@ -35,6 +35,12 @@
35
35
  require 'nendo'
36
36
  include Nendo
37
37
 
38
+ describe Nendo, "Ruby version " do
39
+ it "should" do
40
+ RUBY_VERSION.match( /^1[.]8/ ).should_not be_true
41
+ end
42
+ end
43
+
38
44
  describe Cell, "when initialized as '()" do
39
45
  before do
40
46
  @cell = Cell.new
metadata CHANGED
@@ -1,115 +1,83 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: nendo
3
- version: !ruby/object:Gem::Version
4
- hash: 5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 6
9
- - 1
10
- version: 0.6.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Kiyoka Nishiyama
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-05 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-02-10 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rspec
22
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2152801640 !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
31
22
  type: :runtime
32
23
  prerelease: false
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: jeweler
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- none: false
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- hash: 3
42
- segments:
43
- - 0
44
- version: "0"
45
- type: :runtime
46
- prerelease: false
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
24
+ version_requirements: *2152801640
25
+ - !ruby/object:Gem::Dependency
49
26
  name: json
50
- requirement: &id003 !ruby/object:Gem::Requirement
27
+ requirement: &2152801160 !ruby/object:Gem::Requirement
51
28
  none: false
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- hash: 3
56
- segments:
57
- - 0
58
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
59
33
  type: :runtime
60
34
  prerelease: false
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *2152801160
36
+ - !ruby/object:Gem::Dependency
63
37
  name: rake
64
- requirement: &id004 !ruby/object:Gem::Requirement
38
+ requirement: &2152800680 !ruby/object:Gem::Requirement
65
39
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- hash: 3
70
- segments:
71
- - 0
72
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
73
44
  type: :runtime
74
45
  prerelease: false
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: ruby-prof
78
- requirement: &id005 !ruby/object:Gem::Requirement
46
+ version_requirements: *2152800680
47
+ - !ruby/object:Gem::Dependency
48
+ name: jeweler
49
+ requirement: &2152800200 !ruby/object:Gem::Requirement
79
50
  none: false
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- hash: 3
84
- segments:
85
- - 0
86
- version: "0"
87
- type: :runtime
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
88
56
  prerelease: false
89
- version_requirements: *id005
90
- - !ruby/object:Gem::Dependency
91
- name: rspec
92
- requirement: &id006 !ruby/object:Gem::Requirement
57
+ version_requirements: *2152800200
58
+ - !ruby/object:Gem::Dependency
59
+ name: ruby-prof
60
+ requirement: &2152799680 !ruby/object:Gem::Requirement
93
61
  none: false
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- hash: 3
98
- segments:
99
- - 0
100
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
101
66
  type: :development
102
67
  prerelease: false
103
- version_requirements: *id006
68
+ version_requirements: *2152799680
104
69
  description: Nendo is a programming language written in Ruby.
105
70
  email: kiyoka@sumibi.org
106
- executables:
71
+ executables:
107
72
  - nendo
108
73
  extensions: []
109
-
110
- extra_rdoc_files:
74
+ extra_rdoc_files:
111
75
  - README
112
- files:
76
+ files:
77
+ - .gemtest
78
+ - History.txt
79
+ - Rakefile
80
+ - VERSION.yml
113
81
  - benchmark/benchmark.nnd
114
82
  - benchmark/nendo_benchmark_code.nnd
115
83
  - benchmark/ruby_benchmark_code.rb
@@ -182,36 +150,26 @@ files:
182
150
  - README
183
151
  homepage: http://github.com/kiyoka/nendo
184
152
  licenses: []
185
-
186
153
  post_install_message:
187
154
  rdoc_options: []
188
-
189
- require_paths:
155
+ require_paths:
190
156
  - lib
191
- required_ruby_version: !ruby/object:Gem::Requirement
157
+ required_ruby_version: !ruby/object:Gem::Requirement
192
158
  none: false
193
- requirements:
194
- - - ">="
195
- - !ruby/object:Gem::Version
196
- hash: 3
197
- segments:
198
- - 0
199
- version: "0"
200
- required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
201
164
  none: false
202
- requirements:
203
- - - ">="
204
- - !ruby/object:Gem::Version
205
- hash: 3
206
- segments:
207
- - 0
208
- version: "0"
165
+ requirements:
166
+ - - ! '>='
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
209
169
  requirements: []
210
-
211
170
  rubyforge_project:
212
- rubygems_version: 1.8.11
171
+ rubygems_version: 1.8.15
213
172
  signing_key:
214
173
  specification_version: 3
215
174
  summary: Nendo is a dialect of Lisp.
216
175
  test_files: []
217
-