Permalink
Browse files

chg: Path of IssuePriority and TimeEntryActivity

  • Loading branch information...
1 parent 742fe85 commit e2db9098fc7be9686756ee73fc90a35848906f2a Sven Krzyzak committed May 17, 2010
View
2 .../mylyn_connector/priorities_controller.rb → ..._connector/issue_priorities_controller.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../../../lib/mylyn_connector'
-class MylynConnector::PrioritiesController < ApplicationController
+class MylynConnector::IssuePrioritiesController < ApplicationController
unloadable
include MylynConnector::Rescue::ClassMethods
include MylynConnector::Version::ClassMethods
View
2 .../mylyn_connector/activities_controller.rb → ...ector/time_entry_activities_controller.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../../../lib/mylyn_connector'
-class MylynConnector::ActivitiesController < ApplicationController
+class MylynConnector::TimeEntryActivitiesController < ApplicationController
unloadable
include MylynConnector::Rescue::ClassMethods
include MylynConnector::Version::ClassMethods
View
4 ...ylyn_connector/priorities/all.xml.builder → ...onnector/issue_priorities/all.xml.builder
@@ -1,7 +1,7 @@
xml.instruct! :xml, :encoding => "UTF-8"
-xml.priorities :xmlns => 'http://redmin-mylyncon.sf.net/api', :api=>api_version do
+xml.issuePriorities :xmlns => 'http://redmin-mylyncon.sf.net/api', :api=>api_version do
@priorities.each do |priority|
- xml.priority :id => priority.id do
+ xml.issuePriority :id => priority.id do
xml.name priority.name
xml.position priority.position
xml.default priority.is_default
View
4 ...ylyn_connector/activities/all.xml.builder → ...tor/time_entry_activities/all.xml.builder
@@ -1,7 +1,7 @@
xml.instruct! :xml, :encoding => "UTF-8"
-xml.activities :xmlns => 'http://redmin-mylyncon.sf.net/api', :api=>api_version do
+xml.timeEntryActivities :xmlns => 'http://redmin-mylyncon.sf.net/api', :api=>api_version do
@activities.each do |activity|
- xml.activity :id => activity.id do
+ xml.timeEntryActivity :id => activity.id do
xml.name activity.name
xml.position activity.position
xml.default activity.is_default
View
24 config/routes.rb
@@ -1,18 +1,24 @@
ActionController::Routing::Routes.draw do |map|
+ #meta / settings
map.connect "mylyn/settings", :controller => "MylynConnector::Settings", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/issue/:id", :controller => "MylynConnector::Issues", :action => "show", :conditions => {:method => :get}
- map.connect "mylyn/projects", :controller => "MylynConnector::Projects", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/priorities", :controller => "MylynConnector::Priorities", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/trackers", :controller => "MylynConnector::Trackers", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/version", :controller => "MylynConnector::Information", :action => "version", :conditions => {:method => :get}
+
+ #attributes
+ map.connect "mylyn/customfields", :controller => "MylynConnector::CustomFields", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/issuecategories", :controller => "MylynConnector::IssueCategories", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/issuepriorities", :controller => "MylynConnector::IssuePriorities", :action => "all", :conditions => {:method => :get}
map.connect "mylyn/versions", :controller => "MylynConnector::Versions", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/users", :controller => "MylynConnector::Users", :action => "all", :conditions => {:method => :get}
map.connect "mylyn/queries", :controller => "MylynConnector::Queries", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/activities", :controller => "MylynConnector::Activities", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/users", :controller => "MylynConnector::Users", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/timeentryactivities", :controller => "MylynConnector::TimeEntryActivities", :action => "all", :conditions => {:method => :get}
+ map.connect "mylyn/trackers", :controller => "MylynConnector::Trackers", :action => "all", :conditions => {:method => :get}
map.connect "mylyn/issuestatus", :controller => "MylynConnector::IssueStatus", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/issuecategories", :controller => "MylynConnector::IssueCategories", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/customfields", :controller => "MylynConnector::CustomFields", :action => "all", :conditions => {:method => :get}
- map.connect "mylyn/version", :controller => "MylynConnector::Information", :action => "version", :conditions => {:method => :get}
+
+ #projects
+ map.connect "mylyn/projects", :controller => "MylynConnector::Projects", :action => "all", :conditions => {:method => :get}
+
map.connect "mylyn/:project_id/search", :controller => "MylynConnector::Issues", :action => "query"
map.connect "mylyn/search", :controller => "MylynConnector::Issues", :action => "query"
map.connect "mylyn/:project_id/updatedsince", :controller => "MylynConnector::Issues", :action => "updated_since"
+ map.connect "mylyn/issue/:id", :controller => "MylynConnector::Issues", :action => "show", :conditions => {:method => :get}
end
View
4 test/functional/all_functional_test.rb
@@ -1,16 +1,16 @@
$:.unshift File.dirname(__FILE__)
require 'test/unit'
-require 'activities_controller_test'
require 'custom_fields_controller_test'
require 'information_controller_test'
require 'issue_categories_controller_test'
+require 'issue_priorities_controller_test'
require 'issue_status_controller_test'
#require 'issues_controller_test'
-require 'priorities_controller_test'
require 'projects_controller_test'
require 'queries_controller_test'
require 'settings_controller_test'
+require 'time_entry_activities_controller_test'
require 'trackers_controller_test'
require 'users_controller_test'
require 'versions_controller_test'
View
11 .../functional/priorities_controller_test.rb → ...ional/issue_priorities_controller_test.rb
@@ -5,7 +5,7 @@ class MylynConnector::PrioritiesControllerTest < MylynConnector::ControllerTest
def setup
super
- @controller = MylynConnector::PrioritiesController.new
+ @controller = MylynConnector::IssuePrioritiesController.new
end
def test_all
@@ -16,10 +16,11 @@ def test_all
xmldoc = XML::Document.string @response.body
schema = read_schema 'issuePriorities'
valid = xmldoc.validate_schema schema
- assert valid , 'Ergebnis passt nicht zum Schema ' + 'priorities'
+ assert valid , 'Ergebnis passt nicht zum Schema ' + 'issuePriorities'
- pris = {:tag => 'priorities', :children => {:count => 5}, :attributes => {:api => /^2.7.0/}}
- pri = {:tag => 'priority', :attributes => {:id => 7}, :parent => pris}
+ pris = {:tag => 'issuepriorities', :children => {:count => 5}, :attributes => {:api => /^2.7.0/}}
+ pri = {:tag => 'issuepriority', :attributes => {:id => 7}, :parent => pris}
+ assert_tag pris
assert_tag :tag => 'name', :content => 'Urgent', :parent => pri
assert_tag :tag => 'position', :content => '4', :parent => pri
assert_tag :tag => 'default', :content => 'false', :parent => pri
@@ -36,6 +37,6 @@ def test_all_empty_is_valid
valid = xmldoc.validate_schema schema
assert valid , 'Ergebnis passt nicht zum Schema ' + 'priorities'
- assert_tag :tag => 'priorities', :children => {:count => 0}, :attributes => {:api => /^2.7.0/}
+ assert_tag :tag => 'issuepriorities', :children => {:count => 0}, :attributes => {:api => /^2.7.0/}
end
end
View
8 .../functional/activities_controller_test.rb → .../time_entry_activities_controller_test.rb
@@ -5,7 +5,7 @@ class MylynConnector::ActivitiesControllerTest < MylynConnector::ControllerTest
def setup
super
- @controller = MylynConnector::ActivitiesController.new
+ @controller = MylynConnector::TimeEntryActivitiesController.new
end
def test_all
@@ -16,10 +16,10 @@ def test_all
xmldoc = XML::Document.string @response.body
schema = read_schema 'timeEntryActivities'
valid = xmldoc.validate_schema schema
- assert valid , 'Ergebnis passt nicht zum Schema ' + 'activities'
+ assert valid , 'Ergebnis passt nicht zum Schema ' + 'timeEntryActivities'
- acts = {:tag => 'activities', :children => {:count => 3}, :attributes => {:api => /^2.7.0/}}
- act = {:tag => 'activity', :attributes => {:id => 10}, :parent => acts}
+ acts = {:tag => 'timeentryactivities', :children => {:count => 3}, :attributes => {:api => /^2.7.0/}}
+ act = {:tag => 'timeentryactivity', :attributes => {:id => 10}, :parent => acts}
assert_tag :tag => 'name', :content => 'Development', :parent => act
assert_tag :tag => 'position', :content => '2', :parent => act
assert_tag :tag => 'default', :content => 'true', :parent => act
View
4 test/schema/issuePriorities.xsd
@@ -7,10 +7,10 @@
<xsd:include schemaLocation="types/issuePriority.xsd" />
<xsd:include schemaLocation="types/versionstring.xsd" />
- <xsd:element name="priorities" xmlns="http://redmin-mylyncon.sf.net/api">
+ <xsd:element name="issuePriorities" xmlns="http://redmin-mylyncon.sf.net/api">
<xsd:complexType>
<xsd:sequence >
- <xsd:element name="priority" type="tns:priority" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="issuePriority" type="tns:issuePriority" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="api" type="tns:versionstring" use="required" />
</xsd:complexType>
View
4 test/schema/timeEntryActivities.xsd
@@ -7,10 +7,10 @@
<xsd:include schemaLocation="types/timeEntryActivity.xsd" />
<xsd:include schemaLocation="types/versionstring.xsd" />
- <xsd:element name="activities" xmlns="http://redmin-mylyncon.sf.net/api">
+ <xsd:element name="timeEntryActivities" xmlns="http://redmin-mylyncon.sf.net/api">
<xsd:complexType>
<xsd:sequence >
- <xsd:element name="activity" type="tns:activity" minOccurs="0" maxOccurs="unbounded" />
+ <xsd:element name="timeEntryActivity" type="tns:timeEntryActivity" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="api" type="tns:versionstring" use="required" />
</xsd:complexType>
View
2 test/schema/types/issuePriority.xsd
@@ -7,7 +7,7 @@
<xsd:include schemaLocation="property.xsd" />
- <xsd:complexType name="priority">
+ <xsd:complexType name="issuePriority">
<xsd:complexContent>
<xsd:extension base="tns:sortedProperty">
<xsd:sequence>
View
2 test/schema/types/timeEntryActivity.xsd
@@ -7,7 +7,7 @@
<xsd:include schemaLocation="property.xsd" />
- <xsd:complexType name="activity">
+ <xsd:complexType name="timeEntryActivity">
<xsd:complexContent>
<xsd:extension base="tns:sortedProperty">
<xsd:sequence>

0 comments on commit e2db909

Please sign in to comment.