social_current 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/social_current/github.rb +2 -2
- data/lib/social_current/version.rb +1 -1
- data/test/test_github.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -22,11 +22,11 @@ module SocialCurrent
|
|
22
22
|
def format_message(event)
|
23
23
|
case event["type"]
|
24
24
|
when "PushEvent"
|
25
|
-
"#{self.raw_user["name"]} pushed to <a href='http://github.com/#{event["repo"]["name"]}'>#{event["repo"]["name"]}</a>."
|
25
|
+
"#{self.raw_user["name"]} pushed #{event["payload"]["commits"].collect { |c| "<a href='http://github.com/#{event["repo"]["name"]}/commit/#{c["sha"]}'>" + c["sha"] + "</a>" }.join(", ")} to <a href='http://github.com/#{event["repo"]["name"]}'>#{event["repo"]["name"]}</a>."
|
26
26
|
when "FollowEvent"
|
27
27
|
"#{self.raw_user["name"]} followed <a href='#{event["payload"]["target"]["html_url"]}'>#{event["payload"]["target"]["name"]}</a>."
|
28
28
|
when "CreateEvent"
|
29
|
-
"#{self.raw_user["name"]} created <a href='http://github.com/#{event["repo"]["name"]}'>#{event["repo"]["name"]}</a>."
|
29
|
+
"#{self.raw_user["name"]} created a new #{event["payload"]["ref_type"]}, #{event["payload"]["ref"]} for <a href='http://github.com/#{event["repo"]["name"]}'>#{event["repo"]["name"]}</a>."
|
30
30
|
when "WatchEvent"
|
31
31
|
"#{self.raw_user["name"]} started watching <a href='http://github.com/#{event["repo"]["name"]}'>#{event["repo"]["name"]}</a>."
|
32
32
|
end
|
data/test/test_github.rb
CHANGED
@@ -19,7 +19,7 @@ class TestGithub < Test::Unit::TestCase
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def test_stream
|
22
|
-
assert_equal "Tristan O'Neil pushed to <a href='http://github.com/tristanoneil/tristanoneil.github.com'>tristanoneil/tristanoneil.github.com</a>.", @github.stream[0][:message]
|
22
|
+
assert_equal "Tristan O'Neil pushed <a href='http://github.com/tristanoneil/tristanoneil.github.com/commit/c1e38d24268245b9336e2734e6864c7266c79284'>c1e38d24268245b9336e2734e6864c7266c79284</a> to <a href='http://github.com/tristanoneil/tristanoneil.github.com'>tristanoneil/tristanoneil.github.com</a>.", @github.stream[0][:message]
|
23
23
|
assert_equal "2012-05-11 20:17:30 UTC", @github.stream[0][:created_at].to_s
|
24
24
|
assert_equal 30, @github.stream.size
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_current
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|