Andy Allan
1f242978af
Prefer keyword arguments when method has optional boolean arguments
2020-11-12 11:24:44 +00:00
Andy Allan
da2277505f
Ensure that test utility methods are marked as private
...
This allows us to enable the check for test method names.
2020-10-28 11:49:01 +01:00
Tom Hughes
d6f518f627
More improvements to locale selection for the data browser
...
Use the browser language preferences for non-logged in users.
2020-06-07 19:10:48 +01:00
Tom Hughes
768a792a61
Improve selection of name to display in data browser
...
If the user is logged in then consider all their preferred
languages rather than just the UI language, and use the full
locale matching algorithm instead of just checking parents.
Fixes #2636
2020-06-04 17:33:11 +01:00
Tom Hughes
7a1615bc55
Fix rubocop-minitest warnings
2020-04-15 19:07:13 +01:00
Paul Dexter-Sobkowiak
74d2c4336b
Split browse_helper.rb into two modules due to rubocop ModuleLength
2018-11-28 18:18:14 +00:00
Paul Dexter-Sobkowiak
5ba64efd7c
Show tel: links for multiple phone numbers separated by ;
...
Closes #2069
2018-11-27 00:06:28 +00:00
David Abián
ed1f441ef3
Concept URIs for Wikidata entities
...
Wikidata entities should be linked using concept URIs, which are
permanent. This is the right way of linking web resources according
to the Linked Data principles.
Closes #1884
2018-05-28 13:02:47 +01:00
Štefan Baebler
36a382bb43
Added support for 2 more secondary wikidata tag links
...
Listed on in https://wiki.openstreetmap.org/wiki/Key:wikidata :
* name:etymology:wikidata
* network:wikidata
2018-03-05 08:38:50 +00:00
Tom Hughes
be86e4824f
Convert various URLs to https
2018-01-08 20:18:21 +00:00
Tom Hughes
b6b9d543ac
Fix rubocop warnings
2017-10-29 19:43:02 +00:00
Tom Hughes
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +01:00
Andy Allan
86822ea225
Remove remaining references to fixtures.
2017-06-01 11:00:50 +01:00
Andy Allan
17e9bcd2d4
Use factories for nodes in browse_helper tests.
2017-03-30 13:19:24 +01:00
Andy Allan
3026af170a
Replace fixtures with factory for node_tags
2016-10-30 18:28:01 +01:00
Andy Allan
acb7f44069
Replace fixtures with a factory for old_node_tags
...
Also includes a slight simplification of the old_node_tags tests.
2016-10-30 15:36:33 +01:00
Tom Hughes
224252fd83
Add test for formatting of multi-value wikidata links
2016-08-16 19:27:40 +01:00
Florian Schäfer
3251cdf5d6
Added fixes for rubocop complaints
2016-07-14 15:22:52 +02:00
Florian M. Schäfer
10cde3bb92
Link the prefixed wikidata-tags to wikidata.org
...
With this commit, the prefixed wikidata-tags get linked to the
corresponding wikidata.org-page in the current interface-language.
Multiple semicolon-separated wikidata-IDs are shown as multiple
semicolon-separated links to wikidata.
This commit contains also some tests for those links.
2016-07-14 15:22:52 +02:00
Simon Legner
6f144e8b7d
Show ref of object when no name is present
2016-03-09 18:47:54 +00:00
Tom Hughes
ca213b873f
More improvements to mediawiki fragment escaping
...
It turns out that the PHP urlencode encodes more characters than
the ruby URI.encode does by default, so specify our own characters
to encode based on http://php.net/manual/en/function.urlencode.php
with the extra exclusion of colon, which the mediawiki code reverses
after the encoding is done.
Fixes #967
2015-05-15 15:34:12 +01:00
Tom Hughes
b40353b9b0
Escape fragment identifiers in wikipedia URLs
...
Fixes #967
2015-05-14 20:34:25 +01:00
Tom Hughes
f04211b172
Improve test coverage
2015-02-27 00:40:37 +00:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
25337c0b04
Use assert_dom_equal to compare HTML text
2015-01-10 15:59:09 +00:00
Tom Hughes
3058135d9a
Update to rails 4.1.9
2015-01-08 10:06:22 +00:00
Tom Hughes
c53db246f6
Merge branch 'rails41'
2014-07-21 08:53:44 +01:00
Florian M. Schäfer
212e7153d8
Added tests for wikidata links in the browse helper
2014-07-20 15:03:28 +01:00
Tom Hughes
b13018cc96
Make sure we restore I18n.locale when tests complete
2014-07-04 19:24:25 +01:00
Štefan Baebler
75e07dc5b8
Added telephone links into tag detail browser
...
International phone numbers become links using the official URI scheme
as per http://tools.ietf.org/html/rfc3966 .
It is not limited to key=phone, so it can be used in other keys as well.
2014-06-15 09:31:04 +01:00
Tom Hughes
85e61568da
Try harder to find a name in the right language
2014-05-24 12:52:09 +01:00
Tom Hughes
e010a326a8
Wrap the ID in <bdi> tags for RTL locales
2014-05-19 00:29:08 +01:00
Tom Hughes
5da273027f
Isolate object names from the database with a <bdi> tag
...
Fixes #743
2014-05-18 17:24:38 +01:00
Tom Hughes
0de7fdb4df
Add more tests for BrowseHelper
2014-03-01 16:02:06 +00:00
Tom Hughes
109dcfff19
Add tests for BrowseHelper#wikipedia_link
2014-03-01 00:25:33 +00:00