# This configuration was generated by `rubocop --auto-gen-config`
-# on 2015-04-14 09:29:11 +0100 using RuboCop version 0.30.0.
+# on 2015-06-08 15:55:30 +0100 using RuboCop version 0.32.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Lint/AmbiguousOperator:
Enabled: false
-# Offense count: 125
+# Offense count: 115
Lint/AmbiguousRegexpLiteral:
Enabled: false
-# Offense count: 31
+# Offense count: 30
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Enabled: false
Lint/ParenthesesAsGroupedExpression:
Enabled: false
-# Offense count: 646
+# Offense count: 669
Metrics/AbcSize:
Max: 277
Metrics/ClassLength:
Max: 1653
-# Offense count: 68
+# Offense count: 67
Metrics/CyclomaticComplexity:
Max: 20
-# Offense count: 2454
+# Offense count: 2537
# Configuration parameters: AllowURI, URISchemes.
Metrics/LineLength:
Max: 694
-# Offense count: 601
+# Offense count: 623
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 179
+# Offense count: 1
+# Configuration parameters: CountComments.
+Metrics/ModuleLength:
+ Max: 126
+
# Offense count: 4
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 9
-# Offense count: 70
+# Offense count: 69
Metrics/PerceivedComplexity:
Max: 23
Rails/HasAndBelongsToMany:
Enabled: false
-# Offense count: 70
+# Offense count: 67
# Configuration parameters: EnforcedStyle, SupportedStyles.
Rails/TimeZone:
Enabled: false
Style/AsciiComments:
Enabled: false
-# Offense count: 307
+# Offense count: 308
Style/Documentation:
Enabled: false
-# Offense count: 39
+# Offense count: 38
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Enabled: false
Style/NumericLiterals:
MinDigits: 11
-# Offense count: 41
+# Offense count: 42
# Cop supports --auto-correct.
Style/PerlBackrefs:
Enabled: false
lat << cs.max_lat unless cs.max_lat.nil?
# collapse the arrays to minimum and maximum
- cs.min_lon, cs.min_lat, cs.max_lon, cs.max_lat =
- lon.min, lat.min, lon.max, lat.max
+ cs.min_lon = lon.min
+ cs.min_lat = lat.min
+ cs.max_lon = lon.max
+ cs.max_lat = lat.max
# save the larger bounding box and return the changeset, which
# will include the bigger bounding box.
# This file is used by Rack-based servers to start the application.
-require ::File.expand_path('../config/environment', __FILE__)
+require ::File.expand_path("../config/environment", __FILE__)
run Rails.application
window_pages = current_page.window(options[:window_size]).pages
return if window_pages.length <= 1 unless link_to_current_page
- first, last = paginator.first, paginator.last
+ first = paginator.first
+ last = paginator.last
html = ""
# an exception subclassing OSM::APIError will be thrown.
def commit
# data structure used for mapping placeholder IDs to real IDs
- node_ids, way_ids, rel_ids = {}, {}, {}
- ids = { :node => node_ids, :way => way_ids, :relation => rel_ids }
+ ids = { :node => {}, :way => {}, :relation => {} }
# take the first element and check that it is an osmChange element
@reader.read
# Raised when to delete an already-deleted object.
class APIAlreadyDeletedError < APIError
def initialize(object = "object", object_id = "")
- @object, @object_id = object, object_id
+ @object = object
+ @object_id = object_id
end
attr_reader :object, :object_id
# the changeset ID that the diff was uploaded to.
class APIChangesetMismatchError < APIError
def initialize(provided, allowed)
- @provided, @allowed = provided, allowed
+ @provided = provided
+ @allowed = allowed
end
def status
# they should.
class APIBadXMLError < APIError
def initialize(model, xml, message = "")
- @model, @xml, @message = model, xml, message
+ @model = model
+ @xml = xml
+ @message = message
end
def status
# Raised when the provided version is not equal to the latest in the db.
class APIVersionMismatchError < APIError
def initialize(id, type, provided, latest)
- @id, @type, @provided, @latest = id, type, provided, latest
+ @id = id
+ @type = type
+ @provided = provided
+ @latest = latest
end
attr_reader :provided, :latest, :id, :type
# this is now forbidden by the API.
class APIDuplicateTagsError < APIError
def initialize(type, id, tag_key)
- @type, @id, @tag_key = type, id, tag_key
+ @type = type
+ @id = id
+ @tag_key = tag_key
end
attr_reader :type, :id, :tag_key
# This prevents ways from being to long and difficult to work with
class APITooManyWayNodesError < APIError
def initialize(id, provided, max)
- @id, @provided, @max = id, provided, max
+ @id = id
+ @provided = provided
+ @max = max
end
attr_reader :id, :provided, :max