virility 0.0.6 → 0.1.0
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 +83 -17
- data/lib/virility.rb +35 -3
- data/lib/virility/exceptions.rb +5 -0
- data/lib/virility/excitation.rb +26 -40
- data/lib/virility/strategies/delicious.rb +7 -8
- data/lib/virility/strategies/facebook.rb +12 -5
- data/lib/virility/strategies/pinterest.rb +8 -9
- data/lib/virility/strategies/plus_one.rb +4 -5
- data/lib/virility/strategies/stumble_upon.rb +4 -5
- data/lib/virility/strategies/twitter.rb +4 -5
- data/lib/virility/strategy.rb +98 -0
- data/lib/virility/supporter.rb +55 -0
- data/lib/virility/version.rb +1 -1
- data/spec/excitation_spec.rb +58 -33
- data/spec/spec_helper.rb +27 -0
- data/spec/strategies/delicious_spec.rb +66 -0
- data/spec/strategies/facebook_spec.rb +98 -0
- data/spec/strategies/pinterest_spec.rb +66 -0
- data/spec/strategies/plus_one_spec.rb +66 -0
- data/spec/strategies/stumble_upon_spec.rb +66 -0
- data/spec/strategies/twitter_spec.rb +66 -0
- data/spec/strategy_spec.rb +102 -0
- data/spec/virility_spec.rb +70 -1
- data/virility.gemspec +1 -1
- metadata +22 -8
- data/lib/virility/context.rb +0 -18
- data/spec/context_spec.rb +0 -31
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: virility
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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-10-
|
12
|
+
date: 2012-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -59,7 +59,7 @@ files:
|
|
59
59
|
- README.md
|
60
60
|
- Rakefile
|
61
61
|
- lib/virility.rb
|
62
|
-
- lib/virility/
|
62
|
+
- lib/virility/exceptions.rb
|
63
63
|
- lib/virility/excitation.rb
|
64
64
|
- lib/virility/strategies/delicious.rb
|
65
65
|
- lib/virility/strategies/facebook.rb
|
@@ -67,13 +67,21 @@ files:
|
|
67
67
|
- lib/virility/strategies/plus_one.rb
|
68
68
|
- lib/virility/strategies/stumble_upon.rb
|
69
69
|
- lib/virility/strategies/twitter.rb
|
70
|
+
- lib/virility/strategy.rb
|
71
|
+
- lib/virility/supporter.rb
|
70
72
|
- lib/virility/version.rb
|
71
|
-
- spec/context_spec.rb
|
72
73
|
- spec/excitation_spec.rb
|
73
74
|
- spec/spec_helper.rb
|
75
|
+
- spec/strategies/delicious_spec.rb
|
76
|
+
- spec/strategies/facebook_spec.rb
|
77
|
+
- spec/strategies/pinterest_spec.rb
|
78
|
+
- spec/strategies/plus_one_spec.rb
|
79
|
+
- spec/strategies/stumble_upon_spec.rb
|
80
|
+
- spec/strategies/twitter_spec.rb
|
81
|
+
- spec/strategy_spec.rb
|
74
82
|
- spec/virility_spec.rb
|
75
83
|
- virility.gemspec
|
76
|
-
homepage:
|
84
|
+
homepage: http://github.com/mindtonic/virility
|
77
85
|
licenses: []
|
78
86
|
post_install_message:
|
79
87
|
rdoc_options: []
|
@@ -87,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
95
|
version: '0'
|
88
96
|
segments:
|
89
97
|
- 0
|
90
|
-
hash: -
|
98
|
+
hash: -615126908122416671
|
91
99
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
100
|
none: false
|
93
101
|
requirements:
|
@@ -96,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
104
|
version: '0'
|
97
105
|
segments:
|
98
106
|
- 0
|
99
|
-
hash: -
|
107
|
+
hash: -615126908122416671
|
100
108
|
requirements: []
|
101
109
|
rubyforge_project:
|
102
110
|
rubygems_version: 1.8.24
|
@@ -108,7 +116,13 @@ summary: Virility calls upon the API's of many popular social services such as F
|
|
108
116
|
collection strategies into the framework so that you can collect all of your statistics
|
109
117
|
in one easy location.
|
110
118
|
test_files:
|
111
|
-
- spec/context_spec.rb
|
112
119
|
- spec/excitation_spec.rb
|
113
120
|
- spec/spec_helper.rb
|
121
|
+
- spec/strategies/delicious_spec.rb
|
122
|
+
- spec/strategies/facebook_spec.rb
|
123
|
+
- spec/strategies/pinterest_spec.rb
|
124
|
+
- spec/strategies/plus_one_spec.rb
|
125
|
+
- spec/strategies/stumble_upon_spec.rb
|
126
|
+
- spec/strategies/twitter_spec.rb
|
127
|
+
- spec/strategy_spec.rb
|
114
128
|
- spec/virility_spec.rb
|
data/lib/virility/context.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module Virility
|
2
|
-
class Context
|
3
|
-
include HTTParty
|
4
|
-
attr_accessor :url, :response, :results
|
5
|
-
|
6
|
-
def initialize url
|
7
|
-
@url = url
|
8
|
-
end
|
9
|
-
|
10
|
-
def poll
|
11
|
-
raise "Abstract Method poll called on #{self.class} - Please define this method"
|
12
|
-
end
|
13
|
-
|
14
|
-
def count
|
15
|
-
raise "Abstract Method count called on #{self.class} - Please define this method"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/spec/context_spec.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
-
|
3
|
-
describe "Context" do
|
4
|
-
before(:each) do
|
5
|
-
@url = "http://creativeallies.com"
|
6
|
-
end
|
7
|
-
|
8
|
-
#
|
9
|
-
# Initialization
|
10
|
-
#
|
11
|
-
|
12
|
-
context "initialization" do
|
13
|
-
it "should raise an error if a URL is not set" do
|
14
|
-
lambda {Virility::Context.new}.should raise_error
|
15
|
-
end
|
16
|
-
|
17
|
-
it "should set the url" do
|
18
|
-
Virility::Excitation.new(@url).url.should == @url
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
#
|
23
|
-
# Interface
|
24
|
-
#
|
25
|
-
|
26
|
-
context "interface" do
|
27
|
-
it "should raise an error on poll" do
|
28
|
-
lambda { Virility::Context.new(@url).poll }.should raise_error
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|