mingle4r 0.4.8 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -5
- data/VERSION +1 -1
- data/lib/mingle4r.rb +1 -0
- data/lib/mingle4r/api/card.rb +8 -3
- data/lib/mingle4r/api/wiki.rb +18 -2
- data/lib/mingle4r/common_class_methods.rb +5 -4
- metadata +65 -65
data/README.rdoc
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
== NO LONGER UNDER DEVELOPMENT
|
2
|
-
|
3
|
-
I have stopped development for this project. If you are interested to take this up send me message
|
4
|
-
|
5
1
|
== mingle4r
|
6
2
|
|
7
3
|
http://github.com/arusarka/mingle4r/tree/master
|
@@ -9,7 +5,7 @@ http://github.com/arusarka/mingle4r/tree/master
|
|
9
5
|
== Description:
|
10
6
|
|
11
7
|
This gem is a wrapper around active resource to access the rest api exposed by mingle
|
12
|
-
(http://studios.
|
8
|
+
(http://thoughtworks-studios.com/mingle-agile-project-management).It provides a easy
|
13
9
|
way to communicate with mingle. For the library to work you need to enable basic authentication
|
14
10
|
(not enabled by default) in Mingle. See below to enable basic authentication in Mingle.
|
15
11
|
The typical use-case for this gem is to help someone getting started with writing code
|
@@ -38,6 +34,8 @@ If you have a mingle server running somewhere you can check the different apis a
|
|
38
34
|
|
39
35
|
A lot of examples are given below to get you started.
|
40
36
|
|
37
|
+
Current version under development (0.5.0 ) will support Mingle 3.5.
|
38
|
+
|
41
39
|
The api now supports only mingle 3. Mingle 2 is no longer supported. If you need to connect
|
42
40
|
to both Mingle 2 and Mingle 3 then try 0.3.0 of the gem.
|
43
41
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/mingle4r.rb
CHANGED
data/lib/mingle4r/api/card.rb
CHANGED
@@ -45,7 +45,7 @@ module Mingle4r
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def murmurs
|
48
|
-
set_attributes_for(Murmur)
|
48
|
+
set_attributes_for(Murmur) unless murmur_class_set
|
49
49
|
@murmurs = Murmur.find(:all)
|
50
50
|
end
|
51
51
|
|
@@ -107,7 +107,7 @@ EOS
|
|
107
107
|
# as the mingle property name. the value is optional
|
108
108
|
def property_value(name, val = nil)
|
109
109
|
property = properties.detect { |p| p.name == name }
|
110
|
-
val ? set_prop_val(property, val) : property.value
|
110
|
+
val ? set_prop_val(property, val) : ( property ? property.value : nil )
|
111
111
|
# val ? property.value = val : property.value
|
112
112
|
end
|
113
113
|
|
@@ -169,6 +169,11 @@ EOS
|
|
169
169
|
return @user_class_set unless val
|
170
170
|
@user_class_set = val
|
171
171
|
end
|
172
|
+
|
173
|
+
def murmur_class_set(val = nil)
|
174
|
+
return @murmur_class_set unless val
|
175
|
+
@murmur_class_set = val
|
176
|
+
end
|
172
177
|
end
|
173
178
|
|
174
179
|
private
|
@@ -180,4 +185,4 @@ EOS
|
|
180
185
|
end
|
181
186
|
end
|
182
187
|
end
|
183
|
-
end
|
188
|
+
end
|
data/lib/mingle4r/api/wiki.rb
CHANGED
@@ -2,7 +2,23 @@ module Mingle4r
|
|
2
2
|
module API
|
3
3
|
class Wiki
|
4
4
|
extend Mingle4r::CommonClassMethods
|
5
|
-
|
5
|
+
|
6
|
+
module InstanceMethods
|
7
|
+
def attachments
|
8
|
+
ensure_attachment_resource_configured!
|
9
|
+
@attachments = Attachment.find(:all)
|
10
|
+
end
|
11
|
+
|
12
|
+
def ensure_attachment_resource_configured!
|
13
|
+
unless @attachment_resource_configured
|
14
|
+
Attachment.site = URI.join(self.class.site.to_s, "wiki/#{self.identifier()}").to_s
|
15
|
+
Attachment.user = self.class.user
|
16
|
+
Attachment.password = self.class.password
|
17
|
+
@attachment_resource_configured = true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
6
22
|
private
|
7
23
|
def self.on_setup(klass)
|
8
24
|
klass.primary_key = 'identifier'
|
@@ -12,4 +28,4 @@ module Mingle4r
|
|
12
28
|
end
|
13
29
|
|
14
30
|
Mingle4r::API::Wiki.collection_name = 'wiki'
|
15
|
-
Mingle4r::API::Wiki.element_name = 'page'
|
31
|
+
Mingle4r::API::Wiki.element_name = 'page'
|
@@ -83,6 +83,7 @@ module Mingle4r
|
|
83
83
|
def create_resource_class
|
84
84
|
raise "Please set the site for #{self} class." unless(self.site)
|
85
85
|
created_class = Class.new(MingleResource)
|
86
|
+
created_class.format = :xml
|
86
87
|
setup_class(created_class)
|
87
88
|
created_class
|
88
89
|
end
|
@@ -119,15 +120,15 @@ module Mingle4r
|
|
119
120
|
end
|
120
121
|
|
121
122
|
def class_name
|
122
|
-
self.name.demodulize
|
123
|
+
self.name.to_s.demodulize
|
123
124
|
end
|
124
125
|
|
125
126
|
def has_inst_meths_module?
|
126
|
-
self.constants.detect { |const| const.demodulize == 'InstanceMethods' }
|
127
|
+
self.constants.detect { |const| const.to_s.demodulize == 'InstanceMethods' }
|
127
128
|
end
|
128
129
|
|
129
130
|
def has_class_meths_module?
|
130
|
-
self.constants.detect { |const| const.demodulize == 'ClassMethods' }
|
131
|
+
self.constants.detect { |const| const.to_s.demodulize == 'ClassMethods' }
|
131
132
|
end
|
132
133
|
|
133
134
|
def method_missing(meth_id, *args, &block)
|
@@ -135,4 +136,4 @@ module Mingle4r
|
|
135
136
|
@resource_class.send(meth_id.to_sym, *args, &block)
|
136
137
|
end
|
137
138
|
end
|
138
|
-
end
|
139
|
+
end
|
metadata
CHANGED
@@ -1,62 +1,73 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingle4r
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
- 8
|
10
|
-
version: 0.4.8
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- asur
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: activeresource
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
37
|
-
- rspec
|
38
|
-
- rspec-unit
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rspec
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec-unit
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
41
49
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
49
54
|
type: :development
|
50
|
-
|
51
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: ! " A wrapper connector for connecting to Mingle(http://thoughtworks-studios.com/mingle-agile-project-management).\n
|
63
|
+
\ It uses active resource to handle the restful connections to Mingle. Makes the
|
64
|
+
job of connecting to Mingle a \n lot easier.\n"
|
52
65
|
email: arusarka@gmail.com
|
53
66
|
executables: []
|
54
|
-
|
55
67
|
extensions: []
|
56
|
-
|
57
|
-
extra_rdoc_files:
|
68
|
+
extra_rdoc_files:
|
58
69
|
- README.rdoc
|
59
|
-
files:
|
70
|
+
files:
|
60
71
|
- lib/mingle4r.rb
|
61
72
|
- lib/mingle_resource.rb
|
62
73
|
- lib/mingle4r/common_class_methods.rb
|
@@ -78,39 +89,28 @@ files:
|
|
78
89
|
- README.rdoc
|
79
90
|
- VERSION
|
80
91
|
- TODO.txt
|
81
|
-
has_rdoc: true
|
82
92
|
homepage: http://github.com/arusarka/mingle4r/
|
83
93
|
licenses: []
|
84
|
-
|
85
94
|
post_install_message:
|
86
95
|
rdoc_options: []
|
87
|
-
|
88
|
-
require_paths:
|
96
|
+
require_paths:
|
89
97
|
- lib
|
90
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
99
|
none: false
|
92
|
-
requirements:
|
93
|
-
- -
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
|
96
|
-
|
97
|
-
- 0
|
98
|
-
version: "0"
|
99
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
105
|
none: false
|
101
|
-
requirements:
|
102
|
-
- -
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
|
105
|
-
segments:
|
106
|
-
- 0
|
107
|
-
version: "0"
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
108
110
|
requirements: []
|
109
|
-
|
110
111
|
rubyforge_project:
|
111
|
-
rubygems_version: 1.
|
112
|
+
rubygems_version: 1.8.24
|
112
113
|
signing_key:
|
113
114
|
specification_version: 3
|
114
115
|
summary: Mingle connector using active resource
|
115
116
|
test_files: []
|
116
|
-
|