xtotxt 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/xtotxt.rb CHANGED
@@ -26,7 +26,6 @@ class Xtotxt
26
26
  else
27
27
  raise "Failed to convert #{input_file_name}. Exit status: #{$?.exitstatus}. Output: #{command_output}"
28
28
  end
29
- puts "the text is: #{text}"
30
29
  text
31
30
  end
32
31
 
File without changes
File without changes
File without changes
data/spec/xtotxt_spec.rb CHANGED
@@ -8,7 +8,7 @@ describe Xtotxt do
8
8
  :docx => "/usr/local/bin/docx2txt.pl" }
9
9
 
10
10
  @x = Xtotxt.new(@ext)
11
- @input = "test.pdf"
11
+ @input_prefix = "fixtures/test"
12
12
  end
13
13
 
14
14
  describe "convert" do
@@ -23,7 +23,7 @@ describe Xtotxt do
23
23
 
24
24
  %w{pdf doc docx}.each do |ext|
25
25
  it "accepts an #{ext} input" do
26
- lambda { @x.convert("test.#{ext}") }.should_not raise_error
26
+ lambda { @x.convert("#{@input_prefix}.#{ext}") }.should_not raise_error
27
27
  end
28
28
  end
29
29
 
@@ -35,19 +35,19 @@ describe Xtotxt do
35
35
  end
36
36
 
37
37
  it "converts a pdf document correctly" do
38
- text = @x.convert("test.pdf")
38
+ text = @x.convert("#{@input_prefix}.pdf")
39
39
 
40
40
  text.should == "three pigheaded piglets had a plan\n\n\f"
41
41
  end
42
42
 
43
43
  it "converts a doc document correctly" do
44
- text = @x.convert("test.doc")
44
+ text = @x.convert("#{@input_prefix}.doc")
45
45
 
46
46
  text.should == "\nthree pigheaded piglets had a plan\n\n"
47
47
  end
48
48
 
49
49
  it "converts a docx document correctly" do
50
- text = @x.convert("test.docx")
50
+ text = @x.convert("#{@input_prefix}.docx")
51
51
 
52
52
  text.should == "three pigheaded piglets had a plan\n\n"
53
53
  end
data/xtotxt/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xtotxt
2
- VERSION = 0.1
2
+ VERSION = 0.2
3
3
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xtotxt
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Alexy Khrabrov
@@ -30,10 +30,10 @@ files:
30
30
  - .rvmrc
31
31
  - Rakefile
32
32
  - lib/xtotxt.rb
33
+ - spec/fixtures/test.doc
34
+ - spec/fixtures/test.docx
35
+ - spec/fixtures/test.pdf
33
36
  - spec/spec_helper.rb
34
- - spec/test.doc
35
- - spec/test.docx
36
- - spec/test.pdf
37
37
  - spec/xtotxt_spec.rb
38
38
  - xtotxt.gemspec
39
39
  - xtotxt/version.rb
@@ -73,8 +73,8 @@ signing_key:
73
73
  specification_version: 4
74
74
  summary: Convert pdf, doc and docx to plain text
75
75
  test_files:
76
+ - spec/fixtures/test.doc
77
+ - spec/fixtures/test.docx
78
+ - spec/fixtures/test.pdf
76
79
  - spec/spec_helper.rb
77
- - spec/test.doc
78
- - spec/test.docx
79
- - spec/test.pdf
80
80
  - spec/xtotxt_spec.rb