mingle_cli 0.0.1 → 0.0.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/.travis.yml +0 -2
- data/README.md +59 -8
- data/bin/mingle_cli.rb +20 -0
- data/lib/version.rb +1 -1
- data/spec/spec_helper.rb +6 -0
- 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: 0835611f502bca3efb706124401873324ca90c58
|
4
|
+
data.tar.gz: e72c04e983738449c1b720e21710f2ad2f3d7cc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7590bbf4af8cbe516882a00e03a8c1216b55bc4b66d4a57a01594d2f1a1c7d25a4a70c519e892e0931086190d0a22889fa87d59c2dc3a998a28b56163b2dc9a
|
7
|
+
data.tar.gz: f521fe074dcc90ade956ae48f8c371393c58e278116fb18a565e492ef6604f66a39018b439eec727e34dc393c6cbce69d1c2f9b8b9cc92899604c1bd91c5b734
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,69 @@
|
|
1
|
+
[](http://badge.fury.io/rb/mingle_cli)
|
1
2
|
[](https://travis-ci.org/ike18t/mingle_cli)
|
2
3
|
[](https://codeclimate.com/github/ike18t/mingle_cli)
|
3
4
|
[](https://coveralls.io/r/ike18t/mingle_cli?branch=master)
|
4
5
|
[](https://gemnasium.com/ike18t/mingle_cli)
|
5
6
|
|
6
|
-
MingleCLI
|
7
|
-
|
8
|
-
Command line interface to Mingle's API.
|
7
|
+
## MingleCLI
|
8
|
+
MingleCLI is a command line interface to the Mingle API. Currently the application is a read-only view of card(s) information.
|
9
9
|
|
10
|
-
|
10
|
+
#Configuring
|
11
|
+
```
|
12
|
+
mingle_cli.rb configure --username=[username] --password=[password] --hostname=[hostname] --project=[project]
|
13
|
+
```
|
11
14
|
|
12
|
-
|
15
|
+
#Usage
|
13
16
|
|
14
|
-
`mingle_cli.rb card \<number\> \<format\>`
|
15
17
|
|
16
|
-
|
18
|
+
```
|
19
|
+
mingle_cli.rb card [number] [format]
|
20
|
+
```
|
17
21
|
|
18
|
-
|
22
|
+
```
|
23
|
+
mingle_cli.rb cards [filter] [format]
|
24
|
+
```
|
25
|
+
|
26
|
+
```
|
27
|
+
mingle_cli.rb comments [number]
|
28
|
+
```
|
29
|
+
|
30
|
+
###Argument Definitions:###
|
31
|
+
* __Number__: The card number.
|
32
|
+
* __Format__: The format of the result of the command. Formats can contain property names nested in brackets which will then be replaced with the value of the property.
|
33
|
+
* __Filter__: Mingle's MQL syntax.
|
34
|
+
|
35
|
+
|
36
|
+
#Examples
|
37
|
+
####Configuring:####
|
38
|
+
|
39
|
+
```
|
40
|
+
mingle_cli.rb configure --username=hsimpson --password=doh1 --hostname=power_plant.local --project=radioactive_donut
|
41
|
+
```
|
42
|
+
####Getting card information:####
|
43
|
+
|
44
|
+
```
|
45
|
+
mingle_cli.rb card 19480 "Status: [status] Pair: [dev pair]"
|
46
|
+
```
|
47
|
+
|
48
|
+
```
|
49
|
+
Status: In Development Pair: Homer/Bart
|
50
|
+
```
|
51
|
+
####Querying for cards:####
|
52
|
+
|
53
|
+
```
|
54
|
+
mingle_cli.rb cards 'status is ["in development"]' 'Number: [number] Pair: [dev pair]'
|
55
|
+
```
|
56
|
+
|
57
|
+
```
|
58
|
+
Number: 19480 Pair: Homer/Bart
|
59
|
+
Number: 19495 Pair: Marge/Lisa
|
60
|
+
```
|
61
|
+
####Viewing card comments:####
|
62
|
+
|
63
|
+
```
|
64
|
+
mingle_cli.rb comments 19480
|
65
|
+
```
|
66
|
+
|
67
|
+
```
|
68
|
+
2014-01-30 12:57:46 -0500 Home Simpson: Doh!
|
69
|
+
```
|
data/bin/mingle_cli.rb
CHANGED
@@ -90,6 +90,26 @@ module MingleCLI
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
mode :comment do
|
94
|
+
description 'Comment on a card.'
|
95
|
+
|
96
|
+
argument(:number) {
|
97
|
+
argument :required
|
98
|
+
cast :int
|
99
|
+
description 'Number of the card to leave a comment.'
|
100
|
+
}
|
101
|
+
|
102
|
+
argument(:comment) {
|
103
|
+
argument :required
|
104
|
+
cast :string
|
105
|
+
description 'The comment body.'
|
106
|
+
}
|
107
|
+
|
108
|
+
def run
|
109
|
+
Comment.create :card_id => params[:number].value, :content => params[:comment].value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
93
113
|
mode :comments do
|
94
114
|
description 'Get comments for a card.'
|
95
115
|
|
data/lib/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
3
4
|
require 'rspec'
|
4
5
|
require 'mocha/api'
|
5
6
|
require 'pry'
|
@@ -13,3 +14,8 @@ Coveralls.wear!
|
|
13
14
|
FakeWeb.register_uri(:get, %r|cards.xml|, :body => File.read('spec/fixtures/cards.xml'))
|
14
15
|
FakeWeb.register_uri(:get, %r|19480.xml|, :body => File.read('spec/fixtures/19480.xml'))
|
15
16
|
FakeWeb.register_uri(:get, %r|19480/comments.xml|, :body => File.read('spec/fixtures/19480_comments.xml'))
|
17
|
+
|
18
|
+
ConfigService.stubs(:get).returns(AppConfig.new({ :username => 'test',
|
19
|
+
:password => 'test',
|
20
|
+
:hostname => 'test.local',
|
21
|
+
:project => 'test' }))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingle_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Datlof
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|