syntax 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
- $:.unshift "../../lib"
1
+ $:.unshift File.dirname(__FILE__) +"/../../lib"
2
2
 
3
3
  require 'test/unit'
4
- require 'syntax/xml'
4
+ require 'syntax/lang/xml'
5
5
 
6
6
  class TC_Syntax_XML < Test::Unit::TestCase
7
7
 
@@ -1,7 +1,7 @@
1
- $:.unshift "../../lib"
1
+ $:.unshift File.dirname(__FILE__) +"/../../lib"
2
2
 
3
3
  require 'test/unit'
4
- require 'syntax/yaml'
4
+ require 'syntax/lang/yaml'
5
5
 
6
6
  class TC_Syntax_YAML < Test::Unit::TestCase
7
7
 
@@ -0,0 +1,22 @@
1
+ $:.unshift File.dirname(__FILE__) + "/../lib"
2
+ require 'syntax'
3
+ require 'test/unit'
4
+
5
+ class TC_Syntax < Test::Unit::TestCase
6
+ def test_all
7
+ langs = Syntax.all
8
+ assert langs.include?("ruby")
9
+ assert langs.include?("xml")
10
+ assert langs.include?("yaml")
11
+ end
12
+
13
+ def test_load_bogus
14
+ lang = Syntax.load "bogus"
15
+ assert_instance_of Syntax::Default, lang
16
+ end
17
+
18
+ def test_load
19
+ lang = Syntax.load "ruby"
20
+ assert_instance_of Syntax::Ruby, lang
21
+ end
22
+ end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.4
2
+ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: syntax
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
7
- date: 2005-01-11
6
+ version: 0.7.0
7
+ date: 2005-03-23
8
8
  summary: Syntax is Ruby library for performing simple syntax highlighting.
9
9
  require_paths:
10
10
  - lib
@@ -27,20 +27,26 @@ platform: ruby
27
27
  authors:
28
28
  - Jamis Buck
29
29
  files:
30
- - lib/syntax.rb
30
+ - data/ruby.css
31
+ - data/xml.css
32
+ - data/yaml.css
31
33
  - lib/syntax
32
- - lib/syntax/yaml.rb
34
+ - lib/syntax.rb
33
35
  - lib/syntax/common.rb
34
- - lib/syntax/ruby.rb
35
36
  - lib/syntax/convertors
36
- - lib/syntax/xml.rb
37
+ - lib/syntax/lang
37
38
  - lib/syntax/version.rb
39
+ - lib/syntax/convertors/abstract.rb
38
40
  - lib/syntax/convertors/html.rb
41
+ - lib/syntax/lang/ruby.rb
42
+ - lib/syntax/lang/xml.rb
43
+ - lib/syntax/lang/yaml.rb
39
44
  - test/ALL-TESTS.rb
40
45
  - test/syntax
41
- - test/syntax/tc_yaml.rb
46
+ - test/tc_syntax.rb
42
47
  - test/syntax/tc_ruby.rb
43
48
  - test/syntax/tc_xml.rb
49
+ - test/syntax/tc_yaml.rb
44
50
  test_files:
45
51
  - test/ALL-TESTS.rb
46
52
  rdoc_options: []