redminerb 0.7.5 → 0.8.0
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/CHANGELOG.rdoc +8 -0
- data/README.md +9 -12
- data/lib/redminerb/cli/users.rb +23 -6
- data/lib/redminerb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fab0c9d47ded9d94c9f5493d83e86303c47eaac
|
4
|
+
data.tar.gz: 23719db05f4831efc40eb52cbf896ec0191f5c65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e79942f238f54007293d5a9be204a69c894c9abc14df14ca486e7813af15dd479f0b6d1914820878a56dda54458604179ed14a4657ce88c311c3dd9561f4ed0
|
7
|
+
data.tar.gz: 954359ec39e9d9a983a765f962c30b7b305d8322748c0a086b0d5577ab60894a2fa0a72c19eaf83348b6fe7b5aa82c420d56decae5aa93ee1c734b036d673566
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
= CHANGELOG
|
2
|
+
== 0.8, released 2015-10-09
|
3
|
+
|
4
|
+
* Users' create now asks for each param unless we use the --no-ask option
|
5
|
+
* +redminerb project [show] <id>+ to see a project's info
|
6
|
+
* +redminerb projects list [--name <FILTER>]+ to see our projects
|
7
|
+
* +--project_id+, +assigned_to+ and +--closed+ options to filter *issues*
|
8
|
+
* Minor fixes
|
9
|
+
|
2
10
|
== 0.7, released 2015-10-05
|
3
11
|
|
4
12
|
* Show subcommand's +--template+ option for user/issue command to indicate the .erb template to render.
|
data/README.md
CHANGED
@@ -162,22 +162,19 @@ Will give us the info associated with the user with the given *id*.
|
|
162
162
|
|
163
163
|
To create a new user we should use the *create* subcommand:
|
164
164
|
|
165
|
-
$ redminerb users create
|
166
|
-
--firstname="Wadux" --lastname Wallace \
|
167
|
-
--mail "wadus@waduxwallace.out"
|
165
|
+
$ redminerb users create
|
168
166
|
|
169
|
-
|
167
|
+
It **will ask for the required params** giving us the possibility to fix any mistake until we confirm that everything is ok.
|
170
168
|
|
171
|
-
|
172
|
-
p, --password=PASSWORD
|
173
|
-
fn, --firstname=FIRSTNAME
|
174
|
-
ln, --lastname=LASTNAME
|
175
|
-
m, --mail=MAIL
|
169
|
+
If want to supply some (or all) of the values when calling `redminerb` we can use the following subcommand options (extracted from `redminerb users help create`):
|
176
170
|
|
177
|
-
|
171
|
+
-n, --name, [--login=LOGIN]
|
172
|
+
-p, --pass, [--password=PASSWORD]
|
173
|
+
-f, --fn, [--firstname=FIRSTNAME]
|
174
|
+
-l, --ln, [--lastname=LASTNAME]
|
175
|
+
-m, --email, [--mail=MAIL]
|
178
176
|
|
179
|
-
|
180
|
-
-m wadus@waduxwallace.out
|
177
|
+
Use the option **--no-ask** if you're supplying all the required values and don't want to be asked for them (from a script, for example).
|
181
178
|
|
182
179
|
### Issues
|
183
180
|
|
data/lib/redminerb/cli/users.rb
CHANGED
@@ -23,17 +23,34 @@ module Redminerb
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
|
+
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
28
|
+
# (i'd move code from here but inheriting from Thor i still don't know how :(
|
27
29
|
desc 'create', 'Creates a user.'
|
28
|
-
option :
|
29
|
-
option :
|
30
|
-
option :
|
31
|
-
option :
|
32
|
-
option :
|
30
|
+
option :ask, type: :boolean, default: true
|
31
|
+
option :login, aliases: [:n, '--name']
|
32
|
+
option :password, aliases: [:p, '--pass']
|
33
|
+
option :firstname, aliases: [:f, '--fn']
|
34
|
+
option :lastname, aliases: [:l, '--ln']
|
35
|
+
option :mail, aliases: [:m, '--email']
|
33
36
|
def create
|
34
37
|
Redminerb.init!
|
38
|
+
if options[:ask]
|
39
|
+
loop do
|
40
|
+
initializer_data = @_initializer.detect do |internal|
|
41
|
+
internal.is_a?(Hash) && internal.keys.include?(:current_command)
|
42
|
+
end
|
43
|
+
initializer_data[:current_command].options.keys.each do |option|
|
44
|
+
next if option == :ask
|
45
|
+
value = ask("#{option.capitalize} [#{options[option]}]:", Thor::Shell::Color::GREEN)
|
46
|
+
options[option] = value unless value.empty?
|
47
|
+
end
|
48
|
+
break if yes?('Is everything OK? (NO/yes)')
|
49
|
+
end
|
50
|
+
end
|
35
51
|
puts Redminerb::Users.create(options).green
|
36
52
|
end
|
53
|
+
# rubocop:enabled Metrics/AbcSize, Metrics/MethodLength
|
37
54
|
|
38
55
|
desc 'me', 'Shows the info of the owner of the API key.'
|
39
56
|
def me
|
data/lib/redminerb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redminerb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Garcia Samblas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|