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 +4 -4
- data/lib/zooniverse_social/posts.rb +7 -3
- data/lib/zooniverse_social/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4d215c74175b558797c0702e8ef7fe2f565fcea
|
4
|
+
data.tar.gz: 192016dff12f2b0d9fb3e93357e227f7ee3b2b73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
|
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>', '')
|
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
|
+
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-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puma
|