softcover 0.6.2 → 0.6.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: df5fc92cddff6bd934a2ac83265b7577f09d6fcd
4
- data.tar.gz: e894e67dd71e366249e23083a92f0c81d76e1680
3
+ metadata.gz: 10050a73b2276354c459a451a053cfbad32209fe
4
+ data.tar.gz: 97e8bf921f4323d76ce8c4065bca10dbc7c888a3
5
5
  SHA512:
6
- metadata.gz: 6d4766cf6a4cb4dc2381a276a6736294297a39b4aaff78df690e6ee726e1e36c9a29b2b4de6aa6072caffe06a6c29ecbce888229624b6497af31a1730044cd5c
7
- data.tar.gz: b15fcf53ea90b1813065b0b80885d3095e855dc27f4d1f4ed6ba02796ce9745c04dbeedec9fdd811ce5f2b8e4ab2f18cfbdd5dcdeb4d59b02d62321b09b4145b
6
+ metadata.gz: 1202e237981b7afc03e48585cd3150c52a7e432120fb7954dd6d14acf8637bca4cffd493550ba3e8aba554b002df15554685bf547816cdbebd2992c2f04239ab
7
+ data.tar.gz: 14dbbc6c586b8b402e7bb22d3e1c824c64daf911d353ea39f5fe01ca85af7cac231e061d9a45fdf06ba8fb4e4e07c5fa9ea9d99fe5965cbd7ceb8682429d7988
File without changes
@@ -8,9 +8,9 @@ class Softcover::Book
8
8
 
9
9
  class UploadError < StandardError; end
10
10
 
11
- def initialize
11
+ def initialize(options={})
12
12
  require "softcover/client"
13
- @manifest = Softcover::BookManifest.new
13
+ @manifest = Softcover::BookManifest.new(options)
14
14
  @client = Softcover::Client.new_with_book self
15
15
 
16
16
  @screencasts_dir = DEFAULT_SCREENCASTS_DIR
@@ -24,10 +24,6 @@ module Softcover
24
24
  def setup; end
25
25
  def verify; end
26
26
 
27
- def source
28
- Dir.glob(path('chapters/*.md')).empty? ? :polytex : :markdown
29
- end
30
-
31
27
  # Writes out the PolyTeXnic commands from polytexnic.
32
28
  def write_polytexnic_commands_file
33
29
  Polytexnic.write_polytexnic_style_file(Dir.pwd)
@@ -0,0 +1,10 @@
1
+ # Document README (please edit)
2
+
3
+ This is the README generated by `softcover new <document>`. It's not used by the [Softcover](http://softcover.io/) website, but it's a good practice to have a README when storing your document's source at, e.g., [GitHub](http://github.com/) or [Bitbucket](http://bitbucket.org/). (The latter is especially recommended for documents whose source isn't public, as Bitbucket allows unlimited free private repositories.)
4
+
5
+ Softcover documents come with a `.gitignore` file for use with [Git](http://git-scm.com/). To get started, add your files as follows:
6
+
7
+ $ git add -A
8
+ $ git commit -m "Initialize repository"
9
+
10
+ Then follow the instructions at [GitHub](http://github.com/) or [Bitbucket](http://bitbucket.org/) to create and push a remote repository.
@@ -52,7 +52,7 @@ end
52
52
 
53
53
  Softcover's Markdown mode supports mathematical typesetting using \LaTeX\ syntax, including inline math, such as \( \phi^2 - \phi - 1 = 0, \) and centered math, such as
54
54
  \[ \phi = \frac{1+\sqrt{5}}{2}. \]
55
- It also support centered equations with linked cross-reference via embedded \PolyTeX\ (Eq.~\eqref{eq:phi}).
55
+ It also supports centered equations with linked cross-reference via embedded \PolyTeX\ (Eq.~\eqref{eq:phi}).
56
56
 
57
57
  \begin{equation}
58
58
  \label{eq:phi}
@@ -14,6 +14,7 @@ pygments.css
14
14
  softcover.css
15
15
  frontmatter.tex
16
16
  .highlight_cache
17
+ .softcover-book
17
18
 
18
19
  # Generated HTML files
19
20
  html/*.html
@@ -4,10 +4,15 @@ module Softcover::Utils
4
4
  def current_book
5
5
  # using module level variable because it should be context independent
6
6
  @@current_book ||= begin
7
- in_book_directory? ? Softcover::Book.new : false
7
+ in_book_directory? ? Softcover::Book.new(origin: source) : false
8
8
  end
9
9
  end
10
10
 
11
+ # Returns the source type (PolyTeX or Markdown) of the current book.
12
+ def source
13
+ Dir.glob(path('chapters/*.md')).empty? ? :polytex : :markdown
14
+ end
15
+
11
16
  def reset_current_book!
12
17
  @@current_book = nil
13
18
  end
@@ -52,6 +57,7 @@ module Softcover::Utils
52
57
  # Returns the tmp version of a filename.
53
58
  # E.g., tmpify('foo.tex') => 'foo.tmp.tex'
54
59
  def tmpify(manifest, filename)
60
+ mkdir 'tmp'
55
61
  sep = File::SEPARATOR
56
62
  filename.sub(manifest.polytex_dir + sep, 'tmp' + sep).
57
63
  sub('.tex', '.tmp.tex')
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -66,6 +66,10 @@ describe Softcover::Commands::Generator do
66
66
  expect('chapters/a_chapter.md').not_to exist
67
67
  end
68
68
 
69
+ it "should have a README" do
70
+ expect('README.md').to exist
71
+ end
72
+
69
73
  describe ".gitignore" do
70
74
  subject { File.read('.gitignore') }
71
75
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softcover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-14 00:00:00.000000000 Z
12
+ date: 2013-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic
@@ -363,6 +363,7 @@ files:
363
363
  - .pull_requests/1384304643
364
364
  - .pull_requests/1384447036
365
365
  - .pull_requests/1384468478
366
+ - .pull_requests/1384801823
366
367
  - .rspec
367
368
  - .ruby-gemset
368
369
  - .ruby-version
@@ -409,6 +410,7 @@ files:
409
410
  - lib/softcover/server/views/main.js.erb
410
411
  - lib/softcover/template/.softcover-deploy
411
412
  - lib/softcover/template/Book.txt
413
+ - lib/softcover/template/README.md
412
414
  - lib/softcover/template/book.tex
413
415
  - lib/softcover/template/book.yml.erb
414
416
  - lib/softcover/template/chapters/a_chapter.md
@@ -973,7 +975,6 @@ files:
973
975
  - lib/softcover/template/polytexnic_commands.sty
974
976
  - lib/softcover/template/simple_book.tex
975
977
  - lib/softcover/template/softcover.sty
976
- - lib/softcover/template/tmp/.gitkeep
977
978
  - lib/softcover/template/upquote.sty
978
979
  - lib/softcover/uploader.rb
979
980
  - lib/softcover/utils.rb