ansi-sys 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ * 2007-10-23 zunda <zunda at freeshell.org>
2
+ - (0.3.0)
3
+ - lib/ansisys.rb: convert string to EUC as a Hiki plugin
4
+
5
+ * 2007-10-21 zunda <zunda at freeshell.org>
6
+ - website/index.txt: added instruction to gem install and a link to RDoc
7
+
1
8
  * 2007-10-21 zunda <zunda at freeshell.org>
2
9
  - (0.2.0) First release on RubyForge
3
10
  - Makefile: modified commands in commit target
@@ -1,3 +1,6 @@
1
+ == 0.3.0 2007-10-23
2
+ * Hiki plugin now converts text to EUC
3
+
1
4
  == 0.2.0 2007-10-21
2
5
  * First release from RubyForge
3
6
 
@@ -11,7 +11,7 @@ require 'webrick'
11
11
  module AnsiSys
12
12
  module VERSION #:nodoc:
13
13
  MAJOR = 0
14
- MINOR = 2
14
+ MINOR = 3
15
15
  TINY = 0
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY].join('.')
@@ -583,7 +583,7 @@ if defined?(Hiki) and Hiki::Plugin == self.class
583
583
  unless File.exists?(path)
584
584
  raise PluginError, "No such file:#{page_file_name}"
585
585
  end
586
- data = File.open(path){|f| f.read}
586
+ data = File.open(path){|f| f.read}.to_euc
587
587
 
588
588
  colors = AnsiSys::Screen.default_css_colors(invert, bright)
589
589
  styles = AnsiSys::CSSFormatter.hash_to_styles(AnsiSys::Screen.css_styles(colors, max_row, nil), '; ')
@@ -1,3 +1,5 @@
1
+ require 'nkf'
2
+
1
3
  describe "As a Hiki plugin" do
2
4
  before do
3
5
  include 'webrick'
@@ -5,6 +7,10 @@ describe "As a Hiki plugin" do
5
7
  def escape
6
8
  WEBrick::HTTPUtils.escape(self)
7
9
  end
10
+
11
+ def to_euc
12
+ NKF::nkf('-m0 -e', self)
13
+ end
8
14
  end
9
15
 
10
16
  module Hiki
@@ -36,4 +42,8 @@ describe "As a Hiki plugin" do
36
42
  it "should render an HTML fragment as expected" do
37
43
  @plugin.ansi_screen('test_data.txt').should == File.read('spec/attach/test_data.html')
38
44
  end
45
+
46
+ it "should convert charset to EUC-JP" do
47
+ @plugin.ansi_screen('test_utf8.txt').should include("\306\374\313\334\270\354") # `nihongo' in EUC-JP
48
+ end
39
49
  end
@@ -33,7 +33,7 @@
33
33
  <h1>Ruby-ANSI.SYS</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ansi-sys"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/ansi-sys" class="numbers">0.2.0</a>
36
+ <a href="http://rubyforge.org/projects/ansi-sys" class="numbers">0.3.0</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;ansi-sys&#8217;</h1>
39
39
 
@@ -70,6 +70,11 @@ for Hiki.</p>
70
70
  $ ruby setup.rb setup
71
71
  # ruby setup.rb install</pre>
72
72
 
73
+ <p>Or:</p>
74
+
75
+
76
+ <pre># gem install ansi-sys</pre>
77
+
73
78
  <p>As a Hiki plugin, copy the file lib/ansisys.rb into the
74
79
  misc/plugin directory and configure Hiki to enable the plugin.</p>
75
80
 
@@ -89,6 +94,9 @@ terminal.render #=&gt; HTML fragment</pre>
89
94
 
90
95
  <pre>{{ansi_screen(attach_file_name)}}</pre>
91
96
 
97
+ <p>Please also refer the <a href="rdoc/"><span class="caps">API</span> Document</a></p>
98
+
99
+
92
100
  <h2>Contact</h2>
93
101
 
94
102
 
@@ -102,7 +110,7 @@ terminal.render #=&gt; HTML fragment</pre>
102
110
  <p>Please refer
103
111
  <a href="rdoc/files/License_txt.html">License.txt</a></p>
104
112
  <p class="coda">
105
- zunda, 20th October 2007<br>
113
+ zunda, 23rd October 2007<br>
106
114
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
107
115
  </p>
108
116
  </div>
@@ -29,6 +29,10 @@ As a Ruby library:
29
29
  $ ruby setup.rb setup
30
30
  # ruby setup.rb install</pre>
31
31
 
32
+ Or:
33
+
34
+ <pre># gem install ansi-sys</pre>
35
+
32
36
  As a Hiki plugin, copy the file lib/ansisys.rb into the
33
37
  misc/plugin directory and configure Hiki to enable the plugin.
34
38
 
@@ -45,6 +49,8 @@ As a Hiki plugin:
45
49
 
46
50
  <pre>{{ansi_screen(attach_file_name)}}</pre>
47
51
 
52
+ Please also refer the "API Document":rdoc/
53
+
48
54
  h2. Contact
49
55
 
50
56
  Please send your comments and patches to
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: ansi-sys
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.2.0
7
- date: 2007-10-21 00:00:00 -10:00
6
+ version: 0.3.0
7
+ date: 2007-10-23 00:00:00 -10:00
8
8
  summary: Ruby-ANSI.SYS is a library to render texts with ANSI escape sequences.
9
9
  require_paths:
10
10
  - lib