tbg_social 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +41 -0
- data/Rakefile +36 -0
- data/app/assets/images/social/.keep +0 -0
- data/app/assets/javascripts/social/application.js +13 -0
- data/app/assets/stylesheets/social/application.css +13 -0
- data/app/controllers/social/application_controller.rb +4 -0
- data/app/helpers/social/application_helper.rb +4 -0
- data/app/views/layouts/social/application.html.erb +14 -0
- data/bin/rails +12 -0
- data/config/routes.rb +2 -0
- data/fixtures/vcr_cassettes/facebook_engagement_bad_response.yml +48 -0
- data/fixtures/vcr_cassettes/facebook_engagement_count.yml +48 -0
- data/fixtures/vcr_cassettes/single_offer.yml +90 -0
- data/fixtures/vcr_cassettes/twitter_engagement_bad_response.yml +56 -0
- data/fixtures/vcr_cassettes/twitter_engagement_count.yml +56 -0
- data/lib/generators/social/install_generator.rb +18 -0
- data/lib/social.rb +11 -0
- data/lib/social/engageable.rb +5 -0
- data/lib/social/engagement.rb +38 -0
- data/lib/social/engine.rb +5 -0
- data/lib/social/facebook.rb +30 -0
- data/lib/social/google_plus.rb +34 -0
- data/lib/social/invalidation_policy.rb +7 -0
- data/lib/social/model.rb +26 -0
- data/lib/social/twitter.rb +30 -0
- data/lib/social/url.rb +10 -0
- data/lib/social/version.rb +3 -0
- data/lib/tasks/social_tasks.rake +4 -0
- data/social.gemspec +39 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/offer.rb +2 -0
- data/spec/dummy/app/models/social_engagement.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +23 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +6 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140602112503_create_social_engagements.rb +14 -0
- data/spec/dummy/db/migrate/20140602131702_create_offers.rb +6 -0
- data/spec/dummy/db/schema.rb +29 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/engageable_spec.rb +15 -0
- data/spec/engagement_spec.rb +70 -0
- data/spec/facebook_spec.rb +24 -0
- data/spec/invalidation_policy_spec.rb +11 -0
- data/spec/social_engagement_spec.rb +31 -0
- data/spec/spec_helper.rb +49 -0
- data/spec/twitter_spec.rb +24 -0
- data/spec/url_spec.rb +12 -0
- metadata +368 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/422.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>The change you wanted was rejected.</h1>
|
54
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
+
</div>
|
56
|
+
<p>If you are the application owner check the logs for more information.</p>
|
57
|
+
</body>
|
58
|
+
</html>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style>
|
6
|
+
body {
|
7
|
+
background-color: #EFEFEF;
|
8
|
+
color: #2E2F30;
|
9
|
+
text-align: center;
|
10
|
+
font-family: arial, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
div.dialog {
|
14
|
+
width: 25em;
|
15
|
+
margin: 4em auto 0 auto;
|
16
|
+
border: 1px solid #CCC;
|
17
|
+
border-right-color: #999;
|
18
|
+
border-left-color: #999;
|
19
|
+
border-bottom-color: #BBB;
|
20
|
+
border-top: #B00100 solid 4px;
|
21
|
+
border-top-left-radius: 9px;
|
22
|
+
border-top-right-radius: 9px;
|
23
|
+
background-color: white;
|
24
|
+
padding: 7px 4em 0 4em;
|
25
|
+
}
|
26
|
+
|
27
|
+
h1 {
|
28
|
+
font-size: 100%;
|
29
|
+
color: #730E15;
|
30
|
+
line-height: 1.5em;
|
31
|
+
}
|
32
|
+
|
33
|
+
body > p {
|
34
|
+
width: 33em;
|
35
|
+
margin: 0 auto 1em;
|
36
|
+
padding: 1em 0;
|
37
|
+
background-color: #F7F7F7;
|
38
|
+
border: 1px solid #CCC;
|
39
|
+
border-right-color: #999;
|
40
|
+
border-bottom-color: #999;
|
41
|
+
border-bottom-left-radius: 4px;
|
42
|
+
border-bottom-right-radius: 4px;
|
43
|
+
border-top-color: #DADADA;
|
44
|
+
color: #666;
|
45
|
+
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
+
}
|
47
|
+
</style>
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<!-- This file lives in public/500.html -->
|
52
|
+
<div class="dialog">
|
53
|
+
<h1>We're sorry, but something went wrong.</h1>
|
54
|
+
</div>
|
55
|
+
<p>If you are the application owner check the logs for more information.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::Engageable do
|
4
|
+
before do
|
5
|
+
Offer.include(Social::Engageable)
|
6
|
+
end
|
7
|
+
|
8
|
+
let(:offer) { Offer.new }
|
9
|
+
let(:social_engagement) { SocialEngagement.new }
|
10
|
+
|
11
|
+
it 'calls Social::Engagement::for with self' do
|
12
|
+
Social::Engagement.should_receive(:for).with(offer).and_return(social_engagement)
|
13
|
+
offer.social_engagement.should == social_engagement
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::Engagement do
|
4
|
+
subject { Social::Engagement }
|
5
|
+
let(:url) { 'www.example.com' }
|
6
|
+
|
7
|
+
describe '::for' do
|
8
|
+
let(:url) { 'www.studentbeans.com/offers/offers/1' }
|
9
|
+
let(:offer) { Offer.new }
|
10
|
+
let(:social_engagement) { SocialEngagement.new(url: url) }
|
11
|
+
|
12
|
+
it 'creates an url for the object and gets the engagement' do
|
13
|
+
Social::Url.should_receive(:for).with(offer).and_return(url)
|
14
|
+
Social::Engagement.should_receive(:for_url).with(url).and_return(social_engagement)
|
15
|
+
|
16
|
+
Social::Engagement.for(offer).should == social_engagement
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '::for_url' do
|
21
|
+
let(:cached_social_engagement) { SocialEngagement.new(url: url, twitter: 1, facebook: 1) }
|
22
|
+
let(:social_engagement_from_web) { SocialEngagement.new(url: url, twitter: 2, facebook: 2) }
|
23
|
+
|
24
|
+
context 'this social engagement is cached' do
|
25
|
+
context 'and is valid' do
|
26
|
+
it 'returns it from the cache' do
|
27
|
+
SocialEngagement.should_receive(:for_url).with(url).and_return(cached_social_engagement)
|
28
|
+
Social::InvalidationPolicy.should_receive(:valid?).with(cached_social_engagement).and_return(true)
|
29
|
+
|
30
|
+
subject.for_url(url).should == cached_social_engagement
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'and is not valid' do
|
35
|
+
it 'gets it from the web and updates the cache' do
|
36
|
+
SocialEngagement.should_receive(:for_url).with(url).and_return(cached_social_engagement)
|
37
|
+
Social::InvalidationPolicy.should_receive(:valid?).with(cached_social_engagement).and_return(false)
|
38
|
+
subject.should_receive(:from_web).and_return(social_engagement_from_web)
|
39
|
+
cached_social_engagement.should_receive(:update_counts).with(social_engagement_from_web)
|
40
|
+
|
41
|
+
subject.for_url(url).should == cached_social_engagement
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context 'this social engagement is not cached' do
|
47
|
+
it 'gets it from the web and caches it' do
|
48
|
+
SocialEngagement.should_receive(:for_url).with(url).and_raise(ActiveRecord::RecordNotFound)
|
49
|
+
subject.should_receive(:from_web).and_return(social_engagement_from_web)
|
50
|
+
social_engagement_from_web.should_receive(:save)
|
51
|
+
|
52
|
+
subject.for_url(url).should == social_engagement_from_web
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
describe '::from_web' do
|
58
|
+
let(:facebook_engagement) { 100 }
|
59
|
+
let(:twitter_engagement) { 20 }
|
60
|
+
|
61
|
+
it 'builds a SocialEngagement for a given url' do
|
62
|
+
Social::Facebook.should_receive(:total_count).with(url).and_return(facebook_engagement)
|
63
|
+
Social::Twitter.should_receive(:total_count).with(url).and_return(twitter_engagement)
|
64
|
+
|
65
|
+
social_engagement = subject.from_web(url)
|
66
|
+
social_engagement.facebook.should == facebook_engagement
|
67
|
+
social_engagement.twitter.should == twitter_engagement
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::Facebook do
|
4
|
+
subject { Social::Facebook }
|
5
|
+
|
6
|
+
let(:url) { 'http://www.studentbeans.com/student101/a/relationships/university-sex-league-6793.html' }
|
7
|
+
|
8
|
+
it 'returns the total engagement' do
|
9
|
+
VCR.use_cassette('facebook_engagement_count') do
|
10
|
+
subject.total_count(url).should == 7656
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns 0 if the response does not contain a count' do
|
15
|
+
VCR.use_cassette('facebook_engagement_bad_response') do
|
16
|
+
subject.total_count(url).should == 0
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'returns 0 if an exception is raised' do
|
21
|
+
Net::HTTP.stub(:get).and_raise(StandardError)
|
22
|
+
subject.total_count(url).should == 0
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::InvalidationPolicy do
|
4
|
+
it 'returns true if the social engagement count was updated less than 15 minutes ago' do
|
5
|
+
Social::InvalidationPolicy.valid?(SocialEngagement.new(updated_at: 14.minutes.ago)).should be_true
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'returns true if the social engagement count was updated less than 15 minutes ago' do
|
9
|
+
Social::InvalidationPolicy.valid?(SocialEngagement.new(updated_at: 16.minutes.ago)).should be_false
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SocialEngagement do
|
4
|
+
|
5
|
+
it { should validate_presence_of(:url) }
|
6
|
+
|
7
|
+
describe '::for_url' do
|
8
|
+
let(:url) { 'www.example.com' }
|
9
|
+
|
10
|
+
let!(:social_engagement) { SocialEngagement.create(url: url) }
|
11
|
+
|
12
|
+
it 'finds a social engagement by url' do
|
13
|
+
SocialEngagement.for_url(url).should == social_engagement
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'raises exception if the social engagement is not found' do
|
17
|
+
expect do
|
18
|
+
SocialEngagement.for_url('unknown url')
|
19
|
+
end.to raise_error(ActiveRecord::RecordNotFound)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe '#update_counts' do
|
24
|
+
it 'updates an instance with the engagement count attributes of another instance' do
|
25
|
+
social_engagement = SocialEngagement.new(url: 'www.example.com', facebook: 0, twitter: 0)
|
26
|
+
social_engagement.update_counts(SocialEngagement.new(facebook: 20, twitter: 10))
|
27
|
+
social_engagement.facebook.should == 20
|
28
|
+
social_engagement.twitter.should == 10
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
|
3
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
4
|
+
ENV["RAILS_ENV"] ||= 'test'
|
5
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
6
|
+
require 'rspec/rails'
|
7
|
+
require 'rspec/autorun'
|
8
|
+
require "shoulda/matchers"
|
9
|
+
|
10
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
11
|
+
# in spec/support/ and its subdirectories.
|
12
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
# ## Mock Framework
|
16
|
+
#
|
17
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
18
|
+
#
|
19
|
+
# config.mock_with :mocha
|
20
|
+
# config.mock_with :flexmock
|
21
|
+
# config.mock_with :rr
|
22
|
+
|
23
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
24
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
25
|
+
|
26
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
27
|
+
# examples within a transaction, remove the following line or assign false
|
28
|
+
# instead of true.
|
29
|
+
config.use_transactional_fixtures = true
|
30
|
+
|
31
|
+
# If true, the base class of anonymous controllers will be inferred
|
32
|
+
# automatically. This will be the default behavior in future versions of
|
33
|
+
# rspec-rails.
|
34
|
+
config.infer_base_class_for_anonymous_controllers = false
|
35
|
+
|
36
|
+
# Run specs in random order to surface order dependencies. If you find an
|
37
|
+
# order dependency and want to debug it, you can fix the order by providing
|
38
|
+
# the seed, which is printed after each run.
|
39
|
+
# --seed 1234
|
40
|
+
config.order = "random"
|
41
|
+
end
|
42
|
+
|
43
|
+
require 'vcr'
|
44
|
+
|
45
|
+
VCR.configure do |c|
|
46
|
+
c.cassette_library_dir = 'fixtures/vcr_cassettes'
|
47
|
+
c.hook_into :webmock
|
48
|
+
c.allow_http_connections_when_no_cassette = true
|
49
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::Twitter do
|
4
|
+
subject { Social::Twitter }
|
5
|
+
|
6
|
+
let(:url) { 'http://www.studentbeans.com/student101/a/relationships/university-sex-league-6793.html' }
|
7
|
+
|
8
|
+
it 'returns the total of engagement' do
|
9
|
+
VCR.use_cassette('twitter_engagement_count') do
|
10
|
+
subject.total_count(url).should == 310
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'returns 0 if the response does not contain a count' do
|
15
|
+
VCR.use_cassette('twitter_engagement_bad_response') do
|
16
|
+
subject.total_count(url).should == 0
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'returns 0 if an exception is raised' do
|
21
|
+
Net::HTTP.stub(:get).and_raise(StandardError)
|
22
|
+
subject.total_count(url).should == 0
|
23
|
+
end
|
24
|
+
end
|
data/spec/url_spec.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Social::Url do
|
4
|
+
before do
|
5
|
+
Rails.application.routes.default_url_options[:host]= 'localhost'
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'creates the url for an instance of a model' do
|
9
|
+
offer = Offer.create
|
10
|
+
Social::Url.for(offer).should == "http://localhost/offers/#{offer.id}"
|
11
|
+
end
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,368 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tbg_social
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- zduci
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.13
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.13
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.5'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry-byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-stack_explorer
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: awesome_print
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rspec-rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: shoulda-matchers
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: vcr
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: sqlite3
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: webmock
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
description: It finds, caches and updates social engagement of urls on social media
|
196
|
+
(facebook, twitter)
|
197
|
+
email:
|
198
|
+
- ra.busuioc@gmail.com
|
199
|
+
executables:
|
200
|
+
- rails
|
201
|
+
extensions: []
|
202
|
+
extra_rdoc_files: []
|
203
|
+
files:
|
204
|
+
- ".gitignore"
|
205
|
+
- CHANGELOG.md
|
206
|
+
- Gemfile
|
207
|
+
- LICENSE.txt
|
208
|
+
- README.md
|
209
|
+
- Rakefile
|
210
|
+
- app/assets/images/social/.keep
|
211
|
+
- app/assets/javascripts/social/application.js
|
212
|
+
- app/assets/stylesheets/social/application.css
|
213
|
+
- app/controllers/social/application_controller.rb
|
214
|
+
- app/helpers/social/application_helper.rb
|
215
|
+
- app/views/layouts/social/application.html.erb
|
216
|
+
- bin/rails
|
217
|
+
- config/routes.rb
|
218
|
+
- fixtures/vcr_cassettes/facebook_engagement_bad_response.yml
|
219
|
+
- fixtures/vcr_cassettes/facebook_engagement_count.yml
|
220
|
+
- fixtures/vcr_cassettes/single_offer.yml
|
221
|
+
- fixtures/vcr_cassettes/twitter_engagement_bad_response.yml
|
222
|
+
- fixtures/vcr_cassettes/twitter_engagement_count.yml
|
223
|
+
- lib/generators/social/install_generator.rb
|
224
|
+
- lib/social.rb
|
225
|
+
- lib/social/engageable.rb
|
226
|
+
- lib/social/engagement.rb
|
227
|
+
- lib/social/engine.rb
|
228
|
+
- lib/social/facebook.rb
|
229
|
+
- lib/social/google_plus.rb
|
230
|
+
- lib/social/invalidation_policy.rb
|
231
|
+
- lib/social/model.rb
|
232
|
+
- lib/social/twitter.rb
|
233
|
+
- lib/social/url.rb
|
234
|
+
- lib/social/version.rb
|
235
|
+
- lib/tasks/social_tasks.rake
|
236
|
+
- social.gemspec
|
237
|
+
- spec/dummy/README.rdoc
|
238
|
+
- spec/dummy/Rakefile
|
239
|
+
- spec/dummy/app/assets/images/.keep
|
240
|
+
- spec/dummy/app/assets/javascripts/application.js
|
241
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
242
|
+
- spec/dummy/app/controllers/application_controller.rb
|
243
|
+
- spec/dummy/app/controllers/concerns/.keep
|
244
|
+
- spec/dummy/app/helpers/application_helper.rb
|
245
|
+
- spec/dummy/app/mailers/.keep
|
246
|
+
- spec/dummy/app/models/.keep
|
247
|
+
- spec/dummy/app/models/concerns/.keep
|
248
|
+
- spec/dummy/app/models/offer.rb
|
249
|
+
- spec/dummy/app/models/social_engagement.rb
|
250
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
251
|
+
- spec/dummy/bin/bundle
|
252
|
+
- spec/dummy/bin/rails
|
253
|
+
- spec/dummy/bin/rake
|
254
|
+
- spec/dummy/config.ru
|
255
|
+
- spec/dummy/config/application.rb
|
256
|
+
- spec/dummy/config/boot.rb
|
257
|
+
- spec/dummy/config/database.yml
|
258
|
+
- spec/dummy/config/environment.rb
|
259
|
+
- spec/dummy/config/environments/development.rb
|
260
|
+
- spec/dummy/config/environments/production.rb
|
261
|
+
- spec/dummy/config/environments/test.rb
|
262
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
263
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
264
|
+
- spec/dummy/config/initializers/inflections.rb
|
265
|
+
- spec/dummy/config/initializers/mime_types.rb
|
266
|
+
- spec/dummy/config/initializers/secret_token.rb
|
267
|
+
- spec/dummy/config/initializers/session_store.rb
|
268
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
269
|
+
- spec/dummy/config/locales/en.yml
|
270
|
+
- spec/dummy/config/routes.rb
|
271
|
+
- spec/dummy/db/development.sqlite3
|
272
|
+
- spec/dummy/db/migrate/20140602112503_create_social_engagements.rb
|
273
|
+
- spec/dummy/db/migrate/20140602131702_create_offers.rb
|
274
|
+
- spec/dummy/db/schema.rb
|
275
|
+
- spec/dummy/db/test.sqlite3
|
276
|
+
- spec/dummy/lib/assets/.keep
|
277
|
+
- spec/dummy/log/.keep
|
278
|
+
- spec/dummy/public/404.html
|
279
|
+
- spec/dummy/public/422.html
|
280
|
+
- spec/dummy/public/500.html
|
281
|
+
- spec/dummy/public/favicon.ico
|
282
|
+
- spec/engageable_spec.rb
|
283
|
+
- spec/engagement_spec.rb
|
284
|
+
- spec/facebook_spec.rb
|
285
|
+
- spec/invalidation_policy_spec.rb
|
286
|
+
- spec/social_engagement_spec.rb
|
287
|
+
- spec/spec_helper.rb
|
288
|
+
- spec/twitter_spec.rb
|
289
|
+
- spec/url_spec.rb
|
290
|
+
homepage: https://github.com/thebeansgroup/social
|
291
|
+
licenses:
|
292
|
+
- MIT
|
293
|
+
metadata: {}
|
294
|
+
post_install_message:
|
295
|
+
rdoc_options: []
|
296
|
+
require_paths:
|
297
|
+
- lib
|
298
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
299
|
+
requirements:
|
300
|
+
- - ">="
|
301
|
+
- !ruby/object:Gem::Version
|
302
|
+
version: 2.0.0
|
303
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
|
+
requirements:
|
305
|
+
- - ">="
|
306
|
+
- !ruby/object:Gem::Version
|
307
|
+
version: '0'
|
308
|
+
requirements: []
|
309
|
+
rubyforge_project:
|
310
|
+
rubygems_version: 2.2.2
|
311
|
+
signing_key:
|
312
|
+
specification_version: 4
|
313
|
+
summary: Social engagement module
|
314
|
+
test_files:
|
315
|
+
- spec/dummy/README.rdoc
|
316
|
+
- spec/dummy/Rakefile
|
317
|
+
- spec/dummy/app/assets/images/.keep
|
318
|
+
- spec/dummy/app/assets/javascripts/application.js
|
319
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
320
|
+
- spec/dummy/app/controllers/application_controller.rb
|
321
|
+
- spec/dummy/app/controllers/concerns/.keep
|
322
|
+
- spec/dummy/app/helpers/application_helper.rb
|
323
|
+
- spec/dummy/app/mailers/.keep
|
324
|
+
- spec/dummy/app/models/.keep
|
325
|
+
- spec/dummy/app/models/concerns/.keep
|
326
|
+
- spec/dummy/app/models/offer.rb
|
327
|
+
- spec/dummy/app/models/social_engagement.rb
|
328
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
329
|
+
- spec/dummy/bin/bundle
|
330
|
+
- spec/dummy/bin/rails
|
331
|
+
- spec/dummy/bin/rake
|
332
|
+
- spec/dummy/config.ru
|
333
|
+
- spec/dummy/config/application.rb
|
334
|
+
- spec/dummy/config/boot.rb
|
335
|
+
- spec/dummy/config/database.yml
|
336
|
+
- spec/dummy/config/environment.rb
|
337
|
+
- spec/dummy/config/environments/development.rb
|
338
|
+
- spec/dummy/config/environments/production.rb
|
339
|
+
- spec/dummy/config/environments/test.rb
|
340
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
341
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
342
|
+
- spec/dummy/config/initializers/inflections.rb
|
343
|
+
- spec/dummy/config/initializers/mime_types.rb
|
344
|
+
- spec/dummy/config/initializers/secret_token.rb
|
345
|
+
- spec/dummy/config/initializers/session_store.rb
|
346
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
347
|
+
- spec/dummy/config/locales/en.yml
|
348
|
+
- spec/dummy/config/routes.rb
|
349
|
+
- spec/dummy/db/development.sqlite3
|
350
|
+
- spec/dummy/db/migrate/20140602112503_create_social_engagements.rb
|
351
|
+
- spec/dummy/db/migrate/20140602131702_create_offers.rb
|
352
|
+
- spec/dummy/db/schema.rb
|
353
|
+
- spec/dummy/db/test.sqlite3
|
354
|
+
- spec/dummy/lib/assets/.keep
|
355
|
+
- spec/dummy/log/.keep
|
356
|
+
- spec/dummy/public/404.html
|
357
|
+
- spec/dummy/public/422.html
|
358
|
+
- spec/dummy/public/500.html
|
359
|
+
- spec/dummy/public/favicon.ico
|
360
|
+
- spec/engageable_spec.rb
|
361
|
+
- spec/engagement_spec.rb
|
362
|
+
- spec/facebook_spec.rb
|
363
|
+
- spec/invalidation_policy_spec.rb
|
364
|
+
- spec/social_engagement_spec.rb
|
365
|
+
- spec/spec_helper.rb
|
366
|
+
- spec/twitter_spec.rb
|
367
|
+
- spec/url_spec.rb
|
368
|
+
has_rdoc:
|