Skip to content

Commit e6f1ca6

Browse files
committed
:admin: Ergo crap and update history file.
1 parent f764318 commit e6f1ca6

10 files changed

Lines changed: 140 additions & 52 deletions

File tree

.ergo/config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import 'Ergo.rb'
2+
ignore '.ergo/ignore'

.ergo/ignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
doc
2+
site
3+
log

Ergo.rb

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
#!/usr/bin/env ruby
2+
3+
ignore 'doc', 'site', 'log'
4+
5+
book :default => [:demo]
6+
7+
# Run QED demos
8+
book :demo do
9+
desc "run demos"
10+
11+
rule "demo/*.md" => :run_demo
12+
rule "lib/**/*.rb" => :run_all
13+
14+
def run_demo(*demos)
15+
shell "bundle exec qed -Ilib " + demos.join(' ')
16+
end
17+
18+
def run_all
19+
shell "bundle exec qed -Ilib demo/*.md"
20+
end
21+
22+
#task("demo") { shell "qed -Ilib qed/" }
23+
end
24+
25+
# Run unit tests
26+
book :test do
27+
desc "run unit tests"
28+
29+
rule 'test/helper.rb' => :test_all
30+
rule 'test/case_*.rb' => :test
31+
rule /^lib\/(.*?)\.rb$/ => :test_match
32+
rule /^lib\/ansi\/(.*?)\.rb$/ => :test_match
33+
34+
def test_all
35+
test *Dir['test/test_*.rb']
36+
end
37+
38+
def test_match(m)
39+
test "test/case_#{m[1]}"
40+
end
41+
42+
def test(*paths)
43+
shell "bundle exec rubytest #{gem_opt} -Ilib:test " + paths.flatten.join(' ')
44+
end
45+
46+
def gem_opt
47+
defined?(::Gem) ? "-rubygems" : ""
48+
end
49+
50+
#Signal.trap('QUIT') { test_all } # Ctrl-\
51+
end
52+
53+
#Signal.trap('INT' ) { abort("\n") } # Ctrl-C
54+
55+
# Update .index file
56+
book :index do
57+
desc "update index file"
58+
59+
rule 'Index.yml' do
60+
shell "index -u Index.yml"
61+
end
62+
end

HISTORY.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# RELEASE HISTORY
22

3-
## 1.5.0 | 2012-12-20
3+
## 1.5.0 | 2015-01-16
44

55
ANSI 1.5 introduces one change that is not backward compatiable. The
66
`:clear_line` code no longer clears to the end of the line. Instead it
77
clears the entire line. If you have used this in the past you
88
will need to update your code to use `:clear_eol` or `:clear_right`
9-
instead.
9+
instead. In addition this release finally fixes some long time issues
10+
with Windows compatability, and a few other bugs. Yeah!
1011

1112
Changes:
1213

1314
* Alias `:right` and `:left` as `:forward` and `:back` respectively.
1415
* Change `:clear_line` to clear whole line, not just to the end of line.
1516
* Add `:cursor_hide` and `:cursor_show` codes.
17+
* Fix and adjust #rgb method to work as one would expect.
18+
* Fix Windows compatability (old code was alwasy using stty).
19+
* Fix duplicated hash key in chart.rb.
1620

1721

1822
## 1.4.3 | 2012-06-26

Rakefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#/usr/bin/env ruby
2+
3+
task :default => [:demo]
4+
5+
desc "run demos"
6+
task :demo do
7+
sh "bundle exec qed"
8+
end
9+
10+
desc "run unit tests"
11+
task :test do
12+
sh "bundle exec rubytest"
13+
end
14+

task/demo.ergo

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env ruby
2+
3+
desc "run demos"
4+
5+
rule "demo/*.md" => :run_demo
6+
rule "lib/**/*.rb" => :run_all
7+
8+
def run_demo(*demos)
9+
shell "bundle exec qed -Ilib " + demos.join(' ')
10+
end
11+
12+
def run_all
13+
shell "bundle exec qed -Ilib demo/*.md"
14+
end
15+
16+
#task("demo") { shell "qed -Ilib qed/" }
17+

task/index.ergo

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env ruby
2+
3+
desc "update index file"
4+
5+
rule 'Index.yml' do
6+
shell "index -u Index.yml"
7+
end
8+

task/meta.reap

Lines changed: 0 additions & 6 deletions
This file was deleted.

task/test.ergo

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env ruby
2+
3+
desc "run unit tests"
4+
5+
rule 'test/helper.rb' => :test_all
6+
rule 'test/case_*.rb' => :test
7+
rule /^lib\/(.*?)\.rb$/ => :test_match
8+
rule /^lib\/ansi\/(.*?)\.rb$/ => :test_match
9+
10+
def test_all
11+
test *Dir['test/test_*.rb']
12+
end
13+
14+
def test_match(m)
15+
test "test/case_#{m[1]}"
16+
end
17+
18+
def test(*paths)
19+
shell "bundle exec rubytest #{gem_opt} -Ilib:test " + paths.flatten.join(' ')
20+
end
21+
22+
def gem_opt
23+
defined?(::Gem) ? "-rubygems" : ""
24+
end
25+
26+
#Signal.trap('QUIT') { test tests } # Ctrl-\
27+
#Signal.trap('INT' ) { abort("\n") } # Ctrl-C
28+

task/test.reap

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)