Skip to content
This repository

An active resource based connector for Mingle

tag: 0.2.7

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 pkg
Octocat-spinner-32 spec
Octocat-spinner-32 test
Octocat-spinner-32 History.txt
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 Manifest.txt
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO.txt
Octocat-spinner-32 mingle4r.gemspec
README
== mingle4r

http://github.com/arusarka/mingle4r/tree/master

== DESCRIPTION:

This gem is a wrapper around active resource to access the rest api exposed by mingle
(http://studios.thoughtworks.com/mingle-agile-project-management).It provides a easy 
way to communicate with mingle. For the library to work you need to enable basic authentication
(not enabled by default) in Mingle. See below to enable basic authentication in Mingle.

However if you are planning to connect and work with mingle from the terminal, then there
is another gem mingle-mingle which you should look at. This library provides a very easy
api to write code to work with mingle (see the examples below) but thats it.

Enable basic authentication in Mingle
-------------------------------------

1) Go to Mingle DataDir

2) Open YAML file <Mingle DataDir>/config/auth_config.yml

3) Set 'basic_authentication_enabled' to 'true' (without the quotes) if it is not so

== FEATURES/PROBLEMS:

It gives you access to projects in the mingle instance, cards under the project and also
attachments for a particular card. 

== SYNOPSIS:

A) Getting all the projects for a particular instance
--------------------------------------------------

Suppose you want to connect to the mingle instance hosted at http://localhost:8080 where the
username is 'testuser' and password is 'password'.

m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
projs = m_c.projects

projs is an array of active resource objects

B) Getting a particular project
----------------------------

Before you access a particular project you need to set the project id for the mingle client 
object. You can do that in two ways. Supposing you are trying to access a project with an
identifier of 'great_mingle_project'

WARNING : project identifier and project name are different. If you named your project as
'Great Mingle Project' it's identifier is by default 'great_mingle_project'. To be sure what
the identifier of a project is you should look at the url in mingle in the particular project
you are trying to access. It should be something like 'http://localhost:8080/projects/great_mingle_project'

		1) Set at initialize time

		m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password',
		'great_mingle_project')
		m_c.project

		2) Set an attribute later

		m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
		m_c.proj_id = 'great_mingle_project'
		m_c.project

C) Getting cards for a particular project
--------------------------------------

Get a mingle client object initialized as in SECTION B. Then call the cards method.

m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
m_c.proj_id = 'great_mingle_project'
m_c.cards

cards will be an array of activeresoure objects.

D) Getting custom properties for a card
---------------------------------------

m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
m_c.proj_id = 'great_mingle_project'
card = m_c.cards[0]
card.custom_properties => returns an array of hashes, {property name => property method name}

property name is the name as you see in mingle, whereas property method name is the name
of the method that you need to call on the active resource object (card in this case). The 
default is for a property name 'Added in Iteration Number' the method to call is 'added_in_iteration_number'
However this gives only custom properties, not all the properties.

E) Getting a particular property
--------------------------------

gets the value of a property. The property name can be given in several ways.
suppose we are trying to get the property 'Iteration Number' as in mingle

  1) give the name as seen in Mingle. E.g. - card.property_value('Iteration Number')

  2) give the property method name i.e. in the active resource object it would
become by default 'cp_iteration_number' attribute unless set differently in
Mingle. E.g. - card.property_value('cp_iteration_number')

  3) give the method a 'space separated' / 'camelcased' method name. e.g. - 'Iteration Number'
'IterationNumber' E.g. card.property_value('IterationNumber')

m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
m_c.proj_id = 'great_mingle_project'
card = m_c.cards[0]
card.property_value('Status')

F) Adding comment to a particular card
--------------------------------------

m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
m_c.proj_id = 'great_mingle_project'
defect_card = m_c.cards[0]
defect_card.add_comment('Not able to reproduce')


== REQUIREMENTS:

1) active_resource gem, it would be automatically taken care of
during gem install.

2) Mingle > 2.3

== INSTALL:

sudo (not on windows) gem install mingle4r

== LICENSE:

(The MIT License)

Copyright (c) 2009 Arusarka Haldar

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.