redminerb 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a49e586712bf0924ff9b33e62ced033b819f04c9
4
- data.tar.gz: 701469b08e46198247d08f594a408adf2d337bfc
3
+ metadata.gz: ea84fb5d97fc1832c49ad0b3776291b0edc96794
4
+ data.tar.gz: 989425f92224631a6fd5d4d86c56f96ce234d6c3
5
5
  SHA512:
6
- metadata.gz: 748833ecb5650f32b39bd15701a8b8920cec019dae74cbf9cfadaad204d42fee75a5c388f3cf1c230b2f86c0cea6ec11ce3fb0e2735139525554261ea2201487
7
- data.tar.gz: 7b332454c69db01165a560f4bf83d04a099fd8293e142d8b605483de73bd33087acf4257a3104db64415e9bae90ee8dc68234c5fab3190b0e2b9c5f8b5806086
6
+ metadata.gz: 8b22642e93d4093b302171c273c74dbada54b85095e94e049880be4dee3a2359c4d94d48073ab690ec51d37b76d23c47c99f49424b756e02d709ac8d591c3e67
7
+ data.tar.gz: 131f1c4a13664317154962f75543220346fae902a4cf302e3a1eb828a07ef331e0099fb8d2d316987b091ffd1d34bbac683ec6eb612c0f591fd7bc57179d3b11
data/README.md CHANGED
@@ -68,6 +68,14 @@ command will have more sense.*
68
68
 
69
69
  That should give you the current users on your Redmine server, one per line.
70
70
 
71
+ By omission it gives you the ID, the login and the e-mail of the user. You can
72
+ change that using the --fields option, that let you specify others separated
73
+ by semicolons. For example:
74
+
75
+ $ redminerb users list --fields=id:mail
76
+
77
+ Will return only the ID following by the user e-mail.
78
+
71
79
  #### Create new user
72
80
 
73
81
  $ redminerb users create --login "wadus" --password "ultrasecret" \
@@ -5,10 +5,12 @@ module Redminerb
5
5
  default_command :list
6
6
 
7
7
  desc 'list', 'Shows the current users in our Redmine'
8
+ option :fields, banner: 'id:login:email'
8
9
  def list
9
10
  Redminerb.init!
11
+ fields = options[:fields] || 'id:login:mail'
10
12
  Redminerb.client.users.each do |user|
11
- puts [user.id, user.login, user.mail].join("\t").green
13
+ puts fields.split(':').map {|f| user.send(f)}.join("\t").green
12
14
  end
13
15
  end
14
16
 
@@ -1,4 +1,4 @@
1
1
  # Copyright (c) The Cocktail Experience S.L. (2015)
2
2
  module Redminerb
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garcia Samblas