Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.0.beta.1 #17

Merged
merged 13 commits into from
Jun 3, 2015
Merged

Release 1.0.0.beta.1 #17

merged 13 commits into from
Jun 3, 2015

Conversation

ajb
Copy link
Contributor

@ajb ajb commented Jun 3, 2015

This isn't a complete rewrite, but the API has completely changed. Will look for some real-world feedback before releasing 1.0.0.

paginate_results unless opts[:skip_pagination]

# Add custom meta data if we've defined the method
# @meta.merge!(self.custom_meta_data) if self.respond_to?(:custom_meta_data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [82/80]

filterer = SortingFiltererD.new(sort: 'foo')
end

it 'can change to desc' do
expect_any_instance_of(FakeQuery).to receive(:order).with('baz DESC NULLS LAST').and_return(FakeQuery.new)
expect_any_instance_of(FakeQuery).to receive(:order).with('baz desc NULLS LAST').and_return(FakeQuery.new)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/80]

@@ -88,7 +96,7 @@ def starting_query
end

sort_option 'id', default: true
sort_option Regexp.new('foo([0-9]+)'), -> (results, matches, filterer) { results.order(matches[1] + ' ' + filterer.direction) }
sort_option Regexp.new('foo([0-9]+)'), -> (results, matches, filterer) { results.order(matches[1] + ' ' + filterer.sort_direction) }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [134/80]

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 96.95% when pulling 91f7918 on 1.0.0 into ee7785f on master.

expect(f).to receive(:offset).with(0).and_return(f)
it 'applies default filters' do
expect_any_instance_of(FakeQuery).to receive(:where).with(foo: 'bar').and_return(FakeQuery.new)
filterer = DefaultFiltersFilterer.filter({}, foo: 'bar')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - filterer.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.68%) to 97.06% when pulling a4e7bbd on 1.0.0 into ee7785f on master.

}
def sort
@sort ||= begin
if params[:sort] && (opt = find_sort_option_from_param(params[:sort]))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - opt.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.59%) to 97.16% when pulling 5bda786 on 1.0.0 into ee7785f on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.59%) to 97.16% when pulling 55de315 on 1.0.0 into ee7785f on master.

ajb added a commit that referenced this pull request Jun 3, 2015
@ajb ajb merged commit d2a96e7 into master Jun 3, 2015
@ajb ajb deleted the 1.0.0 branch June 3, 2015 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants