git-issue 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,7 @@ class GitIssue::Github < GitIssue::Base
50
50
  query_names = [:state, :milestone, :assignee, :mentioned, :labels, :sort, :direction]
51
51
  params = query_names.inject({}){|h,k| h[k] = options[k] if options[k];h}
52
52
  params[:state] ||= "open"
53
+ params[:per_page] = options[:max_count] || 30
53
54
 
54
55
  url = to_url("repos", @repo, 'issues')
55
56
 
@@ -270,6 +270,9 @@ class Redmine < GitIssue::Base
270
270
  msg << ""
271
271
 
272
272
  props = []
273
+ prop_name = Proc.new{|name|
274
+ "#{issue[name]['name']}(#{issue[name]['id']})" if issue[name] && issue[name]['name']
275
+ }
273
276
  add_prop = Proc.new{|name|
274
277
  title = property_title(name)
275
278
  value = issue[name] || ""
@@ -278,7 +281,7 @@ class Redmine < GitIssue::Base
278
281
  add_prop_name = Proc.new{|name|
279
282
  title = property_title(name)
280
283
  value = ''
281
- value = "#{issue[name]['name']}(#{issue[name]['id']})" if issue[name] && issue[name]['name']
284
+ value = prop_name.call(name)
282
285
  props << [title, value]
283
286
  }
284
287
 
@@ -290,7 +293,6 @@ class Redmine < GitIssue::Base
290
293
  add_prop.call('done_ratio')
291
294
  add_prop_name.call('category')
292
295
  add_prop.call('estimated_hours')
293
- add_prop_name.call('fixed_version')
294
296
 
295
297
  # acd custom_fields if it have value.
296
298
  if custom_fields = issue[:custom_fields] && custom_fields.reject{|cf| cf['value'].nil? || cf['value'].empty? }
@@ -308,6 +310,8 @@ class Redmine < GitIssue::Base
308
310
  end
309
311
  end
310
312
 
313
+ msg << sprintf("%s : %s", mljust(property_title('fixed_version'),18), mljust(prop_name.call('fixed_version'), 66))
314
+
311
315
  # display relations tickets
312
316
  if ! options[:supperss_relations] || options[:verbose]
313
317
  relations = issue['relations']
@@ -412,7 +416,7 @@ class Redmine < GitIssue::Base
412
416
 
413
417
  max_of = lambda{|name, limit|
414
418
  max = issues.map{|i| mlength(i[name])}.max
415
- [max, limit].min
419
+ [max, limit].compact.min
416
420
  }
417
421
  max_length = {
418
422
  :project => max_of.call(:project, 20),
@@ -1,3 +1,3 @@
1
1
  module GitIssue
2
- VERSION = "0.8.1"
2
+ VERSION = "0.8.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-issue
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 1
10
- version: 0.8.1
9
+ - 2
10
+ version: 0.8.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tomohito Ozaki
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-11 00:00:00 +09:00
18
+ date: 2012-04-19 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency