cite-me 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cite_me.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1136570e84ccad429e53632bfb708069bca03ba7
4
- data.tar.gz: 5dd6a4c067ee770d6ad972b3470477a85bd917c5
3
+ metadata.gz: 9e450fd5b48929fcf3c1f7ff87869f995f21b5b7
4
+ data.tar.gz: 7cad700f7d59cfac7a8d5e82b562bd8a29d19908
5
5
  SHA512:
6
- metadata.gz: 6c3869c12d0923100642a2a499aaf7e763ea3d82741f6db5e8170d5bb65cd487275f0b9198dd0287fd4ff9e72bd0e33037a74dfa5d175c87edcc71e10ae65385
7
- data.tar.gz: 2a7a4d0b7719465daa8e0d65999eea63c5f4bea39c766f72008d43419218afcdb8f7cde6562f81e7dfd37bd9f93cebd153f058d7d41f033530fe656592b8216e
6
+ metadata.gz: 401c99db199e8a5a847d39cc3c2d7e1f340a1c028c48c45c1551bd14a9803cfdd4b3e5a9a6bfc18fe8acb79b03f7bfed23887a0581bbe97b474698c69f07dc5f
7
+ data.tar.gz: 59e3c002be13de426fca20c672b9a8ec441ee444a53f5512b4390bb6dedc5e8ce2ec37c04be5114547d60b0d4f3359f4073fb6b7c9e79005b4b57681da4e44ad
@@ -88,7 +88,7 @@ class Cite_Me
88
88
  option.each_with_index do |author, index|
89
89
  if author =~ /,/
90
90
  # Doe, John A.
91
- author_string += author
91
+ author_string += author.to_s
92
92
  # option.length - 1 checks if last entry in array of authors
93
93
  # if so, end with period, else, 'and , '
94
94
  author_string += index == option.length - 1 ? ". " : "and , "
@@ -96,7 +96,7 @@ class Cite_Me
96
96
  # John Doe or John A. Doe
97
97
  name = author.split(" ")
98
98
  middle_initial = author.scan(/ \w\. /)
99
- author_string += name.last._to_s + ", " + name.first.to_s + middle_initial.first.to_s
99
+ author_string += name.last.to_s + ", " + name.first.to_s + middle_initial.first.to_s
100
100
  # add a period if it's the last entry and NOT a name with a middle initial
101
101
  author_string += index == option.length - 1 ? ". " : ", and " if middle_initial.empty?
102
102
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cite-me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Smith