memorack 0.1.1 → 0.1.2
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 +4 -4
- data/HISTORY.md +7 -0
- data/README.md +2 -2
- data/VERSION +1 -1
- data/lib/memorack/builder.rb +9 -3
- data/lib/memorack/core.rb +2 -2
- data/lib/memorack/template/themes/custom/config.json +1 -1
- data/lib/memorack/themes/basic/css/2-column.scss +6 -1
- data/lib/memorack/themes/basic/index.html +2 -1
- data/lib/memorack/themes/oreilly/oreilly/base.scss +1 -0
- data/spec/memorack_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e66f5b1c38568ebc3011b2210c3b890fa0a8e36
|
4
|
+
data.tar.gz: 006b12c2a64d34170e3a7f3b1543c1dd61120222
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6e4612436e39a618a59681f0db052f8069a05eb1d332ab754fddfc0cc4ba2371981ab77bf2e42f328d5f55e2025180ce73f0ad9d7370d4bb9bc28d65b3dfe81
|
7
|
+
data.tar.gz: 44cfe752ef03701a381582aa26a1020320a161eb061b06b1d6c2a5864f901dca55c145056b3ad12b395e655e12247eb99995ac378b242e8cdf63065e5c9612e8
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## History
|
2
2
|
|
3
|
+
### v0.1.2 / 2013-05-06
|
4
|
+
|
5
|
+
* build not remove .git/.hg/.svn/.cvs direcotry
|
6
|
+
* fix select menu script in basic theme `index.html`
|
7
|
+
* fix comment in basic theme `config.json`
|
8
|
+
* fix css with bootstrap
|
9
|
+
|
3
10
|
### v0.1.1 / 2013-04-16
|
4
11
|
|
5
12
|
* fix error page css URL
|
data/README.md
CHANGED
@@ -116,8 +116,8 @@ Download [highlight.js](http://softwaremaniacs.org/soft/highlight/en/)
|
|
116
116
|
|
117
117
|
Add code to `index.html`
|
118
118
|
|
119
|
-
<link rel="stylesheet" href="/highlight.js/styles/default.css">
|
120
|
-
<script src="/highlight.js/highlight.pack.js"></script>
|
119
|
+
<link rel="stylesheet" href="{{site.url}}/highlight.js/styles/default.css">
|
120
|
+
<script src="{{site.url}}/highlight.js/highlight.pack.js"></script>
|
121
121
|
<script>hljs.initHighlightingOnLoad();</script>
|
122
122
|
|
123
123
|
### org-mode
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/memorack/builder.rb
CHANGED
@@ -17,14 +17,17 @@ module MemoRack
|
|
17
17
|
uri_escape: true,
|
18
18
|
}
|
19
19
|
|
20
|
+
DEFAULT_KEEPS = ['.git', '.hg', '.svn', '.csv']
|
21
|
+
|
20
22
|
def generate(options = {}, &callback)
|
21
23
|
options = DEFAULT_BUILD_OPTIONS.merge(options)
|
24
|
+
keeps = options[:keep] || @options[:keeps] || DEFAULT_KEEPS
|
22
25
|
|
23
26
|
url = @site[:url]
|
24
27
|
options[:prefix] = File.join(url, options[:prefix]) unless url.empty?
|
25
28
|
|
26
29
|
output = File.expand_path(options[:output])
|
27
|
-
dir_init(output)
|
30
|
+
dir_init(output, keeps)
|
28
31
|
|
29
32
|
@contents = contents(options)
|
30
33
|
@templates = Set.new @contents.files.collect { |file| file[:path] }
|
@@ -54,10 +57,13 @@ module MemoRack
|
|
54
57
|
end
|
55
58
|
|
56
59
|
# ディレクトリを初期化する
|
57
|
-
def dir_init(dir)
|
60
|
+
def dir_init(dir, keeps = [])
|
58
61
|
if Dir.exists?(dir)
|
59
62
|
Dir.glob(File.join(dir, '*'), File::FNM_DOTMATCH) { |path|
|
60
|
-
|
63
|
+
fname = File.basename(path)
|
64
|
+
|
65
|
+
next if /^\.{1,2}$/ =~ fname
|
66
|
+
next if keeps.member?(fname)
|
61
67
|
|
62
68
|
FileUtils.remove_entry_secure(path)
|
63
69
|
}
|
data/lib/memorack/core.rb
CHANGED
@@ -28,7 +28,7 @@ module MemoRack
|
|
28
28
|
|
29
29
|
# テンプレートエンジンのオプション
|
30
30
|
DEFAULT_TEMPLATE_OPTIONS = {
|
31
|
-
tables:
|
31
|
+
tables: true
|
32
32
|
}
|
33
33
|
|
34
34
|
# テンプレートで使用するローカル変数の初期値
|
@@ -67,7 +67,7 @@ module MemoRack
|
|
67
67
|
|
68
68
|
@themes_folders.each { |folder|
|
69
69
|
path = theme && File.join(folder, theme)
|
70
|
-
return path if File.exists?(path) &&
|
70
|
+
return path if File.exists?(path) && File.directory?(path)
|
71
71
|
}
|
72
72
|
|
73
73
|
nil
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
// "directory_watcher": 1.0, // ファイルの変更を監視するか決める(秒)
|
3
|
-
"theme": "oreilly", //
|
3
|
+
"theme": "oreilly", // テーマ(省略すると継承されません)
|
4
4
|
// "markdown": "kramdown", // 使用する markdownライブラリ(省略すると redcarpet )
|
5
5
|
// "formats": ["markdown"], // "markdown", "rdoc", "textile" or "wiki" (要 Tilt に対応した gem ライブラリ)
|
6
6
|
// "requires": [], // require libraries
|
@@ -17,7 +17,8 @@
|
|
17
17
|
<script type="text/javascript">
|
18
18
|
$(function(){
|
19
19
|
// 表示しているメニューを選択
|
20
|
-
$('#menu a[href
|
20
|
+
$('#menu a[href="' + document.location.pathname + '"]').parent().addClass('selected');
|
21
|
+
$('#menu a[href="' + document.location + '"]').parent().addClass('selected');
|
21
22
|
|
22
23
|
// 外部サイトのリンクに target='_blank' を追加
|
23
24
|
$('a[href^=http]').not('[href*="://' + location.hostname + '"]').attr('target', '_blank');
|
data/spec/memorack_spec.rb
CHANGED
@@ -264,8 +264,8 @@ describe MemoRack do
|
|
264
264
|
describe "build" do
|
265
265
|
before do
|
266
266
|
@hash = {}
|
267
|
-
@hash['basic'] = '
|
268
|
-
@hash['oreilly'] = '
|
267
|
+
@hash['basic'] = '9b6d4163c422ff9304ebfec6beacb89e23715fe5'
|
268
|
+
@hash['oreilly'] = 'ef118f287e80648235a314980da908f70e982478'
|
269
269
|
|
270
270
|
@file_lists = <<-EOD.cut_indent
|
271
271
|
.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memorack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gnue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|