zooniverse_social 1.0.4 → 1.0.5

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
2
  SHA1:
3
- metadata.gz: 79a9f5ab7a155e33932b3d3fb10b79488839ae05
4
- data.tar.gz: a0b6bb15cc1aa20c77409a20fe21024a3c8872a4
3
+ metadata.gz: f4d215c74175b558797c0702e8ef7fe2f565fcea
4
+ data.tar.gz: 192016dff12f2b0d9fb3e93357e227f7ee3b2b73
5
5
  SHA512:
6
- metadata.gz: 36561d27e03f8ca1a82872ac5e0f27f78e2ceb39ac46db84185ec4dcad95936a023d8a173e3b2c1877d8adda52efdda82b9ef41856ef8644d1e4f47ed5906ed9
7
- data.tar.gz: e2e7e3ea2afebaacc2736c29c10f961615ffcbeadffdc6e144b36d299c36495fc3b79fcad849e67e456e38aba75aba1b12d5211a9ca503527d75a2e5d53c75e0
6
+ metadata.gz: 7e336fce806f80d2525c2b672abe4030cf480ab33d86144cf0e23d890b0b3f50b2d70a867ed6edf16d750725d0f2cc006105863d9f05c8f0bf0c800da9b73623
7
+ data.tar.gz: 8641d89aee9f1f85cb586b6ba4da22dce167dd23de3a20ad84d548a85db4b61587ae09741c238d6af28493ce3ac5172316a0ee68c1acf8d43ffa1483a5e2ca05
@@ -22,16 +22,20 @@ module ZooniverseSocial
22
22
  response.fetch('posts', []).collect do |post|
23
23
  {
24
24
  id: post['ID'],
25
- title: post['title'],
26
- excerpt: clean_excerpt(post['excerpt']),
25
+ title: remove_entities(post['title']),
26
+ excerpt: remove_entities(post['excerpt']),
27
27
  created_at: post['date'],
28
28
  link: post['URL']
29
29
  }
30
30
  end
31
31
  end
32
32
 
33
- def clean_excerpt(text)
33
+ def remove_entities(text)
34
34
  CGI.unescapeHTML (text || '')
35
+ .gsub('’', '\'')
36
+ .gsub('“', '"')
37
+ .gsub('”', '"')
38
+ .gsub('&', '&')
35
39
  .gsub(' ', '')
36
40
  .gsub('[…]', '')
37
41
  .gsub('<p>', '')
@@ -1,3 +1,3 @@
1
1
  module ZooniverseSocial
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zooniverse_social
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Parrish
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puma