[PATCH] Add a robots.txt file.

Adding a robots.txt file. Julien Goodwin (1): Add a robots.txt file. src/kimchi/config.py.in | 4 ++++ ui/Makefile.am | 4 ++++ ui/robots.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 ui/robots.txt -- 2.1.4

Add a static robots.txt file just prohibiting all crawlers. Signed-off-by: Julien Goodwin <jgoodwin@studio442.com.au> --- src/kimchi/config.py.in | 4 ++++ ui/Makefile.am | 4 ++++ ui/robots.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 ui/robots.txt diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in index 83a5dd0..f36cc32 100644 --- a/src/kimchi/config.py.in +++ b/src/kimchi/config.py.in @@ -245,6 +245,10 @@ class KimchiConfig(dict): 'tools.staticfile.on': True, 'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir + }, '/help': { 'tools.staticdir.on': True, 'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix, diff --git a/ui/Makefile.am b/ui/Makefile.am index 5192162..d541355 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -16,3 +16,7 @@ # limitations under the License. SUBDIRS = css images js libs pages spice-html5 + +uidir = $(datadir)/kimchi/ui + +dist_ui_DATA = robots.txt diff --git a/ui/robots.txt b/ui/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/ui/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / -- 2.1.4

Please, make sure to update the test cases The following test is failing after applying this patch: ====================================================================== FAIL: test_kimchi_config (test_config.ConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_config.py", line 192, in test_kimchi_config self.assertEquals(kimchi_config, configObj) On 16/01/2015 02:29, Julien Goodwin wrote:
Add a static robots.txt file just prohibiting all crawlers.
Signed-off-by: Julien Goodwin <jgoodwin@studio442.com.au> --- src/kimchi/config.py.in | 4 ++++ ui/Makefile.am | 4 ++++ ui/robots.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 ui/robots.txt
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in index 83a5dd0..f36cc32 100644 --- a/src/kimchi/config.py.in +++ b/src/kimchi/config.py.in @@ -245,6 +245,10 @@ class KimchiConfig(dict): 'tools.staticfile.on': True, 'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir + }, '/help': { 'tools.staticdir.on': True, 'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix, diff --git a/ui/Makefile.am b/ui/Makefile.am index 5192162..d541355 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -16,3 +16,7 @@ # limitations under the License.
SUBDIRS = css images js libs pages spice-html5 + +uidir = $(datadir)/kimchi/ui + +dist_ui_DATA = robots.txt diff --git a/ui/robots.txt b/ui/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/ui/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /

On 20/01/15 00:59, Aline Manera wrote:
Please, make sure to update the test cases
The following test is failing after applying this patch:
Tah, v2 being sent now to fix the test.
====================================================================== FAIL: test_kimchi_config (test_config.ConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_config.py", line 192, in test_kimchi_config self.assertEquals(kimchi_config, configObj)
On 16/01/2015 02:29, Julien Goodwin wrote:
Add a static robots.txt file just prohibiting all crawlers.
Signed-off-by: Julien Goodwin <jgoodwin@studio442.com.au> --- src/kimchi/config.py.in | 4 ++++ ui/Makefile.am | 4 ++++ ui/robots.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 ui/robots.txt
diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in index 83a5dd0..f36cc32 100644 --- a/src/kimchi/config.py.in +++ b/src/kimchi/config.py.in @@ -245,6 +245,10 @@ class KimchiConfig(dict): 'tools.staticfile.on': True, 'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir + }, '/help': { 'tools.staticdir.on': True, 'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix, diff --git a/ui/Makefile.am b/ui/Makefile.am index 5192162..d541355 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -16,3 +16,7 @@ # limitations under the License.
SUBDIRS = css images js libs pages spice-html5 + +uidir = $(datadir)/kimchi/ui + +dist_ui_DATA = robots.txt diff --git a/ui/robots.txt b/ui/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/ui/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /
-- Julien Goodwin Studio442 "Blue Sky Solutioneering"

Updated patch to also fix test_config. Julien Goodwin (2): Add a robots.txt file. Update config test to expect robots.txt.

Add a static robots.txt file just prohibiting all crawlers. Signed-off-by: Julien Goodwin <jgoodwin@studio442.com.au> --- src/kimchi/config.py.in | 4 ++++ ui/Makefile.am | 4 ++++ ui/robots.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 ui/robots.txt diff --git a/src/kimchi/config.py.in b/src/kimchi/config.py.in index 83a5dd0..f36cc32 100644 --- a/src/kimchi/config.py.in +++ b/src/kimchi/config.py.in @@ -245,6 +245,10 @@ class KimchiConfig(dict): 'tools.staticfile.on': True, 'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir + }, '/help': { 'tools.staticdir.on': True, 'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix, diff --git a/ui/Makefile.am b/ui/Makefile.am index 5192162..d541355 100644 --- a/ui/Makefile.am +++ b/ui/Makefile.am @@ -16,3 +16,7 @@ # limitations under the License. SUBDIRS = css images js libs pages spice-html5 + +uidir = $(datadir)/kimchi/ui + +dist_ui_DATA = robots.txt diff --git a/ui/robots.txt b/ui/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/ui/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / -- 2.1.4

--- tests/test_config.py.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_config.py.in b/tests/test_config.py.in index daf42b6..6990942 100644 --- a/tests/test_config.py.in +++ b/tests/test_config.py.in @@ -180,6 +180,10 @@ class ConfigTests(unittest.TestCase): 'tools.staticfile.filename': '%s/images/logo.ico' % paths.ui_dir }, + '/robots.txt': { + 'tools.staticfile.on': True, + 'tools.staticfile.filename': '%s/robots.txt' % paths.ui_dir + }, '/help': { 'tools.staticdir.on': True, 'tools.staticdir.dir': '%s/ui/pages/help' % paths.prefix, -- 2.1.4

Applied. Thanks. Regards, Aline Manera
participants (2)
-
Aline Manera
-
Julien Goodwin