borrow_direct 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWQyOTk1Y2ViNGM5ZTUyYTljZWRjMTEwNTlkMzcxZGEzM2ViNDJkOA==
4
+ YTdkNTczZjRiY2FlYWQ3OWJiYzkyMGNlYzg5YTg1NGMzMjhlMTBhOA==
5
5
  data.tar.gz: !binary |-
6
- MGMwOWQ2ODJlODI5MTk3NDNhYWZlMDY1ZDZjZTAzYjg3YWJhNjg4Ng==
6
+ ZWFjNzMyMjdkODIyNjY5Y2U4NDZmY2Y2MjFiODY4MDJlMGQ0N2ZkOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWU4N2IzYjM5M2EwMGJmZTU1ZTkxNzRmMTBiZDBmOTYyYmVlMTk0MDIwMDJm
10
- ODBiMTBiNzA1OWNlOGFmZjNhNmQzMzM4YzI5ZjQzYzEwZTc3NzU3NzNhNTE2
11
- YTdhMTRmODcyZjZkMzZlNDhjNmJkNTVkMzYzNjgyNzc4MTVhOGU=
9
+ MTNiZWNlMWVkYTA5OTIzNDA4Mzc3NDlkZDQ4MjhkYzMzZDdhNjVlZDQzM2Yz
10
+ N2YzNGYzMjFlMmZkZmM1MDI2YjE2NWE5OTllYjAwZjY2NjcwYjg1MzI0NTY0
11
+ YzcxMTQ1MDZkN2FjMWQ3YjFhODUyY2JjNGRkZGJmY2YxZGVlNjc=
12
12
  data.tar.gz: !binary |-
13
- ODg1YjdjM2M2ZTkxMzIzMDljZDZkMGEyNzUzMzBmNjA3MmNkYWU5OWFmNDNl
14
- YjRhYzYwZmFhNjQ1M2YzMzMxMWFlNjhlZDQ0YWYzMjIyYjFlMmM4OWZjYWE1
15
- MTY1ODE0Y2YyYTM2OTlhZjhiMzQyMWVjMWZkYzI4ZjMwODAwZTE=
13
+ MDM4Yjg1Y2UzNDUwNjIwMWRlOGJkMGRjM2IzNjIxODJkOTdkYTU1MGI1NWIx
14
+ OTY3NjM5YTFhYWI1NmJjMGUzODU4MDZjYjYzMTdmYjQ3YzZhMTUxM2RjYjcw
15
+ MWU4NTU1ZDEyYjRmMzMwMmE4MWMyNTQ1ZTU5NjEwMDQwODJhMjg=
@@ -108,10 +108,10 @@ module BorrowDirect
108
108
  # classes don't seem to handle combining diacritics well.
109
109
  #
110
110
  # This crazy way does it, replace anything that matches unicode
111
- # space (may include more than just ascii ' ') or punct class, unless it's an apostrophe --
112
- # and replaces them with plain ascii space. (apostrophes are allowed to make it through,
113
- # for possessive use)
114
- title.gsub!(/[[:space:][:punct:]&&[^\']]/, ' ')
111
+ # space (may include more than just ascii ' ') or punct class, unless
112
+ # it's an apostrophe or an ampersand, which are allowed --
113
+ # and replaces them with plain ascii space.
114
+ title.gsub!(/[[:space:][:punct:]&&[^\'\&]]/, ' ')
115
115
 
116
116
  # compress any remaining whitespace
117
117
  title.strip!
@@ -1,3 +1,3 @@
1
1
  module BorrowDirect
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -141,6 +141,10 @@ describe "GenerateQuery" do
141
141
  assert_equal "vel#{a_acute_combined}squez's stuff", normalized_title
142
142
  end
143
143
 
144
+ it "allows ampersands" do
145
+ assert_equal "x & y", @generator.normalized_title("x & y")
146
+ end
147
+
144
148
 
145
149
 
146
150
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: borrow_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind