Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorChristian Raue <christian.raue@gmail.com>2014-07-23 22:27:56 +0400
committerChristian Raue <christian.raue@gmail.com>2014-07-23 22:27:56 +0400
commitd9adcfe6169c6c10059a670f2ed984908eb4e105 (patch)
tree25cfca25851214c1b744a07e67e9c120adfd7513 /misc
parent2788e1dad22533f3e0dbddbdd16c51251c4e130a (diff)
removed lots of trailing whitespace
Diffstat (limited to 'misc')
-rw-r--r--misc/log-analytics/README.md2
-rwxr-xr-xmisc/log-analytics/import_logs.py12
-rw-r--r--misc/log-analytics/tests/tests.py38
-rw-r--r--misc/others/ExamplePiwikTracker.php2
-rw-r--r--misc/others/api_rest_call.php2
-rw-r--r--misc/others/phpstorm-codestyles/README.md2
-rw-r--r--misc/others/uninstall-delete-piwik-directory.php2
-rw-r--r--misc/package/WebAppGallery/parameters.xml14
-rw-r--r--misc/proxy-hide-piwik-url/README.md2
9 files changed, 38 insertions, 38 deletions
diff --git a/misc/log-analytics/README.md b/misc/log-analytics/README.md
index 880133730b..fe7c963fa2 100644
--- a/misc/log-analytics/README.md
+++ b/misc/log-analytics/README.md
@@ -205,7 +205,7 @@ You can use any log format that this script can handle, like Apache Combined, an
### Setup Nginx logs
```
-http {
+http {
...
log_format piwik '{"ip": "$remote_addr",'
'"host": "$host",'
diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py
index f986e580b4..90366304be 100755
--- a/misc/log-analytics/import_logs.py
+++ b/misc/log-analytics/import_logs.py
@@ -140,7 +140,7 @@ class JsonFormat(BaseFormat):
super(JsonFormat, self).__init__(name)
self.json = None
self.date_format = '%Y-%m-%dT%H:%M:%S'
-
+
def check_format_line(self, line):
try:
self.json = json.loads(line)
@@ -160,7 +160,7 @@ class JsonFormat(BaseFormat):
# Some ugly patchs ...
if key == 'generation_time_milli':
self.json[key] = int(self.json[key] * 1000)
- # Patch date format ISO 8601
+ # Patch date format ISO 8601
elif key == 'date':
tz = self.json[key][19:]
self.json['timezone'] = tz.replace(':', '')
@@ -170,7 +170,7 @@ class JsonFormat(BaseFormat):
return self.json[key]
except KeyError:
raise BaseFormatException()
-
+
def get_all(self,):
return self.json
@@ -201,7 +201,7 @@ class RegexFormat(BaseFormat):
def get_all(self,):
return self.matched.groupdict()
-
+
@@ -1503,12 +1503,12 @@ class Parser(object):
if format_groups < match_groups:
format = candidate_format
format_groups = match_groups
- except AttributeError:
+ except AttributeError:
format = candidate_format
else:
logging.debug('Format %s does not match', name)
-
+
return format
@staticmethod
diff --git a/misc/log-analytics/tests/tests.py b/misc/log-analytics/tests/tests.py
index 5499a509bd..5d42e51797 100644
--- a/misc/log-analytics/tests/tests.py
+++ b/misc/log-analytics/tests/tests.py
@@ -9,11 +9,11 @@ def add_junk_to_file(path):
file = open(path)
contents = file.read()
file.close()
-
+
file = open('tmp.log', 'w')
file.write(contents + ' junk')
file.close()
-
+
return 'tmp.log'
def tearDownModule():
@@ -26,10 +26,10 @@ def test_format_detection():
format = import_logs.Parser.detect_format(file)
assert(format is not None)
assert(format.name == format_name)
-
+
def _test_junk(format_name):
tmp_path = add_junk_to_file('logs/%s.log' % format_name)
-
+
file = open(tmp_path)
format = import_logs.Parser.detect_format(file)
assert(format is not None)
@@ -39,7 +39,7 @@ def test_format_detection():
f = functools.partial(_test, format_name)
f.description = 'Testing autodetection of format ' + format_name
yield f
-
+
f = functools.partial(_test_junk, format_name)
f.description = 'Testing autodetection of format ' + format_name + ' w/ garbage at end of line'
yield f
@@ -81,7 +81,7 @@ class Resolver(object):
class Recorder(object):
"""Mock recorder which collects hits but doesn't put their in database."""
recorders = []
-
+
@classmethod
def add_hits(cls, hits):
cls.recorders.extend(hits)
@@ -89,7 +89,7 @@ class Recorder(object):
def test_replay_tracking_arguments():
"""Test data parsing from sample log file."""
file_ = 'logs/logs_to_tests.log'
-
+
import_logs.stats = import_logs.Statistics()
import_logs.config = Config()
import_logs.resolver = Resolver()
@@ -185,11 +185,11 @@ def test_replay_tracking_arguments():
def parse_log_file_line(format_name, file_):
format = import_logs.FORMATS[format_name]
-
+
file = open(file_)
match = format.check_format(file)
file.close()
-
+
return format.get_all()
# check parsing groups
@@ -203,18 +203,18 @@ def check_common_groups(groups):
def check_ncsa_extended_groups(groups):
check_common_groups(groups)
-
+
assert groups['referrer'] == '-'
assert groups['user_agent'] == 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11'
def check_common_vhost_groups(groups):
check_common_groups(groups)
-
+
assert groups['host'] == 'www.example.com'
def check_common_complete_groups(groups):
check_ncsa_extended_groups(groups)
-
+
assert groups['host'] == 'www.example.com'
def check_iis_groups(groups):
@@ -227,12 +227,12 @@ def check_iis_groups(groups):
assert groups['status'] == '200'
assert groups['length'] == '27028'
assert groups['host'] == 'example.com'
-
+
expected_hit_properties = ['date', 'path', 'query_string', 'ip', 'referrer', 'user_agent',
'status', 'length', 'host']
for property_name in groups.keys():
assert property_name in expected_hit_properties
-
+
def check_s3_groups(groups):
assert groups['host'] == 'www.example.com'
assert groups['date'] == '10/Feb/2012:16:42:07'
@@ -261,28 +261,28 @@ def check_match_groups(format_name, groups):
symbols = globals()
check_function = symbols['check_' + format_name + '_groups']
return check_function(groups)
-
+
# parsing tests
def test_format_parsing():
# test format regex parses correctly
def _test(format_name, path):
groups = parse_log_file_line(format_name, path)
check_match_groups(format_name, groups)
-
+
# test format regex parses correctly when there's added junk at the end of the line
def _test_with_junk(format_name, path):
tmp_path = add_junk_to_file(path)
_test(format_name, tmp_path)
-
+
for format_name in import_logs.FORMATS.iterkeys():
f = functools.partial(_test, format_name, 'logs/' + format_name + '.log')
f.description = 'Testing parsing of format "%s"' % format_name
yield f
-
+
f = functools.partial(_test_with_junk, format_name, 'logs/' + format_name + '.log')
f.description = 'Testing parsin of format "%s" with junk appended to path' % format_name
yield f
-
+
f = functools.partial(_test, 'common', 'logs/ncsa_extended.log')
f.description = 'Testing parsing of format "common" with ncsa_extended log'
yield f
diff --git a/misc/others/ExamplePiwikTracker.php b/misc/others/ExamplePiwikTracker.php
index f787a0847a..5daa2d7701 100644
--- a/misc/others/ExamplePiwikTracker.php
+++ b/misc/others/ExamplePiwikTracker.php
@@ -5,7 +5,7 @@ require_once '../../libs/PiwikTracker/PiwikTracker.php';
PiwikTracker::$URL = 'http://localhost/trunk/';
$piwikTracker = new PiwikTracker($idSite = 1);
-// You can manually set the Visitor details (resolution, time, plugins)
+// You can manually set the Visitor details (resolution, time, plugins)
// See all other ->set* functions available in the PiwikTracker class
$piwikTracker->setResolution(1600, 1400);
diff --git a/misc/others/api_rest_call.php b/misc/others/api_rest_call.php
index d158454e24..c85d5c193e 100644
--- a/misc/others/api_rest_call.php
+++ b/misc/others/api_rest_call.php
@@ -1,7 +1,7 @@
<?php
exit; // REMOVE this line to run the script
-// this token is used to authenticate your API request.
+// this token is used to authenticate your API request.
// You can get the token on the API page inside your Piwik interface
$token_auth = 'anonymous';
diff --git a/misc/others/phpstorm-codestyles/README.md b/misc/others/phpstorm-codestyles/README.md
index 5f910b0a5d..ce4f8e94bb 100644
--- a/misc/others/phpstorm-codestyles/README.md
+++ b/misc/others/phpstorm-codestyles/README.md
@@ -4,7 +4,7 @@ Piwik uses PSR coding standard for php source code. We use a slightly customized
(because the default PSR style in Phpstorm results in some unwanted changes).
Steps:
- * Use latest Phpstorm
+ * Use latest Phpstorm
* Copy this Piwik_codestyle.xml file in your ~/.WebIde60/config/codestyles/
* If you use Windows or Mac see which path to copy at: http://intellij-support.jetbrains.com/entries/23358108
* To automatically link to the file in Piwik:
diff --git a/misc/others/uninstall-delete-piwik-directory.php b/misc/others/uninstall-delete-piwik-directory.php
index e05f70259c..97030daa48 100644
--- a/misc/others/uninstall-delete-piwik-directory.php
+++ b/misc/others/uninstall-delete-piwik-directory.php
@@ -5,7 +5,7 @@
// For example if the piwik/ folder is at http://your-site/piwik/ you put the file in http://your-site/uninstall-delete-piwik-directory.php
// 3) Go with your browser to http://your-site/uninstall-delete-piwik-directory.php
// 4) The folder http://your-site/piwik/ should now be deleted!
-// We hope you enjoyed Piwik. If you have any feedback why you stopped using Piwik,
+// We hope you enjoyed Piwik. If you have any feedback why you stopped using Piwik,
// please let us know at hello@piwik.org - we are interested by your experience
function unlinkRecursive($dir)
{
diff --git a/misc/package/WebAppGallery/parameters.xml b/misc/package/WebAppGallery/parameters.xml
index 692cd832b7..14498146ce 100644
--- a/misc/package/WebAppGallery/parameters.xml
+++ b/misc/package/WebAppGallery/parameters.xml
@@ -44,10 +44,10 @@
<parameterEntry
type="TextFile"
scope="config\\config.ini.php"
- match="host\s*=\s*&quot;([^&quot;]*)&quot;"
+ match="host\s*=\s*&quot;([^&quot;]*)&quot;"
/>
</parameter>
-
+
<!-- Database name -->
<parameter
name="DbName"
@@ -71,7 +71,7 @@
<parameterEntry
type="TextFile"
scope="config\\config.ini.php"
- match="dbname\s*=\s*&quot;([^&quot;]*)&quot;"
+ match="dbname\s*=\s*&quot;([^&quot;]*)&quot;"
/>
</parameter>
@@ -98,7 +98,7 @@
<parameterEntry
type="TextFile"
scope="config\\config.ini.php"
- match="username\s*=\s*&quot;([^&quot;]*)&quot;"
+ match="username\s*=\s*&quot;([^&quot;]*)&quot;"
/>
</parameter>
@@ -127,7 +127,7 @@
match="password\s*=\s*&quot;([^&quot;]{6,20})&quot;"
/>
</parameter>
-
+
<!-- Database admin user name -->
<parameter
name="DbAdminUsername"
@@ -142,7 +142,7 @@
description="Password for the database administrator account. Required for site security. This may be predefined by your hosting provider."
tags="Password,MySQL,DbAdminPassword">
</parameter>
-
+
<!-- Execute install.sql -->
<parameter
name="Connection String"
@@ -164,7 +164,7 @@
<parameterEntry
type="TextFile"
scope="config\\config.ini.php"
- match="adapter\s*=\s*[^\r\n]*"
+ match="adapter\s*=\s*[^\r\n]*"
/>
</parameter>
</parameters>
diff --git a/misc/proxy-hide-piwik-url/README.md b/misc/proxy-hide-piwik-url/README.md
index 016bbe1536..a5344beda3 100644
--- a/misc/proxy-hide-piwik-url/README.md
+++ b/misc/proxy-hide-piwik-url/README.md
@@ -1,7 +1,7 @@
## Piwik Proxy Hide URL
This script allows to track statistics using Piwik, without revealing the
Piwik Server URL. This is useful for users who track multiple websites
-on the same Piwik server, but don't want to show the Piwik server URL in
+on the same Piwik server, but don't want to show the Piwik server URL in
the source code of all tracked websites.
### Requirements