wine-pdf 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +64 -0
- data/LICENSE.txt +16 -0
- data/README.md +36 -0
- data/README.rdoc +23 -0
- data/Rakefile +61 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/bin/wine-pdf +29 -0
- data/lib/wine/pdf/version.rb +5 -0
- data/lib/wine/pdf.rb +7 -0
- data/wine-pdf.gemspec +28 -0
- metadata +165 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 98574a173cca0f9bc0d4b2724cbbbcab5d88e005
|
4
|
+
data.tar.gz: 263d1f0851635d471740c00c3d89b4a11123cd90
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 90ab8ce94207b5128a3846035c453a97bf509a68fe6a6bc227935276b541985a97b59522363e6956f2b6685fdd78455af802ed9cc5f5176e2ff33fd344e021ea
|
7
|
+
data.tar.gz: ed2f13678980e369795dbd6436f85855ec6e4147b469d017cf8055b03d3e0e1bb465dd9dda8a522ddc7b44d3e3b798ce5b6b2f14a73f21166bccaa453da39ee6
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
wine-pdf (0.1.0)
|
5
|
+
methadone (~> 1.9.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
aruba (0.14.1)
|
11
|
+
childprocess (~> 0.5.6)
|
12
|
+
contracts (~> 0.9)
|
13
|
+
cucumber (>= 1.3.19)
|
14
|
+
ffi (~> 1.9.10)
|
15
|
+
rspec-expectations (>= 2.99)
|
16
|
+
thor (~> 0.19)
|
17
|
+
builder (3.2.2)
|
18
|
+
childprocess (0.5.9)
|
19
|
+
ffi (~> 1.0, >= 1.0.11)
|
20
|
+
contracts (0.13.0)
|
21
|
+
cucumber (2.3.3)
|
22
|
+
builder (>= 2.1.2)
|
23
|
+
cucumber-core (~> 1.4.0)
|
24
|
+
cucumber-wire (~> 0.0.1)
|
25
|
+
diff-lcs (>= 1.1.3)
|
26
|
+
gherkin (~> 3.2.0)
|
27
|
+
multi_json (>= 1.7.5, < 2.0)
|
28
|
+
multi_test (>= 0.1.2)
|
29
|
+
cucumber-core (1.4.0)
|
30
|
+
gherkin (~> 3.2.0)
|
31
|
+
cucumber-wire (0.0.1)
|
32
|
+
diff-lcs (1.2.5)
|
33
|
+
ffi (1.9.10)
|
34
|
+
gherkin (3.2.0)
|
35
|
+
json (1.8.3)
|
36
|
+
methadone (1.9.2)
|
37
|
+
bundler
|
38
|
+
multi_json (1.11.2)
|
39
|
+
multi_test (0.1.2)
|
40
|
+
power_assert (0.2.7)
|
41
|
+
rake (11.1.2)
|
42
|
+
rdoc (4.2.2)
|
43
|
+
json (~> 1.4)
|
44
|
+
rspec-expectations (3.4.0)
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
+
rspec-support (~> 3.4.0)
|
47
|
+
rspec-support (3.4.1)
|
48
|
+
test-unit (3.1.8)
|
49
|
+
power_assert
|
50
|
+
thor (0.19.1)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
aruba
|
57
|
+
bundler (~> 1.11)
|
58
|
+
rake
|
59
|
+
rdoc
|
60
|
+
test-unit
|
61
|
+
wine-pdf!
|
62
|
+
|
63
|
+
BUNDLED WITH
|
64
|
+
1.11.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
Name: wine-pdf
|
2
|
+
Copyright (c) 2016 Loren Rogers
|
3
|
+
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
5
|
+
it under the terms of the GNU General Public License as published by
|
6
|
+
the Free Software Foundation, either version 3 of the License, or
|
7
|
+
(at your option) any later version.
|
8
|
+
|
9
|
+
This program is distributed in the hope that it will be useful,
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
GNU General Public License for more details.
|
13
|
+
|
14
|
+
You should have received a copy of the GNU General Public License
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Wine::Pdf
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/wine/pdf`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'wine-pdf'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install wine-pdf
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wine-pdf.
|
36
|
+
|
data/README.rdoc
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
= wine-pdf - DESCRIBE YOUR GEM
|
2
|
+
|
3
|
+
Author:: YOUR NAME (YOUR EMAIL)
|
4
|
+
Copyright:: Copyright (c) 2016 YOUR NAME
|
5
|
+
|
6
|
+
|
7
|
+
License:: gplv3, see LICENSE.txt
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
DESCRIBE YOUR GEM HERE
|
12
|
+
|
13
|
+
== Links
|
14
|
+
|
15
|
+
* {Source on Github}[LINK TO GITHUB]
|
16
|
+
* RDoc[LINK TO RDOC.INFO]
|
17
|
+
|
18
|
+
== Install
|
19
|
+
|
20
|
+
== Examples
|
21
|
+
|
22
|
+
== Contributing
|
23
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
def dump_load_path
|
2
|
+
puts $LOAD_PATH.join("\n")
|
3
|
+
found = nil
|
4
|
+
$LOAD_PATH.each do |path|
|
5
|
+
if File.exists?(File.join(path,"rspec"))
|
6
|
+
puts "Found rspec in #{path}"
|
7
|
+
if File.exists?(File.join(path,"rspec","core"))
|
8
|
+
puts "Found core"
|
9
|
+
if File.exists?(File.join(path,"rspec","core","rake_task"))
|
10
|
+
puts "Found rake_task"
|
11
|
+
found = path
|
12
|
+
else
|
13
|
+
puts "!! no rake_task"
|
14
|
+
end
|
15
|
+
else
|
16
|
+
puts "!!! no core"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
if found.nil?
|
21
|
+
puts "Didn't find rspec/core/rake_task anywhere"
|
22
|
+
else
|
23
|
+
puts "Found in #{path}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
require 'bundler'
|
27
|
+
require 'rake/clean'
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
|
31
|
+
require 'cucumber'
|
32
|
+
require 'cucumber/rake/task'
|
33
|
+
gem 'rdoc' # we need the installed RDoc gem, not the system one
|
34
|
+
require 'rdoc/task'
|
35
|
+
|
36
|
+
include Rake::DSL
|
37
|
+
|
38
|
+
Bundler::GemHelper.install_tasks
|
39
|
+
|
40
|
+
|
41
|
+
Rake::TestTask.new do |t|
|
42
|
+
t.pattern = 'test/tc_*.rb'
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
CUKE_RESULTS = 'results.html'
|
47
|
+
CLEAN << CUKE_RESULTS
|
48
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
49
|
+
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
|
50
|
+
t.fork = false
|
51
|
+
end
|
52
|
+
|
53
|
+
Rake::RDocTask.new do |rd|
|
54
|
+
|
55
|
+
rd.main = "README.rdoc"
|
56
|
+
|
57
|
+
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
|
58
|
+
end
|
59
|
+
|
60
|
+
task :default => [:test,:features]
|
61
|
+
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "wine/pdf"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/bin/wine-pdf
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'optparse'
|
4
|
+
require 'methadone'
|
5
|
+
require 'wine/pdf.rb'
|
6
|
+
|
7
|
+
class App
|
8
|
+
include Methadone::Main
|
9
|
+
include Methadone::CLILogging
|
10
|
+
|
11
|
+
main do |pdf_file|
|
12
|
+
username = `whoami`.chomp!
|
13
|
+
command = '"c:\\\\Program Files\\\\Tracker Software\\\\PDF Editor\\\\PDFXEdit.exe"'
|
14
|
+
pdf_unix_path = File.absolute_path pdf_file
|
15
|
+
pdf_wine_path = pdf_unix_path.gsub(
|
16
|
+
"/home/#{username}/",
|
17
|
+
"c:/users/#{username}/My Documents/")
|
18
|
+
pdf_wine_path.gsub! '/', '\\\\'
|
19
|
+
`wine #{command} \"#{pdf_wine_path}\"`
|
20
|
+
#puts "wine #{command} \"#{pdf_wine_path}\""
|
21
|
+
end
|
22
|
+
|
23
|
+
description "Open PDF files in Wine."
|
24
|
+
arg :pdf_file, 'Path to the PDF file'
|
25
|
+
version Wine::Pdf::VERSION
|
26
|
+
use_log_level_option :toggle_debug_on_signal => 'USR1'
|
27
|
+
|
28
|
+
go!
|
29
|
+
end
|
data/lib/wine/pdf.rb
ADDED
data/wine-pdf.gemspec
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wine/pdf/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wine-pdf"
|
8
|
+
spec.license = "GPL-3.0"
|
9
|
+
spec.version = Wine::Pdf::VERSION
|
10
|
+
spec.authors = ["Loren Rogers"]
|
11
|
+
spec.email = ["loren@lorentrogers.com"]
|
12
|
+
|
13
|
+
spec.summary = %q{Open PDF files in Wine.}
|
14
|
+
spec.description = %q{A simple utility to open PDF files in Wine.}
|
15
|
+
spec.homepage = "https://github.com/lorentrogers/wine-pdf"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
23
|
+
spec.add_development_dependency('rdoc', '~> 4.2', '>= 4.2.2')
|
24
|
+
spec.add_development_dependency('aruba', '~> 0.14.1')
|
25
|
+
spec.add_development_dependency('rake', '~> 11.1', '>= 11.1.2')
|
26
|
+
spec.add_development_dependency('test-unit', '~> 3.1', '>= 3.1.8')
|
27
|
+
spec.add_dependency('methadone', '~> 1.9', '>= 1.9.2')
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wine-pdf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Loren Rogers
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.2'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 4.2.2
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '4.2'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 4.2.2
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: aruba
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.14.1
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.14.1
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rake
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '11.1'
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 11.1.2
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - "~>"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '11.1'
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: 11.1.2
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: test-unit
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - "~>"
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '3.1'
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 3.1.8
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '3.1'
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 3.1.8
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: methadone
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - "~>"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '1.9'
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.9.2
|
111
|
+
type: :runtime
|
112
|
+
prerelease: false
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.9'
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 1.9.2
|
121
|
+
description: A simple utility to open PDF files in Wine.
|
122
|
+
email:
|
123
|
+
- loren@lorentrogers.com
|
124
|
+
executables: []
|
125
|
+
extensions: []
|
126
|
+
extra_rdoc_files: []
|
127
|
+
files:
|
128
|
+
- ".gitignore"
|
129
|
+
- Gemfile
|
130
|
+
- Gemfile.lock
|
131
|
+
- LICENSE.txt
|
132
|
+
- README.md
|
133
|
+
- README.rdoc
|
134
|
+
- Rakefile
|
135
|
+
- bin/console
|
136
|
+
- bin/setup
|
137
|
+
- bin/wine-pdf
|
138
|
+
- lib/wine/pdf.rb
|
139
|
+
- lib/wine/pdf/version.rb
|
140
|
+
- wine-pdf.gemspec
|
141
|
+
homepage: https://github.com/lorentrogers/wine-pdf
|
142
|
+
licenses:
|
143
|
+
- GPL-3.0
|
144
|
+
metadata: {}
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options: []
|
147
|
+
require_paths:
|
148
|
+
- lib
|
149
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0'
|
159
|
+
requirements: []
|
160
|
+
rubyforge_project:
|
161
|
+
rubygems_version: 2.5.1
|
162
|
+
signing_key:
|
163
|
+
specification_version: 4
|
164
|
+
summary: Open PDF files in Wine.
|
165
|
+
test_files: []
|