wikimd 0.2.0 → 0.3.0

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: 097f85eaa789163d1355df7a9305c26d7de4912d
4
- data.tar.gz: e2b322cec89890671a221f545bf274e67652277f
3
+ metadata.gz: dae0ad2420e537eff698abc5eda9a6a5a0de6d22
4
+ data.tar.gz: 44b7b655700d403880737b6b2bc63671f0250a17
5
5
  SHA512:
6
- metadata.gz: bf7581f4e9ec5cb875deb40e88e8d28855202ed0fe67e265a07b1b94c69e97d329f9f4b048e74cc5ffe77a3e44d08c8cf4d62f0a37eb0ffc98c86a17b0a30c66
7
- data.tar.gz: 909d0a74a36e3691969f7bfdbe4c6ea964f2df75582e228ae180074c78be26adc4e8e9d9af846a361214488421df7bc5e4e7a3da7dde3e0f493b36897d2471bf
6
+ metadata.gz: b78023746e9a246d4a28d505f5cce8043c0a13feb1df198fdc725fb9371a80566aa4c7d06d3a211fedde25a85be3a696229ecbab958f63bde3b6d4f436761913
7
+ data.tar.gz: eadec7179a5ea42a5a6f0754410bd4b73ee56eb7fba038bce69c5590506c204eea63e706f04ef70c29a01845febde9e479b044bfe9f7b52bf1cf50a91d6fa872
@@ -1,7 +1,8 @@
1
1
  require 'json'
2
2
 
3
- require 'sinatra/base'
4
3
  require 'fuzzy_set'
4
+ require 'pry'
5
+ require 'sinatra/base'
5
6
  require 'slim'
6
7
 
7
8
  require 'wikimd/renderer'
@@ -13,15 +14,21 @@ module WikiMD
13
14
  TYPE_MARKDOWN = %w(md mdown markdown)
14
15
  TYPE_TEXT = %w(txt rb js slim css scss coffee)
15
16
 
17
+ # Use gzip compression
16
18
  use Rack::Deflater
17
19
 
18
20
  configure do
21
+ # disable stuff not needed
19
22
  disable :method_override
20
- disable :sessions
23
+
24
+ enable :sessions
21
25
 
22
26
  set :views, File.expand_path('../app/views', __FILE__)
23
27
  set :markdown_renderer, WikiMD::Renderer.build
24
28
  set :public_folder, File.expand_path('../app/public', __FILE__)
29
+
30
+ set :fs_created, Time.new(0)
31
+ set :fs, nil
25
32
  end
26
33
 
27
34
  # :nocov:
@@ -33,67 +40,119 @@ module WikiMD
33
40
  # :nocov:
34
41
 
35
42
  helpers do
43
+ # returns the URI for a static asset.
44
+ #
45
+ # @param name [#to_s] name of the asset file
46
+ # @return [String] the full URI
36
47
  def asset_path(name)
37
48
  url("assets/#{name}")
38
49
  end
39
50
 
51
+ # Include an Octicon! (see https://octicons.github.com/)
52
+ #
53
+ # @param name [#to_s] Name of the Octicon
54
+ # @return [String] HTML Code for the Octicon
40
55
  def octicon(name)
41
56
  %(<span class="octicon octicon-#{name}"></span>)
42
57
  end
43
58
 
59
+ # Get the directory-Tree from the root of the repo
44
60
  def tree_root
45
61
  repo.tree
46
62
  end
47
63
 
48
- def js_files
49
- repo.files.to_json.gsub('/', ',')
50
- end
51
-
64
+ # URL helper for the History page of a document
65
+ #
66
+ # @param path [String] relative path of the document in the Repository
67
+ # @return [String] full URI to the history page
52
68
  def history_path(path)
53
69
  url('/h/' + path)
54
70
  end
71
+
72
+ def class_for_diff(line)
73
+ case line[0]
74
+ when '+'
75
+ 'addition'
76
+ when '-'
77
+ 'removal'
78
+ end
79
+ end
55
80
  end
56
81
 
82
+ # If no route matches, render the 404 page
57
83
  not_found do
58
84
  slim :'404'
59
85
  end
60
86
 
61
- error WikiMD::Repository::FileNotFound do
62
- status 404
63
- slim :'404'
87
+ before do
88
+ @flash = session[:flash]
89
+ session[:flash] = nil
90
+ end
91
+
92
+ post '/c/*' do |path|
93
+ if (params[:compare] || []).length != 2
94
+ session[:flash] = {
95
+ 'error' => 'Must select exactly 2 revisions!'
96
+ }
97
+ redirect to('/h/' + path)
98
+ end
99
+
100
+ @from, @to = params['compare'][1], params['compare'][0]
101
+ begin
102
+ @diff = repo.diff(path, @from, @to)
103
+ rescue WikiMD::Repository::FileNotFound
104
+ pass
105
+ end
106
+
107
+ @path = path
108
+ slim :diff
64
109
  end
65
110
 
111
+ # Quick/Fuzzy Search
66
112
  get '/search.json' do
67
113
  headers 'Content-Type' => 'application/json'
68
- files_set = FuzzySet.new(repo.files)
69
114
  files_set.get(params[:query]).to_json
70
115
  end
71
116
 
117
+ # History Page
72
118
  get '/h/*' do |path|
73
119
  @path = path
74
120
  @history = repo.history(@path)
75
121
  slim :history
76
122
  end
77
123
 
124
+ # Document Page
78
125
  get '/*' do |path|
79
- @path = path
80
- @extension = (m = path.match(/(?:\.)([^.]+)$/)) ? m[1].downcase : ''
81
126
  begin
82
- @content = repo.read(@path, params[:at])
127
+ @content = repo.read(path, params[:at])
83
128
  rescue WikiMD::Repository::FileNotFound
84
129
  pass
85
130
  end
131
+ @path = path
132
+ session[:test] = path
133
+ @extension = (m = path.match(/(?:\.)([^.]+)$/)) ? m[1].downcase : ''
86
134
  slim :file
87
135
  end
88
136
 
89
137
  private
90
138
 
139
+ # Render Markdown to HTML
91
140
  def render_markdown(markdown)
92
141
  settings.markdown_renderer.render(markdown)
93
142
  end
94
143
 
144
+ # create or return Repository
95
145
  def repo
96
146
  @_repo ||= WikiMD::Repository.new(settings.repo_path)
97
147
  end
148
+
149
+ # create or return the Search Index
150
+ def files_set
151
+ if settings.fs_created + 12 < Time.now
152
+ settings.fs = FuzzySet.new(repo.files)
153
+ settings.fs_created = Time.now
154
+ end
155
+ settings.fs
156
+ end
98
157
  end
99
158
  end
@@ -1 +1 @@
1
- /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8}@font-face{font-family:'octicons';src:url("/assets/font/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("embedded-opentype"),url("/assets/font/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("woff"),url("/assets/font/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("truetype"),url("/assets/font/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons") format("svg");font-weight:normal;font-style:normal}.octicon,.mega-octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-microscope:before,.octicon-beaker:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gist-private:before,.octicon-mirror-private:before,.octicon-git-fork-private:before,.octicon-lock:before{content:'\f06a'}.octicon-logo-github:before{content:'\f092'}.octicon-mail:before{content:'\f03b'}.octicon-mail-read:before{content:'\f03c'}.octicon-mail-reply:before{content:'\f051'}.octicon-mark-github:before{content:'\f00a'}.octicon-markdown:before{content:'\f0c9'}.octicon-megaphone:before{content:'\f077'}.octicon-mention:before{content:'\f0be'}.octicon-milestone:before{content:'\f075'}.octicon-mirror-public:before,.octicon-mirror:before{content:'\f024'}.octicon-mortar-board:before{content:'\f0d7'}.octicon-mute:before{content:'\f080'}.octicon-no-newline:before{content:'\f09c'}.octicon-octoface:before{content:'\f008'}.octicon-organization:before{content:'\f037'}.octicon-package:before{content:'\f0c4'}.octicon-paintcan:before{content:'\f0d1'}.octicon-pencil:before{content:'\f058'}.octicon-person-add:before,.octicon-person-follow:before,.octicon-person:before{content:'\f018'}.octicon-pin:before{content:'\f041'}.octicon-plug:before{content:'\f0d4'}.octicon-repo-create:before,.octicon-gist-new:before,.octicon-file-directory-create:before,.octicon-file-add:before,.octicon-plus:before{content:'\f05d'}.octicon-primitive-dot:before{content:'\f052'}.octicon-primitive-square:before{content:'\f053'}.octicon-pulse:before{content:'\f085'}.octicon-question:before{content:'\f02c'}.octicon-quote:before{content:'\f063'}.octicon-radio-tower:before{content:'\f030'}.octicon-repo-delete:before,.octicon-repo:before{content:'\f001'}.octicon-repo-clone:before{content:'\f04c'}.octicon-repo-force-push:before{content:'\f04a'}.octicon-gist-fork:before,.octicon-repo-forked:before{content:'\f002'}.octicon-repo-pull:before{content:'\f006'}.octicon-repo-push:before{content:'\f005'}.octicon-rocket:before{content:'\f033'}.octicon-rss:before{content:'\f034'}.octicon-ruby:before{content:'\f047'}.octicon-screen-full:before{content:'\f066'}.octicon-screen-normal:before{content:'\f067'}.octicon-search-save:before,.octicon-search:before{content:'\f02e'}.octicon-server:before{content:'\f097'}.octicon-settings:before{content:'\f07c'}.octicon-shield:before{content:'\f0e1'}.octicon-log-in:before,.octicon-sign-in:before{content:'\f036'}.octicon-log-out:before,.octicon-sign-out:before{content:'\f032'}.octicon-squirrel:before{content:'\f0b2'}.octicon-star-add:before,.octicon-star-delete:before,.octicon-star:before{content:'\f02a'}.octicon-stop:before{content:'\f08f'}.octicon-repo-sync:before,.octicon-sync:before{content:'\f087'}.octicon-tag-remove:before,.octicon-tag-add:before,.octicon-tag:before{content:'\f015'}.octicon-telescope:before{content:'\f088'}.octicon-terminal:before{content:'\f0c8'}.octicon-three-bars:before{content:'\f05e'}.octicon-thumbsdown:before{content:'\f0db'}.octicon-thumbsup:before{content:'\f0da'}.octicon-tools:before{content:'\f031'}.octicon-trashcan:before{content:'\f0d0'}.octicon-triangle-down:before{content:'\f05b'}.octicon-triangle-left:before{content:'\f044'}.octicon-triangle-right:before{content:'\f05a'}.octicon-triangle-up:before{content:'\f0aa'}.octicon-unfold:before{content:'\f039'}.octicon-unmute:before{content:'\f0ba'}.octicon-versions:before{content:'\f064'}.octicon-watch:before{content:'\f0e0'}.octicon-remove-close:before,.octicon-x:before{content:'\f081'}.octicon-zap:before{content:'\26A1'}*{box-sizing:border-box}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}body{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:16px;line-height:1.5;font-weight:300;color:#444;background-color:#f2f2f2}h1,h2,h3,h4,h5,h6{color:#444;margin-top:20px;margin-bottom:10px;font-weight:600}h1{font-size:32px;border-bottom:1px solid #ccc}h1 small{color:#919191}p{margin-bottom:10px}a,a:visited{color:#3a980b;text-decoration:none;font-weight:600}code{color:#000;background:#f8f8f8;border:1px solid #e5e5e5;border-radius:3px}pre code{border:none}.topbar{position:fixed;top:0;right:0;left:0;z-index:999;height:56px;background:#3a980b;box-shadow:0 0 4px rgba(0,0,0,0.14),0 4px 8px rgba(0,0,0,0.28)}.search{display:block;margin-left:300px;margin-right:30px;height:56px}#search{height:36px;margin:10px 0;padding:7px 8px;line-height:22px;font-size:22px;width:100%;background:#31800a;border:none;outline:none;border-radius:0;box-shadow:none;color:#fff}#search::-webkit-input-placeholder{color:#fff}#search:-moz-placeholder{color:#fff;opacity:1}#search::-moz-placeholder{color:#fff;opacity:1}#search:-ms-input-placeholder{color:#fff}.sidebar{width:300px;height:100%;box-sizing:border-box;padding:16px 8px 0 24px;padding-top:72px;float:left;position:fixed;overflow:auto}.sidebar>ul{list-style:none;padding:0 0 8px 0}.sidebar .title{font-weight:bold;text-transform:uppercase}.sidebar .tree{overflow:auto}.sidebar footer{margin-top:120px;text-align:center;color:#ccc}.sidebar footer a,.sidebar footer a:visited{font-weight:bold;color:#aaa}.sidebar footer a:hover{color:#888}.sidebar footer ul{list-style:none;padding:0}.sidebar footer li{display:inline-block;margin-right:32px}.tree-view{padding-left:0;list-style:none}.tree-view .entry .tree-view{padding-left:16px}.tree-view .directory.collapsed>ul{display:none}.tree-view .entry{white-space:nowrap}.tree-view .entry>a{display:inline-block;width:100%;font-weight:normal}.tree-view .entry:before{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:16px;content:' '}.tree-view .entry.collapsed:before{content:'\f078'}.tree-view .entry.expanded:before{content:'\f0a3'}.tree-view .entry.directory{cursor:pointer}.tree-view .entry>:before{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:16px;margin-right:4px}.tree-view .entry>a:before{content:""}.tree-view .entry.directory>span:before{content:'\f016'}main{padding-left:300px;padding-top:56px}.content{margin:30px;margin-left:0;padding:30px;background:#fff;box-shadow:0 0 5px rgba(0,0,0,0.1);border:1px solid #ddd}.content h1:first-of-type{margin-top:0}.highlight{background-color:#f8f8f8;padding:10px;border-radius:4px}.actions{text-align:right;margin-bottom:-24px}.alert{border:1px solid;padding:8px 16px}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bcdff1}.history{border:1px solid #bbb;padding:0;list-style:none}.history li{border-bottom:1px solid #bbb;padding:8px 16px}.history li:last-child{border:none}.history .rev{display:inline-block;width:80px}.history .date{display:inline-block;width:160px}
1
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.highlight table td{padding:5px}.highlight table pre{margin:0}.highlight .cm{color:#999988;font-style:italic}.highlight .cp{color:#999999;font-weight:bold}.highlight .c1{color:#999988;font-style:italic}.highlight .cs{color:#999999;font-weight:bold;font-style:italic}.highlight .c,.highlight .cd{color:#999988;font-style:italic}.highlight .err{color:#a61717;background-color:#e3d2d2}.highlight .gd{color:#000000;background-color:#ffdddd}.highlight .ge{color:#000000;font-style:italic}.highlight .gr{color:#aa0000}.highlight .gh{color:#999999}.highlight .gi{color:#000000;background-color:#ddffdd}.highlight .go{color:#888888}.highlight .gp{color:#555555}.highlight .gs{font-weight:bold}.highlight .gu{color:#aaaaaa}.highlight .gt{color:#aa0000}.highlight .kc{color:#000000;font-weight:bold}.highlight .kd{color:#000000;font-weight:bold}.highlight .kn{color:#000000;font-weight:bold}.highlight .kp{color:#000000;font-weight:bold}.highlight .kr{color:#000000;font-weight:bold}.highlight .kt{color:#445588;font-weight:bold}.highlight .k,.highlight .kv{color:#000000;font-weight:bold}.highlight .mf{color:#009999}.highlight .mh{color:#009999}.highlight .il{color:#009999}.highlight .mi{color:#009999}.highlight .mo{color:#009999}.highlight .m,.highlight .mb,.highlight .mx{color:#009999}.highlight .sb{color:#d14}.highlight .sc{color:#d14}.highlight .sd{color:#d14}.highlight .s2{color:#d14}.highlight .se{color:#d14}.highlight .sh{color:#d14}.highlight .si{color:#d14}.highlight .sx{color:#d14}.highlight .sr{color:#009926}.highlight .s1{color:#d14}.highlight .ss{color:#990073}.highlight .s{color:#d14}.highlight .na{color:#008080}.highlight .bp{color:#999999}.highlight .nb{color:#0086B3}.highlight .nc{color:#445588;font-weight:bold}.highlight .no{color:#008080}.highlight .nd{color:#3c5d5d;font-weight:bold}.highlight .ni{color:#800080}.highlight .ne{color:#990000;font-weight:bold}.highlight .nf{color:#990000;font-weight:bold}.highlight .nl{color:#990000;font-weight:bold}.highlight .nn{color:#555555}.highlight .nt{color:#000080}.highlight .vc{color:#008080}.highlight .vg{color:#008080}.highlight .vi{color:#008080}.highlight .nv{color:#008080}.highlight .ow{color:#000000;font-weight:bold}.highlight .o{color:#000000;font-weight:bold}.highlight .w{color:#bbbbbb}.highlight{background-color:#f8f8f8}@font-face{font-family:'octicons';src:url("/assets/font/octicons.eot?#iefix&v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("embedded-opentype"),url("/assets/font/octicons.woff?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("woff"),url("/assets/font/octicons.ttf?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d") format("truetype"),url("/assets/font/octicons.svg?v=396334ee3da78f4302d25c758ae3e3ce5dc3c97d#octicons") format("svg");font-weight:normal;font-style:normal}.octicon,.mega-octicon{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mega-octicon{font-size:32px}.octicon-alert:before{content:'\f02d'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-microscope:before,.octicon-beaker:before{content:'\f0dd'}.octicon-bell:before{content:'\f0de'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-briefcase:before{content:'\f0d3'}.octicon-broadcast:before{content:'\f048'}.octicon-browser:before{content:'\f0c5'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-circuit-board:before{content:'\f0d6'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment-add:before,.octicon-comment:before{content:'\f02b'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dash:before{content:'\f0ca'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-clone:before,.octicon-desktop-download:before{content:'\f0dc'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye-unwatch:before,.octicon-eye-watch:before,.octicon-eye:before{content:'\f04e'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-flame:before{content:'\f0d2'}.octicon-fold:before{content:'\f0cc'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch-create:before,.octicon-git-branch-delete:before,.octicon-git-branch:before{content:'\f020'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request-abandoned:before,.octicon-git-pull-request:before{content:'\f009'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-heart:before{content:'\2665'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hubot:before{content:'\f09d'}.octicon-inbox:before{content:'\f0cf'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-law:before{content:'\f0d8'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-gist-private:before,.octicon-mirror-private:before,.octicon-git-fork-private:before,.octicon-lock:before{content:'\f06a'}.octicon-logo-github:before{content:'\f092'}.octicon-mail:before{content:'\f03b'}.octicon-mail-read:before{content:'\f03c'}.octicon-mail-reply:before{content:'\f051'}.octicon-mark-github:before{content:'\f00a'}.octicon-markdown:before{content:'\f0c9'}.octicon-megaphone:before{content:'\f077'}.octicon-mention:before{content:'\f0be'}.octicon-milestone:before{content:'\f075'}.octicon-mirror-public:before,.octicon-mirror:before{content:'\f024'}.octicon-mortar-board:before{content:'\f0d7'}.octicon-mute:before{content:'\f080'}.octicon-no-newline:before{content:'\f09c'}.octicon-octoface:before{content:'\f008'}.octicon-organization:before{content:'\f037'}.octicon-package:before{content:'\f0c4'}.octicon-paintcan:before{content:'\f0d1'}.octicon-pencil:before{content:'\f058'}.octicon-person-add:before,.octicon-person-follow:before,.octicon-person:before{content:'\f018'}.octicon-pin:before{content:'\f041'}.octicon-plug:before{content:'\f0d4'}.octicon-repo-create:before,.octicon-gist-new:before,.octicon-file-directory-create:before,.octicon-file-add:before,.octicon-plus:before{content:'\f05d'}.octicon-primitive-dot:before{content:'\f052'}.octicon-primitive-square:before{content:'\f053'}.octicon-pulse:before{content:'\f085'}.octicon-question:before{content:'\f02c'}.octicon-quote:before{content:'\f063'}.octicon-radio-tower:before{content:'\f030'}.octicon-repo-delete:before,.octicon-repo:before{content:'\f001'}.octicon-repo-clone:before{content:'\f04c'}.octicon-repo-force-push:before{content:'\f04a'}.octicon-gist-fork:before,.octicon-repo-forked:before{content:'\f002'}.octicon-repo-pull:before{content:'\f006'}.octicon-repo-push:before{content:'\f005'}.octicon-rocket:before{content:'\f033'}.octicon-rss:before{content:'\f034'}.octicon-ruby:before{content:'\f047'}.octicon-screen-full:before{content:'\f066'}.octicon-screen-normal:before{content:'\f067'}.octicon-search-save:before,.octicon-search:before{content:'\f02e'}.octicon-server:before{content:'\f097'}.octicon-settings:before{content:'\f07c'}.octicon-shield:before{content:'\f0e1'}.octicon-log-in:before,.octicon-sign-in:before{content:'\f036'}.octicon-log-out:before,.octicon-sign-out:before{content:'\f032'}.octicon-squirrel:before{content:'\f0b2'}.octicon-star-add:before,.octicon-star-delete:before,.octicon-star:before{content:'\f02a'}.octicon-stop:before{content:'\f08f'}.octicon-repo-sync:before,.octicon-sync:before{content:'\f087'}.octicon-tag-remove:before,.octicon-tag-add:before,.octicon-tag:before{content:'\f015'}.octicon-telescope:before{content:'\f088'}.octicon-terminal:before{content:'\f0c8'}.octicon-three-bars:before{content:'\f05e'}.octicon-thumbsdown:before{content:'\f0db'}.octicon-thumbsup:before{content:'\f0da'}.octicon-tools:before{content:'\f031'}.octicon-trashcan:before{content:'\f0d0'}.octicon-triangle-down:before{content:'\f05b'}.octicon-triangle-left:before{content:'\f044'}.octicon-triangle-right:before{content:'\f05a'}.octicon-triangle-up:before{content:'\f0aa'}.octicon-unfold:before{content:'\f039'}.octicon-unmute:before{content:'\f0ba'}.octicon-versions:before{content:'\f064'}.octicon-watch:before{content:'\f0e0'}.octicon-remove-close:before,.octicon-x:before{content:'\f081'}.octicon-zap:before{content:'\26A1'}*{box-sizing:border-box}hr{display:block;height:1px;border:0;border-top:1px solid #ccc;margin:1em 0;padding:0}body{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:16px;line-height:1.5;font-weight:300;color:#444;background-color:#f2f2f2}h1,h2,h3,h4,h5,h6{color:#444;margin-top:20px;margin-bottom:10px;font-weight:600}h1{font-size:32px;border-bottom:1px solid #ccc}h1 small{color:#919191}p{margin-bottom:10px}a,a:visited{color:#2798dd;text-decoration:none;font-weight:600}code{color:#000;background:#f8f8f8;border:1px solid #e5e5e5;border-radius:3px}pre code{border:none}button{border-radius:0;background:#2798dd;color:#fff;border:1px solid #1c7bb5;box-shadow:0 2px 2px rgba(0,0,0,0.2)}.lead{font-size:1.25rem}.topbar{position:fixed;top:0;right:0;left:0;z-index:999;height:56px;background:#2798dd;box-shadow:0 0 4px rgba(0,0,0,0.14),0 4px 8px rgba(0,0,0,0.28)}.search{display:block;margin-left:300px;margin-right:30px;height:56px}#search{height:36px;margin:10px 0;padding:7px 8px;line-height:22px;font-size:22px;width:100%;background:#208acb;border:none;outline:none;border-radius:0;box-shadow:none;color:#fff}#search::-webkit-input-placeholder{color:#fff}#search:-moz-placeholder{color:#fff;opacity:1}#search::-moz-placeholder{color:#fff;opacity:1}#search:-ms-input-placeholder{color:#fff}.sidebar{width:300px;height:100%;box-sizing:border-box;padding:16px 8px 0 24px;padding-top:72px;float:left;position:fixed;overflow:auto}.sidebar>ul{list-style:none;padding:0 0 8px 0}.sidebar .title{font-weight:bold;text-transform:uppercase}.sidebar .tree{overflow:auto}.sidebar footer{margin-top:120px;text-align:center;color:#ccc}.sidebar footer a,.sidebar footer a:visited{font-weight:bold;color:#aaa}.sidebar footer a:hover{color:#888}.sidebar footer ul{list-style:none;padding:0}.sidebar footer li{display:inline-block;margin-right:32px}.tree-view{padding-left:0;list-style:none}.tree-view .entry .tree-view{padding-left:16px}.tree-view .directory.collapsed>ul{display:none}.tree-view .entry{white-space:nowrap}.tree-view .entry>a{display:inline-block;width:100%;font-weight:normal}.tree-view .entry:before{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:16px;content:' '}.tree-view .entry.collapsed:before{content:'\f078'}.tree-view .entry.expanded:before{content:'\f0a3'}.tree-view .entry.directory{cursor:pointer}.tree-view .entry>:before{font:normal normal normal 16px/1 octicons;display:inline-block;text-decoration:none;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:16px;margin-right:4px}.tree-view .entry>a:before{content:""}.tree-view .entry.directory>span:before{content:'\f016'}main{padding-left:300px;padding-top:56px}.content{margin:30px;margin-left:0;padding:30px;background:#fff;box-shadow:0 0 5px rgba(0,0,0,0.1);border:1px solid #ddd}.content h1:first-of-type{margin-top:0}.highlight{background-color:#f8f8f8;padding:10px;border-radius:4px}.actions{text-align:right;margin-bottom:-24px}.alert{border:1px solid;padding:8px 16px}.alert-info{color:#5d8915;background-color:#c2eb7f;border-color:#3f5c0f}.alert-error{color:#89155d;background-color:#eb7fc2;border-color:#5c0f3f}.history{border:1px solid #bbb;padding:0;list-style:none}.history li{border-bottom:1px solid #bbb;padding:8px 16px}.history li:last-child{border:none}.history input[type='checkbox']{margin-right:8px}.history .rev{display:inline-block;width:80px}.history .date{display:inline-block;width:160px}.diff{width:100%;overflow-x:hidden;font-family:monospace;border:1px solid #ccc;margin:10px 0;background:#eee}.diff th{text-align:left;border-bottom:1px solid #ccc;background:#ddd;padding:4px}.diff tr td:first-child{width:24px;text-align:center;vertical-align:top}.addition{background:#ccffcc;color:#060;border-color:#060}.removal{background:#ffcccc;color:#600;border-color:#600}a.addition,a.removal{padding-left:4px;padding-right:4px;font-weight:normal;font-family:monospace;border:1px solid;border-radius:3px}
@@ -7,7 +7,7 @@ $(document).ready(function() {
7
7
  // collapse all directories
8
8
  $('.tree-view > .entry.directory').addClass('collapsed');
9
9
  // expand current tree
10
- var path = document.location.pathname.substr(1);
10
+ var path = document.location.pathname.replace(/^\/([ch]\/)?/, '');
11
11
  $('[data-path="'+path+'"]').trigger('expand-tree');
12
12
 
13
13
  // click handler for directory entries
@@ -0,0 +1,22 @@
1
+ h1
2
+ | Changes
3
+ small< = @path
4
+
5
+ a href=url('/h/' + @path) == "#{octicon(:'arrow-left')} back to History"
6
+
7
+ p.lead
8
+ | Showing Changes from
9
+ a.removal<> href=url("/#{@path}?at=#{@from}") = @from
10
+ | to
11
+ a.addition< href=url("/#{@path}?at=#{@to}") = @to
12
+
13
+ - @diff.each do |diff|
14
+ table.diff
15
+ thead
16
+ tr
17
+ th colspan="2" = diff[:start]
18
+ tbody
19
+ - diff[:lines].each do |line|
20
+ tr class=class_for_diff(line)
21
+ td = line[0]
22
+ td = line[1..-1]
@@ -3,12 +3,16 @@ h1
3
3
  small< = @path
4
4
 
5
5
  - if @history.any?
6
- ul.history
7
- - @history.each do |h|
8
- li
9
- a.rev> href=url(@path + "?at=#{h[:hash]}") = h[:hash]
10
- strong.date<> = h[:date]
11
- span.message< = h[:message]
6
+ form action=url("/c/#{@path}") method="post"
7
+ ul.history
8
+ - @history.each do |h|
9
+ li
10
+ input type="checkbox" name="compare[]" value=h[:hash]
11
+ a.rev> href=url(@path + "?at=#{h[:hash]}") = h[:hash]
12
+ strong.date<> = h[:date]
13
+ span.message< = h[:message]
14
+
15
+ button type="submit" == "#{octicon(:diff)} compare selected revisions"
12
16
 
13
17
  - else
14
18
  .alert.alert-info
@@ -32,6 +32,9 @@ html
32
32
  main
33
33
  ul#results
34
34
  .content
35
+ - if @flash
36
+ - @flash.each do |type, msg|
37
+ div class="alert alert-#{type}" = msg
35
38
  == yield
36
39
 
37
40
  script src=asset_path('js/jquery-2.1.4.min.js')
@@ -92,6 +92,26 @@ module WikiMD
92
92
  build_hash(files(root), root)
93
93
  end
94
94
 
95
+ def diff(path, old, new)
96
+ path = pathname(path)
97
+ raw_diff = git :diff, "-p --no-color #{old} #{new} -- #{path}"
98
+ diff = []
99
+ raw_diff.each_line do |line|
100
+ next if line =~ /^(diff|index|\+\+\+|---)/
101
+ case line[0]
102
+ when '@'
103
+ parts = line.chomp.split('@@')
104
+ diff << {
105
+ start: parts[1].gsub(/^\s|\s$/, ''),
106
+ lines: [(parts[2])].compact
107
+ }
108
+ else
109
+ diff.last[:lines] << line.chomp
110
+ end
111
+ end
112
+ diff
113
+ end
114
+
95
115
  private
96
116
 
97
117
  def git(cmd, arg)
@@ -1,4 +1,4 @@
1
1
  module WikiMD # :nodoc:
2
2
  # Version of the gem
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
@@ -19,17 +19,18 @@ Gem::Specification.new do |s|
19
19
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  s.require_paths = ['lib']
21
21
 
22
+ s.add_runtime_dependency 'fuzzy_set', '~> 1.1'
22
23
  s.add_runtime_dependency 'rack'
23
- s.add_runtime_dependency 'sinatra'
24
- s.add_runtime_dependency 'slim'
25
24
  s.add_runtime_dependency 'redcarpet'
26
25
  s.add_runtime_dependency 'rouge', '~> 1.8', '!= 1.9.1' # 1.9.1 has a loading bug
27
- s.add_runtime_dependency 'fuzzy_set', '~> 1.1'
26
+ s.add_runtime_dependency 'sinatra'
27
+ s.add_runtime_dependency 'slim'
28
28
 
29
- s.add_development_dependency 'sass'
30
- s.add_development_dependency 'yard'
31
- s.add_development_dependency 'rspec'
32
- s.add_development_dependency 'cucumber'
33
29
  s.add_development_dependency 'capybara'
30
+ s.add_development_dependency 'cucumber'
31
+ s.add_development_dependency 'rack-test'
32
+ s.add_development_dependency 'rspec'
33
+ s.add_development_dependency 'sass'
34
34
  s.add_development_dependency 'simplecov'
35
+ s.add_development_dependency 'yard'
35
36
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikimd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Hutter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-28 00:00:00.000000000 Z
11
+ date: 2015-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fuzzy_set
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rack
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -25,7 +39,7 @@ dependencies:
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: sinatra
42
+ name: redcarpet
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
@@ -39,21 +53,27 @@ dependencies:
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: slim
56
+ name: rouge
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: '1.8'
62
+ - - "!="
63
+ - !ruby/object:Gem::Version
64
+ version: 1.9.1
48
65
  type: :runtime
49
66
  prerelease: false
50
67
  version_requirements: !ruby/object:Gem::Requirement
51
68
  requirements:
52
- - - ">="
69
+ - - "~>"
53
70
  - !ruby/object:Gem::Version
54
- version: '0'
71
+ version: '1.8'
72
+ - - "!="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.9.1
55
75
  - !ruby/object:Gem::Dependency
56
- name: redcarpet
76
+ name: sinatra
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - ">="
@@ -67,41 +87,35 @@ dependencies:
67
87
  - !ruby/object:Gem::Version
68
88
  version: '0'
69
89
  - !ruby/object:Gem::Dependency
70
- name: rouge
90
+ name: slim
71
91
  requirement: !ruby/object:Gem::Requirement
72
92
  requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.8'
76
- - - "!="
93
+ - - ">="
77
94
  - !ruby/object:Gem::Version
78
- version: 1.9.1
95
+ version: '0'
79
96
  type: :runtime
80
97
  prerelease: false
81
98
  version_requirements: !ruby/object:Gem::Requirement
82
99
  requirements:
83
- - - "~>"
84
- - !ruby/object:Gem::Version
85
- version: '1.8'
86
- - - "!="
100
+ - - ">="
87
101
  - !ruby/object:Gem::Version
88
- version: 1.9.1
102
+ version: '0'
89
103
  - !ruby/object:Gem::Dependency
90
- name: fuzzy_set
104
+ name: capybara
91
105
  requirement: !ruby/object:Gem::Requirement
92
106
  requirements:
93
- - - "~>"
107
+ - - ">="
94
108
  - !ruby/object:Gem::Version
95
- version: '1.1'
96
- type: :runtime
109
+ version: '0'
110
+ type: :development
97
111
  prerelease: false
98
112
  version_requirements: !ruby/object:Gem::Requirement
99
113
  requirements:
100
- - - "~>"
114
+ - - ">="
101
115
  - !ruby/object:Gem::Version
102
- version: '1.1'
116
+ version: '0'
103
117
  - !ruby/object:Gem::Dependency
104
- name: sass
118
+ name: cucumber
105
119
  requirement: !ruby/object:Gem::Requirement
106
120
  requirements:
107
121
  - - ">="
@@ -115,7 +129,7 @@ dependencies:
115
129
  - !ruby/object:Gem::Version
116
130
  version: '0'
117
131
  - !ruby/object:Gem::Dependency
118
- name: yard
132
+ name: rack-test
119
133
  requirement: !ruby/object:Gem::Requirement
120
134
  requirements:
121
135
  - - ">="
@@ -143,7 +157,7 @@ dependencies:
143
157
  - !ruby/object:Gem::Version
144
158
  version: '0'
145
159
  - !ruby/object:Gem::Dependency
146
- name: cucumber
160
+ name: sass
147
161
  requirement: !ruby/object:Gem::Requirement
148
162
  requirements:
149
163
  - - ">="
@@ -157,7 +171,7 @@ dependencies:
157
171
  - !ruby/object:Gem::Version
158
172
  version: '0'
159
173
  - !ruby/object:Gem::Dependency
160
- name: capybara
174
+ name: simplecov
161
175
  requirement: !ruby/object:Gem::Requirement
162
176
  requirements:
163
177
  - - ">="
@@ -171,7 +185,7 @@ dependencies:
171
185
  - !ruby/object:Gem::Version
172
186
  version: '0'
173
187
  - !ruby/object:Gem::Dependency
174
- name: simplecov
188
+ name: yard
175
189
  requirement: !ruby/object:Gem::Requirement
176
190
  requirements:
177
191
  - - ">="
@@ -207,6 +221,7 @@ files:
207
221
  - lib/wikimd/app/public/assets/js/jquery-2.1.4.min.js
208
222
  - lib/wikimd/app/public/favicon.ico
209
223
  - lib/wikimd/app/views/404.slim
224
+ - lib/wikimd/app/views/diff.slim
210
225
  - lib/wikimd/app/views/file.slim
211
226
  - lib/wikimd/app/views/history.slim
212
227
  - lib/wikimd/app/views/layout.slim