# global (SVN-style) versioning were used - then that would be
# unambiguous.
elements.sort! do |a, b|
- if (a.timestamp == b.timestamp)
+ if a.timestamp == b.timestamp
a.version <=> b.version
else
a.timestamp <=> b.timestamp
# check these assertions.
elements.each do |elt|
result.root <<
- if (elt.version == 1)
+ if elt.version == 1
# first version, so it must be newly-created.
created = XML::Node.new "create"
created << elt.to_xml_node(changeset_cache, user_display_name_cache)
"oauth_token=#{@token.token}"
else
@redirect_url.query +
- "&oauth_token=#{@token.token}"
+ "&oauth_token=#{@token.token}"
end
unless @token.oauth10?
def create_paginators_and_retrieve_collections #:nodoc:
Pagination::OPTIONS[self.class].each do |collection_id, options|
- next unless options[:actions].include? action_name if
- options[:actions]
+ next if options[:actions] && !options[:actions].include?(action_name)
paginator, collection =
paginator_and_collection_for(collection_id, options)
current_page = paginator.current_page
window_pages = current_page.window(options[:window_size]).pages
- return if window_pages.length <= 1 unless link_to_current_page
+ return unless link_to_current_page || window_pages.length > 1
first = paginator.first
last = paginator.last
b = UserBlock.find(id)
assert_in_delta Time.now, b.created_at, 1
assert_in_delta Time.now, b.updated_at, 1
- assert_in_delta Time.now + 12.hour, b.ends_at, 1
+ assert_in_delta Time.now + 12.hours, b.ends_at, 1
assert_equal false, b.needs_view
assert_equal "Vandalism", b.reason
assert_equal "markdown", b.reason_format