summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2015-03-09 08:13:10 +0100
committerJochen Topf <jochen@topf.org>2015-03-09 08:13:10 +0100
commit3bbc13dc420a11fc92a61be52badec7971cda6e2 (patch)
tree0a59698cf41eaf212f163cc0c4b1b3cfb9c16206
parenta2ce2ec5448a98678cdaeb99b673e11ffcc8845f (diff)
downloadtaginfo-3bbc13dc420a11fc92a61be52badec7971cda6e2.tar
taginfo-3bbc13dc420a11fc92a61be52badec7971cda6e2.tar.gz
Remove superfluous semikolons at end of lines.
You know you have been programming in C++ for too long when...
-rwxr-xr-xsources/db/update_characters.rb14
-rwxr-xr-xsources/projects/import.rb4
-rwxr-xr-xsources/projects/parse.rb2
-rwxr-xr-xsources/wiki/get_wiki_data.rb6
4 files changed, 13 insertions, 13 deletions
diff --git a/sources/db/update_characters.rb b/sources/db/update_characters.rb
index 826e392..dbfc5cd 100755
--- a/sources/db/update_characters.rb
+++ b/sources/db/update_characters.rb
@@ -31,11 +31,11 @@ dir = ARGV[0] || '.'
db = SQLite3::Database.new(dir + '/taginfo-db.db')
db.results_as_hash = true
-db.execute("PRAGMA journal_mode = OFF");
-db.execute("PRAGMA synchronous = OFF");
-db.execute("PRAGMA count_changes = OFF");
-db.execute("PRAGMA temp_store = MEMORY;");
-db.execute("PRAGMA cache_size = 5000000;");
+db.execute("PRAGMA journal_mode = OFF")
+db.execute("PRAGMA synchronous = OFF")
+db.execute("PRAGMA count_changes = OFF")
+db.execute("PRAGMA temp_store = MEMORY")
+db.execute("PRAGMA cache_size = 5000000")
#------------------------------------------------------------------------------
@@ -45,7 +45,7 @@ regexes = [
[ 'letters', %r{^[\p{L}\p{M}]([\p{L}\p{M}\p{N}_:]*[\p{L}\p{M}\p{N}])?$}u ],
[ 'space', %r{[\s\p{Z}]}u ],
[ 'problem', %r{[=+/&<>;\@'"?%#\\,\p{C}]}u ]
-];
+]
keys = {}
db.execute("SELECT key FROM keys").map{ |row| row['key'] }.each do |key|
@@ -60,7 +60,7 @@ end
db.transaction do |db|
keys.each do |key, type|
- db.execute("UPDATE keys SET characters=? WHERE key=?", type, key);
+ db.execute("UPDATE keys SET characters=? WHERE key=?", type, key)
end
end
diff --git a/sources/projects/import.rb b/sources/projects/import.rb
index 5b1f0b4..d171244 100755
--- a/sources/projects/import.rb
+++ b/sources/projects/import.rb
@@ -71,7 +71,7 @@ projects.each do |id, url|
response.body,
(response.code == '200' ? 'OK' : 'FETCH ERROR'),
last_modified
- );
+ )
rescue
db.execute("INSERT INTO projects (id, json_url, fetch_date, fetch_status, status) VALUES (?, ?, ?, ?, ?)",
id,
@@ -79,7 +79,7 @@ projects.each do |id, url|
Time.now.utc.iso8601,
500,
'FETCH ERROR'
- );
+ )
end
end
diff --git a/sources/projects/parse.rb b/sources/projects/parse.rb
index f077a70..70f2d68 100755
--- a/sources/projects/parse.rb
+++ b/sources/projects/parse.rb
@@ -194,7 +194,7 @@ def parse_and_check(id, data, log, db)
on['way'],
on['relation'],
on['area'],
- );
+ )
end
end
end
diff --git a/sources/wiki/get_wiki_data.rb b/sources/wiki/get_wiki_data.rb
index 4d8029c..e219441 100755
--- a/sources/wiki/get_wiki_data.rb
+++ b/sources/wiki/get_wiki_data.rb
@@ -367,10 +367,10 @@ class Cache
puts "Page #{ page.title } in cache (#{ page.timestamp })"
return
end
- @db.execute("DELETE FROM cache.cache_pages WHERE title=?", page.title);
+ @db.execute("DELETE FROM cache.cache_pages WHERE title=?", page.title)
res = @api.get(page.params)
page.content = res.body
- @db.execute("INSERT INTO cache.cache_pages (title, timestamp, body) VALUES (?, ?, ?)", page.title, page.timestamp, page.content);
+ @db.execute("INSERT INTO cache.cache_pages (title, timestamp, body) VALUES (?, ?, ?)", page.title, page.timestamp, page.content)
puts "Page #{ page.title } not in cache (#{ page.timestamp })"
end
@@ -383,7 +383,7 @@ class Cache
to_delete = @current_pagetitles.keys
puts "Deleting pages from cache: #{ to_delete.join(' ') }"
to_delete.each do |title|
- @db.execute("DELETE FROM cache.cache_pages WHERE title=?", title);
+ @db.execute("DELETE FROM cache.cache_pages WHERE title=?", title)
end
end