scouter 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -1
- data/lib/scouter/base/single_url_api.rb +4 -1
- data/lib/scouter/base/version.rb +1 -1
- data/lib/scouter/github.rb +39 -0
- data/lib/scouter.rb +2 -0
- data/spec/fixtures/scouter/github_morizyun_events_jp.json +90 -0
- data/spec/fixtures/scouter/github_morizyun_scouter.json +90 -0
- data/spec/fixtures/scouter/twitter_morizyun_scouter.json +2 -0
- data/spec/scouter/github_spec.rb +37 -0
- data/spec/scouter_spec.rb +11 -0
- data/spec/spec_helper.rb +7 -2
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e10d13f309f51a5e4e30d817882bfddf479a9c2
|
4
|
+
data.tar.gz: 652dd456d4246834fef2e7f817fc517da245cf7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f3002eb0c2f8698cb6e91328f0ef3ddd5d602eb80c6f8e3bdbcb0e975fb8ab1c1f0fd9d1fd6f219e30dabb335aace4029f0aec3a443013ccfb61d3473c9fb09
|
7
|
+
data.tar.gz: e11a88bd630a78a5a5760ce7f9a79ff6558b2dfb9d5692c71de6bab3b9de11e0c2a87713cee98ce937cfac7d207fbbf6e8bcd1d92a08839e03a24acacbd8f13d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Scouter [![Gem Version](https://badge.fury.io/rb/scouter.svg)](http://badge.fury.io/rb/scouter) [![Build Status](https://travis-ci.org/morizyun/scouter.svg?branch=master)](https://travis-ci.org/morizyun/scouter) [![Code Climate](https://codeclimate.com/github/morizyun/scouter/badges/gpa.svg)](https://codeclimate.com/github/morizyun/scouter) [![Test Coverage](https://codeclimate.com/github/morizyun/scouter/badges/coverage.svg)](https://codeclimate.com/github/morizyun/scouter)
|
2
2
|
|
3
|
-
Get share count in Buffer/Facebook/Feedly/GooglePlus/HatenaBookmark/Linkedin/Pinterest/Pocket/Twitter
|
3
|
+
Get share count in Buffer/Facebook/Feedly/GitHub/GooglePlus/HatenaBookmark/Linkedin/Pinterest/Pocket/Twitter
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -46,6 +46,19 @@ if you want to get social count in facebook & twitter
|
|
46
46
|
puts service.facebook #=> 166458
|
47
47
|
puts service.twitter #=> 1358112
|
48
48
|
end
|
49
|
+
|
50
|
+
## Correspondence services
|
51
|
+
|
52
|
+
* Scouter::Buffer
|
53
|
+
* Scouter::Facebook
|
54
|
+
* Scouter::Feedly #=> can get only feed url
|
55
|
+
* Scouter::Github #=> can get only github.com repository url
|
56
|
+
* Scouter::GooglePlus
|
57
|
+
* Scouter::HatenaBookmark
|
58
|
+
* Scouter::Linkedin
|
59
|
+
* Scouter::Pinterest
|
60
|
+
* Scouter::Pocket
|
61
|
+
* Scouter::Twitter
|
49
62
|
|
50
63
|
## Contributing
|
51
64
|
|
@@ -8,8 +8,11 @@ module Scouter
|
|
8
8
|
# @param [String or Array] urls
|
9
9
|
# @return [Hashie::Mash, Array] URL & count hash, Error
|
10
10
|
def self.get_count(urls)
|
11
|
-
urls = check_and_trans_url(urls)
|
12
11
|
results, errors = {}, []
|
12
|
+
|
13
|
+
# check valid url or change URL to Array object
|
14
|
+
urls = check_and_trans_url(urls)
|
15
|
+
|
13
16
|
urls.each_with_index do |u, idx|
|
14
17
|
sleep(WAIT_SEC) if idx != 0
|
15
18
|
res, error = get_and_parse_response(u)
|
data/lib/scouter/base/version.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
module Scouter
|
2
|
+
class Github < Scouter::Base::SingleUrlApi
|
3
|
+
END_POINT = 'https://api.github.com'.freeze
|
4
|
+
|
5
|
+
private
|
6
|
+
|
7
|
+
def self.check_and_trans_url(urls)
|
8
|
+
urls = to_array(urls)
|
9
|
+
|
10
|
+
github_urls = urls.map do |u|
|
11
|
+
uri = URI.parse(u)
|
12
|
+
uri.host == 'github.com' ? u : nil
|
13
|
+
end.compact
|
14
|
+
|
15
|
+
raise ArgumentError, "#{github_urls} is not String and Array" unless github_urls.class == Array
|
16
|
+
return github_urls
|
17
|
+
end
|
18
|
+
|
19
|
+
# Build GitHub API URL
|
20
|
+
# @param [String] url
|
21
|
+
# @return [String] API url
|
22
|
+
def self.api_url(url)
|
23
|
+
uri = URI.parse(url)
|
24
|
+
if uri.path =~ /^\/([^\/]+)\/([^\/]+)/
|
25
|
+
"#{END_POINT}/repos/#{$1}/#{$2}"
|
26
|
+
else
|
27
|
+
raise ArgumentError, "#{url} is not valid GitHub URL"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Parse json data for response
|
32
|
+
# @param [String] json
|
33
|
+
# @return [Hash] url & count
|
34
|
+
def self.parse_response(json, url)
|
35
|
+
res = JSON.parse(json)
|
36
|
+
{ url => { self.service_name => res['stargazers_count'] } }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/lib/scouter.rb
CHANGED
@@ -14,6 +14,7 @@ require 'scouter/base/multi_url_api'
|
|
14
14
|
require 'scouter/buffer'
|
15
15
|
require 'scouter/facebook'
|
16
16
|
require 'scouter/feedly'
|
17
|
+
require 'scouter/github'
|
17
18
|
require 'scouter/google_plus'
|
18
19
|
require 'scouter/hatena_bookmark'
|
19
20
|
require 'scouter/linkedin'
|
@@ -28,6 +29,7 @@ module Scouter
|
|
28
29
|
SERVICES = [ Scouter::Buffer,
|
29
30
|
Scouter::Facebook,
|
30
31
|
Scouter::Feedly,
|
32
|
+
Scouter::Github,
|
31
33
|
Scouter::GooglePlus,
|
32
34
|
Scouter::HatenaBookmark,
|
33
35
|
Scouter::Linkedin,
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
{
|
3
|
+
"id": 24559313,
|
4
|
+
"name": "events_jp",
|
5
|
+
"full_name": "morizyun/events_jp",
|
6
|
+
"owner": {
|
7
|
+
"login": "morizyun",
|
8
|
+
"id": 2871482,
|
9
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/2871482?v=3",
|
10
|
+
"gravatar_id": "",
|
11
|
+
"url": "https://api.github.com/users/morizyun",
|
12
|
+
"html_url": "https://github.com/morizyun",
|
13
|
+
"followers_url": "https://api.github.com/users/morizyun/followers",
|
14
|
+
"following_url": "https://api.github.com/users/morizyun/following{/other_user}",
|
15
|
+
"gists_url": "https://api.github.com/users/morizyun/gists{/gist_id}",
|
16
|
+
"starred_url": "https://api.github.com/users/morizyun/starred{/owner}{/repo}",
|
17
|
+
"subscriptions_url": "https://api.github.com/users/morizyun/subscriptions",
|
18
|
+
"organizations_url": "https://api.github.com/users/morizyun/orgs",
|
19
|
+
"repos_url": "https://api.github.com/users/morizyun/repos",
|
20
|
+
"events_url": "https://api.github.com/users/morizyun/events{/privacy}",
|
21
|
+
"received_events_url": "https://api.github.com/users/morizyun/received_events",
|
22
|
+
"type": "User",
|
23
|
+
"site_admin": false
|
24
|
+
},
|
25
|
+
"private": false,
|
26
|
+
"html_url": "https://github.com/morizyun/events_jp",
|
27
|
+
"description": "A Ruby wrapper for atnd/connpass/doorkeeper/zusaar API",
|
28
|
+
"fork": false,
|
29
|
+
"url": "https://api.github.com/repos/morizyun/events_jp",
|
30
|
+
"forks_url": "https://api.github.com/repos/morizyun/events_jp/forks",
|
31
|
+
"keys_url": "https://api.github.com/repos/morizyun/events_jp/keys{/key_id}",
|
32
|
+
"collaborators_url": "https://api.github.com/repos/morizyun/events_jp/collaborators{/collaborator}",
|
33
|
+
"teams_url": "https://api.github.com/repos/morizyun/events_jp/teams",
|
34
|
+
"hooks_url": "https://api.github.com/repos/morizyun/events_jp/hooks",
|
35
|
+
"issue_events_url": "https://api.github.com/repos/morizyun/events_jp/issues/events{/number}",
|
36
|
+
"events_url": "https://api.github.com/repos/morizyun/events_jp/events",
|
37
|
+
"assignees_url": "https://api.github.com/repos/morizyun/events_jp/assignees{/user}",
|
38
|
+
"branches_url": "https://api.github.com/repos/morizyun/events_jp/branches{/branch}",
|
39
|
+
"tags_url": "https://api.github.com/repos/morizyun/events_jp/tags",
|
40
|
+
"blobs_url": "https://api.github.com/repos/morizyun/events_jp/git/blobs{/sha}",
|
41
|
+
"git_tags_url": "https://api.github.com/repos/morizyun/events_jp/git/tags{/sha}",
|
42
|
+
"git_refs_url": "https://api.github.com/repos/morizyun/events_jp/git/refs{/sha}",
|
43
|
+
"trees_url": "https://api.github.com/repos/morizyun/events_jp/git/trees{/sha}",
|
44
|
+
"statuses_url": "https://api.github.com/repos/morizyun/events_jp/statuses/{sha}",
|
45
|
+
"languages_url": "https://api.github.com/repos/morizyun/events_jp/languages",
|
46
|
+
"stargazers_url": "https://api.github.com/repos/morizyun/events_jp/stargazers",
|
47
|
+
"contributors_url": "https://api.github.com/repos/morizyun/events_jp/contributors",
|
48
|
+
"subscribers_url": "https://api.github.com/repos/morizyun/events_jp/subscribers",
|
49
|
+
"subscription_url": "https://api.github.com/repos/morizyun/events_jp/subscription",
|
50
|
+
"commits_url": "https://api.github.com/repos/morizyun/events_jp/commits{/sha}",
|
51
|
+
"git_commits_url": "https://api.github.com/repos/morizyun/events_jp/git/commits{/sha}",
|
52
|
+
"comments_url": "https://api.github.com/repos/morizyun/events_jp/comments{/number}",
|
53
|
+
"issue_comment_url": "https://api.github.com/repos/morizyun/events_jp/issues/comments/{number}",
|
54
|
+
"contents_url": "https://api.github.com/repos/morizyun/events_jp/contents/{+path}",
|
55
|
+
"compare_url": "https://api.github.com/repos/morizyun/events_jp/compare/{base}...{head}",
|
56
|
+
"merges_url": "https://api.github.com/repos/morizyun/events_jp/merges",
|
57
|
+
"archive_url": "https://api.github.com/repos/morizyun/events_jp/{archive_format}{/ref}",
|
58
|
+
"downloads_url": "https://api.github.com/repos/morizyun/events_jp/downloads",
|
59
|
+
"issues_url": "https://api.github.com/repos/morizyun/events_jp/issues{/number}",
|
60
|
+
"pulls_url": "https://api.github.com/repos/morizyun/events_jp/pulls{/number}",
|
61
|
+
"milestones_url": "https://api.github.com/repos/morizyun/events_jp/milestones{/number}",
|
62
|
+
"notifications_url": "https://api.github.com/repos/morizyun/events_jp/notifications{?since,all,participating}",
|
63
|
+
"labels_url": "https://api.github.com/repos/morizyun/events_jp/labels{/name}",
|
64
|
+
"releases_url": "https://api.github.com/repos/morizyun/events_jp/releases{/id}",
|
65
|
+
"created_at": "2014-09-28T12:47:22Z",
|
66
|
+
"updated_at": "2014-12-17T11:58:41Z",
|
67
|
+
"pushed_at": "2014-12-17T11:58:51Z",
|
68
|
+
"git_url": "git://github.com/morizyun/events_jp.git",
|
69
|
+
"ssh_url": "git@github.com:morizyun/events_jp.git",
|
70
|
+
"clone_url": "https://github.com/morizyun/events_jp.git",
|
71
|
+
"svn_url": "https://github.com/morizyun/events_jp",
|
72
|
+
"homepage": null,
|
73
|
+
"size": 883,
|
74
|
+
"stargazers_count": 6,
|
75
|
+
"watchers_count": 6,
|
76
|
+
"language": "Ruby",
|
77
|
+
"has_issues": true,
|
78
|
+
"has_downloads": true,
|
79
|
+
"has_wiki": true,
|
80
|
+
"has_pages": false,
|
81
|
+
"forks_count": 2,
|
82
|
+
"mirror_url": null,
|
83
|
+
"open_issues_count": 0,
|
84
|
+
"forks": 2,
|
85
|
+
"open_issues": 0,
|
86
|
+
"watchers": 6,
|
87
|
+
"default_branch": "master",
|
88
|
+
"network_count": 2,
|
89
|
+
"subscribers_count": 2
|
90
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
{
|
3
|
+
"id": 27663372,
|
4
|
+
"name": "scouter",
|
5
|
+
"full_name": "morizyun/scouter",
|
6
|
+
"owner": {
|
7
|
+
"login": "morizyun",
|
8
|
+
"id": 2871482,
|
9
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/2871482?v=3",
|
10
|
+
"gravatar_id": "",
|
11
|
+
"url": "https://api.github.com/users/morizyun",
|
12
|
+
"html_url": "https://github.com/morizyun",
|
13
|
+
"followers_url": "https://api.github.com/users/morizyun/followers",
|
14
|
+
"following_url": "https://api.github.com/users/morizyun/following{/other_user}",
|
15
|
+
"gists_url": "https://api.github.com/users/morizyun/gists{/gist_id}",
|
16
|
+
"starred_url": "https://api.github.com/users/morizyun/starred{/owner}{/repo}",
|
17
|
+
"subscriptions_url": "https://api.github.com/users/morizyun/subscriptions",
|
18
|
+
"organizations_url": "https://api.github.com/users/morizyun/orgs",
|
19
|
+
"repos_url": "https://api.github.com/users/morizyun/repos",
|
20
|
+
"events_url": "https://api.github.com/users/morizyun/events{/privacy}",
|
21
|
+
"received_events_url": "https://api.github.com/users/morizyun/received_events",
|
22
|
+
"type": "User",
|
23
|
+
"site_admin": false
|
24
|
+
},
|
25
|
+
"private": false,
|
26
|
+
"html_url": "https://github.com/morizyun/scouter",
|
27
|
+
"description": "Get share count in Buffer/Facebook/Feedly/GooglePlus/HatenaBookmark/Linkedin/Pinterest/Pocket/Twitter",
|
28
|
+
"fork": false,
|
29
|
+
"url": "https://api.github.com/repos/morizyun/scouter",
|
30
|
+
"forks_url": "https://api.github.com/repos/morizyun/scouter/forks",
|
31
|
+
"keys_url": "https://api.github.com/repos/morizyun/scouter/keys{/key_id}",
|
32
|
+
"collaborators_url": "https://api.github.com/repos/morizyun/scouter/collaborators{/collaborator}",
|
33
|
+
"teams_url": "https://api.github.com/repos/morizyun/scouter/teams",
|
34
|
+
"hooks_url": "https://api.github.com/repos/morizyun/scouter/hooks",
|
35
|
+
"issue_events_url": "https://api.github.com/repos/morizyun/scouter/issues/events{/number}",
|
36
|
+
"events_url": "https://api.github.com/repos/morizyun/scouter/events",
|
37
|
+
"assignees_url": "https://api.github.com/repos/morizyun/scouter/assignees{/user}",
|
38
|
+
"branches_url": "https://api.github.com/repos/morizyun/scouter/branches{/branch}",
|
39
|
+
"tags_url": "https://api.github.com/repos/morizyun/scouter/tags",
|
40
|
+
"blobs_url": "https://api.github.com/repos/morizyun/scouter/git/blobs{/sha}",
|
41
|
+
"git_tags_url": "https://api.github.com/repos/morizyun/scouter/git/tags{/sha}",
|
42
|
+
"git_refs_url": "https://api.github.com/repos/morizyun/scouter/git/refs{/sha}",
|
43
|
+
"trees_url": "https://api.github.com/repos/morizyun/scouter/git/trees{/sha}",
|
44
|
+
"statuses_url": "https://api.github.com/repos/morizyun/scouter/statuses/{sha}",
|
45
|
+
"languages_url": "https://api.github.com/repos/morizyun/scouter/languages",
|
46
|
+
"stargazers_url": "https://api.github.com/repos/morizyun/scouter/stargazers",
|
47
|
+
"contributors_url": "https://api.github.com/repos/morizyun/scouter/contributors",
|
48
|
+
"subscribers_url": "https://api.github.com/repos/morizyun/scouter/subscribers",
|
49
|
+
"subscription_url": "https://api.github.com/repos/morizyun/scouter/subscription",
|
50
|
+
"commits_url": "https://api.github.com/repos/morizyun/scouter/commits{/sha}",
|
51
|
+
"git_commits_url": "https://api.github.com/repos/morizyun/scouter/git/commits{/sha}",
|
52
|
+
"comments_url": "https://api.github.com/repos/morizyun/scouter/comments{/number}",
|
53
|
+
"issue_comment_url": "https://api.github.com/repos/morizyun/scouter/issues/comments/{number}",
|
54
|
+
"contents_url": "https://api.github.com/repos/morizyun/scouter/contents/{+path}",
|
55
|
+
"compare_url": "https://api.github.com/repos/morizyun/scouter/compare/{base}...{head}",
|
56
|
+
"merges_url": "https://api.github.com/repos/morizyun/scouter/merges",
|
57
|
+
"archive_url": "https://api.github.com/repos/morizyun/scouter/{archive_format}{/ref}",
|
58
|
+
"downloads_url": "https://api.github.com/repos/morizyun/scouter/downloads",
|
59
|
+
"issues_url": "https://api.github.com/repos/morizyun/scouter/issues{/number}",
|
60
|
+
"pulls_url": "https://api.github.com/repos/morizyun/scouter/pulls{/number}",
|
61
|
+
"milestones_url": "https://api.github.com/repos/morizyun/scouter/milestones{/number}",
|
62
|
+
"notifications_url": "https://api.github.com/repos/morizyun/scouter/notifications{?since,all,participating}",
|
63
|
+
"labels_url": "https://api.github.com/repos/morizyun/scouter/labels{/name}",
|
64
|
+
"releases_url": "https://api.github.com/repos/morizyun/scouter/releases{/id}",
|
65
|
+
"created_at": "2014-12-07T07:58:59Z",
|
66
|
+
"updated_at": "2014-12-18T13:45:07Z",
|
67
|
+
"pushed_at": "2014-12-18T13:45:38Z",
|
68
|
+
"git_url": "git://github.com/morizyun/scouter.git",
|
69
|
+
"ssh_url": "git@github.com:morizyun/scouter.git",
|
70
|
+
"clone_url": "https://github.com/morizyun/scouter.git",
|
71
|
+
"svn_url": "https://github.com/morizyun/scouter",
|
72
|
+
"homepage": "",
|
73
|
+
"size": 112,
|
74
|
+
"stargazers_count": 4,
|
75
|
+
"watchers_count": 4,
|
76
|
+
"language": "Ruby",
|
77
|
+
"has_issues": true,
|
78
|
+
"has_downloads": true,
|
79
|
+
"has_wiki": true,
|
80
|
+
"has_pages": false,
|
81
|
+
"forks_count": 1,
|
82
|
+
"mirror_url": null,
|
83
|
+
"open_issues_count": 0,
|
84
|
+
"forks": 1,
|
85
|
+
"open_issues": 0,
|
86
|
+
"watchers": 4,
|
87
|
+
"default_branch": "master",
|
88
|
+
"network_count": 1,
|
89
|
+
"subscribers_count": 1
|
90
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Scouter::Github do
|
4
|
+
describe '#get_count' do
|
5
|
+
let!(:yahoo) { 'http://www.yahoo.co.jp/' }
|
6
|
+
let!(:morizyun_scouter) { 'https://github.com/morizyun/scouter/' }
|
7
|
+
let!(:morizyun_events_jp) { 'https://github.com/morizyun/events_jp' }
|
8
|
+
|
9
|
+
context 'when url parameter is String' do
|
10
|
+
context 'when url is github url' do
|
11
|
+
it 'return 4 shares' do
|
12
|
+
results, errors = Scouter::Github.get_count(morizyun_scouter)
|
13
|
+
expect(errors).to be_empty
|
14
|
+
expect(results[morizyun_scouter].github).to be == 4
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'when url is not github url' do
|
19
|
+
it 'return raise error' do
|
20
|
+
results, errors = Scouter::Github.get_count(yahoo)
|
21
|
+
expect(errors).to be_empty
|
22
|
+
expect { results[morizyun_scouter].github }.to raise_error
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'when url parameter is Array' do
|
28
|
+
it 'morizyun_scouter has over 4 shares and morizyun_events_jp 6 shares' do
|
29
|
+
results, errors = Scouter::Github.get_count([morizyun_scouter, morizyun_events_jp, yahoo])
|
30
|
+
expect(errors).to be_empty
|
31
|
+
expect(results[morizyun_scouter].github).to be == 4
|
32
|
+
expect(results[morizyun_events_jp].github).to be == 6
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
data/spec/scouter_spec.rb
CHANGED
@@ -10,6 +10,7 @@ describe Scouter do
|
|
10
10
|
let!(:google) { 'http://www.google.com/' }
|
11
11
|
let!(:morizyun_feed) { 'http://feeds.feedburner.com/rubyrails' }
|
12
12
|
let!(:morizyun_hp) { 'http://morizyun.github.io' }
|
13
|
+
let!(:github_morizyun_scouter) { 'https://github.com/morizyun/scouter' }
|
13
14
|
|
14
15
|
context 'when url parameter is String' do
|
15
16
|
context 'when get count by all services' do
|
@@ -76,6 +77,16 @@ describe Scouter do
|
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
80
|
+
context 'when get count by github/twitter' do
|
81
|
+
let!(:services) { [Scouter::Github, Scouter::Twitter] }
|
82
|
+
it 'returns many social count info by 1 url' do
|
83
|
+
results, errors = Scouter.get_count([github_morizyun_scouter], services)
|
84
|
+
expect(errors).to be_empty
|
85
|
+
expect(results[github_morizyun_scouter].github).to be == 4
|
86
|
+
expect(results[github_morizyun_scouter].twitter).to be == 0
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
79
90
|
end
|
80
91
|
end
|
81
92
|
|
data/spec/spec_helper.rb
CHANGED
@@ -46,9 +46,14 @@ RSpec.configure do |config|
|
|
46
46
|
stub_get(Scouter::Feedly.__send__(:api_url, 'http://feeds.feedburner.com/rubyrails'), 'scouter/feedly_morizyun_feed.json')
|
47
47
|
stub_get(Scouter::Feedly.__send__(:api_url, 'http://rss.dailynews.yahoo.co.jp/fc/rss.xml'), 'scouter/feedly_yahoo_news.json')
|
48
48
|
|
49
|
+
# Github
|
50
|
+
stub_get(Scouter::Github.__send__(:api_url, 'https://github.com/morizyun/scouter/'), 'scouter/github_morizyun_scouter.json')
|
51
|
+
stub_get(Scouter::Github.__send__(:api_url, 'https://github.com/morizyun/events_jp'), 'scouter/github_morizyun_events_jp.json')
|
52
|
+
|
49
53
|
# Twitter
|
50
|
-
stub_get(Scouter::Twitter.__send__(:api_url, 'http://www.yahoo.co.jp/'),
|
51
|
-
stub_get(Scouter::Twitter.__send__(:api_url, 'http://www.google.com/'),
|
54
|
+
stub_get(Scouter::Twitter.__send__(:api_url, 'http://www.yahoo.co.jp/'), 'scouter/twitter_yahoo.json')
|
55
|
+
stub_get(Scouter::Twitter.__send__(:api_url, 'http://www.google.com/'), 'scouter/twitter_google.json')
|
56
|
+
stub_get(Scouter::Twitter.__send__(:api_url, 'https://github.com/morizyun/scouter'), 'scouter/twitter_morizyun_scouter.json')
|
52
57
|
|
53
58
|
# Hatena Bookmark
|
54
59
|
stub_get(Scouter::HatenaBookmark.__send__(:api_url, ['http://www.yahoo.co.jp/']), 'scouter/hatenabookmark_yahoo.json')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scouter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- morizyun
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -147,6 +147,7 @@ files:
|
|
147
147
|
- lib/scouter/buffer.rb
|
148
148
|
- lib/scouter/facebook.rb
|
149
149
|
- lib/scouter/feedly.rb
|
150
|
+
- lib/scouter/github.rb
|
150
151
|
- lib/scouter/google_plus.rb
|
151
152
|
- lib/scouter/hatena_bookmark.rb
|
152
153
|
- lib/scouter/linkedin.rb
|
@@ -161,6 +162,8 @@ files:
|
|
161
162
|
- spec/fixtures/scouter/feedly_morizyun_feed.json
|
162
163
|
- spec/fixtures/scouter/feedly_morizyun_hp.json
|
163
164
|
- spec/fixtures/scouter/feedly_yahoo_news.json
|
165
|
+
- spec/fixtures/scouter/github_morizyun_events_jp.json
|
166
|
+
- spec/fixtures/scouter/github_morizyun_scouter.json
|
164
167
|
- spec/fixtures/scouter/hatenabookmark_yahoo.json
|
165
168
|
- spec/fixtures/scouter/hatenabookmark_yahoo_google.json
|
166
169
|
- spec/fixtures/scouter/linkedin_google.json
|
@@ -172,10 +175,12 @@ files:
|
|
172
175
|
- spec/fixtures/scouter/pocket_morizyun_hp.html
|
173
176
|
- spec/fixtures/scouter/pocket_yahoo.html
|
174
177
|
- spec/fixtures/scouter/twitter_google.json
|
178
|
+
- spec/fixtures/scouter/twitter_morizyun_scouter.json
|
175
179
|
- spec/fixtures/scouter/twitter_yahoo.json
|
176
180
|
- spec/scouter/buffer_spec.rb
|
177
181
|
- spec/scouter/facebook_spec.rb
|
178
182
|
- spec/scouter/feedly_spec.rb
|
183
|
+
- spec/scouter/github_spec.rb
|
179
184
|
- spec/scouter/google_plus_spec.rb
|
180
185
|
- spec/scouter/hatena_bookmark_spec.rb
|
181
186
|
- spec/scouter/linkedin_spec.rb
|
@@ -216,6 +221,8 @@ test_files:
|
|
216
221
|
- spec/fixtures/scouter/feedly_morizyun_feed.json
|
217
222
|
- spec/fixtures/scouter/feedly_morizyun_hp.json
|
218
223
|
- spec/fixtures/scouter/feedly_yahoo_news.json
|
224
|
+
- spec/fixtures/scouter/github_morizyun_events_jp.json
|
225
|
+
- spec/fixtures/scouter/github_morizyun_scouter.json
|
219
226
|
- spec/fixtures/scouter/hatenabookmark_yahoo.json
|
220
227
|
- spec/fixtures/scouter/hatenabookmark_yahoo_google.json
|
221
228
|
- spec/fixtures/scouter/linkedin_google.json
|
@@ -227,10 +234,12 @@ test_files:
|
|
227
234
|
- spec/fixtures/scouter/pocket_morizyun_hp.html
|
228
235
|
- spec/fixtures/scouter/pocket_yahoo.html
|
229
236
|
- spec/fixtures/scouter/twitter_google.json
|
237
|
+
- spec/fixtures/scouter/twitter_morizyun_scouter.json
|
230
238
|
- spec/fixtures/scouter/twitter_yahoo.json
|
231
239
|
- spec/scouter/buffer_spec.rb
|
232
240
|
- spec/scouter/facebook_spec.rb
|
233
241
|
- spec/scouter/feedly_spec.rb
|
242
|
+
- spec/scouter/github_spec.rb
|
234
243
|
- spec/scouter/google_plus_spec.rb
|
235
244
|
- spec/scouter/hatena_bookmark_spec.rb
|
236
245
|
- spec/scouter/linkedin_spec.rb
|