redminerb 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 +4 -4
- data/README.md +8 -0
- data/lib/redminerb/cli/users.rb +3 -1
- data/lib/redminerb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea84fb5d97fc1832c49ad0b3776291b0edc96794
|
4
|
+
data.tar.gz: 989425f92224631a6fd5d4d86c56f96ce234d6c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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" \
|
data/lib/redminerb/cli/users.rb
CHANGED
@@ -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
|
13
|
+
puts fields.split(':').map {|f| user.send(f)}.join("\t").green
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
data/lib/redminerb/version.rb
CHANGED