mingle4r 0.3.0 → 0.4.0
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.
- data/History.txt +6 -0
- data/README +53 -20
- data/TODO.txt +8 -4
- data/lib/mingle4r.rb +9 -23
- data/lib/mingle4r/api/card.rb +137 -0
- data/lib/mingle4r/api/card/attachment.rb +47 -0
- data/lib/mingle4r/api/card/comment.rb +12 -0
- data/lib/mingle4r/api/card/transition.rb +48 -0
- data/lib/mingle4r/api/murmur.rb +12 -0
- data/lib/mingle4r/api/project.rb +64 -0
- data/lib/mingle4r/api/property_definition.rb +7 -0
- data/lib/mingle4r/api/user.rb +7 -0
- data/lib/mingle4r/api/wiki.rb +10 -0
- data/lib/mingle4r/common_class_methods.rb +0 -1
- data/lib/mingle4r/mingle_client.rb +16 -14
- data/lib/mingle4r/version.rb +1 -1
- metadata +11 -22
- data/lib/mingle4r/api.rb +0 -31
- data/lib/mingle4r/api/v1.rb +0 -25
- data/lib/mingle4r/api/v1/card.rb +0 -173
- data/lib/mingle4r/api/v1/card/attachment.rb +0 -51
- data/lib/mingle4r/api/v1/project.rb +0 -71
- data/lib/mingle4r/api/v1/property_definition.rb +0 -16
- data/lib/mingle4r/api/v1/transition_execution.rb +0 -15
- data/lib/mingle4r/api/v1/user.rb +0 -9
- data/lib/mingle4r/api/v1/wiki.rb +0 -12
- data/lib/mingle4r/api/v2.rb +0 -25
- data/lib/mingle4r/api/v2/card.rb +0 -157
- data/lib/mingle4r/api/v2/card/attachment.rb +0 -51
- data/lib/mingle4r/api/v2/card/comment.rb +0 -16
- data/lib/mingle4r/api/v2/card/transition.rb +0 -52
- data/lib/mingle4r/api/v2/murmur.rb +0 -14
- data/lib/mingle4r/api/v2/project.rb +0 -90
- data/lib/mingle4r/api/v2/property_definition.rb +0 -14
- data/lib/mingle4r/api/v2/user.rb +0 -9
- data/lib/mingle4r/api/v2/wiki.rb +0 -12
- data/lib/mingle4r/common_dyn_class_instance_methods.rb +0 -5
@@ -1,90 +0,0 @@
|
|
1
|
-
module Mingle4r
|
2
|
-
class API
|
3
|
-
class V2
|
4
|
-
class Project
|
5
|
-
module InstanceMethods
|
6
|
-
# returns the cards for the project. To hit the resource server without returning
|
7
|
-
# cached results pass true as an argument.
|
8
|
-
def cards(refresh = false)
|
9
|
-
return @cards if(!refresh && @cards_cached)
|
10
|
-
cards_site = File.join(self.class.site.to_s, "projects/#{self.identifier()}")
|
11
|
-
Card.site = cards_site
|
12
|
-
Card.user = self.class.user
|
13
|
-
Card.password = self.class.password
|
14
|
-
# @cards = Card.send(:create_resource_class).find_without_pagination(:all)
|
15
|
-
@cards = Card.find_without_pagination(:all)
|
16
|
-
@cards_cached = true
|
17
|
-
@cards
|
18
|
-
end
|
19
|
-
|
20
|
-
# returns the users for the project. To hit the resource server without returning
|
21
|
-
# cached results pass true as an argument.
|
22
|
-
def users(refresh = false)
|
23
|
-
return @users if(!refresh && @users_cached)
|
24
|
-
users_site = File.join(self.class.site.to_s, "projects/#{self.identifier()}")
|
25
|
-
User.site = users_site
|
26
|
-
User.user = self.class.user
|
27
|
-
User.password = self.class.password
|
28
|
-
User.element_name = nil # reset
|
29
|
-
user_class = User.send(:create_resource_class)
|
30
|
-
@users = user_class.find(:all)
|
31
|
-
@users_cached = true
|
32
|
-
@users
|
33
|
-
end
|
34
|
-
|
35
|
-
# returns the wikis for the project. To hit the resource server without returning
|
36
|
-
# cached results pass true as an argument.
|
37
|
-
def wikis(refresh = false)
|
38
|
-
return @wikis if(!refresh && @wikis_cached)
|
39
|
-
wiki_site = File.join(self.class.site.to_s, "projects/#{self.identifier()}")
|
40
|
-
Wiki.site = wiki_site
|
41
|
-
Wiki.user = self.class.user
|
42
|
-
Wiki.password = self.class.password
|
43
|
-
wiki_class = Wiki.send(:create_resource_class)
|
44
|
-
@wikis = wiki_class.find(:all)
|
45
|
-
@wikis_cached = true
|
46
|
-
@wikis
|
47
|
-
end
|
48
|
-
|
49
|
-
# returns the property definitions for the project. To hit the resource server
|
50
|
-
# pass true as an argument
|
51
|
-
def property_definitions(refresh = false)
|
52
|
-
return @prop_definitions if(!refresh && @prop_definitions_cached)
|
53
|
-
properties_site = File.join(self.class.site.to_s, "/projects/#{self.identifier}")
|
54
|
-
PropertyDefinition.site = properties_site
|
55
|
-
PropertyDefinition.user = self.class.user
|
56
|
-
PropertyDefinition.password = self.class.password
|
57
|
-
prop_defn_class = PropertyDefinition.send(:create_resource_class)
|
58
|
-
@prop_definitions = prop_defn_class.find(:all)
|
59
|
-
@prop_definitions_cached = true
|
60
|
-
@prop_definitions
|
61
|
-
end
|
62
|
-
|
63
|
-
# returns the murmurs for the project. To hit the resource server without returning
|
64
|
-
# cached results pass true as an argument.
|
65
|
-
def murmurs(refresh = false)
|
66
|
-
return @murmurs if(!refresh && @murmurs)
|
67
|
-
murmur_site = File.join(self.class.site.to_s, "/projects/#{self.identifier}")
|
68
|
-
Murmur.site = murmurs_site
|
69
|
-
Murmur.user = self.class.user
|
70
|
-
Murmur.password = self.class.password
|
71
|
-
@murmurs = Murmur.find(:all)
|
72
|
-
end
|
73
|
-
|
74
|
-
# posts a murmur
|
75
|
-
def post_murmur(str)
|
76
|
-
murmurs_site = File.join(self.class.site.to_s, "projects/#{self.identifier}")
|
77
|
-
Murmur.site = murmurs_site
|
78
|
-
Murmur.user = self.class.user
|
79
|
-
Murmur.password = self.class.password
|
80
|
-
|
81
|
-
murmur = Murmur.new(:body => str.to_s)
|
82
|
-
murmur.save
|
83
|
-
end
|
84
|
-
end # module InstanceMethods
|
85
|
-
|
86
|
-
extend Mingle4r::CommonClassMethods
|
87
|
-
end # class Project
|
88
|
-
end # class V1
|
89
|
-
end # class API
|
90
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
module Mingle4r
|
2
|
-
class API
|
3
|
-
class V2
|
4
|
-
class PropertyDefinition
|
5
|
-
extend Mingle4r::CommonClassMethods
|
6
|
-
|
7
|
-
def self.column_name_for(prop_name)
|
8
|
-
property_def = @resource_class.find(:all).detect { |prop| prop.name == prop_name }
|
9
|
-
property_def ? property_def.column_name : nil
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
data/lib/mingle4r/api/v2/user.rb
DELETED
data/lib/mingle4r/api/v2/wiki.rb
DELETED