jiraSOAP 0.6.1 → 0.7.1
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/.yardopts +10 -0
- data/ChangeLog +18 -0
- data/{LICENSE → LICENSE.txt} +0 -0
- data/README.markdown +4 -6
- data/lib/jiraSOAP.rb +0 -2
- data/lib/jiraSOAP/JIRAservice.rb +5 -5
- data/lib/jiraSOAP/api.rb +77 -696
- data/lib/jiraSOAP/api/additions.rb +22 -0
- data/lib/jiraSOAP/api/attachments.rb +33 -0
- data/lib/jiraSOAP/api/avatars.rb +64 -0
- data/lib/jiraSOAP/api/comments.rb +33 -0
- data/lib/jiraSOAP/api/filters.rb +20 -0
- data/lib/jiraSOAP/api/issue_data_types.rb +51 -0
- data/lib/jiraSOAP/api/issues.rb +102 -0
- data/lib/jiraSOAP/api/project_roles.rb +49 -0
- data/lib/jiraSOAP/api/projects.rb +67 -0
- data/lib/jiraSOAP/api/schemes.rb +17 -0
- data/lib/jiraSOAP/api/server_info.rb +18 -0
- data/lib/jiraSOAP/api/users.rb +35 -0
- data/lib/jiraSOAP/api/versions.rb +50 -0
- data/lib/jiraSOAP/entities.rb +5 -1
- data/lib/jiraSOAP/entities/attachment_metadata.rb +9 -22
- data/lib/jiraSOAP/entities/avatar.rb +10 -23
- data/lib/jiraSOAP/entities/comment.rb +12 -31
- data/lib/jiraSOAP/entities/component.rb +1 -1
- data/lib/jiraSOAP/entities/custom_field_value.rb +5 -11
- data/lib/jiraSOAP/entities/described_entity.rb +4 -4
- data/lib/jiraSOAP/entities/dynamic_entity.rb +5 -5
- data/lib/jiraSOAP/entities/entity.rb +28 -13
- data/lib/jiraSOAP/entities/field.rb +1 -1
- data/lib/jiraSOAP/entities/filter.rb +5 -14
- data/lib/jiraSOAP/entities/issue.rb +29 -88
- data/lib/jiraSOAP/entities/issue_property.rb +4 -4
- data/lib/jiraSOAP/entities/issue_security_scheme.rb +1 -1
- data/lib/jiraSOAP/entities/issue_type.rb +4 -5
- data/lib/jiraSOAP/entities/named_entity.rb +4 -4
- data/lib/jiraSOAP/entities/notification_scheme.rb +1 -1
- data/lib/jiraSOAP/entities/permission.rb +7 -10
- data/lib/jiraSOAP/entities/permission_mapping.rb +5 -10
- data/lib/jiraSOAP/entities/permission_scheme.rb +3 -4
- data/lib/jiraSOAP/entities/priority.rb +4 -3
- data/lib/jiraSOAP/entities/project.rb +9 -30
- data/lib/jiraSOAP/entities/project_role.rb +1 -1
- data/lib/jiraSOAP/entities/resolution.rb +1 -1
- data/lib/jiraSOAP/entities/scheme.rb +1 -1
- data/lib/jiraSOAP/entities/server_configuration.rb +14 -53
- data/lib/jiraSOAP/entities/server_info.rb +8 -26
- data/lib/jiraSOAP/entities/status.rb +1 -1
- data/lib/jiraSOAP/entities/time_info.rb +5 -10
- data/lib/jiraSOAP/entities/user.rb +5 -15
- data/lib/jiraSOAP/entities/username.rb +4 -0
- data/lib/jiraSOAP/entities/version.rb +6 -20
- data/lib/jiraSOAP/handsoap_extensions.rb +4 -2
- data/lib/jiraSOAP/macruby_bonuses.rb +12 -5
- data/lib/jiraSOAP/url.rb +13 -24
- data/yard-jiraSOAP.rb +65 -0
- metadata +52 -92
- data/lib/jiraSOAP/api/convenience.rb +0 -12
- data/lib/jiraSOAP/entities/remote_entity.rb +0 -7
@@ -2,8 +2,8 @@
|
|
2
2
|
# have an icon to go with them to help identify properties of issues more
|
3
3
|
# quickly.
|
4
4
|
class JIRA::IssueProperty < JIRA::DescribedEntity
|
5
|
-
add_attributes(
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
add_attributes(
|
6
|
+
# NSURL on MacRuby and a URI::HTTP object on CRuby
|
7
|
+
['icon', :icon, :to_url]
|
8
|
+
)
|
9
9
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# Contains all the metadata for an issue type.
|
2
2
|
class JIRA::IssueType < JIRA::IssueProperty
|
3
|
-
add_attributes(
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
alias_method :subtask?, :subtask
|
3
|
+
add_attributes(
|
4
|
+
# True if the issue type is also a subtask.
|
5
|
+
['subTask', :subtask, :to_boolean]
|
6
|
+
)
|
8
7
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# @abstract Most dynamic entities also have a name
|
2
2
|
class JIRA::NamedEntity < JIRA::DynamicEntity
|
3
|
-
add_attributes(
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
add_attributes(
|
4
|
+
# A plain language name.
|
5
|
+
['name', :name, :to_s]
|
6
|
+
)
|
7
7
|
end
|
@@ -1,12 +1,9 @@
|
|
1
|
+
# A permission id and the username that it is tied to.
|
1
2
|
class JIRA::Permission < JIRA::Entity
|
2
|
-
add_attributes(
|
3
|
-
|
4
|
-
'
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
attr_accessor :name
|
9
|
-
|
10
|
-
# @return [Fixnum] a unique id number
|
11
|
-
attr_accessor :permission
|
3
|
+
add_attributes(
|
4
|
+
# The permission type
|
5
|
+
['name', :name, :to_s],
|
6
|
+
# A unique id number
|
7
|
+
['permission', :permission, :to_i]
|
8
|
+
)
|
12
9
|
end
|
@@ -1,12 +1,7 @@
|
|
1
|
+
# @todo make sure the xml names are correct (check the XML dump)
|
1
2
|
class JIRA::PermissionMapping < JIRA::Entity
|
2
|
-
|
3
|
-
'permission'
|
4
|
-
'
|
5
|
-
|
6
|
-
|
7
|
-
# @return [JIRA::Permission]
|
8
|
-
attr_accessor :permission
|
9
|
-
|
10
|
-
# @return [[JIRA::RemoteEntity]]
|
11
|
-
attr_accessor :remote_entities
|
3
|
+
add_attributes(
|
4
|
+
['permission', :permission, :to_object, JIRA::Permission],
|
5
|
+
['entities', :users, :to_objects, JIRA::UserName]
|
6
|
+
)
|
12
7
|
end
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# @todo complete this class
|
2
2
|
# Includes a mapping of project specific permission settings.
|
3
3
|
class JIRA::PermissionScheme < JIRA::Scheme
|
4
|
-
add_attributes(
|
5
|
-
|
6
|
-
|
7
|
-
attr_accessor :permission_mappings
|
4
|
+
add_attributes(
|
5
|
+
['permissionMappings', :permission_mappings, :to_objects, JIRA::PermissionMapping]
|
6
|
+
)
|
8
7
|
end
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# Contains all the metadata for a priority level.
|
2
2
|
class JIRA::Priority < JIRA::IssueProperty
|
3
|
-
add_attributes(
|
3
|
+
add_attributes(
|
4
|
+
# the RGB components as a triple
|
5
|
+
['color', :color, :to_hex_string]
|
6
|
+
)
|
4
7
|
|
5
|
-
# @return [Array(String,String,String)] the RGB components as a triple
|
6
|
-
attr_accessor :color
|
7
8
|
alias_method :colour, :color
|
8
9
|
alias_method :colour=, :color=
|
9
10
|
end
|
@@ -1,35 +1,14 @@
|
|
1
1
|
# Contains the data and metadata about a project and its configuration.
|
2
2
|
class JIRA::Project < JIRA::DescribedEntity
|
3
|
-
add_attributes(
|
4
|
-
'key'
|
5
|
-
'lead'
|
6
|
-
'issueSecurityScheme'
|
7
|
-
'notificationScheme'
|
8
|
-
'permissionScheme'
|
9
|
-
'url'
|
10
|
-
'projectUrl'
|
11
|
-
|
12
|
-
|
13
|
-
# @return [String]
|
14
|
-
attr_accessor :key
|
15
|
-
|
16
|
-
# @return [URL]
|
17
|
-
attr_accessor :jira_url
|
18
|
-
|
19
|
-
# @return [URL]
|
20
|
-
attr_accessor :project_url
|
21
|
-
|
22
|
-
# @return [String]
|
23
|
-
attr_accessor :lead_username
|
24
|
-
|
25
|
-
# @return [JIRA::IssueSecurityScheme]
|
26
|
-
attr_accessor :issue_security_scheme
|
27
|
-
|
28
|
-
# @return [JIRA::NotificationScheme]
|
29
|
-
attr_accessor :notification_scheme
|
30
|
-
|
31
|
-
# @return [JIRA::PermissionScheme]
|
32
|
-
attr_accessor :permission_scheme
|
3
|
+
add_attributes(
|
4
|
+
['key', :key, :to_s],
|
5
|
+
['lead', :lead_username, :to_s],
|
6
|
+
['issueSecurityScheme', :issue_security_scheme, :to_object, JIRA::IssueSecurityScheme],
|
7
|
+
['notificationScheme', :notification_scheme, :to_object, JIRA::NotificationScheme],
|
8
|
+
['permissionScheme', :permission_scheme, :to_object, JIRA::PermissionScheme],
|
9
|
+
['url', :jira_url, :to_url],
|
10
|
+
['projectUrl', :project_url, :to_url]
|
11
|
+
)
|
33
12
|
|
34
13
|
# @todo make this method shorter
|
35
14
|
# @todo encode the schemes
|
@@ -1,56 +1,17 @@
|
|
1
1
|
# A simple structure that is used by {RemoteAPI#get_server_configuration}.
|
2
2
|
class JIRA::ServerConfiguration < JIRA::Entity
|
3
|
-
add_attributes(
|
4
|
-
'allowExternalUserManagement'
|
5
|
-
'allowAttachments'
|
6
|
-
'allowIssueLinking'
|
7
|
-
'allowSubTasks'
|
8
|
-
'allowTimeTracking'
|
9
|
-
'allowUnassignedIssues'
|
10
|
-
'allowVoting'
|
11
|
-
'allowWatching'
|
12
|
-
'timeTrackingDaysPerWeek'
|
13
|
-
'timeTrackingHoursPerDay'
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
})
|
18
|
-
|
19
|
-
# @return [boolean]
|
20
|
-
attr_accessor :attachments_allowed
|
21
|
-
alias_method :attachments_allowed?, :attachments_allowed
|
22
|
-
|
23
|
-
# @return [boolean]
|
24
|
-
attr_accessor :external_user_management_allowed
|
25
|
-
alias_method :external_user_management_allowed?, :external_user_management_allowed
|
26
|
-
|
27
|
-
# @return [boolean]
|
28
|
-
attr_accessor :issue_linking_allowed
|
29
|
-
alias_method :issue_linking_allowed?, :issue_linking_allowed
|
30
|
-
|
31
|
-
# @return [boolean]
|
32
|
-
attr_accessor :subtasks_allowed
|
33
|
-
alias_method :subtasks_allowed?, :subtasks_allowed
|
34
|
-
|
35
|
-
# @return [boolean]
|
36
|
-
attr_accessor :time_tracking_allowed
|
37
|
-
alias_method :time_tracking_allowed?, :time_tracking_allowed
|
38
|
-
|
39
|
-
# @return [boolean]
|
40
|
-
attr_accessor :unassigned_issues_allowed
|
41
|
-
alias_method :unassigned_issues_allowed?, :unassigned_issues_allowed
|
42
|
-
|
43
|
-
# @return [boolean]
|
44
|
-
attr_accessor :voting_allowed
|
45
|
-
alias_method :voting_allowed?, :voting_allowed
|
46
|
-
|
47
|
-
# @return [boolean]
|
48
|
-
attr_accessor :watching_allowed
|
49
|
-
alias_method :watching_allowed?, :watching_allowed
|
50
|
-
|
51
|
-
# @return [Fixnum]
|
52
|
-
attr_accessor :time_tracking_days_per_week
|
53
|
-
|
54
|
-
# @return [Fixnum]
|
55
|
-
attr_accessor :time_tracking_hours_per_day
|
3
|
+
add_attributes(
|
4
|
+
['allowExternalUserManagement', :external_user_management_allowed, :to_boolean],
|
5
|
+
['allowAttachments', :attachments_allowed, :to_boolean],
|
6
|
+
['allowIssueLinking', :issue_linking_allowed, :to_boolean],
|
7
|
+
['allowSubTasks', :subtasks_allowed, :to_boolean],
|
8
|
+
['allowTimeTracking', :time_tracking_allowed, :to_boolean],
|
9
|
+
['allowUnassignedIssues', :unassigned_issues_allowed, :to_boolean],
|
10
|
+
['allowVoting', :voting_allowed, :to_boolean],
|
11
|
+
['allowWatching', :watching_allowed, :to_boolean],
|
12
|
+
['timeTrackingDaysPerWeek', :time_tracking_days_per_week, :to_i],
|
13
|
+
['timeTrackingHoursPerDay', :time_tracking_hours_per_day, :to_i],
|
14
|
+
# In case we are using a version of JIRA that misspells 'management'
|
15
|
+
['allowExternalUserManagment', :external_user_management_allowed, :to_boolean]
|
16
|
+
)
|
56
17
|
end
|
@@ -1,30 +1,12 @@
|
|
1
1
|
# Only contains basic information about the endpoint server and only used
|
2
2
|
# by {RemoteAPI#get_server_info}.
|
3
3
|
class JIRA::ServerInfo < JIRA::Entity
|
4
|
-
add_attributes(
|
5
|
-
'baseUrl'
|
6
|
-
'buildDate'
|
7
|
-
'buildNumber'
|
8
|
-
'edition'
|
9
|
-
'version'
|
10
|
-
'serverTime'
|
11
|
-
|
12
|
-
|
13
|
-
# @return [URL]
|
14
|
-
attr_accessor :base_url
|
15
|
-
|
16
|
-
# @return [Time]
|
17
|
-
attr_accessor :build_date
|
18
|
-
|
19
|
-
# @return [Fixnum]
|
20
|
-
attr_accessor :build_number
|
21
|
-
|
22
|
-
# @return [String]
|
23
|
-
attr_accessor :edition
|
24
|
-
|
25
|
-
# @return [String]
|
26
|
-
attr_accessor :version
|
27
|
-
|
28
|
-
# @return [JIRA::TimeInfo]
|
29
|
-
attr_accessor :server_time
|
4
|
+
add_attributes(
|
5
|
+
['baseUrl', :base_url, :to_url],
|
6
|
+
['buildDate', :build_date, :to_date],
|
7
|
+
['buildNumber', :build_number, :to_i],
|
8
|
+
['edition', :edition, :to_s],
|
9
|
+
['version', :version, :to_s],
|
10
|
+
['serverTime', :server_time, :to_object, JIRA::TimeInfo]
|
11
|
+
)
|
30
12
|
end
|
@@ -2,14 +2,9 @@
|
|
2
2
|
# objects, which themselves are only created when {RemoteAPI#get_server_info}
|
3
3
|
# is called.
|
4
4
|
class JIRA::TimeInfo < JIRA::Entity
|
5
|
-
add_attributes(
|
6
|
-
'serverTime'
|
7
|
-
'
|
8
|
-
|
9
|
-
|
10
|
-
# @return [Time]
|
11
|
-
attr_accessor :server_time
|
12
|
-
|
13
|
-
# @return [String] in the form of 'America/Toronto'
|
14
|
-
attr_accessor :timezone
|
5
|
+
add_attributes(
|
6
|
+
['serverTime', :server_time, :to_date_string],
|
7
|
+
# in the form of 'America/Toronto'
|
8
|
+
['timeZoneId', :timezone, :to_s]
|
9
|
+
)
|
15
10
|
end
|
@@ -1,18 +1,8 @@
|
|
1
1
|
# Contains only the basic information about a user. The only things missing here
|
2
2
|
# are the permissions and login statistics, but these are not given in the API.
|
3
|
-
class JIRA::User < JIRA::
|
4
|
-
add_attributes(
|
5
|
-
'
|
6
|
-
'
|
7
|
-
|
8
|
-
})
|
9
|
-
|
10
|
-
# @return [String]
|
11
|
-
attr_accessor :username
|
12
|
-
|
13
|
-
# @return [String]
|
14
|
-
attr_accessor :full_name
|
15
|
-
|
16
|
-
# @return [String]
|
17
|
-
attr_accessor :email_address
|
3
|
+
class JIRA::User < JIRA::UserName
|
4
|
+
add_attributes(
|
5
|
+
['fullname', :full_name, :to_s],
|
6
|
+
['email', :email_address, :to_s]
|
7
|
+
)
|
18
8
|
end
|
@@ -2,26 +2,12 @@
|
|
2
2
|
# Represents a version for a project. The description field is never
|
3
3
|
# included when you retrieve versions from the server.
|
4
4
|
class JIRA::Version < JIRA::NamedEntity
|
5
|
-
add_attributes(
|
6
|
-
'sequence'
|
7
|
-
'released'
|
8
|
-
'archived'
|
9
|
-
'releaseDate'
|
10
|
-
|
11
|
-
|
12
|
-
# @return [Fixnum]
|
13
|
-
attr_accessor :sequence
|
14
|
-
|
15
|
-
# @return [boolean]
|
16
|
-
attr_accessor :released
|
17
|
-
alias_method :released?, :released
|
18
|
-
|
19
|
-
# @return [boolean]
|
20
|
-
attr_accessor :archived
|
21
|
-
alias_method :archived?, :archived
|
22
|
-
|
23
|
-
# @return [Time]
|
24
|
-
attr_accessor :release_date
|
5
|
+
add_attributes(
|
6
|
+
['sequence', :sequence, :to_i],
|
7
|
+
['released', :released, :to_boolean],
|
8
|
+
['archived', :archived, :to_boolean],
|
9
|
+
['releaseDate', :release_date, :to_date]
|
10
|
+
)
|
25
11
|
|
26
12
|
# @todo make this method shorter
|
27
13
|
# @param [Handsoap::XmlMason::Node] msg
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Some simple extensions to Handsoap.
|
2
2
|
module Handsoap
|
3
3
|
|
4
|
+
# @todo check if these methods already exist in Handsoap::Service
|
4
5
|
# Some extensions to the XML builder to make message building less ugly.
|
5
6
|
module XmlMason
|
6
7
|
|
@@ -35,6 +36,7 @@ end
|
|
35
36
|
# These are simple extensions to the existing class provided by Handsoap.
|
36
37
|
module XmlQueryFront
|
37
38
|
|
39
|
+
# @todo move these extensions straight to the nokogiri layer
|
38
40
|
# Simple extensions on the existing Handsoap class to make parsing easier.
|
39
41
|
class NokogiriDriver
|
40
42
|
|
@@ -54,11 +56,11 @@ module XmlQueryFront
|
|
54
56
|
temp.match(/#(..)(..)(..)/).captures
|
55
57
|
end
|
56
58
|
|
57
|
-
# @return [
|
59
|
+
# @return [URI::HTTP,NSURL]
|
58
60
|
def to_url
|
59
61
|
temp = self.to_s
|
60
62
|
return unless temp
|
61
|
-
|
63
|
+
JIRA.url_class.send JIRA.url_init_method, temp
|
62
64
|
end
|
63
65
|
|
64
66
|
# Returns the node's children to an array of strings.
|
@@ -1,16 +1,23 @@
|
|
1
1
|
framework 'Foundation'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
end
|
3
|
+
# In the case of MacRuby, we extend NSURL to behave enough like a
|
4
|
+
# URI::HTTP object that they can be interchanged.
|
5
|
+
class NSURL
|
7
6
|
|
7
|
+
# We have to override, using {#alias_method} does not work because
|
8
|
+
# {#to_s} is defined in the base class.
|
9
|
+
# @return [String]
|
8
10
|
def to_s
|
9
|
-
|
11
|
+
absoluteString
|
10
12
|
end
|
13
|
+
|
11
14
|
end
|
12
15
|
|
16
|
+
|
13
17
|
# @todo get a parallel map method for collections
|
14
18
|
module JIRA
|
15
19
|
|
20
|
+
@url_class = NSURL
|
21
|
+
@url_init_method = :'URLWithString:'
|
22
|
+
|
16
23
|
end
|