onebox 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onebox/engine/pubmed_onebox.rb +1 -1
- data/lib/onebox/engine/twitter_status_onebox.rb +6 -2
- data/lib/onebox/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: 361d952da51eeaae06dd188e243d16d04fcd8691
|
4
|
+
data.tar.gz: dae28e5bddf77ee0b3f5651205b3da7dfe214f91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38eaeb38d1b11789fb6f77baab8e81fe335ceaa149e24db6d96223b5e38efa497e18b814d3ba3ee6514a7b62940d481d1bbe7445674e83c59311302385edf5b6
|
7
|
+
data.tar.gz: 4c3b62dde2e770a222565663d3fa0bada07c306091ffc48eb418a241c101ccc3f6328a767a1de028b379ad37e33bf68c0a6f5dc72c15544ef61d407dbf15e4db
|
@@ -41,9 +41,13 @@ module Onebox
|
|
41
41
|
|
42
42
|
def timestamp
|
43
43
|
if raw.html?
|
44
|
-
raw.css(".metadata span").inner_text
|
44
|
+
raw.css(".metadata span")[0].inner_text
|
45
45
|
else
|
46
|
-
access(:created_at)
|
46
|
+
created_at = access(:created_at)
|
47
|
+
date = DateTime.strptime(created_at, "%a %b %d %H:%M:%S %z %Y")
|
48
|
+
user_offset = access(:user, :utc_offset).to_i
|
49
|
+
offset = (user_offset >= 0 ? "+" : "-") + Time.at(user_offset.abs).gmtime.strftime("%H%M")
|
50
|
+
date.new_offset(offset).strftime("%l:%M %p - %e %b %Y")
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
data/lib/onebox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joanna Zeta
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: multi_json
|
@@ -341,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
requirements: []
|
343
343
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.
|
344
|
+
rubygems_version: 2.2.2
|
345
345
|
signing_key:
|
346
346
|
specification_version: 4
|
347
347
|
summary: A gem for turning URLs into previews.
|