scraperd 0.0.1 → 0.0.2
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 +4 -4
- data/lib/scraperd/activity.rb +7 -7
- data/lib/scraperd/version.rb +1 -1
- data/test/activity_test.rb +1 -0
- 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: c89ab4e737da21e3401a8277ffa15c336763d05d
|
|
4
|
+
data.tar.gz: f8346f873afd1328f202933d9949a4b07a6353cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d609b4c5e82e571719ff7e43f4585a0530a0870e648cf8f9d1c1a9d5bb7f289084b49306694593966b31dfdbb6cd0b18253368b982bd18da04ea272a7761ba3b
|
|
7
|
+
data.tar.gz: a75213d34d42cc685a71dc1089d89d20c4a3873b735fe31ab09da833ae52ddea20f42138b04865d8619bdbd0fac26b7be071a5b536d03971ef9d3f478d79489a
|
data/lib/scraperd/activity.rb
CHANGED
|
@@ -7,13 +7,13 @@ module Scraperd
|
|
|
7
7
|
|
|
8
8
|
def initialize(item)
|
|
9
9
|
super(Hashie::Mash.new({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
id: item[:guid].force_encoding("UTF-8"),
|
|
11
|
+
title: title_from_title(item[:title]),
|
|
12
|
+
score: score_from_title(item[:title]),
|
|
13
|
+
link: item[:link].force_encoding("UTF-8"),
|
|
14
|
+
film_link: "http://letterboxd.com/film/#{nicetitle_from_url(item[:link])}/".force_encoding("UTF-8"),
|
|
15
|
+
watched_at: watched_at_from_description(item[:description]),
|
|
16
|
+
added_at: item[:pubDate]
|
|
17
17
|
})
|
|
18
18
|
)
|
|
19
19
|
end
|
data/lib/scraperd/version.rb
CHANGED
data/test/activity_test.rb
CHANGED
|
@@ -17,5 +17,6 @@ class ActivityTest < MiniTest::Unit::TestCase
|
|
|
17
17
|
assert_equal activity.film_link, "http://letterboxd.com/film/nausicaa-of-the-valley-of-the-wind/"
|
|
18
18
|
assert_equal activity.watched_at, Time.parse("Saturday March 14, 2015.")
|
|
19
19
|
assert_equal activity.added_at, Time.new('2015-03-14 19:45:50 +0100')
|
|
20
|
+
assert_equal activity.id, "letterboxd-watch-7911516"
|
|
20
21
|
end
|
|
21
22
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scraperd
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Víctor Martín
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|