social_current 0.0.6 → 0.0.7

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.
data/README.md CHANGED
@@ -42,7 +42,7 @@ Then you can easily access this from within your view like.
42
42
 
43
43
  ```ruby
44
44
  <% @user.stream.each do |item| %>
45
- <%= item[:message] >
45
+ <%= item[:message] %>
46
46
  <% end %>
47
47
  ```
48
48
 
@@ -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
@@ -1,4 +1,4 @@
1
1
  module SocialCurrent
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  SUPPORTED_INTEGRATIONS = [:github, :twitter]
4
4
  end
@@ -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.6
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-18 00:00:00.000000000 Z
12
+ date: 2012-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty