mingle4r 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/README +35 -31
- data/TODO.txt +3 -0
- data/lib/mingle4r/api/card.rb +9 -1
- data/lib/mingle4r/version.rb +1 -1
- metadata +18 -10
- data/lib/mingle4r/api/execute_mql.rb +0 -15
data/History.txt
CHANGED
data/README
CHANGED
@@ -38,8 +38,8 @@ the api documentation for the mingle instance(located at <mingle instance host>/
|
|
38
38
|
In all the documentation below you can replace Mingle4r::MingleClient with MingleClient.
|
39
39
|
Its an alias for easy use.
|
40
40
|
|
41
|
-
|
42
|
-
|
41
|
+
Getting all the projects for a particular instance
|
42
|
+
--------------------------------------------------
|
43
43
|
|
44
44
|
Suppose you want to connect to the mingle instance hosted at http://localhost:8080 where the
|
45
45
|
username is 'testuser' and password is 'password'.
|
@@ -49,8 +49,8 @@ projs = m_c.projects
|
|
49
49
|
|
50
50
|
projs is an array of active resource objects
|
51
51
|
|
52
|
-
|
53
|
-
|
52
|
+
Getting a particular project
|
53
|
+
----------------------------
|
54
54
|
|
55
55
|
Before you access a particular project you need to set the project id for the mingle client
|
56
56
|
object. You can do that in two ways. Supposing you are trying to access a project with an
|
@@ -75,8 +75,8 @@ you are trying to access. It should be something like 'http://localhost:8080/pro
|
|
75
75
|
|
76
76
|
project is a single activeresource object
|
77
77
|
|
78
|
-
|
79
|
-
|
78
|
+
Getting cards for a particular project
|
79
|
+
--------------------------------------
|
80
80
|
|
81
81
|
Get a mingle client object initialized as in SECTION B. Then call the cards method.
|
82
82
|
|
@@ -86,8 +86,8 @@ m_c.project.cards
|
|
86
86
|
|
87
87
|
cards will be an array of activeresoure objects.
|
88
88
|
|
89
|
-
|
90
|
-
|
89
|
+
Getting custom properties for a card
|
90
|
+
------------------------------------
|
91
91
|
|
92
92
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
93
93
|
m_c.proj_id = 'great_mingle_project'
|
@@ -96,21 +96,25 @@ card.custom_properties => returns an array of hashes, {property name => property
|
|
96
96
|
|
97
97
|
However this gives only custom properties, not all the properties.
|
98
98
|
|
99
|
-
|
100
|
-
|
99
|
+
Getting a particular property
|
100
|
+
-----------------------------
|
101
101
|
|
102
102
|
gets the value of a property. The property name given should be the same as seen in Mingle.
|
103
|
+
Type, name, description and number of a card can be accessed directly. For any other custom
|
104
|
+
property use the method below.
|
103
105
|
|
104
106
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
105
107
|
m_c.proj_id = 'great_mingle_project'
|
106
108
|
card = m_c.project.cards[0]
|
107
109
|
card.property_value('Status')
|
108
110
|
|
109
|
-
|
110
|
-
|
111
|
+
Setting a particular property
|
112
|
+
-----------------------------
|
111
113
|
|
112
|
-
sets the value of the property. The property name given should be the same as in Mingle
|
113
|
-
|
114
|
+
sets the value of the property. The property name given should be the same as in Mingle.
|
115
|
+
Type, name and description should be set directly when creating or updating a card.
|
116
|
+
In case of a custom property use the following method. The value given should be one of
|
117
|
+
the values that Mingle accepts in case of a managed list
|
114
118
|
|
115
119
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
116
120
|
m_c.proj_id = 'great_mingle_project'
|
@@ -118,16 +122,16 @@ defect_card = m_c.project.cards.first
|
|
118
122
|
defect_card.property_value('Status', 'Closed')
|
119
123
|
defect_card.save
|
120
124
|
|
121
|
-
|
122
|
-
|
125
|
+
Adding comment to a particular card
|
126
|
+
-----------------------------------
|
123
127
|
|
124
128
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
125
129
|
m_c.proj_id = 'great_mingle_project'
|
126
130
|
defect_card = m_c.project.cards[0]
|
127
131
|
defect_card.add_comment('Not able to reproduce')
|
128
132
|
|
129
|
-
|
130
|
-
|
133
|
+
Getting a particular version of a card
|
134
|
+
--------------------------------------
|
131
135
|
|
132
136
|
Mingle maintains the different versions of a card. It always shows the latest version
|
133
137
|
by default. However if you want to access a different version you can do so in the
|
@@ -153,16 +157,16 @@ supposing the latest version of the card is 42
|
|
153
157
|
|
154
158
|
defect_card.version(21) # returns version 21
|
155
159
|
|
156
|
-
|
157
|
-
|
160
|
+
Getting all comments for a card
|
161
|
+
-------------------------------
|
158
162
|
|
159
163
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
160
164
|
m_c.proj_id = 'great_mingle_project'
|
161
165
|
defect_card = m_c.project.cards.first
|
162
166
|
defect_cards.comments
|
163
167
|
|
164
|
-
|
165
|
-
|
168
|
+
Attachments
|
169
|
+
-----------
|
166
170
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
167
171
|
m_c.proj_id = 'great_mingle_project'
|
168
172
|
defect_card = m_c.project.cards.first
|
@@ -178,9 +182,9 @@ defect_card.attachments
|
|
178
182
|
--------------------------
|
179
183
|
|
180
184
|
defect_card.upload_attachment('page-screenshot.jpg')
|
181
|
-
|
182
|
-
|
183
|
-
|
185
|
+
|
186
|
+
Murmurs
|
187
|
+
-------
|
184
188
|
|
185
189
|
1) Get the murmurs for a project
|
186
190
|
--------------------------------
|
@@ -200,8 +204,8 @@ K) Murmurs
|
|
200
204
|
-------------------------
|
201
205
|
project.post_murmur('my first murmur, I am excited!')
|
202
206
|
|
203
|
-
|
204
|
-
|
207
|
+
Get all transitions for a card
|
208
|
+
------------------------------
|
205
209
|
|
206
210
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
207
211
|
m_c.proj_id = 'great_mingle_project'
|
@@ -209,8 +213,8 @@ defect_card = m_c.project.cards.first
|
|
209
213
|
|
210
214
|
defect_card.transitions # array of active resource objects
|
211
215
|
|
212
|
-
|
213
|
-
|
216
|
+
Execute a transition on a card
|
217
|
+
------------------------------
|
214
218
|
|
215
219
|
m_c = Mingle4r::MingleClient.new('http://localhost:8080', 'testuser', 'password')
|
216
220
|
m_c.proj_id = 'great_mingle_project'
|
@@ -222,8 +226,8 @@ defect_card.execute_transition(
|
|
222
226
|
if the transition requires to be set manually, multiple properties might need to be set.
|
223
227
|
)
|
224
228
|
|
225
|
-
|
226
|
-
|
229
|
+
MQL execution
|
230
|
+
-------------
|
227
231
|
|
228
232
|
mingle allows you to write an arbitrary MQL query and returns the results. This gem
|
229
233
|
allows you to do that in a simpler way. If you want to know more about MQL go to http://www.thoughtworks-studios.com/mingle/3.0/help/mql_reference.html.
|
data/TODO.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
update documentation - write about executing transitions directly on the transition
|
2
|
+
clarify in docs difference between custom properties and native properties
|
2
3
|
write tests for project class
|
3
4
|
|
4
5
|
refactorings
|
@@ -7,4 +8,6 @@ refactorings
|
|
7
8
|
maybe nice to nave
|
8
9
|
-------------------
|
9
10
|
|
11
|
+
provide a easy mechanism to link to other cards
|
12
|
+
|
10
13
|
should transtions give the list of properties to be changed directly
|
data/lib/mingle4r/api/card.rb
CHANGED
@@ -32,7 +32,15 @@ module Mingle4r
|
|
32
32
|
def id
|
33
33
|
number()
|
34
34
|
end
|
35
|
-
|
35
|
+
|
36
|
+
def type
|
37
|
+
card_type.name
|
38
|
+
end
|
39
|
+
|
40
|
+
def type=(type)
|
41
|
+
attributes['card_type_name'] = type
|
42
|
+
end
|
43
|
+
|
36
44
|
def attachments(refresh = false)
|
37
45
|
return @attachments if(!refresh && @attachments)
|
38
46
|
set_attributes_for(Attachment)
|
data/lib/mingle4r/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingle4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- asur
|
@@ -9,19 +14,21 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-02-
|
17
|
+
date: 2010-02-25 00:00:00 +05:30
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: activeresource
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
23
29
|
version: "0"
|
24
|
-
|
30
|
+
type: :runtime
|
31
|
+
version_requirements: *id001
|
25
32
|
description: " A connector wrapper for connecting to Mingle(http://studios.thoughtworks.com/mingle-agile-project-management).\n It uses active resource to handle the restful connections to Mingle. Makes the job of connecting to Mingle a \n lot easier. Also since it uses lazy evaluation, resources are fetched only when they are requested.\n"
|
26
33
|
email: arusarka@gmail.com
|
27
34
|
executables: []
|
@@ -41,7 +48,6 @@ files:
|
|
41
48
|
- lib/mingle4r/api/card/attachment.rb
|
42
49
|
- lib/mingle4r/api/card/comment.rb
|
43
50
|
- lib/mingle4r/api/card/transition.rb
|
44
|
-
- lib/mingle4r/api/execute_mql.rb
|
45
51
|
- lib/mingle4r/api/murmur.rb
|
46
52
|
- lib/mingle4r/api/project.rb
|
47
53
|
- lib/mingle4r/api/property_definition.rb
|
@@ -64,18 +70,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
70
|
requirements:
|
65
71
|
- - ">="
|
66
72
|
- !ruby/object:Gem::Version
|
73
|
+
segments:
|
74
|
+
- 0
|
67
75
|
version: "0"
|
68
|
-
version:
|
69
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
77
|
requirements:
|
71
78
|
- - ">="
|
72
79
|
- !ruby/object:Gem::Version
|
80
|
+
segments:
|
81
|
+
- 0
|
73
82
|
version: "0"
|
74
|
-
version:
|
75
83
|
requirements: []
|
76
84
|
|
77
85
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.3.
|
86
|
+
rubygems_version: 1.3.6
|
79
87
|
signing_key:
|
80
88
|
specification_version: 3
|
81
89
|
summary: Mingle connector using active resource
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Mingle4r
|
2
|
-
module API
|
3
|
-
class ExecuteMql
|
4
|
-
extend Mingle4r::CommonClassMethods
|
5
|
-
|
6
|
-
def self.query(query_string)
|
7
|
-
@resource_class.find(:all, :params => {:mql => query_string}).
|
8
|
-
collect { |res| res.attributes }
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
Mingle4r::API::ExecuteMql.collection_name = 'execute_mql'
|
15
|
-
Mingle4r::API::ExecuteMql.element_name = 'result'
|