redmine_cli 0.2.1 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 330bed73053905c14e88b9ffcb3a2dda1899c6c3
4
- data.tar.gz: 2a5afe6852b78a077e58d1bd8263547f491a9869
3
+ metadata.gz: 00076ae6856ab08c117ae349cddb9612fecf323e
4
+ data.tar.gz: 2984d5491b6ad7522e37ae98b1e406c90cb835e5
5
5
  SHA512:
6
- metadata.gz: 524e03de034a06904712e498993556980b1c4d2ffeb35818e11a2cbb18f87b007e01185eca3dd94a09e0c78560fd4d5d2491cef422f67059b17d3f5c79ca252e
7
- data.tar.gz: 75b462532ca6f3376532704e5f0a7448eda228dcbd74aa22973f8a1d1fda2d4f8db41480e77e478210058320a7032a82e23d971f4fae4044e209003a50a6b8cd
6
+ metadata.gz: d3b4cd2a1337400909ab272e2116afc5d8b43f3b5256eec464e9f567cc12a88d25a3b07679d878adec4fc462e341f59498f99be59d55fcb6546e88e99ec8f19c
7
+ data.tar.gz: 6b314ee1180f075de75ac480c70c633d7d19c66a0a75689d066ceeeffd36f6eb5126c1a96d4a07d799067829d23efb827649fa8c3cb7c2aadfea1e1d9c216316
@@ -1,4 +1,11 @@
1
- % max_id_len = issues.max_by { |i| i.id.size }.id.size
1
+ % if issues.size.zero?
2
+ There're no issues assigned to you
3
+ % end
4
+ %
5
+ % #
6
+ % # It's ok, it won't print anything
7
+ % #
8
+ % max_id_len = issues.map { |i| i.id.size }.max
2
9
  % subject_limit = 60
3
10
  %
4
11
  % issues.group_by_project.each do |project, project_issues|
@@ -9,4 +16,4 @@
9
16
  <%= i.id.ljust(max_id_len) %> <%= i.subject.cut(subject_limit).ljust(subject_limit) %> <%= i.status.name %><%= "\n" %>
10
17
  <% end %>
11
18
 
12
- % end
19
+ % end
@@ -10,7 +10,9 @@ Project: <%= issue.project.name %>
10
10
  % if issue.version?
11
11
  Version: <%= issue.version.name %>
12
12
  % end
13
+ % if issue.assigned_to?
13
14
  Assigned to: <%= issue.assigned_to.name %> (<%= issue.assigned_to.id %>)
15
+ % end
14
16
  Author: <%= issue.author.name %> (<%= issue.author.id %>)
15
17
  % if issue.description? && !issue.description.empty?
16
18
 
@@ -22,6 +22,9 @@ module RedmineCLI
22
22
  desc 'show <id>', m('desc.issue.show')
23
23
  def show(id)
24
24
  puts erb('issue/show', issue: Models::Issue.find(id))
25
+ #
26
+ # WARNING: it can be raised by associations in template
27
+ #
25
28
  rescue ActiveResource::ResourceNotFound
26
29
  puts m(:not_found)
27
30
  end
@@ -1,3 +1,3 @@
1
1
  module RedmineCLI
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Non