incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [18/44] git commit: [#6534] ticket:443 Rename option
Date Fri, 04 Oct 2013 14:43:06 GMT
[#6534] ticket:443 Rename option


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

Branch: refs/heads/master
Commit: 1ed6fcc82c885de958fa00c9b8ce7aa804a4dc59
Parents: e395f38
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Thu Sep 19 13:08:35 2013 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Oct 4 14:21:21 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/github/templates/wiki/index.html | 2 +-
 ForgeImporters/forgeimporters/github/tests/test_wiki.py        | 6 +++---
 ForgeImporters/forgeimporters/github/wiki.py                   | 4 ++--
 .../forgeimporters/tests/github/functional/test_github.py      | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1ed6fcc8/ForgeImporters/forgeimporters/github/templates/wiki/index.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/templates/wiki/index.html b/ForgeImporters/forgeimporters/github/templates/wiki/index.html
index dfac2e1..b372c49 100644
--- a/ForgeImporters/forgeimporters/github/templates/wiki/index.html
+++ b/ForgeImporters/forgeimporters/github/templates/wiki/index.html
@@ -35,7 +35,7 @@
 </div>
 <div>
   <label for="import_history">Import wiki history</label>
-  <input id="import_history" name="tool_option" value="history_github_wiki" type="checkbox"
{% if c.form_values['tool_option'] == 'history_github_wiki'  %} checked="checked"{% endif
%}/>
+  <input id="import_history" name="tool_option" value="import_history" type="checkbox"
{% if c.form_values['tool_option'] == 'import_history'  %} checked="checked"{% endif %}/>
   {{ error('tool_option') }}
 </div>
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1ed6fcc8/ForgeImporters/forgeimporters/github/tests/test_wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/tests/test_wiki.py b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
index 83bc58a..68b3bad 100644
--- a/ForgeImporters/forgeimporters/github/tests/test_wiki.py
+++ b/ForgeImporters/forgeimporters/github/tests/test_wiki.py
@@ -134,7 +134,7 @@ class TestGitHubWikiImportController(TestController, TestCase):
         self.assertIsNotNone(r.html.find(attrs=dict(name='gh_project_name')))
         self.assertIsNotNone(r.html.find(attrs=dict(name='mount_label')))
         self.assertIsNotNone(r.html.find(attrs=dict(name='mount_point')))
-        self.assertIsNotNone(r.html.find(attrs=dict(name='tool_option', value='history_github_wiki')))
+        self.assertIsNotNone(r.html.find(attrs=dict(name='tool_option', value='import_history')))
 
     @with_wiki
     @patch('forgeimporters.github.wiki.import_tool')
@@ -144,7 +144,7 @@ class TestGitHubWikiImportController(TestController, TestCase):
             gh_project_name='mulder',
             mount_point='gh-wiki',
             mount_label='GitHub Wiki',
-            tool_option='history_github_wiki')
+            tool_option='import_history')
         r = self.app.post(self.url + 'create', params, status=302)
         self.assertEqual(r.location, 'http://localhost/p/%s/admin/' % test_project_with_wiki)
         args = import_tool.post.call_args[1]
@@ -152,7 +152,7 @@ class TestGitHubWikiImportController(TestController, TestCase):
         self.assertEqual(u'gh-wiki', args['mount_point'])
         self.assertEqual(u'mulder', args['project_name'])
         self.assertEqual(u'spooky', args['user_name'])
-        self.assertEqual(u'history_github_wiki', args['tool_option'])
+        self.assertEqual(u'import_history', args['tool_option'])
 
         # without history
         params.pop('tool_option')

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1ed6fcc8/ForgeImporters/forgeimporters/github/wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/wiki.py b/ForgeImporters/forgeimporters/github/wiki.py
index 319b253..cabe145 100644
--- a/ForgeImporters/forgeimporters/github/wiki.py
+++ b/ForgeImporters/forgeimporters/github/wiki.py
@@ -112,7 +112,7 @@ class GitHubWikiImporter(ToolImporter):
     source = 'GitHub'
     tool_label = 'Wiki'
     tool_description = 'Import your wiki from GitHub'
-    tool_option = {"history_github_wiki": "Import history"}
+    tool_option = {"import_history": "Import history"}
     # List of supported formats https://github.com/gollum/gollum/wiki#page-files
     supported_formats = [
             'asciidoc',
@@ -148,7 +148,7 @@ class GitHubWikiImporter(ToolImporter):
             "Wiki",
             mount_point=mount_point or 'wiki',
             mount_label=mount_label or 'Wiki')
-        with_history = tool_option == 'history_github_wiki'
+        with_history = tool_option == 'import_history'
         ThreadLocalORMSession.flush_all()
         try:
             M.session.artifact_orm_session._get().skip_mod_date = True

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1ed6fcc8/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
index f2f93df..afc9bd0 100644
--- a/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
+++ b/ForgeImporters/forgeimporters/tests/github/functional/test_github.py
@@ -26,7 +26,7 @@ class TestGitHubImportController(TestController, TestCase):
         assert '<input id="user_name" name="user_name" value="" autofocus/>' in r
         assert '<input id="project_name" name="project_name" value="" />' in r
         assert '<input id="project_shortname" name="project_shortname" value=""/>'
in r
-        assert '<input name="tool_option" value="history_github_wiki" type="checkbox"
checked="checked"/>' in r, r
+        assert '<input name="tool_option" value="import_history" type="checkbox" checked="checked"/>'
in r
 
     def test_login_overlay(self):
         r = self.app.get('/p/import_project/github/', extra_environ=dict(username='*anonymous'))


Mime
View raw message