twithub 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/twithub/entries.rb +1 -1
- data/lib/twithub/feed_entry.rb +1 -1
- data/lib/twithub/version.rb +1 -1
- data/spec/twithub/feed_entry_spec.rb +2 -1
- data/spec/twithub_spec.rb +3 -1
- metadata +9 -9
data/lib/twithub/entries.rb
CHANGED
@@ -12,7 +12,7 @@ module Twithub
|
|
12
12
|
def entry_for(hash)
|
13
13
|
entry = hash["origin"] == Twithub::TWITTER ? Twithub::TwitterEntry.new : Twithub::GithubEntry.new
|
14
14
|
time = Time.parse(hash["posted_at"])
|
15
|
-
entry.with_content(hash["content"]).with_username(hash["username"]).with_posted_at(time)
|
15
|
+
entry.with_content(hash["content"]).with_username(hash["username"]).with_posted_at(time).with_url(hash["url"])
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
data/lib/twithub/feed_entry.rb
CHANGED
data/lib/twithub/version.rb
CHANGED
@@ -48,13 +48,14 @@ describe Twithub::FeedEntry do
|
|
48
48
|
let(:entry) { Twithub::FeedEntry.new }
|
49
49
|
let(:time) { Time.now }
|
50
50
|
let(:expected_hash) { {"posted_at" => time.to_s, "content" => "the content",
|
51
|
-
"username" => "pzimbelman", "origin" => "twitter" } }
|
51
|
+
"username" => "pzimbelman", "origin" => "twitter", "url" => "foobar" } }
|
52
52
|
|
53
53
|
before do
|
54
54
|
entry.stub(:posted_at).and_return(time)
|
55
55
|
entry.stub(:content).and_return("the content")
|
56
56
|
entry.stub(:username).and_return("pzimbelman")
|
57
57
|
entry.stub(:origin).and_return("twitter")
|
58
|
+
entry.stub(:url).and_return("foobar")
|
58
59
|
end
|
59
60
|
|
60
61
|
it "should take the entry to json" do
|
data/spec/twithub_spec.rb
CHANGED
@@ -50,12 +50,13 @@ describe Twithub do
|
|
50
50
|
|
51
51
|
describe "from_json" do
|
52
52
|
let(:time) { Time.parse("Jan 1st 2011") }
|
53
|
-
let(:entry) { Twithub::TwitterEntry.new.with_content("foobar").with_username("thing").with_posted_at(time) }
|
53
|
+
let(:entry) { Twithub::TwitterEntry.new.with_content("foobar").with_username("thing").with_posted_at(time).with_url("urlstring") }
|
54
54
|
|
55
55
|
it "should be able accept a json string for a single entry" do
|
56
56
|
new_entry = Twithub.from_json(entry.to_json)
|
57
57
|
new_entry.content.should == "foobar"
|
58
58
|
new_entry.posted_at.should == time
|
59
|
+
new_entry.url.should == "urlstring"
|
59
60
|
end
|
60
61
|
|
61
62
|
it "should be able to accept a json string of an array of entries" do
|
@@ -63,6 +64,7 @@ describe Twithub do
|
|
63
64
|
new_entry = Twithub.from_json(json).first
|
64
65
|
new_entry.content.should == "foobar"
|
65
66
|
new_entry.posted_at.should == time
|
67
|
+
new_entry.url.should == "urlstring"
|
66
68
|
end
|
67
69
|
end
|
68
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twithub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-07-23 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70193804691340 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70193804691340
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70193804690900 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70193804690900
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: twitter
|
38
|
-
requirement: &
|
38
|
+
requirement: &70193804690340 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '3.3'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70193804690340
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: feedzirra
|
49
|
-
requirement: &
|
49
|
+
requirement: &70193804689820 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 0.2.0.rc2
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70193804689820
|
58
58
|
description: A gem to aggregate your recent twitter and github activity into a single
|
59
59
|
feed. Can accept multiple logins for either service.
|
60
60
|
email:
|