jiraSOAP 0.5.3 → 0.6.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.
Files changed (46) hide show
  1. data/ChangeLog +22 -0
  2. data/README.markdown +6 -2
  3. data/lib/jiraSOAP.rb +6 -2
  4. data/lib/jiraSOAP/JIRAservice.rb +29 -32
  5. data/lib/jiraSOAP/api.rb +220 -59
  6. data/lib/jiraSOAP/entities.rb +29 -19
  7. data/lib/jiraSOAP/entities/attachment_metadata.rb +27 -0
  8. data/lib/jiraSOAP/entities/avatar.rb +12 -19
  9. data/lib/jiraSOAP/entities/comment.rb +17 -26
  10. data/lib/jiraSOAP/entities/component.rb +5 -0
  11. data/lib/jiraSOAP/entities/custom_field_value.rb +33 -0
  12. data/lib/jiraSOAP/entities/described_entity.rb +7 -0
  13. data/lib/jiraSOAP/entities/dynamic_entity.rb +8 -0
  14. data/lib/jiraSOAP/entities/entity.rb +43 -0
  15. data/lib/jiraSOAP/entities/field.rb +4 -0
  16. data/lib/jiraSOAP/entities/field_value.rb +4 -49
  17. data/lib/jiraSOAP/entities/filter.rb +7 -16
  18. data/lib/jiraSOAP/entities/issue.rb +32 -43
  19. data/lib/jiraSOAP/entities/issue_property.rb +9 -0
  20. data/lib/jiraSOAP/entities/issue_security_scheme.rb +4 -0
  21. data/lib/jiraSOAP/entities/issue_type.rb +8 -0
  22. data/lib/jiraSOAP/entities/named_entity.rb +7 -0
  23. data/lib/jiraSOAP/entities/notification_scheme.rb +4 -0
  24. data/lib/jiraSOAP/entities/permission.rb +12 -0
  25. data/lib/jiraSOAP/entities/permission_mapping.rb +12 -0
  26. data/lib/jiraSOAP/entities/permission_scheme.rb +8 -0
  27. data/lib/jiraSOAP/entities/priority.rb +9 -0
  28. data/lib/jiraSOAP/entities/project.rb +14 -24
  29. data/lib/jiraSOAP/entities/project_role.rb +11 -0
  30. data/lib/jiraSOAP/entities/remote_entity.rb +7 -0
  31. data/lib/jiraSOAP/entities/resolution.rb +4 -0
  32. data/lib/jiraSOAP/entities/scheme.rb +9 -0
  33. data/lib/jiraSOAP/entities/server_configuration.rb +56 -0
  34. data/lib/jiraSOAP/entities/server_info.rb +30 -0
  35. data/lib/jiraSOAP/entities/status.rb +4 -0
  36. data/lib/jiraSOAP/entities/time_info.rb +15 -0
  37. data/lib/jiraSOAP/entities/user.rb +8 -13
  38. data/lib/jiraSOAP/entities/version.rb +8 -16
  39. data/lib/jiraSOAP/handsoap_extensions.rb +29 -42
  40. data/lib/jiraSOAP/url.rb +3 -2
  41. metadata +193 -33
  42. data/lib/jiraSOAP/entities/abstract.rb +0 -93
  43. data/lib/jiraSOAP/entities/attachments.rb +0 -35
  44. data/lib/jiraSOAP/entities/issue_properties.rb +0 -39
  45. data/lib/jiraSOAP/entities/read_only.rb +0 -120
  46. data/lib/jiraSOAP/entities/schemes.rb +0 -25
@@ -1,39 +0,0 @@
1
- module JIRA
2
-
3
- # Contains all the metadata for a resolution.
4
- class Resolution < JIRA::IssueProperty
5
- end
6
-
7
- # Contains all the metadata for an issue's status.
8
- class Status < JIRA::IssueProperty
9
- end
10
-
11
- # Contains all the metadata for a priority level.
12
- # @todo change @color to be some kind of hex Fixnum object
13
- class Priority < JIRA::IssueProperty
14
-
15
- # @return [String] is a hex value
16
- attr_accessor :color
17
-
18
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
19
- def initialize_with_xml_fragment(frag)
20
- super frag
21
- @color = (frag/'color').to_s
22
- end
23
- end
24
-
25
- # Contains all the metadata for an issue type.
26
- class IssueType < JIRA::IssueProperty
27
-
28
- # @return [boolean] true if the issue type is also a subtask
29
- attr_accessor :subtask
30
- alias_method :subtask?, :subtask
31
-
32
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
33
- def initialize_with_xml_fragment(frag)
34
- super frag
35
- @subtask = (frag/'subTask').to_boolean
36
- end
37
- end
38
-
39
- end
@@ -1,120 +0,0 @@
1
- module JIRA
2
-
3
- # Only contains basic information about the endpoint server and only used
4
- # by {RemoteAPI#get_server_info}.
5
- class ServerInfo < JIRA::Entity
6
-
7
- # @return [URL]
8
- attr_reader :base_url
9
-
10
- # @return [Time]
11
- attr_reader :build_date
12
-
13
- # @return [Fixnum]
14
- attr_reader :build_number
15
-
16
- # @return [String]
17
- attr_reader :edition
18
-
19
- # @return [JIRA::TimeInfo]
20
- attr_reader :server_time
21
-
22
- # @return [String]
23
- attr_reader :version
24
-
25
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
26
- def initialize_with_xml_fragment(frag)
27
- @build_date, @build_number, @base_url, @edition, @version, @server_time =
28
- frag.nodes( ['buildDate', :to_date],
29
- ['buildNumber', :to_i],
30
- ['baseUrl', :to_url],
31
- ['edition', :to_s],
32
- ['version', :to_s],
33
- ['serverTime', :to_object, JIRA::TimeInfo] )
34
- end
35
- end
36
-
37
-
38
- # Simple structure for a time and time zone; only used by JIRA::ServerInfo
39
- # objects, which themselves are only created when {RemoteAPI#get_server_info}
40
- # is called.
41
- class TimeInfo < JIRA::Entity
42
-
43
- # @return [Time]
44
- attr_reader :server_time
45
-
46
- # @return [String] in the form of 'America/Toronto'
47
- attr_reader :timezone
48
-
49
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
50
- def initialize_with_xml_fragment(frag)
51
- @server_time, @timezone =
52
- frag.nodes ['serverTime', :to_string_date], ['timeZoneId', :to_s]
53
- end
54
- end
55
-
56
-
57
- # A simple structure that is used by {RemoteAPI#get_server_configuration}.
58
- class ServerConfiguration < JIRA::Entity
59
-
60
- # @return [boolean]
61
- attr_reader :attachments_allowed
62
- alias_method :attachments_allowed?, :attachments_allowed
63
-
64
- # @return [boolean]
65
- attr_reader :external_user_management_allowed
66
- alias_method :external_user_management_allowed?, :external_user_management_allowed
67
-
68
- # @return [boolean]
69
- attr_reader :issue_linking_allowed
70
- alias_method :issue_linking_allowed?, :issue_linking_allowed
71
-
72
- # @return [boolean]
73
- attr_reader :subtasks_allowed
74
- alias_method :subtasks_allowed?, :subtasks_allowed
75
-
76
- # @return [boolean]
77
- attr_reader :time_tracking_allowed
78
- alias_method :time_tracking_allowed?, :time_tracking_allowed
79
-
80
- # @return [boolean]
81
- attr_reader :unassigned_issues_allowed
82
- alias_method :unassigned_issues_allowed?, :unassigned_issues_allowed
83
-
84
- # @return [boolean]
85
- attr_reader :voting_allowed
86
- alias_method :voting_allowed?, :voting_allowed
87
-
88
- # @return [boolean]
89
- attr_reader :watching_allowed
90
- alias_method :watching_allowed?, :watching_allowed
91
-
92
- # @return [Fixnum]
93
- attr_reader :time_tracking_days_per_week
94
-
95
- # @return [Fixnum]
96
- attr_reader :time_tracking_hours_per_day
97
-
98
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
99
- def initialize_with_xml_fragment(frag)
100
- @external_user_management_allowed, @attachments_allowed,
101
- @issue_linking_allowed, @subtasks_allowed,
102
- @time_tracking_allowed, @unassigned_issues_allowed,
103
- @voting_allowed, @watching_allowed,
104
- @time_tracking_days_per_week, @time_tracking_hours_per_day =
105
- frag.nodes( ['allowExternalUserManagement', :to_boolean],
106
- ['allowAttachments', :to_boolean],
107
- ['allowIssueLinking', :to_boolean],
108
- ['allowSubTasks', :to_boolean],
109
- ['allowTimeTracking', :to_boolean],
110
- ['allowUnassignedIssues', :to_boolean],
111
- ['allowVoting', :to_boolean],
112
- ['allowWatching', :to_boolean],
113
- ['timeTrackingDaysPerWeek', :to_i],
114
- ['timeTrackingHoursPerDay', :to_i] )
115
- # in case Atlassian still has not fixed their spelling of 'management'
116
- @external_user_management_allowed ||= (frag/'allowExternalUserManagment').to_boolean
117
- end
118
- end
119
-
120
- end
@@ -1,25 +0,0 @@
1
- module JIRA
2
-
3
- # @todo complete this class
4
- # Includes a mapping of project specific permission settings.
5
- class PermissionScheme < JIRA::Scheme
6
-
7
- # @return [nil]
8
- attr_accessor :permission_mappings
9
-
10
- # @todo actually parse the permission mapping
11
- # @param [Handsoap::XmlQueryFront::NokogiriDriver] frag
12
- def initialize_with_xml_fragment(frag)
13
- super frag
14
- end
15
- end
16
-
17
- # Basic metadata about a project's notification scheme.
18
- class NotificationScheme < JIRA::Scheme
19
- end
20
-
21
- # Basic metadata about a project's issue security scheme.
22
- class IssueSecurityScheme < JIRA::Scheme
23
- end
24
-
25
- end