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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3f5703f33b0cd3b5455cc44236cc6c6aefe3eb1
4
- data.tar.gz: 2985930ee09d4593f511f5063fa2e5c4cdea13ee
3
+ metadata.gz: 0835611f502bca3efb706124401873324ca90c58
4
+ data.tar.gz: e72c04e983738449c1b720e21710f2ad2f3d7cc5
5
5
  SHA512:
6
- metadata.gz: 39159a96e1556ba3b0c0f48d6e4a1fd0084d7dbd6ae9a2a49e3af9a02b2375304092db87aca1fb0a06fa60a98a5e345c32c3cbc9bdaaf050d733c1ebe22d2c55
7
- data.tar.gz: 5559c321b0dc15384ba692193397901e07f25c32b51d09bc4256b939dd534adcd777015e4e5a95515c2a7667a5e8e577f9b6c7f7a5a6c563c5ac908af212c46f
6
+ metadata.gz: d7590bbf4af8cbe516882a00e03a8c1216b55bc4b66d4a57a01594d2f1a1c7d25a4a70c519e892e0931086190d0a22889fa87d59c2dc3a998a28b56163b2dc9a
7
+ data.tar.gz: f521fe074dcc90ade956ae48f8c371393c58e278116fb18a565e492ef6604f66a39018b439eec727e34dc393c6cbce69d1c2f9b8b9cc92899604c1bd91c5b734
data/.travis.yml CHANGED
@@ -9,8 +9,6 @@ rvm:
9
9
  env:
10
10
  - RUBY_PLATFORM="x86_64-linux"
11
11
  - RUBY_PLATFORM="x86_64-darwin11.3.0"
12
- before_script:
13
- - bin/mingle_cli.rb config --username=test --hostname=test --password=test --hostname=test.local
14
12
  matrix:
15
13
  allow_failures:
16
14
  - rvm: ruby-head
data/README.md CHANGED
@@ -1,18 +1,69 @@
1
+ [![Gem Version](https://badge.fury.io/rb/mingle_cli.png)](http://badge.fury.io/rb/mingle_cli)
1
2
  [![Build Status](https://travis-ci.org/ike18t/mingle_cli.png?branch=master)](https://travis-ci.org/ike18t/mingle_cli)
2
3
  [![Code Climate](https://codeclimate.com/github/ike18t/mingle_cli.png)](https://codeclimate.com/github/ike18t/mingle_cli)
3
4
  [![Coverage Status](https://coveralls.io/repos/ike18t/mingle_cli/badge.png?branch=master)](https://coveralls.io/r/ike18t/mingle_cli?branch=master)
4
5
  [![Dependency Status](https://gemnasium.com/ike18t/mingle_cli.png)](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
- Use bundler to install dependencies.
10
+ #Configuring
11
+ ```
12
+ mingle_cli.rb configure --username=[username] --password=[password] --hostname=[hostname] --project=[project]
13
+ ```
11
14
 
12
- **Usage**
15
+ #Usage
13
16
 
14
- `mingle_cli.rb card \<number\> \<format\>`
15
17
 
16
- `mingle_cli.rb cards \<filter\> \<format\>`
18
+ ```
19
+ mingle_cli.rb card [number] [format]
20
+ ```
17
21
 
18
- `mingle_cli.rb comments \<number\>`
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
@@ -1,3 +1,3 @@
1
1
  module MingleCLI
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
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.1
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-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource