redminerb 0.7.4 → 0.7.5

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: fb1b78daceb9e534fbb08d2be01e8fb7b7d3aa3d
4
- data.tar.gz: 281d20855bfc55dd7f5134a73b2e9bc9728fd68c
3
+ metadata.gz: 33579d16f4ec37d35fdd4d7c4614984fbd43dadb
4
+ data.tar.gz: 3302211d9c58917bb07ccadca0424046306f9fc4
5
5
  SHA512:
6
- metadata.gz: c25f9e8e51395befed867a4c1a67b99bed9dc69375010396163ce572cb00e088d0a2e5e4cf0a96afaeed889dc9428d3dee48b14ef57465f39ba3f1f0661956b4
7
- data.tar.gz: 08103ba62efdbaeb4466e6b46a6b79eff4b2bffab3aa94ab038a400680c7eeddb72cfeba2af3e7b710e065e940f096af137f0382a132f7e2638e865db102a277
6
+ metadata.gz: bd83552c384f3e53fed2c9f37ceacf66dc8aae1e880fd8fba1fce9fbd009f039078aaa3f965a77def7203dde24d314ee94445c0cd9b2de4970a90724f31ee649
7
+ data.tar.gz: a4d15addd5891dc51d2158efb03f75f5dca162e328ca01306c249478dcb5f8e2c9c07f812c7f4c55693350682b7b7dd55a2955ea4b50842a1c4d5f6751373fcf
data/README.md CHANGED
@@ -185,7 +185,20 @@ The **issues** command is the wrapper for part of the [Issues resource](http://w
185
185
 
186
186
  #### List issues
187
187
 
188
- $ redminerb issues [list]
188
+ $ redminerb issues [list] [--closed|-c] [--project_id|-p <id>] [--assigned_to_id|-a <id>]
189
+
190
+ Examples:
191
+
192
+ $ # Show the first three issues of the project whose id equals 1:
193
+ $ redminerb issues -p 1 -l 3
194
+ [Systems#148] Poner Pisco en modo sólo lectura
195
+ [Systems#110] [Tatefiel] Añadir tarea de cron
196
+ [Systems#172] SSID para cámaras de seguridad
197
+
198
+ $ # Show the issues assigned to the user whose id equals 42:
199
+ $ redminerb issues -a 42
200
+ [Primeroto#166] Se deben mover todas las imágenes al proyecto
201
+ [Primeroto#165] No se pueden escoger los eventos de entradas
189
202
 
190
203
  #### Show an issue
191
204
 
@@ -7,19 +7,26 @@ module Redminerb
7
7
  class Issues < Thor
8
8
  default_command :list
9
9
 
10
+ # rubocop:disable Metrics/AbcSize
11
+ # (disabled to let the "closed" option be managed here)
10
12
  desc 'list', 'Shows open issues in our Redmine'
11
- option :offset, aliases: :o
12
- option :limit, aliases: :l
13
+ option :offset, aliases: :o
14
+ option :limit, aliases: :l
15
+ option :closed, aliases: :c, type: :boolean
16
+ option :assigned_to_id, aliases: :a
17
+ option :project_id, aliases: :p
13
18
  def list(issue_id = nil)
14
19
  if issue_id
15
20
  show(issue_id)
16
21
  else
17
22
  Redminerb.init!
23
+ options[:status_id] = :closed if options.delete(:closed)
18
24
  Redminerb::Issues.list(options).each do |issue|
19
- puts "[#{issue.id}] ".blue + issue.subject.green
25
+ puts "[#{issue.project.name}##{issue.id}] ".blue + issue.subject.green
20
26
  end
21
27
  end
22
28
  end
29
+ # rubocop:enable Metrics/AbcSize
23
30
 
24
31
  desc 'show <number>', 'Shows an issue (SHORTCUT: "redminerb issues <number>")'
25
32
  option :template, aliases: :t
@@ -13,10 +13,9 @@ module Redminerb
13
13
  # puts "#{issue.id}: #{issue.subject}"
14
14
  # end
15
15
  #
16
-
17
16
  def list(params)
18
17
  Redminerb.client.get_json('/issues.json', params)['issues'].map do |issue|
19
- OpenStruct.new issue
18
+ RecursiveOpenStruct.new issue
20
19
  end
21
20
  end
22
21
 
@@ -1,4 +1,4 @@
1
1
  # Copyright (c) The Cocktail Experience S.L. (2015)
2
2
  module Redminerb
3
- VERSION = '0.7.4'
3
+ VERSION = '0.7.5'
4
4
  end
data/templates/issue.erb CHANGED
@@ -6,7 +6,7 @@
6
6
  Status: <%= issue.status.name.red %>
7
7
  Priority: <%= issue.priority.name.red %>
8
8
  <%= Redminerb.separator.green %>
9
- <%= issue.description %>
9
+ <%= issue.description.gsub("\n", "\n ") %>
10
10
  <%= Redminerb.separator.green %>
11
11
  <%= (Redminerb.config.url + "issues/#{issue.id}").red %>
12
12
  <%= Redminerb.separator.green %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redminerb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garcia Samblas