arxiv 0.1.9 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 705be15f67d328ce1b0e3134104b64009a8797fe
4
- data.tar.gz: eb382d0dc4c5429346f0549b9169079262daa499
2
+ SHA256:
3
+ metadata.gz: ea850a69ba595fb098bd32ca80d12cd8c0576f41f0c4497e606aa940e22126fe
4
+ data.tar.gz: 48fb479b215b6baa5d0a99cc86c99f25512f8e92f591930c270f1849dc8da473
5
5
  SHA512:
6
- metadata.gz: 6a628624db06ca75b1ed50d92bd3d8e86f5118b16afca8b0ceaaf8fc7c8b975191c2523cb694237ad9ef83003b777d90589553644d595689982f6829bd269f36
7
- data.tar.gz: 00556b2a1e72bd5c22cc8dd497a98158167cf4d511b0ed71a3e8d0640914034f1efab3be4a10c73911120b42a80d4bbaab6534e733463e2ec54e7e159475a81d
6
+ metadata.gz: 0002e8248b6b94eff14a39a712a42bc58df328999bcd639dd274c12025b4fa4892ba49433a10c279671fb7a7b26c8786c8248ec973153182a84512c1b2998218
7
+ data.tar.gz: ede6bb478ef6d00e550ae8d9fa725919b9fe60fee757eb9401e94e3055a03b7aedcfd8bf2a563b17e9640ef72ee4d5d1ab30e371e83e5d0fedf463fee125eca3
@@ -4,11 +4,14 @@ on:
4
4
  jobs:
5
5
  test:
6
6
  runs-on: ubuntu-latest
7
+ strategy:
8
+ matrix:
9
+ ruby-version: ['3.0', '3.1', '3.2']
7
10
 
8
11
  steps:
9
12
  - uses: actions/checkout@v3
10
13
  - name: Set up Ruby
11
- uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
14
+ uses: ruby/setup-ruby@v1
12
15
  - name: Install dependencies
13
16
  run: bundle install
14
17
  - name: Run tests
@@ -23,10 +26,14 @@ jobs:
23
26
  steps:
24
27
  - uses: actions/checkout@v3
25
28
  - name: Set up Ruby
26
- uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
29
+ uses: ruby/setup-ruby@v1
27
30
  - name: Publish to GPR
28
31
  run: |
29
- curl -u $RUBYGEMS_USERNAME:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials
32
+ mkdir -p $HOME/.gem
33
+ touch $HOME/.gem/credentials
34
+ chmod 0600 $HOME/.gem/credentials
35
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
36
+ curl -u $RUBYGEMS_USERNAME:$RUBYGEMS_PASSWORD https://rubygems.org/api/v1/api_key.yaml > $HOME/.gem/credentials; chmod 0600 $HOME/.gem/credentials
30
37
  gem build arxiv.gemspec
31
38
  gem push `ls | grep *.gem`
32
39
  env:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.2.1
1
+ 3.2.2
@@ -51,8 +51,7 @@ module Arxiv
51
51
  def pdf_url
52
52
  if available_in_pdf?
53
53
  url = links.find { |l| l.content_type == "application/pdf" }.url
54
- url = StringScrubber.force_ssl_url(url)
55
- "#{url}.pdf" unless url =~ /\.pdf$/
54
+ StringScrubber.force_ssl_url(url)
56
55
  end
57
56
  end
58
57
 
data/lib/arxiv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Arxiv
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.11"
3
3
  end
data/lib/arxiv.rb CHANGED
@@ -39,7 +39,7 @@ module Arxiv
39
39
  end
40
40
 
41
41
  url = ::URI.parse("http://export.arxiv.org/api/query?id_list=#{id}")
42
- response = ::Nokogiri::XML(open(url)).remove_namespaces!
42
+ response = ::Nokogiri::XML(URI.open(url)).remove_namespaces!
43
43
  manuscript = Arxiv::Manuscript.parse(response.to_s, single: id)
44
44
 
45
45
  raise Arxiv::Error::ManuscriptNotFound, "Manuscript #{id} doesn't exist on arXiv" if manuscript.title.nil?
@@ -93,7 +93,7 @@ module Arxiv
93
93
 
94
94
  describe "pdf_url" do
95
95
  it "should return the url to download the manuscript in PDF format" do
96
- expect(@manuscript.pdf_url).to eql('https://arxiv.org/pdf/1202.0819v1.pdf')
96
+ expect(@manuscript.pdf_url).to eql('https://arxiv.org/pdf/1202.0819v1')
97
97
  end
98
98
  end
99
99
 
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'arxiv'
2
- require 'pry'
3
2
 
4
3
  RSpec.configure do |config|
5
4
  # some (optional) config here
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arxiv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scholastica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-29 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: happymapper
@@ -149,8 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubyforge_project: arxiv
153
- rubygems_version: 2.4.5.5
152
+ rubygems_version: 3.4.10
154
153
  signing_key:
155
154
  specification_version: 4
156
155
  summary: Ruby wrapper accessing the arXiv API