memorack 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6430c72a4053f23e3741c9ccf52baad7d285de39
4
- data.tar.gz: 23d5eaa2c3681cecc1d411dafd75c335fff998e5
3
+ metadata.gz: 6e66f5b1c38568ebc3011b2210c3b890fa0a8e36
4
+ data.tar.gz: 006b12c2a64d34170e3a7f3b1543c1dd61120222
5
5
  SHA512:
6
- metadata.gz: 9e91e9f5381a21fdc873ce74f3a74da9093ab97609709fd9fc372f7a677408015712b058d78ebb29b8d152e70c9b9543045a4b9fd6df270f35010c356a1c0f1d
7
- data.tar.gz: b71a85e648d23f013d546f3c8e3a712e429c3b71ecbd197e2b852f73c75d37db6497e9574597ba91b5788c2229ede96560cd487630cab7c667333eb73b43b978
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
1
+ 0.1.2
@@ -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
- next if /(^|\/)(\.|\.\.)$/ =~ path
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: true
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) && FileTest::directory?(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", // テーマ(省略すると basic )
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
@@ -13,7 +13,12 @@
13
13
  border-radius: 10px;
14
14
 
15
15
  ul {
16
- padding-left: 20px;
16
+ padding-left: 0;
17
+ margin: 14px 0 14px 20px;
18
+ }
19
+
20
+ ul ul {
21
+ margin: 0 0 0 20px;
17
22
  }
18
23
 
19
24
  a:link {
@@ -17,7 +17,8 @@
17
17
  <script type="text/javascript">
18
18
  $(function(){
19
19
  // 表示しているメニューを選択
20
- $('#menu a[href$="' + document.location.pathname + '"]').parent().addClass('selected');
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');
@@ -22,6 +22,7 @@ body {
22
22
  font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif;
23
23
  line-height: 1.5;
24
24
  -webkit-font-smoothing: antialiased;
25
+ margin-top: 8px;
25
26
  }
26
27
 
27
28
  h1, h2, h3, h4, h5, h6 {
@@ -264,8 +264,8 @@ describe MemoRack do
264
264
  describe "build" do
265
265
  before do
266
266
  @hash = {}
267
- @hash['basic'] = 'd414b3942f61e6b0a07f6458bfb133da40e7c7b8'
268
- @hash['oreilly'] = '56b0c0f6a7394904442d7af6986797b1300301c3'
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.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-04-16 00:00:00.000000000 Z
11
+ date: 2013-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack