apple-news 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apple-news/article.rb +6 -1
- data/lib/apple-news/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: 1999f6d65250e429481b63570bdc37ef5acaa55b
|
4
|
+
data.tar.gz: 6cf8e0310a8905d0a65cbbf72c924f51534c0891
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87939702ec210d09593df11c1e39dc67476cdabd2248a2df1f574b5e171ab00a316979cc322a3ff7f87f86ecf9984c19e6a4493953f4a8001943eca46cf97b93
|
7
|
+
data.tar.gz: 195138eb2d3924e504ba9f2f6cfc74cc5a92703990a0800213949dbbe88b90a1b647a79a49c9064e49a3f2e4d3393865765e390f1e46125d0b72fa51b09b8cf5
|
data/lib/apple-news/article.rb
CHANGED
@@ -13,7 +13,7 @@ module AppleNews
|
|
13
13
|
optional_properties :is_sponsored, :is_preview, :accessory_text, :revision
|
14
14
|
optional_property :links, {}
|
15
15
|
|
16
|
-
attr_reader :id
|
16
|
+
attr_reader :id, :share_url, :state
|
17
17
|
attr_accessor :document
|
18
18
|
def_delegator :@document, :title
|
19
19
|
|
@@ -38,7 +38,12 @@ module AppleNews
|
|
38
38
|
|
39
39
|
def hydrate!
|
40
40
|
data = fetch_data['data']
|
41
|
+
|
42
|
+
# Some special properties that need to be manually set.
|
41
43
|
@document = Document.new(data.delete('document'))
|
44
|
+
@share_url = data.delete('share_url')
|
45
|
+
@state = data.delete('state')
|
46
|
+
|
42
47
|
load_properties(data)
|
43
48
|
end
|
44
49
|
end
|
data/lib/apple-news/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apple-news
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan LeFevre
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|