incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [8/9] git commit: [#7208] ticket:556 Populate name and dc:title with proper names
Date Wed, 12 Mar 2014 20:48:06 GMT
[#7208] ticket:556 Populate name and dc:title with proper names


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2fcf7ee6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2fcf7ee6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2fcf7ee6

Branch: refs/heads/master
Commit: 2fcf7ee64f34fd95c02980c94e1718c876e25a04
Parents: 42bb8c0
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Mar 10 20:19:03 2014 +0200
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Mar 12 20:47:55 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py              | 4 ++--
 Allura/allura/tests/functional/test_rest.py | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2fcf7ee6/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index c7f0ee0..b2a6dff 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -999,8 +999,8 @@ class Project(MappedClass, ActivityNode, ActivityObject):
             'rdf:about': "http://sourceforge.net/api/project/name/vivo/doap#",
         })
         # Basic fields
-        ET.SubElement(project, 'name').text = self.name
-        ET.SubElement(project, 'sf:shortname').text = self.shortname
+        ET.SubElement(project, 'name').text = self.shortname
+        ET.SubElement(project, 'dc:title').text = self.name
         ET.SubElement(project, 'sf:id').text = str(self._id)
         ET.SubElement(project, 'sf:private').text = self.private
         ET.SubElement(project, 'shortdesc', {'xml:lang': 'en'}).text = self.short_description

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2fcf7ee6/Allura/allura/tests/functional/test_rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_rest.py b/Allura/allura/tests/functional/test_rest.py
index 52d33ea..4bd53cf 100644
--- a/Allura/allura/tests/functional/test_rest.py
+++ b/Allura/allura/tests/functional/test_rest.py
@@ -231,13 +231,14 @@ class TestDoap(TestRestApiBase):
     ns = '{http://usefulinc.com/ns/doap#}'
     ns_sf = '{http://sourceforge.net/api/sfelements.rdf#}'
     foaf = '{http://xmlns.com/foaf/0.1/}'
+    dc = '{http://dublincore.org/documents/dcmi-namespace/}'
 
     def test_project_data(self):
         r = self.app.get('/rest/p/test?doap')
         assert_equal(r.content_type, 'application/rdf+xml')
         p = r.xml.find(self.ns + 'Project')
-        assert_equal(p.find(self.ns + 'name').text, 'Test Project')
-        assert_equal(p.find(self.ns_sf + 'shortname').text, 'test')
+        assert_equal(p.find(self.ns + 'name').text, 'test')
+        assert_equal(p.find(self.dc + 'title').text, 'Test Project')
         assert p.find(self.ns_sf + 'id') is not None
 
         maintainers = p.findall(self.ns + 'maintainer')


Mime
View raw message