gh-cards 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gh-cards/cards.html +13 -11
- data/CHANGELOG.md +5 -1
- data/README.md +3 -0
- data/lib/gh/cards/version.rb +1 -1
- data/lib/gh/cards.rb +1 -1
- data/templates/default.html.erb +14 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0d362fafa37f0704620fd5ec88669629f470882fd483ce8d613c675ced211a
|
4
|
+
data.tar.gz: 87f6f49a34655b7f240106544fd9b791c2428d4ba2350a2764103b59b7561ebc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6a9f07d6d822613913d0685c955f51330debced24f917b15621a4246af3d3a9b913333a94448a324683916abe5f977c5268ac1be4e6afc1b3f2238a5b60d160
|
7
|
+
data.tar.gz: 0b86645a00ce3a4547052bc11ee8b6ffa89da21258c06611ef39a91583f30925e47981c43c0a78c27e6f84b500d109a83ff8d600e288fffb8d9797dc97da7852
|
data/.gh-cards/cards.html
CHANGED
@@ -11,17 +11,22 @@
|
|
11
11
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css">
|
12
12
|
<style>
|
13
13
|
.card-deck .card {
|
14
|
-
|
14
|
+
max-width: calc(33% - 30px);
|
15
|
+
height: 350px;
|
16
|
+
}
|
17
|
+
@media print {
|
18
|
+
.row {
|
19
|
+
page-break-before: always;
|
20
|
+
}
|
15
21
|
}
|
16
22
|
</style>
|
17
23
|
</head>
|
18
24
|
<body>
|
19
25
|
<div class="container">
|
20
|
-
|
26
|
+
<div class="row">
|
21
27
|
<div class="col-12">
|
22
28
|
<div class="card-deck">
|
23
29
|
|
24
|
-
|
25
30
|
<div class="card">
|
26
31
|
<div class="card-header">
|
27
32
|
gh-cards
|
@@ -32,15 +37,11 @@
|
|
32
37
|
<h6 class="text-secondary"><span class="octicon octicon-milestone" aria-hidden="true"></span>Test Milestone</h6>
|
33
38
|
<br />
|
34
39
|
|
35
|
-
|
36
|
-
<h6 class="text-secondary">Labels:</h6>
|
40
|
+
<h6 class="text-secondary">Labels:</h6>
|
37
41
|
<div class="small text-secondary test-lowercase">
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
enhancement<br />
|
42
|
-
|
43
|
-
good first issue<br />
|
42
|
+
bug<br />
|
43
|
+
enhancement<br />
|
44
|
+
good first issue<br />
|
44
45
|
|
45
46
|
</div>
|
46
47
|
|
@@ -56,6 +57,7 @@
|
|
56
57
|
</div>
|
57
58
|
</div>
|
58
59
|
</div>
|
60
|
+
|
59
61
|
</div>
|
60
62
|
</body>
|
61
63
|
</html>
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/gh/cards/version.rb
CHANGED
data/lib/gh/cards.rb
CHANGED
@@ -109,7 +109,7 @@ module Gh
|
|
109
109
|
end
|
110
110
|
|
111
111
|
puts "Generating cards using template: #{template}"
|
112
|
-
erb = ERB.new(File.read(template_file))
|
112
|
+
erb = ERB.new(File.read(template_file), nil, '-')
|
113
113
|
File.write("#{directory}/cards.html", erb.result(binding))
|
114
114
|
end
|
115
115
|
end
|
data/templates/default.html.erb
CHANGED
@@ -11,31 +11,38 @@
|
|
11
11
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css">
|
12
12
|
<style>
|
13
13
|
.card-deck .card {
|
14
|
-
|
14
|
+
max-width: calc(33% - 30px);
|
15
|
+
height: 350px;
|
16
|
+
}
|
17
|
+
@media print {
|
18
|
+
.row {
|
19
|
+
page-break-before: always;
|
20
|
+
}
|
15
21
|
}
|
16
22
|
</style>
|
17
23
|
</head>
|
18
24
|
<body>
|
19
25
|
<div class="container">
|
26
|
+
<% cards.each_slice(12) do |cardslice| -%>
|
20
27
|
<div class="row">
|
21
28
|
<div class="col-12">
|
22
29
|
<div class="card-deck">
|
23
|
-
<%
|
24
|
-
|
30
|
+
<% cardslice.each_slice(3) do |slice| -%>
|
31
|
+
<%- slice.each do |card| %>
|
25
32
|
<div class="card">
|
26
33
|
<div class="card-header">
|
27
34
|
<%= repo.split('/')[-1] %>
|
28
35
|
</div>
|
29
36
|
<div class="card-body">
|
30
|
-
<h4 class="card-title"><span class="font-weight-bold">#<%= card[:number] %></span> <%= card[:title] %></h4>
|
37
|
+
<h4 class="card-title"><span class="font-weight-bold">#<%= card[:number] %></span> <%= card[:title].length > 40 ? card[:title][0, 80 - 3] + "..." : card[:title] %></h4>
|
31
38
|
<% if card[:milestone] %>
|
32
39
|
<h6 class="text-secondary"><span class="octicon octicon-milestone" aria-hidden="true"></span><%= card[:milestone] %></h6>
|
33
40
|
<br />
|
34
41
|
<% end %>
|
35
|
-
<% if card[:labels].length > 0
|
42
|
+
<% if card[:labels].length > 0 -%>
|
36
43
|
<h6 class="text-secondary">Labels:</h6>
|
37
44
|
<div class="small text-secondary test-lowercase">
|
38
|
-
<% for label in card[:labels]
|
45
|
+
<% for label in card[:labels] -%>
|
39
46
|
<%= label[:name] %><br />
|
40
47
|
<% end %>
|
41
48
|
</div>
|
@@ -52,6 +59,7 @@
|
|
52
59
|
</div>
|
53
60
|
</div>
|
54
61
|
</div>
|
62
|
+
<% end %>
|
55
63
|
</div>
|
56
64
|
</body>
|
57
65
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh-cards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Birkett
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|