publication 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32ba88788a3092b7c375fccd9317e164b8b88033
4
- data.tar.gz: 3d62228be86e7a4082a1e881905bf2050391054e
3
+ metadata.gz: aca2cd73586a7ad4d804107e0f438a71d85cb727
4
+ data.tar.gz: 7aeaa748c653da378c4b73e0db241ddeda3129e2
5
5
  SHA512:
6
- metadata.gz: 10cc69eda68bf5648e31871109619cf8153f4f4c7674ea1db4e2a42c91520c9c831782ff87bdfe9abca3dd50c827328dbe0aa68cfeaea64ef5f9a265e1ed8128
7
- data.tar.gz: 65085a76d4efb748a4a7844a9f1d49c3a15f17c6d4b6179efde7673cc9c34bf088adc5a02006e5067c5db16a5be349287b6544fd72f20ce352588278f79ef057
6
+ metadata.gz: 6e8518dcab6a9c7eb22902bc022e7f1729e4a717e6c748188111d943eafbd47009adbc4a5a87a89cef207222dcd6273203e603c29dc5db9b02075540747aee80
7
+ data.tar.gz: 4f7b25d699157204af1bb0407a038d9d026a11e4d9207d5ae594ba3a6c4a47023c3017c071f4e889a8c4ca2adf9897e1794a0555b857defa7725128b64936b66
data/lib/publication.rb CHANGED
@@ -1,4 +1,2 @@
1
1
  require 'active_support/all'
2
- require 'publication/dependencies'
3
2
  require 'publication/publish'
4
- require 'publication/rake_tasks' if defined? Rake
@@ -1,4 +1,4 @@
1
- require 'pandoc-ruby'
1
+ require 'ruby-pandoc'
2
2
 
3
3
  module Publication
4
4
  class Publisher
@@ -14,7 +14,7 @@ module Publication
14
14
 
15
15
  def publish
16
16
  @formats.each do |format|
17
- PandocRuby.new(@paths, from: @type, output: "#{@output}.#{format}").convert
17
+ RubyPandoc::Converter.new(@paths, from: @type, output: "#{@output}.#{format}").convert
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Publication
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Hamel
@@ -11,19 +11,19 @@ cert_chain: []
11
11
  date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pandoc-ruby
14
+ name: ruby-pandoc
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 0.0.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: 0.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -132,11 +132,8 @@ files:
132
132
  - bin/publication
133
133
  - lib/publication.rb
134
134
  - lib/publication/cli.rb
135
- - lib/publication/dependencies.rb
136
135
  - lib/publication/publish.rb
137
- - lib/publication/rake_tasks.rb
138
136
  - lib/publication/version.rb
139
- - lib/tasks/publication.rake
140
137
  homepage: https://github.com/dalehamel/publication
141
138
  licenses:
142
139
  - MIT
@@ -1,60 +0,0 @@
1
- require 'mkmf'
2
- require 'tmpdir'
3
-
4
- PANDOC_MIN_VERSION = '1.6' # min version with epub
5
- PANDOC_URL = 'https://github.com/jgm/pandoc/releases/download/1.17.0.2/pandoc-1.17.0.2-1-amd64.deb' # FIXME
6
-
7
- module MakeMakefile::Logging
8
- @logfile = File::NULL
9
- end
10
-
11
- module Publication
12
- module Dependencies
13
- extend self
14
-
15
- def satisfied?
16
- has_pandoc
17
- has_latex
18
- end
19
-
20
- def satisfy
21
- get_pandoc
22
- get_latex
23
- end
24
-
25
- private
26
-
27
- def has_pandoc
28
- pandoc = find_executable 'pandoc'
29
- unless pandoc
30
- puts 'Pandoc is not installed'
31
- return false
32
- end
33
- version = `#{pandoc} -v`.lines.first.split(/\s+/).last
34
- unless Gem::Version.new(version) > Gem::Version.new(PANDOC_MIN_VERSION)
35
- puts "Pandoc version #{version} too old (require #{PANDOC_MIN_VERSION})"
36
- return false
37
- end
38
- true
39
- end
40
-
41
- def has_latex
42
- find_executable 'pdflatex'
43
- end
44
-
45
- # FIXME make this conditional to different types of platforms
46
- def get_pandoc
47
- return if has_pandoc
48
- Dir.mktmpdir do |dir|
49
- Dir.chdir(dir) do
50
- system("wget #{PANDOC_URL} -O pandoc.deb")
51
- system("dpkg -i pandoc.deb")
52
- end
53
- end
54
- end
55
-
56
- def get_latex
57
- system('apt-get install -y --force-yes texlive-full')
58
- end
59
- end
60
- end
@@ -1,14 +0,0 @@
1
- require 'rake'
2
-
3
- module Publisher
4
- # Loads all rake tasks when terraform_dsl is included by a rake script
5
- module Tasks
6
- extend self
7
-
8
- def load_all
9
- Dir.glob("#{File.expand_path('../../tasks', __FILE__)}/*.rake").each { |r| load r }
10
- end
11
- end
12
- end
13
-
14
- Publisher::Tasks.load_all
@@ -1,9 +0,0 @@
1
- desc 'Assert that dependencies are installed'
2
- task 'check_depends' do
3
- Publication::Dependencies.satisfied?
4
- end
5
-
6
- desc 'Install necessary dependencies'
7
- task 'get_depends' do
8
- Publication::Dependencies.satisfy
9
- end