redminerb 0.7.0 → 0.7.1

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: 747f0c97c7d76ba854ec38522436b28472ff06cf
4
- data.tar.gz: c865d6012d0e98fd83509f123271d7e384e203ea
3
+ metadata.gz: c0eaa8da3e11151f1a2699b28ef9d1cdb1f5444f
4
+ data.tar.gz: 48d69b47bb1d62359ceb1c8561eaf725303af1ff
5
5
  SHA512:
6
- metadata.gz: 575252af1e2233e0743ca70a6324e4a0f2457756775c3c6836ab68c6f1e1ca1ece024653e1d136f79e4eeefbd1380aa016e787ccb6ae50d9c57252e823f5f4d4
7
- data.tar.gz: 4a81b7ab83059a60cfd08e9228f38b4fbbccca846a10e03c31d9da07b95df84b3f9d29f181671a9b9bc1f72c888cf3c2eb4cd5a7933e8d46c3e1ae70d8257f52
6
+ metadata.gz: 5171b97f91535076e8329bdbe5a87ccb88e94cb5951670e8dc1447a1788efbc659b2036d6dffc17ff96b2b1db960c06338b8da30b0b6670e0c0c0fdb967f365f
7
+ data.tar.gz: e1ca1b8a22384bc489850c2dcec3671bb5792c4239399d1236ada750f73ad39e87f5354de4a7607f3daae1d4c50dd8922828b39a22b5d588691a8099083aa091
data/README.md CHANGED
@@ -74,12 +74,12 @@ The output of **a single resource** obtained with **the `show` subcommand can be
74
74
 
75
75
  The default templates could be found in the *templates* directory.
76
76
 
77
- For example, to customize the output of an issue, we could write the following content in the `.redminerb/issue.erb`:
77
+ For example, to customize the output of an issue, we write the following content in the `.redminerb/issue.erb` file:
78
78
 
79
79
  Number: <%= issue.id %>
80
80
  Title: <%= issue.subject %>
81
81
 
82
- The *.redminerb* directory will be search in your current directory first, and then in your home directory.
82
+ The *.redminerb* directory will be search **in the current directory first**, and then in **your home directory**.
83
83
 
84
84
  We can also create other templates and use them through **the `--template` option**. For example:
85
85
 
@@ -91,7 +91,13 @@ Will use the file `.redminerb/user_in_a_box.erb` as template, whose content coul
91
91
  <%= Redminerb.line user.login %>
92
92
  <%= Redminerb.bottom %>
93
93
 
94
- As you can see Redminerb give us also some functions to draw its output using old-school boxes. These functions are:
94
+ That would give us an output similar to this:
95
+
96
+ ┌────────────────────────────────────┐
97
+ │ roger.williams │
98
+ └────────────────────────────────────┘
99
+
100
+ As you can see Redminerb give us also **some functions to draw** its output using old-school boxes. These functions are:
95
101
 
96
102
  * **Redminerb.top**: shows the top of the box (i.e. `┌──────┐`).
97
103
  * **Redminerb.middle**: shows a line in the middle of the box (i.e. `├──────┤`).
@@ -99,6 +105,8 @@ As you can see Redminerb give us also some functions to draw its output using ol
99
105
  * **Redminerb.line** *string*: content into the box (i.e. `│ Example │`).
100
106
  * **Redminerb.separator**: a line from left to right (like *middle* wo/ box borders).
101
107
 
108
+ Have fun with them!
109
+
102
110
  ### Configuration (config)
103
111
 
104
112
  To see the current configuration used by Redminerb we have the `config` command:
@@ -135,18 +143,18 @@ by semicolons. For example:
135
143
 
136
144
  Will return only the ID following by the user's email.
137
145
 
138
- You can see **all the fields available** with `redminerb users me`.
146
+ You can see **all the fields available** with `redminerb user me`.
139
147
 
140
148
  #### Show our info in the Redmine server
141
149
 
142
- $ redminerb users me
150
+ $ redminerb user me
143
151
 
144
152
  Will show the data in the Redmine server associated with the account that has
145
153
  the API key used to access the Rest API (hopefully your data :).
146
154
 
147
155
  #### Show user's data
148
156
 
149
- $ redminerb users [show] <id> # aka "redminerb users <id>"
157
+ $ redminerb user [show] <id>
150
158
 
151
159
  Will give us the info associated with the user with the given *id*.
152
160
 
@@ -177,17 +185,17 @@ The **issues** command is the wrapper for part of the [Issues resource](http://w
177
185
 
178
186
  #### List issues
179
187
 
180
- $ redminerb issues list # aka "redminerb issues"
188
+ $ redminerb issues [list]
181
189
 
182
190
  #### Show an issue
183
191
 
184
192
  Shows the info of an issue with a number or id.
185
193
 
186
- $ redminerb issues [show] <number>
194
+ $ redminerb issue [show] <number>
187
195
 
188
- For example, to see the info of the issue #12532 we'd launch:
196
+ For example, to see the info of the issue #12539 we'd launch:
189
197
 
190
- $ redminerb issues 12539
198
+ $ redminerb issue 12539
191
199
 
192
200
  ## Development
193
201
 
@@ -1,4 +1,4 @@
1
1
  # Copyright (c) The Cocktail Experience S.L. (2015)
2
2
  module Redminerb
3
- VERSION = '0.7.0'
3
+ VERSION = '0.7.1'
4
4
  end
data/lib/redminerb.rb CHANGED
@@ -74,14 +74,15 @@ module Redminerb
74
74
  end
75
75
 
76
76
  def line(string)
77
- if string.size > max_length
77
+ uncolorized = string.uncolorize
78
+ if uncolorized.size > max_length
78
79
  "│ #{string[0..(max_length - 1)]} │\n#{line(string[max_length..-1])}" if string
79
80
  else
80
- "│ #{string}#{extra_espaces_for(string)} │"
81
+ "│ #{string}#{fill_with_spaces(uncolorized)} │"
81
82
  end
82
83
  end
83
-
84
- def extra_espaces_for(string)
84
+
85
+ def fill_with_spaces(string)
85
86
  ' ' * (max_length - string.size)
86
87
  end
87
88
  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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Garcia Samblas