zitgit 0.0.1

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.
Files changed (65) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +5 -0
  3. data/Gemfile.lock +94 -0
  4. data/Guardfile +6 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +29 -0
  7. data/Rakefile +1 -0
  8. data/bin/zitgit +4 -0
  9. data/lib/zitgit/version.rb +3 -0
  10. data/lib/zitgit.rb +57 -0
  11. data/public/coffee/application.coffee +54 -0
  12. data/public/css/app.css +4071 -0
  13. data/public/images/loader.gif +0 -0
  14. data/public/js/application.js +69 -0
  15. data/public/js/jquery.js +5 -0
  16. data/public/js/jquery.nicescroll.js +111 -0
  17. data/public/scss/app.scss +155 -0
  18. data/public/scss/foundation/foundation/_variables.scss +1037 -0
  19. data/public/scss/foundation/foundation/components/_alert-boxes.scss +106 -0
  20. data/public/scss/foundation/foundation/components/_block-grid.scss +70 -0
  21. data/public/scss/foundation/foundation/components/_breadcrumbs.scss +124 -0
  22. data/public/scss/foundation/foundation/components/_button-groups.scss +88 -0
  23. data/public/scss/foundation/foundation/components/_buttons.scss +226 -0
  24. data/public/scss/foundation/foundation/components/_clearing.scss +211 -0
  25. data/public/scss/foundation/foundation/components/_custom-forms.scss +240 -0
  26. data/public/scss/foundation/foundation/components/_dropdown-buttons.scss +114 -0
  27. data/public/scss/foundation/foundation/components/_dropdown.scss +149 -0
  28. data/public/scss/foundation/foundation/components/_flex-video.scss +45 -0
  29. data/public/scss/foundation/foundation/components/_forms.scss +348 -0
  30. data/public/scss/foundation/foundation/components/_global.scss +267 -0
  31. data/public/scss/foundation/foundation/components/_grid.scss +184 -0
  32. data/public/scss/foundation/foundation/components/_inline-lists.scss +52 -0
  33. data/public/scss/foundation/foundation/components/_joyride.scss +208 -0
  34. data/public/scss/foundation/foundation/components/_keystrokes.scss +56 -0
  35. data/public/scss/foundation/foundation/components/_labels.scss +84 -0
  36. data/public/scss/foundation/foundation/components/_magellan.scss +21 -0
  37. data/public/scss/foundation/foundation/components/_orbit.scss +207 -0
  38. data/public/scss/foundation/foundation/components/_pagination.scss +99 -0
  39. data/public/scss/foundation/foundation/components/_panels.scss +76 -0
  40. data/public/scss/foundation/foundation/components/_pricing-tables.scss +130 -0
  41. data/public/scss/foundation/foundation/components/_progress-bars.scss +70 -0
  42. data/public/scss/foundation/foundation/components/_reveal.scss +131 -0
  43. data/public/scss/foundation/foundation/components/_section.scss +303 -0
  44. data/public/scss/foundation/foundation/components/_side-nav.scss +68 -0
  45. data/public/scss/foundation/foundation/components/_split-buttons.scss +159 -0
  46. data/public/scss/foundation/foundation/components/_sub-nav.scss +67 -0
  47. data/public/scss/foundation/foundation/components/_switch.scss +249 -0
  48. data/public/scss/foundation/foundation/components/_tables.scss +80 -0
  49. data/public/scss/foundation/foundation/components/_thumbs.scss +47 -0
  50. data/public/scss/foundation/foundation/components/_tooltips.scss +113 -0
  51. data/public/scss/foundation/foundation/components/_top-bar.scss +462 -0
  52. data/public/scss/foundation/foundation/components/_type.scss +422 -0
  53. data/public/scss/foundation/foundation/components/_visibility.scss +320 -0
  54. data/public/scss/foundation/foundation.scss +46 -0
  55. data/public/scss/foundation/normalize.scss +402 -0
  56. data/views/branch.slim +1 -0
  57. data/views/commits/detail.slim +12 -0
  58. data/views/commits/labels.slim +9 -0
  59. data/views/commits/list.slim +22 -0
  60. data/views/diffs/list.slim +39 -0
  61. data/views/index.slim +36 -0
  62. data/views/layout.slim +9 -0
  63. data/views/refs/dropdown.slim +3 -0
  64. data/zitgit.gemspec +30 -0
  65. metadata +239 -0
@@ -0,0 +1,402 @@
1
+ /*! normalize.css v2.1.1 | MIT License | git.io/normalize */
2
+
3
+ /* ==========================================================================
4
+ HTML5 display definitions
5
+ ========================================================================== */
6
+
7
+ /**
8
+ * Correct `block` display not defined in IE 8/9.
9
+ */
10
+
11
+ article,
12
+ aside,
13
+ details,
14
+ figcaption,
15
+ figure,
16
+ footer,
17
+ header,
18
+ hgroup,
19
+ main,
20
+ nav,
21
+ section,
22
+ summary {
23
+ display: block;
24
+ }
25
+
26
+ /**
27
+ * Correct `inline-block` display not defined in IE 8/9.
28
+ */
29
+
30
+ audio,
31
+ canvas,
32
+ video {
33
+ display: inline-block;
34
+ }
35
+
36
+ /**
37
+ * Prevent modern browsers from displaying `audio` without controls.
38
+ * Remove excess height in iOS 5 devices.
39
+ */
40
+
41
+ audio:not([controls]) {
42
+ display: none;
43
+ height: 0;
44
+ }
45
+
46
+ /**
47
+ * Address styling not present in IE 8/9.
48
+ */
49
+
50
+ [hidden] {
51
+ display: none;
52
+ }
53
+
54
+ /* ==========================================================================
55
+ Base
56
+ ========================================================================== */
57
+
58
+ /**
59
+ * 1. Prevent system color scheme's background color being used in Firefox, IE,
60
+ * and Opera.
61
+ * 2. Prevent system color scheme's text color being used in Firefox, IE, and
62
+ * Opera.
63
+ * 3. Set default font family to sans-serif.
64
+ * 4. Prevent iOS text size adjust after orientation change, without disabling
65
+ * user zoom.
66
+ */
67
+
68
+ html {
69
+ background: #fff; /* 1 */
70
+ color: #000; /* 2 */
71
+ font-family: sans-serif; /* 3 */
72
+ -ms-text-size-adjust: 100%; /* 4 */
73
+ -webkit-text-size-adjust: 100%; /* 4 */
74
+ }
75
+
76
+ /**
77
+ * Remove default margin.
78
+ */
79
+
80
+ body {
81
+ margin: 0;
82
+ }
83
+
84
+ /* ==========================================================================
85
+ Links
86
+ ========================================================================== */
87
+
88
+ /**
89
+ * Address `outline` inconsistency between Chrome and other browsers.
90
+ */
91
+
92
+ a:focus {
93
+ outline: thin dotted;
94
+ }
95
+
96
+ /**
97
+ * Improve readability when focused and also mouse hovered in all browsers.
98
+ */
99
+
100
+ a:active,
101
+ a:hover {
102
+ outline: 0;
103
+ }
104
+
105
+ /* ==========================================================================
106
+ Typography
107
+ ========================================================================== */
108
+
109
+ /**
110
+ * Address variable `h1` font-size and margin within `section` and `article`
111
+ * contexts in Firefox 4+, Safari 5, and Chrome.
112
+ */
113
+
114
+ h1 {
115
+ font-size: 2em;
116
+ margin: 0.67em 0;
117
+ }
118
+
119
+ /**
120
+ * Address styling not present in IE 8/9, Safari 5, and Chrome.
121
+ */
122
+
123
+ abbr[title] {
124
+ border-bottom: 1px dotted;
125
+ }
126
+
127
+ /**
128
+ * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
129
+ */
130
+
131
+ b,
132
+ strong {
133
+ font-weight: bold;
134
+ }
135
+
136
+ /**
137
+ * Address styling not present in Safari 5 and Chrome.
138
+ */
139
+
140
+ dfn {
141
+ font-style: italic;
142
+ }
143
+
144
+ /**
145
+ * Address differences between Firefox and other browsers.
146
+ */
147
+
148
+ hr {
149
+ -moz-box-sizing: content-box;
150
+ box-sizing: content-box;
151
+ height: 0;
152
+ }
153
+
154
+ /**
155
+ * Address styling not present in IE 8/9.
156
+ */
157
+
158
+ mark {
159
+ background: #ff0;
160
+ color: #000;
161
+ }
162
+
163
+ /**
164
+ * Correct font family set oddly in Safari 5 and Chrome.
165
+ */
166
+
167
+ code,
168
+ kbd,
169
+ pre,
170
+ samp {
171
+ font-family: monospace, serif;
172
+ font-size: 1em;
173
+ }
174
+
175
+ /**
176
+ * Improve readability of pre-formatted text in all browsers.
177
+ */
178
+
179
+ pre {
180
+ white-space: pre-wrap;
181
+ }
182
+
183
+ /**
184
+ * Set consistent quote types.
185
+ */
186
+
187
+ q {
188
+ quotes: "\201C" "\201D" "\2018" "\2019";
189
+ }
190
+
191
+ /**
192
+ * Address inconsistent and variable font size in all browsers.
193
+ */
194
+
195
+ small {
196
+ font-size: 80%;
197
+ }
198
+
199
+ /**
200
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
201
+ */
202
+
203
+ sub,
204
+ sup {
205
+ font-size: 75%;
206
+ line-height: 0;
207
+ position: relative;
208
+ vertical-align: baseline;
209
+ }
210
+
211
+ sup {
212
+ top: -0.5em;
213
+ }
214
+
215
+ sub {
216
+ bottom: -0.25em;
217
+ }
218
+
219
+ /* ==========================================================================
220
+ Embedded content
221
+ ========================================================================== */
222
+
223
+ /**
224
+ * Remove border when inside `a` element in IE 8/9.
225
+ */
226
+
227
+ img {
228
+ border: 0;
229
+ }
230
+
231
+ /**
232
+ * Correct overflow displayed oddly in IE 9.
233
+ */
234
+
235
+ svg:not(:root) {
236
+ overflow: hidden;
237
+ }
238
+
239
+ /* ==========================================================================
240
+ Figures
241
+ ========================================================================== */
242
+
243
+ /**
244
+ * Address margin not present in IE 8/9 and Safari 5.
245
+ */
246
+
247
+ figure {
248
+ margin: 0;
249
+ }
250
+
251
+ /* ==========================================================================
252
+ Forms
253
+ ========================================================================== */
254
+
255
+ /**
256
+ * Define consistent border, margin, and padding.
257
+ */
258
+
259
+ fieldset {
260
+ border: 1px solid #c0c0c0;
261
+ margin: 0 2px;
262
+ padding: 0.35em 0.625em 0.75em;
263
+ }
264
+
265
+ /**
266
+ * 1. Correct `color` not being inherited in IE 8/9.
267
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
268
+ */
269
+
270
+ legend {
271
+ border: 0; /* 1 */
272
+ padding: 0; /* 2 */
273
+ }
274
+
275
+ /**
276
+ * 1. Correct font family not being inherited in all browsers.
277
+ * 2. Correct font size not being inherited in all browsers.
278
+ * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
279
+ */
280
+
281
+ button,
282
+ input,
283
+ select,
284
+ textarea {
285
+ font-family: inherit; /* 1 */
286
+ font-size: 100%; /* 2 */
287
+ margin: 0; /* 3 */
288
+ }
289
+
290
+ /**
291
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
292
+ * the UA stylesheet.
293
+ */
294
+
295
+ button,
296
+ input {
297
+ line-height: normal;
298
+ }
299
+
300
+ /**
301
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
302
+ * All other form control elements do not inherit `text-transform` values.
303
+ * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
304
+ * Correct `select` style inheritance in Firefox 4+ and Opera.
305
+ */
306
+
307
+ button,
308
+ select {
309
+ text-transform: none;
310
+ }
311
+
312
+ /**
313
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
314
+ * and `video` controls.
315
+ * 2. Correct inability to style clickable `input` types in iOS.
316
+ * 3. Improve usability and consistency of cursor style between image-type
317
+ * `input` and others.
318
+ */
319
+
320
+ button,
321
+ html input[type="button"], /* 1 */
322
+ input[type="reset"],
323
+ input[type="submit"] {
324
+ -webkit-appearance: button; /* 2 */
325
+ cursor: pointer; /* 3 */
326
+ }
327
+
328
+ /**
329
+ * Re-set default cursor for disabled elements.
330
+ */
331
+
332
+ button[disabled],
333
+ html input[disabled] {
334
+ cursor: default;
335
+ }
336
+
337
+ /**
338
+ * 1. Address box sizing set to `content-box` in IE 8/9.
339
+ * 2. Remove excess padding in IE 8/9.
340
+ */
341
+
342
+ input[type="checkbox"],
343
+ input[type="radio"] {
344
+ box-sizing: border-box; /* 1 */
345
+ padding: 0; /* 2 */
346
+ }
347
+
348
+ /**
349
+ * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
350
+ * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
351
+ * (include `-moz` to future-proof).
352
+ */
353
+
354
+ input[type="search"] {
355
+ -webkit-appearance: textfield; /* 1 */
356
+ -moz-box-sizing: content-box;
357
+ -webkit-box-sizing: content-box; /* 2 */
358
+ box-sizing: content-box;
359
+ }
360
+
361
+ /**
362
+ * Remove inner padding and search cancel button in Safari 5 and Chrome
363
+ * on OS X.
364
+ */
365
+
366
+ input[type="search"]::-webkit-search-cancel-button,
367
+ input[type="search"]::-webkit-search-decoration {
368
+ -webkit-appearance: none;
369
+ }
370
+
371
+ /**
372
+ * Remove inner padding and border in Firefox 4+.
373
+ */
374
+
375
+ button::-moz-focus-inner,
376
+ input::-moz-focus-inner {
377
+ border: 0;
378
+ padding: 0;
379
+ }
380
+
381
+ /**
382
+ * 1. Remove default vertical scrollbar in IE 8/9.
383
+ * 2. Improve readability and alignment in all browsers.
384
+ */
385
+
386
+ textarea {
387
+ overflow: auto; /* 1 */
388
+ vertical-align: top; /* 2 */
389
+ }
390
+
391
+ /* ==========================================================================
392
+ Tables
393
+ ========================================================================== */
394
+
395
+ /**
396
+ * Remove most spacing between table cells.
397
+ */
398
+
399
+ table {
400
+ border-collapse: collapse;
401
+ border-spacing: 0;
402
+ }
data/views/branch.slim ADDED
@@ -0,0 +1 @@
1
+ == slim :'commits/list', :locals => {commits: commits }, :layout => false
@@ -0,0 +1,12 @@
1
+ .commit
2
+ h4=commit.message
3
+ == slim :'commits/labels', :locals => {commit: commit}, :layout => false
4
+ .commit_sha =commit.sha
5
+ .author_info
6
+ div = commit.author.name
7
+ div = commit.author.email
8
+ .stats
9
+ div.additions = "#{ commit.stats.additions } additions"
10
+ div.deletions = "#{ commit.stats.deletions } deletions"
11
+
12
+ == slim :'diffs/list', :locals => {diffs: commit.diffs}, :layout => false
@@ -0,0 +1,9 @@
1
+ - heads(commit).each do |head|
2
+ .ref_label.branch_label
3
+ = head.name
4
+ - remotes(commit).each do |head|
5
+ .ref_label.remote_label
6
+ = head.name
7
+ - tags(commit).each do |head|
8
+ .ref_label.tag_label
9
+ = head.name
@@ -0,0 +1,22 @@
1
+ table.large-12.commits-table
2
+ thead
3
+ tr
4
+ th.badges SHA
5
+ th.author Author
6
+ th.message Message
7
+ tbody
8
+ - commits.each_with_index do |commit, i|
9
+ tr class=('selected' if i==0)
10
+ td.badges
11
+ == slim :'commits/labels', :locals => {commit: commit}, :layout => false
12
+ .sha
13
+ = commit.sha
14
+ td.author
15
+ =' commit.author.name
16
+ = commit.author.email
17
+ td.hidden
18
+ == slim :'commits/detail', :locals => {commit: commit}, :layout => false
19
+ td.message
20
+ = commit.message
21
+
22
+
@@ -0,0 +1,39 @@
1
+ ul.diff-names
2
+ - diffs.each do |diff|
3
+ li
4
+ - if diff.deleted_file
5
+ a.deleted
6
+ = diff.a_path
7
+ - elsif diff.renamed_file
8
+ a.renamed
9
+ = "#{ diff.a_path } -> #{ diff.b_path }"
10
+ -elsif diff.new_file
11
+ a.new_file
12
+ = diff.a_path
13
+ -else
14
+ a.changed
15
+ = diff.a_path
16
+ ul.diffs
17
+ - diffs.each do |diff|
18
+ li
19
+ - diff.diff.lines.each do |line|
20
+ - if line.match /^\-\-\- a/
21
+ .diff-first-line.diff-a
22
+ = line
23
+ - elsif line.match /^\+\+\+ b/
24
+ .diff-first-line.diff-b
25
+ = line
26
+ - elsif line.match /^@@ -/
27
+ .diff-summ-line
28
+ = line
29
+ - elsif line[0] == '+'
30
+ .diff-added-line
31
+ = line
32
+ - elsif line[0] == '-'
33
+ .diff-removed-line
34
+ = line
35
+ - else
36
+ .diff-line
37
+ = line
38
+
39
+
data/views/index.slim ADDED
@@ -0,0 +1,36 @@
1
+ nav.top-bar
2
+ ul.title-area
3
+ li.name
4
+ h1
5
+ a
6
+ = repo_name
7
+ section.top-bar-section
8
+ ul.left
9
+ li.divider
10
+ li
11
+ a Branches:
12
+ li.has-dropdown
13
+ a.active.current_branch
14
+ = current_branch.name
15
+ ul.dropdown.branches
16
+ == slim :'refs/dropdown', :locals => {refs: @branches}, :layout => false
17
+ li.divider
18
+ li
19
+ a Remotes:
20
+ li.has-dropdown
21
+ a.active.current_branch
22
+ ul.dropdown.remotes
23
+ == slim :'refs/dropdown', :locals => {refs: @remotes}, :layout => false
24
+ li.divider
25
+ li
26
+ a Tags:
27
+ li.has-dropdown
28
+ a.active.current_branch
29
+ ul.dropdown.tags
30
+ == slim :'refs/dropdown', :locals => {refs: @tags}, :layout => false
31
+ .loader
32
+ .main.row
33
+ .history.large-6.columns
34
+ == slim :'commits/list', :locals => {commits: commits}, :layout => false
35
+ .show_commit.large-6.columns
36
+ == slim :'commits/detail', :locals => {commit: last_commit}, :layout => false
data/views/layout.slim ADDED
@@ -0,0 +1,9 @@
1
+ html
2
+ head
3
+ link rel="stylesheet" href="css/app.css"
4
+ body
5
+ == yield
6
+ script type="text/javascript" src="js/jquery.js"
7
+ script type="text/javascript" src="js/jquery.nicescroll.js"
8
+ script type="text/javascript" src="js/application.js"
9
+
@@ -0,0 +1,3 @@
1
+ - refs.each do |ref|
2
+ li
3
+ a href="ref/#{URI::encode(ref.name, '/')}" = ref.name
data/zitgit.gemspec ADDED
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'zitgit/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "zitgit"
8
+ spec.version = Zitgit::VERSION
9
+ spec.authors = ["Oleg Potapov"]
10
+ spec.email = ["oleg0potapov@gmail.com"]
11
+ spec.description = %q{Simple sinatra-based web-interface to view git repository history}
12
+ spec.summary = %q{Git repository viewer}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'sinatra', "~> 1.4"
22
+ spec.add_dependency 'slim', "~> 1.3"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency 'guard', "~> 1.8"
27
+ spec.add_development_dependency 'guard-sass', "~> 1.0"
28
+ spec.add_development_dependency 'guard-coffeescript', "~> 1.3"
29
+ spec.add_development_dependency 'therubyracer', "~> 0.11"
30
+ end