memorack 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3a8343ec0da45fc84d78fa23a4f7cd8dc31f102a
4
+ data.tar.gz: 38119f27df0c8ff87ae0d81d3fb92584254fc7ac
5
+ SHA512:
6
+ metadata.gz: 492fa18c13a7718fa49cf8baa5b7e0f0fcad410eb875317a64e064a16da7e6276756be35c9e7a414fb493ae7abdb2138a442becbb11d5db07e2931ce473f8845
7
+ data.tar.gz: 288807a89bb8d6d5bc80b18a01796b69191e1fc3d6cf9520d2801ea0bea378b92fae065753af0ba60282f39c70fe7fa49807a9f75a790bfa86303bc6589443fe
@@ -0,0 +1,16 @@
1
+ ## History
2
+
3
+ ### v0.0.3 / 2013-04-06
4
+
5
+ * Abstraction URI
6
+ * other css render engines support (less)
7
+ * custom error page
8
+
9
+ ### v0.0.2 / 2013-02-15
10
+
11
+ * fix highlight.js with oreilly theme
12
+ * add customizing Tips for syntax highlighting
13
+
14
+ ### v0.0.1 / 2013-02-14
15
+
16
+ * first release
data/README.md CHANGED
@@ -132,7 +132,8 @@ Special variables -- `{{{VAR}}}`
132
132
  * Template comments translate english
133
133
  * Add customizing tips
134
134
  * Server test program
135
- * Abstraction of URI
135
+ * Generate HTMLs for static site
136
+ * Plugin
136
137
 
137
138
  ## Contributing
138
139
 
@@ -1,5 +1,6 @@
1
1
  def update_version(path)
2
- version = `git describe --tags --dirty`.chomp
2
+ version = `git describe --dirty 2>/dev/null`.chomp
3
+ version = `git describe --tags --dirty`.chomp if version.empty?
3
4
  version[0, 1] = '' if version =~ /^v[0-9]/
4
5
  version.gsub!(/-([a-z0-9]+(-dirty)?)$/) { |m| "(#{$1})" }
5
6
 
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ module MemoRack
4
+
5
+ class Locals < Hash
6
+ alias :super_has_key? has_key?
7
+
8
+ def [](key)
9
+ return super if super_has_key?(key)
10
+ return context[key].call(self, key) if context[key]
11
+
12
+ super
13
+ end
14
+
15
+ def has_key?(key)
16
+ return true if context.has_key?(key)
17
+ super
18
+ end
19
+
20
+ def merge(hash)
21
+ new_hash = super
22
+ new_hash.context = context.dup
23
+ new_hash
24
+ end
25
+
26
+ def context
27
+ @context ||= {}
28
+ end
29
+
30
+ def context=(value)
31
+ @context = value
32
+ end
33
+
34
+ def define_key(name, &block)
35
+ context[name] = block
36
+ end
37
+ end
38
+
39
+ end
@@ -74,6 +74,7 @@ class MdMenu
74
74
 
75
75
  Dir.glob(pattern) { |path|
76
76
  link = @config[:prefix].to_s + (@config[:uri_escape] ? URI.escape(path, URI_UNSAFE) : path)
77
+ link = link.sub(/\.[^.]*$/, '') + @config[:suffix] if @config[:suffix]
77
78
  @files << {:link => link, :path => path} if ! @links.member?(link)
78
79
  }
79
80
  end
@@ -166,12 +167,13 @@ if __FILE__ == $0
166
167
  config = {:verbose => true}
167
168
 
168
169
  OptionParser.new { |opts|
169
- opts.banner = "Usage: #{opts.program_name} [-f FILE] [-u] [-e] [--prefix PREFIX] DIRECTORY… "
170
+ opts.banner = "Usage: #{opts.program_name} [-f FILE] [-u] [-e] [--prefix PREFIX] [--suffix SUFFIX] DIRECTORY… "
170
171
 
171
172
  opts.on('-f FILE', 'menu file') { |v| config[:file] = v }
172
173
  opts.on('-u', 'file update(default is dry-run)') { config[:update] = true }
173
174
  opts.on('-e', 'URI escape') { config[:uri_escape] = true }
174
175
  opts.on('-p PREFIX', '--prefix PREFIX', 'link prefix') { |v| config[:prefix] = v }
176
+ opts.on('-s SUFFIX', '--suffix SUFFIX', 'link suffix') { |v| config[:suffix] = v }
175
177
  opts.on('-h', '--help') { abort opts.help }
176
178
  opts.parse!(ARGV)
177
179
  }
@@ -1,11 +1,13 @@
1
- # coding: utf-8
1
+ # -*- encoding: utf-8 -*-
2
2
 
3
+ require 'pathname'
3
4
  require 'rubygems'
4
5
  require 'rack'
5
6
  require 'uri'
6
7
 
7
8
  require 'memorack/tilt-mustache'
8
9
  require 'memorack/mdmenu'
10
+ require 'memorack/locals'
9
11
 
10
12
  module MemoRack
11
13
  class MemoApp
@@ -19,6 +21,7 @@ module MemoRack
19
21
  markdown: 'redcarpet',
20
22
  formats: ['markdown'],
21
23
  css: nil,
24
+ suffix: '',
22
25
  directory_watcher: false
23
26
  }
24
27
 
@@ -39,6 +42,7 @@ module MemoRack
39
42
 
40
43
  @themes_folders = [options[:themes_folder], File.expand_path('../themes/', __FILE__)]
41
44
  read_config(options[:theme], options)
45
+ read_config(DEFAULT_APP_OPTIONS[:theme], options) if @themes.empty?
42
46
 
43
47
  @app = app
44
48
  @options = options
@@ -57,52 +61,43 @@ module MemoRack
57
61
  define_statics(@root, *@themes)
58
62
 
59
63
  # ファイル監視を行う
60
- watcher(@root) if @directory_watcher
64
+ watcher(@root, @directory_watcher) if @directory_watcher
61
65
  end
62
66
 
63
67
  def call(env)
64
68
  content_type = 'text/html'
65
69
 
66
- req = Rack::Request.new(env)
67
- query = Rack::Utils.parse_query(req.query_string)
68
- path_info = URI.unescape(req.path_info)
69
- path, ext = split_extname(path_info)
70
+ path_info = unescape_path_info(env)
70
71
 
71
72
  case path_info
72
73
  when '/'
73
74
  content = render_with_mustache :index, :markdown
74
75
  when /\.css$/
75
- case @css
76
- when 'scss', 'sass'
77
- require 'sass'
78
-
79
- result = pass(env, @statics)
80
- return result unless result.first == 404
76
+ result = pass(env, @statics)
77
+ return result unless result.first == 404
81
78
 
79
+ begin
82
80
  content_type = 'text/css'
83
- cache_location = File.expand_path('sass-cache', @tmpdir)
84
- content = render @css.to_sym, "#{path}.#{@css}", {views: @themes, cache_location: cache_location}
81
+ content = render_css(env, path_info)
82
+ rescue Errno::ENOENT => e
83
+ return error(env, 404)
85
84
  end
86
85
  else
87
- return pass(env) unless ext && Tilt.registered?(ext)
88
-
89
- if query.has_key?('edit')
90
- fullpath = File.expand_path(File.join(@root, path_info))
91
-
92
- # @attention リダイレクトはうまく動作しない
93
- #
94
- # redirect_url = 'file://' + File.expand_path(File.join(@root, req.path_info))
95
- # return redirect(redirect_url, 302) if File.exists?(fullpath)
96
- end
97
-
98
- content = render_with_mustache path.to_sym, ext
86
+ content = render_content(env, path_info)
99
87
  end
100
88
 
101
- return pass(env) unless content
89
+ return [200, {'Content-Type' => content_type}, [content.to_s]] if content
102
90
 
103
- [200, {'Content-Type' => content_type}, [content.to_s]]
91
+ pass(env) { |env, code|
92
+ error(env, code)
93
+ }
104
94
  end
105
95
 
96
+ # PATH_INFO を unescape して取出す
97
+ def unescape_path_info(env)
98
+ path_info = URI.unescape(env['PATH_INFO'])
99
+ path_info.force_encoding('UTF-8')
100
+ end
106
101
 
107
102
  # リダイレクト
108
103
  def redirect(url, code = 301)
@@ -132,16 +127,18 @@ module MemoRack
132
127
 
133
128
  # デフォルトの locals を生成する
134
129
  def default_locals(locals = {})
135
- locals = locals.dup
136
-
137
- locals[:page] ||= {}
138
- locals[:page][:title] ||= locals[:title]
130
+ locals = Locals[locals]
139
131
 
140
- locals[:app] ||= {}
132
+ locals[:app] ||= Locals[]
141
133
  locals[:app][:name] ||= MemoRack::name
142
134
  locals[:app][:version] ||= MemoRack::VERSION
143
135
  locals[:app][:url] ||= MemoRack::HOMEPAGE
144
136
 
137
+ locals.define_key(:__menu__) { |hash, key|
138
+ @menu = nil unless @directory_watcher # ファイル監視していない場合はメニューを初期化
139
+ @menu ||= render :markdown, :menu, @options
140
+ }
141
+
145
142
  locals
146
143
  end
147
144
 
@@ -195,15 +192,50 @@ module MemoRack
195
192
  return result unless result.first == 404
196
193
  }
197
194
 
198
- [404, {'Content-Type' => 'text/plain'}, ['File not found: ', env['PATH_INFO']]]
195
+ return yield(env, 404) if block_given?
196
+
197
+ error(env, 404, 'File not found: ')
198
+ end
199
+
200
+ # エラー
201
+ def error(env, code, body = nil, content_type = 'text/plain; charset=utf-8')
202
+ path_info = unescape_path_info(env)
203
+
204
+ if body
205
+ body = [body.to_s, path_info] unless body.kind_of?(Array)
206
+ else
207
+ fullpath = file_search("/#{code}", {views: @themes})
208
+ ext = split_extname(fullpath)[1]
209
+ locals = {env: env, path_info: path_info, page: {name: "Error #{code}"}}
210
+
211
+ if ext && Tilt.registered?(ext)
212
+ template = Pathname.new(fullpath)
213
+ else
214
+ template = "Error #{code}: #{path_info}"
215
+ ext = nil
216
+ end
217
+
218
+ content = render_with_mustache template, ext, {mustache: 'error.html'}, locals
219
+
220
+ if content
221
+ content_type = 'text/html'
222
+ body = [content.to_s]
223
+ else
224
+ body = ["Error #{code}: ", path_info]
225
+ end
226
+ end
227
+
228
+ [code, {'Content-Type' => content_type, }, body]
199
229
  end
200
230
 
201
231
  # ファイル監視を行う
202
- def watcher(path = '.')
232
+ def watcher(path = '.', interval = 1.0)
203
233
  require 'directory_watcher'
204
234
 
235
+ interval = 1.0 if interval == true # 旧バージョンとの互換性のため
236
+
205
237
  dw = DirectoryWatcher.new path, :pre_load => true
206
- dw.interval = 1
238
+ dw.interval = interval
207
239
  dw.stable = 2
208
240
  dw.glob = '**/*'
209
241
  dw.add_observer { |*args|
@@ -216,11 +248,43 @@ module MemoRack
216
248
  dw.start
217
249
  end
218
250
 
251
+ # ファイルを探す
252
+ def file_search(template, options = {}, exts = enable_exts)
253
+ options = {views: @root}.merge(options)
254
+
255
+ if options[:views].kind_of?(Array)
256
+ err = nil
257
+
258
+ options[:views].each { |views|
259
+ options[:views] = views
260
+
261
+ begin
262
+ path = file_search(template, options, exts)
263
+ return path if path
264
+ rescue Errno::ENOENT => e
265
+ err = e
266
+ end
267
+ }
268
+
269
+ raise err if err
270
+ return nil
271
+ end
272
+
273
+ exts.each { |ext|
274
+ path = File.join(options[:views], "#{template}.#{ext}")
275
+ return path if File.exists?(path)
276
+ }
277
+
278
+ return nil
279
+ end
280
+
219
281
  # テンプレートエンジンで render する
220
282
  def render(engine, template, options = {}, locals = {})
221
283
  options = {views: @root}.merge(options)
222
284
 
223
- if options[:views].kind_of?(Array)
285
+ if template.kind_of?(Pathname)
286
+ path = template
287
+ elsif options[:views].kind_of?(Array)
224
288
  err = nil
225
289
 
226
290
  options[:views].each { |views|
@@ -234,11 +298,11 @@ module MemoRack
234
298
  }
235
299
 
236
300
  raise err
301
+ else
302
+ fname = template.kind_of?(String) ? template : "#{template}.#{engine}"
303
+ path = File.join(options[:views], fname)
237
304
  end
238
305
 
239
- fname = template.kind_of?(String) ? template : "#{template}.#{engine}"
240
- path = File.join(options[:views], fname)
241
-
242
306
  engine = Tilt.new(File.join(File.dirname(path), ".#{engine}"), options) {
243
307
  method = MemoApp.template_method(template)
244
308
 
@@ -257,26 +321,97 @@ module MemoRack
257
321
  # レイアウトに mustache を適用してテンプレートエンジンでレンダリングする
258
322
  def render_with_mustache(template, engine = :markdown, options = {}, locals = {})
259
323
  begin
324
+ mustache_templ = options[:mustache] || 'index.html'
325
+
260
326
  options = @options.merge(options)
327
+ locals = @locals.merge(locals)
261
328
 
262
- @menu = nil unless @directory_watcher # ファイル監視していない場合はメニューを初期化
329
+ locals.define_key(:__content__) { |hash, key|
330
+ if engine
331
+ render engine, template, options
332
+ else
333
+ template
334
+ end
335
+ }
263
336
 
264
- @menu ||= render :markdown, :menu, options
265
- content = render engine, template, options
266
- fname = template.to_s.force_encoding('UTF-8')
337
+ locals[:content] = true unless template == :index
338
+ locals[:page] = page = Locals[locals[:page] || {}]
267
339
 
268
- locals = @locals.merge(locals)
340
+ page.define_key(:name) { |hash, key|
341
+ unless template == :index
342
+ fname = locals[:path_info]
343
+ fname ||= template.to_s.force_encoding('UTF-8')
344
+ File.basename(fname)
345
+ end
346
+ }
269
347
 
270
- locals[:__menu__] = @menu
271
- locals[:__content__] = content
272
- locals[:page][:title] = [File.basename(fname), locals[:title]].join(' | ') unless template == :index
348
+ page.define_key(:title) { |hash, key|
349
+ page_title = home_title = locals[:title]
350
+ page_name = hash[:name]
351
+ page_title = "#{page_name} | #{home_title}" if page_name
273
352
 
274
- render :mustache, 'index.html', {views: @themes}, locals
353
+ page_title
354
+ }
355
+
356
+ render :mustache, mustache_templ, {views: @themes}, locals
275
357
  rescue => e
276
358
  e.to_s
277
359
  end
278
360
  end
279
361
 
362
+ # コンテンツをレンダリングする
363
+ def render_content(env, path_info)
364
+ path, ext = split_extname(path_info)
365
+
366
+ if @suffix == ''
367
+ path = path_info
368
+ fullpath = file_search(path, @options)
369
+ return nil unless fullpath
370
+
371
+ ext = split_extname(fullpath)[1]
372
+ end
373
+
374
+ return nil unless ext && Tilt.registered?(ext)
375
+
376
+ req = Rack::Request.new(env)
377
+ query = Rack::Utils.parse_query(req.query_string)
378
+ locals = {env: env, path_info: path_info}
379
+
380
+ if query.has_key?('edit')
381
+ fullpath = File.expand_path(File.join(@root, "#{path}.#{ext}")) unless fullpath
382
+
383
+ # @attention リダイレクトはうまく動作しない
384
+ #
385
+ # redirect_url = 'file://' + File.expand_path(File.join(@root, req.path_info))
386
+ # return redirect(redirect_url, 302) if File.exists?(fullpath)
387
+ end
388
+
389
+ template = fullpath ? Pathname.new(fullpath) : path.to_sym
390
+ content = render_with_mustache template, ext, {}, locals
391
+ end
392
+
393
+ # CSSをレンダリングする
394
+ def render_css(env, path_info)
395
+ return unless @css
396
+
397
+ exts = @css
398
+ exts = [exts] unless exts.kind_of?(Array)
399
+ path, = split_extname(path_info)
400
+ options = {views: @themes}
401
+
402
+ fullpath = file_search(path, options, exts)
403
+ return nil unless fullpath
404
+
405
+ ext = split_extname(fullpath)[1]
406
+
407
+ case ext
408
+ when 'scss', 'sass'
409
+ options[:cache_location] = File.expand_path('sass-cache', @tmpdir)
410
+ end
411
+
412
+ render ext, Pathname.new(fullpath), options
413
+ end
414
+
280
415
  # 拡張子を取出す
281
416
  def split_extname(path)
282
417
  return [$1, $2] if /^(.+)\.([^.]+)/ =~ path
@@ -318,6 +453,11 @@ module MemoRack
318
453
  @collect_formats
319
454
  end
320
455
 
456
+ # 対応している拡張子
457
+ def enable_exts
458
+ @enable_exts ||= collect_formats.values.flatten
459
+ end
460
+
321
461
  # テンプレート名
322
462
  def self.template_method(name)
323
463
  name.kind_of?(Symbol) && "template_#{name}".to_sym
@@ -341,7 +481,7 @@ module MemoRack
341
481
 
342
482
  # メニューを作成
343
483
  template :menu do
344
- mdmenu = MdMenu.new({prefix: '/', uri_escape: true, formats: collect_formats})
484
+ mdmenu = MdMenu.new({prefix: '/', suffix: @suffix, uri_escape: true, formats: collect_formats})
345
485
  Dir.chdir(@root) { |path| mdmenu.collection('.') }
346
486
  mdmenu.generate(StringIO.new).string
347
487
  end
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # -*- encoding: utf-8 -*-
2
2
 
3
3
  require 'sinatra/base'
4
4
  require 'memorack/tilt-mustache'
@@ -1,5 +1,5 @@
1
1
  {
2
- // "directory_watcher": true, // ファイルの変更を監視するか決める
2
+ // "directory_watcher": 1.0, // ファイルの変更を監視するか決める(秒)
3
3
  "theme": "oreilly", // テーマ(省略すると basic )
4
4
  // "markdown": "kramdown", // 使用する markdownライブラリ(省略すると redcarpet )
5
5
  // "formats": ["markdown"], // "markdown", "rdoc", "textile" or "wiki" (要 Tilt に対応した gem ライブラリ)
@@ -0,0 +1 @@
1
+ ### Not Found
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "directory_watcher": false, // ファイルの変更を監視するか決める
3
- "css": "scss", // scss の自動変換を使用する
3
+ "css": ["scss"], // css の自動変換を使用する
4
4
  // "markdown": "kramdown", // 使用する markdownライブラリ
5
5
  // "formats": ["markdown"], // "markdown", "rdoc", "textile" or "wiki" (要 Tilt に対応した gem ライブラリ)
6
6
 
@@ -0,0 +1,34 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+
6
+ <style>
7
+ article, aside, dialog, figure, footer, header,
8
+ hgroup, menu, nav, section { display: block; }
9
+ </style>
10
+
11
+ <meta name="keywords" content="" />
12
+ <meta name="description" content="" />
13
+ <title>{{page.title}}</title>
14
+
15
+ <link type="text/css" href="/styles.css" rel="stylesheet" media="all" />
16
+
17
+ </head>
18
+ <body>
19
+ <div id="page">
20
+ <header>
21
+ <h1><a href="/">{{title}}</a></h1>
22
+ </header>
23
+
24
+ <div id="content-container">
25
+ <div id="content">{{{__content__}}}</div>
26
+ <div class="clear"></div>
27
+ </div>
28
+
29
+ <footer>
30
+ <p>Powered by <a href="{{app.url}}" target="_blank"> {{app.name}} {{app.version}}</a></p>
31
+ </footer>
32
+ </div>
33
+ </body>
34
+ </html>
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # -*- encoding: utf-8 -*-
2
2
 
3
3
  require 'tilt'
4
4
  require 'tilt/template'
@@ -211,8 +211,10 @@ describe MemoRack do
211
211
  `cd themes/#{theme}; find . -print`.must_equal <<-EOD.cut_indent
212
212
  .
213
213
  ./2-column.scss
214
+ ./404.md
214
215
  ./basic-styles.scss
215
216
  ./config.json
217
+ ./error.html
216
218
  ./index.html
217
219
  ./styles.scss
218
220
  EOD
metadata CHANGED
@@ -1,158 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memorack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
4
+ version: 0.0.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - gnue
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
11
+ date: 2013-04-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: tilt
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: mustache
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: redcarpet
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: 2.0.0
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 2.0.0
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: json
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: sass
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: i18n
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - '>='
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: minitest
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - '>='
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - '>='
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: turn
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - '>='
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - '>='
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  description: Rack Application for markdown memo
@@ -165,6 +146,7 @@ extra_rdoc_files: []
165
146
  files:
166
147
  - .gitignore
167
148
  - Gemfile
149
+ - HISTORY.md
168
150
  - LICENSE.txt
169
151
  - README.md
170
152
  - Rakefile
@@ -174,6 +156,7 @@ files:
174
156
  - lib/memorack/cli.rb
175
157
  - lib/memorack/locales/en.yml
176
158
  - lib/memorack/locales/ja.yml
159
+ - lib/memorack/locals.rb
177
160
  - lib/memorack/mdmenu.rb
178
161
  - lib/memorack/memoapp.rb
179
162
  - lib/memorack/sinatra-mustache.rb
@@ -185,8 +168,10 @@ files:
185
168
  - lib/memorack/template/themes/custom/config.json
186
169
  - lib/memorack/template/themes/custom/index.md
187
170
  - lib/memorack/themes/basic/2-column.scss
171
+ - lib/memorack/themes/basic/404.md
188
172
  - lib/memorack/themes/basic/basic-styles.scss
189
173
  - lib/memorack/themes/basic/config.json
174
+ - lib/memorack/themes/basic/error.html
190
175
  - lib/memorack/themes/basic/index.html
191
176
  - lib/memorack/themes/basic/styles.scss
192
177
  - lib/memorack/themes/oreilly/config.json
@@ -201,30 +186,28 @@ files:
201
186
  - VERSION
202
187
  homepage: https://github.com/gnue/memorack
203
188
  licenses: []
204
- post_install_message: ! "\n ==================\n Quick Start\n\n $ memorack
189
+ metadata: {}
190
+ post_install_message: "\n ==================\n Quick Start\n\n $ memorack
205
191
  create memo\n $ cd memo\n $ rackup\n\n ==================\n "
206
192
  rdoc_options: []
207
193
  require_paths:
208
194
  - lib
209
195
  required_ruby_version: !ruby/object:Gem::Requirement
210
- none: false
211
196
  requirements:
212
- - - ! '>='
197
+ - - '>='
213
198
  - !ruby/object:Gem::Version
214
199
  version: 1.9.0
215
200
  required_rubygems_version: !ruby/object:Gem::Requirement
216
- none: false
217
201
  requirements:
218
- - - ! '>='
202
+ - - '>='
219
203
  - !ruby/object:Gem::Version
220
204
  version: '0'
221
205
  requirements: []
222
206
  rubyforge_project:
223
- rubygems_version: 1.8.23
207
+ rubygems_version: 2.0.0
224
208
  signing_key:
225
- specification_version: 3
209
+ specification_version: 4
226
210
  summary: Rack Application for markdown memo
227
211
  test_files:
228
212
  - spec/memorack_spec.rb
229
213
  - spec/spec_helper.rb
230
- has_rdoc: