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

[patch:lib] Remove version filter from query ID list #69

Merged
merged 1 commit into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/arx/query/query.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def initialize(*ids, sort_by: :relevance, sort_order: :descending)

ids.flatten!
unless ids.empty?
ids.map! &Cleaner.method(:extract_id)
ids.map! {|id| Cleaner.extract_id(id, version: true)}
@query << "&#{PARAMS[:id_list]}=#{ids * ','}"
end

Expand Down
14 changes: 11 additions & 3 deletions spec/arx/entities/paper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
context '1703.04834' do
it { expect(papers[3].version).to eq 1 }
end
context '1807.06918v1' do
subject { Arx.get('1807.06918v1').version }

it { is_expected.to eq 1 }
end
context '1807.06918v2' do
subject { Arx.get('1807.06918v2').version }

it { is_expected.to eq 2 }
end
end
context '#title' do
context 'cond-mat/9609089' do
Expand Down Expand Up @@ -623,9 +633,7 @@
version1 = Arx.get('1807.06918v1')
version2 = Arx.get('1807.06918v2')

pending "Allow query IDs in id_list to include version numbers, don't filter them!"

expect(version1).not_to eq version2
expect(version1).to eq version2
end
end
end
Expand Down