snaptoken 0.13.0 → 0.14.0

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: 4efad115f3cb1376a5586f18969fdd7e1e9d54fb
4
- data.tar.gz: 9cea842498ffe65612e2725414e5eb5bb980067a
3
+ metadata.gz: 786cbd31e529a228b77a591237e1b43a0b64424e
4
+ data.tar.gz: 92ed1c09c7e9bc60f10c6ca20dd2e69a47370cc9
5
5
  SHA512:
6
- metadata.gz: 22649a4cbc0e63703a06d3c13f1de6be7578820714dc143ed68bd463e5f9baf0363e1f89b39f53455db152cbfb952df6a2845fa8e53276a306a839b484a3edfc
7
- data.tar.gz: 8c7816177098407d716f7b3c7f77aea23da6f73a19cc159288f438ab1c1fcab4acabc51e3267ea731237c518b1d848c3f24adfb2694a6707870249c0d0d11bd6
6
+ metadata.gz: ab86847bef210f8b8462a6e152188d512e8cc3872d82178a4dc23b98e76fc75a4495a2a681a64077f5c912687b0b2e69c79317ea4e9f428b93a745404f453d10
7
+ data.tar.gz: 14896c6ba8d42520d098b09ca2d62c4a2207ea1cb9e54cbf43c479d0c9d702f1358ffd3595f4a407c953b6a4d64a20c8c775dbd16345f14c8181f235d5f094fd
@@ -11,7 +11,7 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
11
11
  needs! :config, :config_name, :config_title, :steps_folder, :steps, :doc
12
12
 
13
13
  FileUtils.cd(File.join(@config[:path], "doc")) do
14
- unless @args.include? "--no-diffs"
14
+ unless @args.include? "-c"
15
15
  FileUtils.rm_rf("html_out")
16
16
  FileUtils.mkdir("html_out")
17
17
  end
@@ -65,7 +65,10 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
65
65
  end
66
66
 
67
67
  def prerender_diffs
68
- return if @args.include? "--no-diffs"
68
+ if @args.include? "-c"
69
+ return Marshal.load(File.read("../.cached-diffs"))
70
+ end
71
+
69
72
  diffs = {}
70
73
  FileUtils.cd("../steps") do
71
74
  FileUtils.mkdir_p("0")
@@ -88,6 +91,7 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
88
91
  puts
89
92
  FileUtils.rmdir("0")
90
93
  end
94
+ File.write("../.cached-diffs", Marshal.dump(diffs))
91
95
  diffs
92
96
  end
93
97
 
@@ -105,8 +109,6 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
105
109
 
106
110
  index << "<li><a href='#{page}.html'>#{title}</a></li>\n"
107
111
 
108
- next if @args.include? "--no-diffs"
109
-
110
112
  prev_link = "<a href='#'></a>"
111
113
  if idx > 0
112
114
  prev_link = "<a href='#{pages[idx-1]}.html'>&larr; prev</a>"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snaptoken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Ruten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2017-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged