twigg-app 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twigg-app/app/routes.rb +4 -0
- data/lib/twigg-app/app/server.rb +9 -0
- data/lib/twigg-app/app/version.rb +1 -1
- data/views/dashboard.haml +4 -0
- data/views/layout.haml +2 -0
- data/views/pivotal/index.haml +38 -0
- data/views/shared/commit_row.haml +1 -1
- data/views/shared/commit_set.haml +1 -1
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 778647a7c7b5a69244d496cc1b8b36d816038c49
|
4
|
+
data.tar.gz: ab3e92b4089f729c44fc7644390948104cc8f843
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78ced03fa9a42f74a5c37ce21349d7af9b166ca4ab094d7520ce86e55ce177a26d03ac42d184ee55a856652280a38ba7139d972382af09b5f2d86c78dfd8db11
|
7
|
+
data.tar.gz: 1a39194134bcea06936abba4d16a4c5a032e36c364f2dba400fbf445d1e964a0b327849e0038e8f4a90bfde003f88c703fb6c0ef529d20b28de787768a73bea4
|
data/lib/twigg-app/app/routes.rb
CHANGED
@@ -25,6 +25,10 @@ module Twigg
|
|
25
25
|
'/pairs' + query_string_from_options(options)
|
26
26
|
end
|
27
27
|
|
28
|
+
def pivotal_path(options = {})
|
29
|
+
'/pivotal' + query_string_from_options(options)
|
30
|
+
end
|
31
|
+
|
28
32
|
def russian_novels_path(options = {})
|
29
33
|
'/russian-novels' + query_string_from_options(options)
|
30
34
|
end
|
data/lib/twigg-app/app/server.rb
CHANGED
@@ -161,6 +161,15 @@ module Twigg
|
|
161
161
|
haml :'pairs/index', layout: !request.xhr?
|
162
162
|
end
|
163
163
|
|
164
|
+
if Config.app.pivotal.enabled
|
165
|
+
with_dependency 'twigg-pivotal' do
|
166
|
+
get '/pivotal' do
|
167
|
+
@stats = Cacher.get('pivotal') { Pivotal::Status.status }
|
168
|
+
haml :'pivotal/index', layout: !request.xhr?
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
164
173
|
get '/russian-novels', provides: %i[html json] do
|
165
174
|
respond_to do |f|
|
166
175
|
f.html { haml :'russian-novels/index' }
|
data/views/dashboard.haml
CHANGED
@@ -13,5 +13,9 @@
|
|
13
13
|
%h2 Gerrit
|
14
14
|
.gerrit.well{ 'data-lazy-url' => gerrit_changes_path }
|
15
15
|
|
16
|
+
- if Twigg::Config.app.pivotal.enabled
|
17
|
+
%h2 Pivotal
|
18
|
+
.pivotal.well{ 'data-lazy-url' => pivotal_path(summary_only: 1) }
|
19
|
+
|
16
20
|
%h2 Authors
|
17
21
|
.authors.well{ 'data-lazy-url' => authors_path(days: @days) }
|
data/views/layout.haml
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
- content_for :title do
|
2
|
+
Open stories in Pivotal
|
3
|
+
|
4
|
+
%h2= pluralize(@stats.sum { |state, stories| stories.size }, 'open story', 'open stories')
|
5
|
+
%table.table.table-striped.table-hover.table-bordered.sortable
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
%th{ data: { sort: 'string-ins' } } Type
|
9
|
+
%th{ data: { sort: 'int' } } Count
|
10
|
+
%th Breakdown
|
11
|
+
%tbody
|
12
|
+
- @stats.each do |state, stories|
|
13
|
+
%tr
|
14
|
+
%td&= state
|
15
|
+
%td= number_with_delimiter(stories.size)
|
16
|
+
%td
|
17
|
+
&= stories.group_by { |story| story.owned_by && story.owned_by['initials'] }.sort_by { |owner, stories| -stories.size }.delete_if { |owner, stories| owner.nil? }.map { |owner, stories| "#{owner}: #{stories.size}" }.join(', ')
|
18
|
+
|
19
|
+
- unless params[:summary_only]
|
20
|
+
- @stats.each do |state, stories|
|
21
|
+
%h3= pluralize(stories.size, "#{state} story", "#{state} stories")
|
22
|
+
%table.table.table-striped.table-hover.table-bordered.sortable
|
23
|
+
%thead
|
24
|
+
%th{ data: { sort: 'string-ins' } } Name
|
25
|
+
%th{ data: { sort: 'string-ins' } } Type
|
26
|
+
%th{ data: { sort: 'string-ins' } } Owner
|
27
|
+
%tbody
|
28
|
+
- stories.each do |story|
|
29
|
+
%tr
|
30
|
+
%td
|
31
|
+
%a{ href: story.url }&= story.name
|
32
|
+
%td&= story.story_type
|
33
|
+
%td
|
34
|
+
- if story.owned_by
|
35
|
+
%span{ data: { toggle: 'tooltip' }, title: story.owned_by['name'] }
|
36
|
+
&= story.owned_by['initials']
|
37
|
+
- else
|
38
|
+
|
@@ -2,7 +2,7 @@
|
|
2
2
|
%td= number_with_delimiter(commit_set.count)
|
3
3
|
%td
|
4
4
|
%a{ href: author_href, data: { toggle: 'tooltip' }, title: author_tooltip }&= author
|
5
|
-
%td= breakdown
|
5
|
+
%td= commit_set.decorate.breakdown
|
6
6
|
%td
|
7
7
|
%a{ data: { toggle: 'modal' }, href: '#' + name_to_id(author) + '-details' }
|
8
8
|
Details
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twigg-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: compass
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,14 +142,14 @@ dependencies:
|
|
128
142
|
requirements:
|
129
143
|
- - '='
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.0.
|
145
|
+
version: 0.0.4
|
132
146
|
type: :runtime
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - '='
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.0.
|
152
|
+
version: 0.0.4
|
139
153
|
description: Twigg provides stats for activity in Git repositories. This is the web-based
|
140
154
|
interface.
|
141
155
|
email:
|
@@ -416,6 +430,7 @@ files:
|
|
416
430
|
- views/gerrit/tags.haml
|
417
431
|
- views/layout.haml
|
418
432
|
- views/pairs/index.haml
|
433
|
+
- views/pivotal/index.haml
|
419
434
|
- views/russian-novels/index.haml
|
420
435
|
- views/shared/commit_list.haml
|
421
436
|
- views/shared/commit_row.haml
|