forked from klauern/mantisrb
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I have no tests for most of this, but since most of them are queries or require very little in the way of manipulating data, it's pretty easy to think that any issues I'll encounter will be because i misstyped something or because MantisConnect doesn't work. A third option is the user fat-fingered or just didn't know what to put in to a field, which I can't help with, yet.
- Loading branch information
Showing
5 changed files
with
188 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module Mantis::XSD | ||
|
||
class ProjectAttachmentData | ||
|
||
include Mantis::XSD::DocBuilder | ||
|
||
attr_accessor :id, :filename, :title, :description, :size, | ||
:content_type, :date_submitted, :download_url, :user_id | ||
|
||
|
||
# Creates a Nokogiri::XML::Element object out of this class | ||
def to_doc(tag_filename) | ||
builder = Nokogiri::XML::Builder.new { |xml| | ||
xml.send(tag_filename, type: "tns:ProjectAttachmentData") do | ||
xml.id_ @id unless @id == nil | ||
xml.filename @name unless @name == nil | ||
xml.title @project_id unless @project_id == nil | ||
xml.description @description unless @description == nil | ||
xml.size @description unless @description == nil | ||
xml.content_type @description unless @description == nil | ||
xml.date_submitted @description unless @description == nil | ||
xml.download_url @description unless @description == nil | ||
xml.user_id @description unless @description == nil | ||
end | ||
} | ||
builder.doc | ||
end # to_doc | ||
end # ProjectData | ||
end # Mantis::XSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Mantis::XSD | ||
|
||
class ProjectVersionData | ||
|
||
include Mantis::XSD::DocBuilder | ||
|
||
attr_accessor :id, :name, :project_id, :date_order, :description, | ||
:released, :obsolete | ||
|
||
|
||
# Creates a Nokogiri::XML::Element object out of this class | ||
def to_doc(tag_name) | ||
builder = Nokogiri::XML::Builder.new { |xml| | ||
xml.send(tag_name, type: "tns:ProjectVersionData") do | ||
xml.id_ @id unless @id == nil | ||
xml.name @name unless @name == nil | ||
xml.project_id @project_id unless @project_id == nil | ||
xml.date_order @date_order unless @date_order == nil | ||
xml.description @description unless @description == nil | ||
xml.released @released unless @released == nil | ||
xml.obsolete @obsolete unless @obsolete == nil | ||
end | ||
} | ||
builder.doc | ||
end # to_doc | ||
end # ProjectData | ||
end # Mantis::XSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters