ref2bibtex 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +3 -3
- data/lib/ref2bibtex.rb +2 -2
- data/lib/ref2bibtex/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4ec3e55b7810701e4f89859a2613a3f914da477
|
4
|
+
data.tar.gz: 885c66dbbbab034887ec6a47bc6047457189349f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11b2d14f8665c82d95f9bc90db84b25a250c0d524b4cd589e46064ce4f48faeb367e97fab510c00d46b67caa6cf8ed694975b75e44246ad1c6f0274ef566e0d3
|
7
|
+
data.tar.gz: 0b9fedcc76708c2c8204702ffaaf4861645456826f17881d58b6a1f0b04b7b86fd00e4b1629f0f36e4bf784a53ed0d3feb89fdb026339af756599832291508b5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -9,13 +9,13 @@ An (almost) single purpose gem wrapping Crossref's API. Pass it a full referenc
|
|
9
9
|
|
10
10
|
Be polite (https://github.com/CrossRef/rest-api-doc#etiquette). Provide a email as per CrossRef recommendations. Do this by:
|
11
11
|
|
12
|
-
1) Add it to the file
|
12
|
+
1) Add it to the file `~/.ref2bibtex_user_email`.
|
13
13
|
|
14
14
|
2) Add it to the file .env in the root of your application:
|
15
15
|
|
16
|
-
REF2BIBTEX_USER_EMAIL=user@example.com
|
16
|
+
`REF2BIBTEX_USER_EMAIL=user@example.com`
|
17
17
|
|
18
|
-
3) Set REF2BIBTEX_USER_EMAIL in your shell profile.
|
18
|
+
3) Set `REF2BIBTEX_USER_EMAIL` in your shell profile.
|
19
19
|
|
20
20
|
If the email is set in multiple places priority is reverse order listed here.
|
21
21
|
|
data/lib/ref2bibtex.rb
CHANGED
@@ -7,7 +7,7 @@ require 'net/http'
|
|
7
7
|
|
8
8
|
module Ref2bibtex
|
9
9
|
|
10
|
-
USER_EMAIL_FILE_PATH = File.expand_path("
|
10
|
+
USER_EMAIL_FILE_PATH = File.expand_path("#{ENV['HOME']}/.ref2bibtex_user_email")
|
11
11
|
key = nil
|
12
12
|
key = File.read(USER_EMAIL_FILE_PATH).strip if File.exists?(USER_EMAIL_FILE_PATH)
|
13
13
|
USER_EMAIL_FILE = key
|
@@ -15,7 +15,7 @@ module Ref2bibtex
|
|
15
15
|
|
16
16
|
USER_EMAIL = USER_EMAIL_FILE || USER_EMAIL_ENV || nil
|
17
17
|
|
18
|
-
warn "\n\n !! User email not set in ~/.ref2bibtex_user_email, .env, or ENV, you're not being a polite user! (https://github.com/CrossRef/rest-api-doc)!! \n\n"
|
18
|
+
warn "\n\n !! User email not set in ~/.ref2bibtex_user_email, .env, or ENV, you're not being a polite user! (https://github.com/CrossRef/rest-api-doc)!! \n\n" if USER_EMAIL.nil? || USER_EMAIL == 'https%3A%2F%2Fgithub.com%2FSpeciesFileGroup%2Fref2bibtex'
|
19
19
|
|
20
20
|
# By default sorts by score
|
21
21
|
CROSSREF_URI = URI("https://search.crossref.org/links?mailto=#{USER_EMAIL}")
|
data/lib/ref2bibtex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ref2bibtex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Yoder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.6.
|
125
|
+
rubygems_version: 2.6.14
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: Pass a full citation, get the bibtex back, that's all.
|