RbST 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +0 -2
- data/Rakefile +1 -2
- data/RbST.gemspec +5 -8
- data/VERSION +1 -1
- data/lib/rbst.rb +3 -3
- data/test/test_rbst.rb +4 -3
- metadata +3 -13
data/README.markdown
CHANGED
data/Rakefile
CHANGED
@@ -10,9 +10,8 @@ begin
|
|
10
10
|
gem.email = "wmelody@gmail.com"
|
11
11
|
gem.homepage = "http://rdoc.info/projects/autodata/rbst"
|
12
12
|
gem.authors = ["William Melody"]
|
13
|
-
gem.add_development_dependency "
|
13
|
+
gem.add_development_dependency "shoulda"
|
14
14
|
gem.add_development_dependency "mocha"
|
15
|
-
gem.add_dependency "open4"
|
16
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
16
|
end
|
18
17
|
rescue LoadError
|
data/RbST.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{RbST}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["William Melody"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-02}
|
13
13
|
s.description = %q{A simple Ruby wrapper for processing reStructuredText via Python's Docutils}
|
14
14
|
s.email = %q{wmelody@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -50,18 +50,15 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.specification_version = 3
|
51
51
|
|
52
52
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
53
|
-
s.add_development_dependency(%q<
|
53
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
54
54
|
s.add_development_dependency(%q<mocha>, [">= 0"])
|
55
|
-
s.add_runtime_dependency(%q<open4>, [">= 0"])
|
56
55
|
else
|
57
|
-
s.add_dependency(%q<
|
56
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
58
57
|
s.add_dependency(%q<mocha>, [">= 0"])
|
59
|
-
s.add_dependency(%q<open4>, [">= 0"])
|
60
58
|
end
|
61
59
|
else
|
62
|
-
s.add_dependency(%q<
|
60
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
63
61
|
s.add_dependency(%q<mocha>, [">= 0"])
|
64
|
-
s.add_dependency(%q<open4>, [">= 0"])
|
65
62
|
end
|
66
63
|
end
|
67
64
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/rbst.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'open3'
|
2
2
|
|
3
3
|
class RbST
|
4
4
|
|
@@ -63,12 +63,12 @@ class RbST
|
|
63
63
|
private
|
64
64
|
|
65
65
|
def self.executable(writer = :html)
|
66
|
-
File.join(File.dirname(__FILE__), "rst2parts", "rst2#{writer}.py")
|
66
|
+
File.expand_path(File.join(File.dirname(__FILE__), "rst2parts", "rst2#{writer}.py"))
|
67
67
|
end
|
68
68
|
|
69
69
|
def execute(command)
|
70
70
|
output = ''
|
71
|
-
|
71
|
+
Open3::popen3(command) do |stdin, stdout, stderr|
|
72
72
|
stdin.puts @target
|
73
73
|
stdin.close
|
74
74
|
output = stdout.read.strip
|
data/test/test_rbst.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'test_helper'
|
2
2
|
require 'mocha'
|
3
3
|
|
4
4
|
class TestRbST < Test::Unit::TestCase
|
@@ -9,11 +9,12 @@ class TestRbST < Test::Unit::TestCase
|
|
9
9
|
File.join(File.dirname(__FILE__), 'files', "test.#{f}")
|
10
10
|
)
|
11
11
|
end
|
12
|
+
@rst2parts_path = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'rst2parts'))
|
12
13
|
end
|
13
14
|
|
14
15
|
should "call bare rest2parts when passed no options" do
|
15
16
|
converter = RbST.new(@rst_file)
|
16
|
-
converter.expects(:execute).with(
|
17
|
+
converter.expects(:execute).with("python #{@rst2parts_path}/rst2html.py").returns(true)
|
17
18
|
assert converter.convert
|
18
19
|
end
|
19
20
|
|
@@ -30,7 +31,7 @@ class TestRbST < Test::Unit::TestCase
|
|
30
31
|
[:html, :latex].each do |f|
|
31
32
|
should "accept options on #to_#{f}" do
|
32
33
|
converter = RbST.new(@rst_file)
|
33
|
-
converter.expects(:execute).with("python
|
34
|
+
converter.expects(:execute).with("python #{@rst2parts_path}/rst2#{f}.py --raw-enabled").returns(true)
|
34
35
|
assert converter.send("to_#{f}", :raw_enabled)
|
35
36
|
end
|
36
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RbST
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Melody
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-02 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: shoulda
|
17
17
|
type: :development
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -32,16 +32,6 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: "0"
|
34
34
|
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: open4
|
37
|
-
type: :runtime
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: "0"
|
44
|
-
version:
|
45
35
|
description: A simple Ruby wrapper for processing reStructuredText via Python's Docutils
|
46
36
|
email: wmelody@gmail.com
|
47
37
|
executables: []
|