rrimm 0.5.0 → 0.6.0
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 +8 -8
- data/.coveralls.yml +1 -1
- data/CONTRIBUTING.md +2 -0
- data/Gemfile.lock +1 -1
- data/lib/rrimm/cache.rb +2 -3
- data/lib/rrimm/fetcher.rb +1 -1
- data/lib/rrimm/item_formatter/mail.rb +1 -0
- data/rrimm.gemspec +1 -1
- data/spec/xkcd_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWM5MjRiNDNmMGQ1MGFmZjVhNjcwYWEyNGIwNjhkNmI1NTA3MmQ5Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzIzMGNkYmU0NTJkMDYyNGZjODZlMmI3MDdmZTM0NDdhMWM2MWYwYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2M0MDNlOWFiNTZjODg5ZTAzYjQ1NzFhOTliYTM5MWZjYTU1NzY4NzhhZjEz
|
10
|
+
ZjZiNWYyMDAxMWI5MGI0MWEwNjc3MDQzOTA5NjgwYmYyZjc2NDQ1MDFlNzUy
|
11
|
+
NGJiN2E1MzQ5YWM1NTcwNDBlNDFhMjIxOTliOTJkMjMxZDNhNTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWY4ZjNiMjFlOWM4MDY2YzNhY2FlNjJjYjQ4ZWYwZTMxOGM0MjkzMmJkYTBm
|
14
|
+
OTIxMzlhNDZiYjY5ZmUzNjBjOGU4MWEyYjI2NWMxMDA1NmNlY2M3NWViOTRj
|
15
|
+
MDc1YWY4MGE3ZWY4MTVlNmE1ZTRjZDMwODIwNjA0MjY4ZjY5MzM=
|
data/.coveralls.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
service_name: travis-ci
|
data/CONTRIBUTING.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/rrimm/cache.rb
CHANGED
@@ -41,12 +41,11 @@ module RRImm
|
|
41
41
|
timestamp.to_i
|
42
42
|
end
|
43
43
|
|
44
|
-
def save(feed, timestamp)
|
44
|
+
def save(feed, timestamp, force=true)
|
45
45
|
file_path = cache_file(feed)
|
46
|
-
File.write(file_path, timestamp)
|
46
|
+
File.write(file_path, timestamp) if (force or timestamp != read(feed))
|
47
47
|
end
|
48
48
|
|
49
|
-
|
50
49
|
private
|
51
50
|
def sanitize(name)
|
52
51
|
cleaned_name = INVALID_PATTERNS.inject(name) do |memo,pattern|
|
data/lib/rrimm/fetcher.rb
CHANGED
@@ -30,6 +30,7 @@ module RRImm
|
|
30
30
|
def format(feed, item, feed_config, pipe)
|
31
31
|
pipe.write "From: #{from [item.author, default_author(feed_config)]}\n"
|
32
32
|
pipe.write "To: #{dest}\n"
|
33
|
+
pipe.write "Date: #{item.published.rfc2822}\n"
|
33
34
|
pipe.write "Subject: #{subject(feed, item, feed_config)}\n"
|
34
35
|
pipe.write "Content-Type: text/html;\n"
|
35
36
|
pipe.write "\n"
|
data/rrimm.gemspec
CHANGED
data/spec/xkcd_spec.rb
CHANGED
@@ -15,7 +15,7 @@ describe RRImm::ItemFormatter::Mail do
|
|
15
15
|
config.should_receive(:category).twice.and_return nil
|
16
16
|
config.should_receive(:default_name?).and_return(true, false)
|
17
17
|
mail_formatter.format(feed, feed.entries.first, config, s)
|
18
|
-
expect(s.string).to eq "From: RRImm <from@example.com>\nTo: to@example.com\nSubject: When You Assume\nContent-Type: text/html;\n\nhttp://xkcd.com/1339/\n\n<img src=\"http://imgs.xkcd.com/comics/when_you_assume.png\" title=\"You know what happens when you assert--you make an ass out of the emergency response team.\" alt=\"You know what happens when you assert--you make an ass out of the emergency response team.\" />\n"
|
18
|
+
expect(s.string).to eq "From: RRImm <from@example.com>\nTo: to@example.com\nDate: Fri, 07 Mar 2014 05:00:00 -0000\nSubject: When You Assume\nContent-Type: text/html;\n\nhttp://xkcd.com/1339/\n\n<img src=\"http://imgs.xkcd.com/comics/when_you_assume.png\" title=\"You know what happens when you assert--you make an ass out of the emergency response team.\" alt=\"You know what happens when you assert--you make an ass out of the emergency response team.\" />\n"
|
19
19
|
s = StringIO.new
|
20
20
|
|
21
21
|
config.should_receive(:name).and_return "Randall Munroe"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rrimm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grégoire Seux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: open_uri_redirections
|