plans 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -0
  3. data/Gemfile.lock +1 -1
  4. data/Guardfile +0 -0
  5. data/LICENSE +0 -0
  6. data/README.md +0 -4
  7. data/Rakefile +0 -0
  8. data/lib/plans/cli.rb +0 -25
  9. data/lib/plans/command.rb +0 -0
  10. data/lib/plans/init.rb +0 -0
  11. data/lib/plans/list.rb +0 -0
  12. data/lib/plans/new.rb +0 -0
  13. data/lib/plans/publish.rb +1 -1
  14. data/lib/plans/thumbs.rb +0 -0
  15. data/lib/plans/version.rb +1 -1
  16. data/lib/plans.rb +0 -0
  17. data/plans.gemspec +10 -0
  18. data/template/README.md +0 -0
  19. data/template/doc/README.md +0 -0
  20. data/template/doc/img/.empty_directory +0 -0
  21. data/template/doc/publish/.empty_directory +0 -0
  22. data/template/doc/reference.docx +0 -0
  23. data/template/doc/template.yml +0 -0
  24. data/template/functional/README.md +0 -0
  25. data/template/functional/img/.empty_directory +0 -0
  26. data/template/functional/publish/.empty_directory +0 -0
  27. data/template/functional/reference.docx +0 -0
  28. data/template/functional/template.yml +0 -0
  29. data/template/glossary/README.md +0 -0
  30. data/template/glossary/img/.empty_directory +0 -0
  31. data/template/glossary/publish/.empty_directory +0 -0
  32. data/template/glossary/reference.docx +0 -0
  33. data/template/glossary/template.yml +0 -0
  34. data/template/scope/README.md +0 -0
  35. data/template/scope/img/.empty_directory +0 -0
  36. data/template/scope/publish/.empty_directory +0 -0
  37. data/template/scope/reference.docx +0 -0
  38. data/template/scope/template.yml +0 -0
  39. data/template/users/README.md +0 -0
  40. data/template/users/img/.empty_directory +0 -0
  41. data/template/users/publish/.empty_directory +0 -0
  42. data/template/users/reference.docx +0 -0
  43. data/template/users/template.yml +0 -0
  44. metadata +2 -5
  45. data/.rspec +0 -3
  46. data/.versions.conf +0 -2
  47. data/lib/plans/pdf.rb +0 -43
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ac32cb6c1b729bd93cf76a59f72e6ef8b52fc01
4
- data.tar.gz: b8e4e7780348f4534fa8b7d3b4c450be6191e235
3
+ metadata.gz: 4051c95d34783fb60570cad2032b31fcda41dc0e
4
+ data.tar.gz: e66e5dc50118d847bcc59234ba3bce3698dd4f92
5
5
  SHA512:
6
- metadata.gz: 3ca5d8a0a21ca4b9948ea5fb49100ddbd2d5af82e78ec9cbb69537015b7f67cd05528f44e9b06b3a57164f82552ec6ff28dad0339681c86c0219517a4946d4bc
7
- data.tar.gz: d6042203795eb8036ff9f4fa83fb8d019b04d6595171966e3c2a5fdb5fded404c0f99a3d20657acbcc7137d2f78c1a54b5e9f13eabc6047d1913781de7f9ad37
6
+ metadata.gz: 403efa3cc442334309bea0f5d6aad3af8f3eba4e2690ad95149068f6dac1f7908375d4a665fe1fd30b8b90860026ada840297a56884f8fb0f022d483f8786820
7
+ data.tar.gz: 13c26d5d41d4d1214cd330ae7acff2a0774354c8695063cd2d861aba1a0e7ecaadb46b4e6189fd9c93a3bf21e81ab781cae30d776a0365143de5484c63680950
data/Gemfile CHANGED
File without changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plans (0.2.0)
4
+ plans (0.3.0)
5
5
  thor
6
6
 
7
7
  GEM
data/Guardfile CHANGED
File without changes
data/LICENSE CHANGED
File without changes
data/README.md CHANGED
@@ -34,10 +34,6 @@ ImageMagick works pretty much the same way.
34
34
 
35
35
  You also need Microsoft Word. :)
36
36
 
37
- Plans can also create PDFs. If you want to create PDFs of your markdown documents you will need to install a XeLaTeX engine for use by Pandoc. [BasicTex](https://tug.org/mactex/morepackages.html) will work. You can also install this with homebrew.
38
-
39
- $ brew install Caskroom/cask/basictex
40
-
41
37
  ## Installation
42
38
 
43
39
  Install it:
data/Rakefile CHANGED
File without changes
data/lib/plans/cli.rb CHANGED
@@ -4,7 +4,6 @@ require 'plans/list'
4
4
  require 'plans/init'
5
5
  require 'plans/publish'
6
6
  require 'plans/thumbs'
7
- require 'plans/pdf'
8
7
 
9
8
  module Plans
10
9
  class CLI < Thor
@@ -115,30 +114,6 @@ module Plans
115
114
  Thumbs.new(shell, options).do(path)
116
115
  end
117
116
 
118
-
119
- desc 'pdf', 'Create an PDF version of the document'
120
- long_desc <<-PDF
121
- `plans pdf` will create a PDF version of the document.
122
-
123
- The document type is determined by inspecting the template.yml.
124
-
125
- Overwrites any previously published versions of the PDF document.
126
-
127
- > $ plans pdf
128
- PDF
129
- method_option :toc,
130
- {:type => :boolean,
131
- :default => false,
132
- :desc => 'Add a table of contents to the PDF document. Not included by default.'}
133
- method_option :open,
134
- {:type => :boolean,
135
- :default => true,
136
- :desc => 'Open the published document after it has been rendered by Pandoc.'}
137
-
138
- def pdf (path = '.')
139
- Pdf.new(shell, options).do(path)
140
- end
141
-
142
117
  end
143
118
  end
144
119
 
data/lib/plans/command.rb CHANGED
File without changes
data/lib/plans/init.rb CHANGED
File without changes
data/lib/plans/list.rb CHANGED
File without changes
data/lib/plans/new.rb CHANGED
File without changes
data/lib/plans/publish.rb CHANGED
@@ -32,7 +32,7 @@ module Plans
32
32
  # the images render correctly.
33
33
  # Pandoc only looks in the current working directory.
34
34
  Dir.chdir(path) do
35
- `pandoc #{toc_flag} #{source_file} --reference-docx=#{reference_docx} --standalone -f markdown -t docx -o #{output_file}`
35
+ `pandoc #{toc_flag} #{source_file} --reference-docx=#{reference_docx} --standalone -f markdown+backtick_code_blocks -t docx -o #{output_file}`
36
36
  end
37
37
 
38
38
  # Get the return code from pandoc.
data/lib/plans/thumbs.rb CHANGED
File without changes
data/lib/plans/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plans
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/plans.rb CHANGED
File without changes
data/plans.gemspec CHANGED
@@ -14,6 +14,16 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = "https://github.com/code-lever/plans-gem"
15
15
  spec.license = "MIT"
16
16
 
17
+ # Comment this out to publish to rubygems with bin/rake release
18
+ #
19
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
20
+ # delete this section to allow pushing this gem to any host.
21
+ # if spec.respond_to?(:metadata)
22
+ # spec.metadata['allowed_push_host'] = "'http://mygemserver.com'"
23
+ # else
24
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
25
+ # end
26
+
17
27
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
28
  spec.bindir = "exe"
19
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
data/template/README.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Cook
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-20 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,8 +131,6 @@ executables:
131
131
  extensions: []
132
132
  extra_rdoc_files: []
133
133
  files:
134
- - ".rspec"
135
- - ".versions.conf"
136
134
  - Gemfile
137
135
  - Gemfile.lock
138
136
  - Guardfile
@@ -152,7 +150,6 @@ files:
152
150
  - lib/plans/init.rb
153
151
  - lib/plans/list.rb
154
152
  - lib/plans/new.rb
155
- - lib/plans/pdf.rb
156
153
  - lib/plans/publish.rb
157
154
  - lib/plans/thumbs.rb
158
155
  - lib/plans/version.rb
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --require spec_helper
3
- --format documentation
data/.versions.conf DELETED
@@ -1,2 +0,0 @@
1
- ruby=ruby-2.2.3
2
- ruby-gemset=plans
data/lib/plans/pdf.rb DELETED
@@ -1,43 +0,0 @@
1
- require 'plans/publish'
2
-
3
- module Plans
4
- class Pdf < Publish
5
-
6
- def do(path)
7
- # Create the thumbnails first.
8
- say 'Updating thumbnails.'
9
- Thumbs.new(shell, options).do(path)
10
-
11
- path = pathname(path)
12
- toc_flag = options[:toc] ? "--toc" : ""
13
- open_flag = options[:open]
14
-
15
- source_file = path + 'README.md'
16
- check_source_file(source_file)
17
-
18
- doc_type = get_doctype(path)
19
-
20
- output_dir = path + 'publish'
21
- # Make the publish directory if it does not exist.
22
- FileUtils.mkdir output_dir unless Dir.exist? output_dir
23
- output_file = output_dir + "#{doc_type}.pdf"
24
-
25
- # We need to set the current working directory to where the markdown file is so
26
- # the images render correctly.
27
- # Pandoc only looks in the current working directory.
28
- Dir.chdir(path) do
29
- `pandoc #{toc_flag} #{source_file} --standalone --latex-engine=xelatex -o #{output_file}`
30
- end
31
-
32
- # Get the return code from pandoc.
33
- pandoc_return = $?.to_i
34
- check_pandoc_return(pandoc_return)
35
-
36
- say "#{doc_type} published as PDF.", :green
37
-
38
- # Open the PDF if requested
39
- `open #{output_file}` if open_flag
40
- end
41
-
42
- end
43
- end