impermium 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/MIT-LICENSE.txt +20 -0
- data/README.md +118 -0
- data/Rakefile +7 -0
- data/impermium.gemspec +31 -0
- data/lib/faraday/raise_4xx.rb +18 -0
- data/lib/impermium/client.rb +57 -0
- data/lib/impermium/configuration.rb +44 -0
- data/lib/impermium/content/blog_post.rb +38 -0
- data/lib/impermium/content/bookmark.rb +47 -0
- data/lib/impermium/content/comment.rb +38 -0
- data/lib/impermium/content/connection.rb +42 -0
- data/lib/impermium/content/listing.rb +37 -0
- data/lib/impermium/content.rb +15 -0
- data/lib/impermium/errors.rb +25 -0
- data/lib/impermium/user/account.rb +50 -0
- data/lib/impermium/user/profile.rb +35 -0
- data/lib/impermium/user.rb +9 -0
- data/lib/impermium/version.rb +3 -0
- data/lib/impermium.rb +20 -0
- data/spec/.gitignore +1 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_blog_post_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_id.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_url.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_enduser_ip.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_user_id.yml +43 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_method/successful_blog_post_request.yml +39 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_blog_post_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_url.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_like_value.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_url.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_bookmark_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_article_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_permalink.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_enduser_ip.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_user_id.yml +43 -0
- data/spec/cassettes/content_API_section/comment_object/comment_method/successful_request.yml +39 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_comment_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_operation_value.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_requester_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_responder_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_response.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_request.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_response.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_connection_type_value.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_type.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_content.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_permalink.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_method/successful_request.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_listing_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_analyst_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/successful_account_analyst_feedback_method_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_attempt_method/missing_arguments.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_attempt_method/successful_account_attempt_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_login_method/successful_account_login_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_method/successful_account_method_request.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/account_object/account_user_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_analyst_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_enduser_ip.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_method/successful_request.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml +38 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_desired_result.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_profile_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_ip.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_user_id.yml +42 -0
- data/spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/successful_request.yml +38 -0
- data/spec/configuration.yml.sample +3 -0
- data/spec/impermium/client_spec.rb +67 -0
- data/spec/impermium/content/blog_post_spec.rb +173 -0
- data/spec/impermium/content/bookmark_spec.rb +205 -0
- data/spec/impermium/content/comment_spec.rb +178 -0
- data/spec/impermium/content/connection_spec.rb +257 -0
- data/spec/impermium/content/listing_spec.rb +169 -0
- data/spec/impermium/user/account_spec.rb +184 -0
- data/spec/impermium/user/profile_spec.rb +154 -0
- data/spec/spec_helper.rb +32 -0
- metadata +433 -0
@@ -0,0 +1,154 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "json"
|
3
|
+
|
4
|
+
describe "user API section" do
|
5
|
+
describe "profile object" do
|
6
|
+
before(:each) do
|
7
|
+
@user_id = "whi543"
|
8
|
+
@reporter_user_id = "whi789"
|
9
|
+
@ip_address = "1.1.1.1"
|
10
|
+
@analyst_id = "123456"
|
11
|
+
@profile_id = "whi543_profile"
|
12
|
+
@desired_result = {:spam_classifier => { :label => "notspam" }}
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "profile method" do
|
16
|
+
describe "missing arguments" do
|
17
|
+
context "missing user_id" do
|
18
|
+
use_vcr_cassette
|
19
|
+
it "should raise BadRequest error" do
|
20
|
+
lambda { Impermium.profile(nil, @profile_id, @ip_address) }.should raise_error(Impermium::BadRequest, /user_id/)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context "missing profile_id" do
|
25
|
+
use_vcr_cassette
|
26
|
+
it "should raise BadRequest error" do
|
27
|
+
lambda { Impermium.profile(@user_id, nil, @ip_address) }.should raise_error(Impermium::BadRequest, /profile_id/)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
context "missing enduser_ip" do
|
32
|
+
use_vcr_cassette
|
33
|
+
it "should raise BadRequest error" do
|
34
|
+
lambda { Impermium.profile(@user_id, @profile_id, '') }.should raise_error(Impermium::BadRequest, /enduser_ip/)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "successful request" do
|
40
|
+
use_vcr_cassette
|
41
|
+
it "should mark user with zero spam classifier score" do
|
42
|
+
res = Impermium.profile(@user_id, @profile_id, @ip_address)
|
43
|
+
res.spam_classifier.score.to_i.should == 0
|
44
|
+
res.spam_classifier.label.should == "notspam"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe "profile_analyst_feedback method" do
|
50
|
+
describe 'missing params' do
|
51
|
+
context "missing profile_id" do
|
52
|
+
use_vcr_cassette
|
53
|
+
it "should raise BadRequest error" do
|
54
|
+
lambda {
|
55
|
+
Impermium.profile_analyst_feedback(nil, @analyst_id, @desired_result)
|
56
|
+
}.should raise_error(Impermium::BadRequest, /profile_id/)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context "missing analyst_id" do
|
61
|
+
use_vcr_cassette
|
62
|
+
it "should raise BadRequest error" do
|
63
|
+
lambda {
|
64
|
+
Impermium.profile_analyst_feedback(@profile_id, nil, @desired_result)
|
65
|
+
}.should raise_error(Impermium::BadRequest, /analyst_id/)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context "missing desired_result" do
|
70
|
+
use_vcr_cassette
|
71
|
+
it "should raise BadRequest error" do
|
72
|
+
lambda {
|
73
|
+
Impermium.profile_analyst_feedback(@profile_id, @analyst_id, nil)
|
74
|
+
}.should raise_error(Impermium::BadRequest, /desired_result/)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
describe "successful request" do
|
80
|
+
use_vcr_cassette
|
81
|
+
it "should return an OK response" do
|
82
|
+
res = Impermium.profile_analyst_feedback(@profile_id, @analyst_id, @desired_result)
|
83
|
+
res.response_id.should be
|
84
|
+
res.timestamp.should be
|
85
|
+
res.status.should be_nil
|
86
|
+
res.message.should be_nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
describe "profile_user_feedback method" do
|
92
|
+
describe "missing arguments" do
|
93
|
+
context "missing profile_id" do
|
94
|
+
use_vcr_cassette
|
95
|
+
it "should raise BadRequest error" do
|
96
|
+
lambda { Impermium.profile_user_feedback(nil, @reporter_user_id,
|
97
|
+
"MODERATOR", @ip_address, @desired_result)
|
98
|
+
}.should raise_error(Impermium::BadRequest, /profile_id/)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
context "missing reporter_user_id" do
|
103
|
+
use_vcr_cassette
|
104
|
+
it "should raise BadRequest error" do
|
105
|
+
lambda { Impermium.profile_user_feedback(@profile_id, nil,
|
106
|
+
"MODERATOR", @ip_address, @desired_result)
|
107
|
+
}.should raise_error(Impermium::BadRequest, /reporter_user_id/)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context "invalid reporter_user_type" do
|
112
|
+
use_vcr_cassette
|
113
|
+
it "should use default value" do
|
114
|
+
res = Impermium.profile_user_feedback(@profile_id, @reporter_user_id, "NOT VALID", @ip_address, @desired_result)
|
115
|
+
res.response_id.should be
|
116
|
+
res.timestamp.should be
|
117
|
+
res.status.should be_nil
|
118
|
+
res.message.should be_nil
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
context "missing reporter_ip" do
|
123
|
+
use_vcr_cassette
|
124
|
+
it "should raise BadRequest" do
|
125
|
+
lambda { Impermium.profile_user_feedback(@profile_id, @reporter_user_id,
|
126
|
+
"MODERATOR", "", @desired_result)
|
127
|
+
}.should raise_error(Impermium::BadRequest, /reporter_ip/)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
context "missing desired_result" do
|
132
|
+
use_vcr_cassette
|
133
|
+
it "should raise BadRequest error" do
|
134
|
+
lambda { Impermium.profile_user_feedback(@profile_id, @reporter_user_id,
|
135
|
+
"MODERATOR", @ip_address, nil)
|
136
|
+
}.should raise_error(Impermium::BadRequest, /desired_result/)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
describe "successful request" do
|
142
|
+
use_vcr_cassette
|
143
|
+
it "should return an OK response" do
|
144
|
+
res = Impermium.profile_user_feedback(@profile_id, @reporter_user_id, "ENDUSER", @ip_address, @desired_result)
|
145
|
+
res.response_id.start_with?("CLID").should be_true
|
146
|
+
res.response_id.should be
|
147
|
+
res.timestamp.should be
|
148
|
+
res.status.should be_nil
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
end
|
154
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'impermium'
|
3
|
+
require "vcr"
|
4
|
+
require "psych"
|
5
|
+
|
6
|
+
conf_file = File.join(File.expand_path("..", __FILE__), "configuration.yml")
|
7
|
+
conf = {}
|
8
|
+
if File.exist?(conf_file)
|
9
|
+
conf = Psych.load_file(conf_file)
|
10
|
+
Impermium.api_key = conf[:api_key]
|
11
|
+
Impermium.endpoint = conf[:endpoint]
|
12
|
+
else
|
13
|
+
puts "WARNING: No configuration file found. API key must be set before tests are started"
|
14
|
+
end
|
15
|
+
|
16
|
+
VCR.configure do |vcr|
|
17
|
+
vcr.cassette_library_dir = "spec/cassettes"
|
18
|
+
vcr.hook_into :webmock
|
19
|
+
vcr.default_cassette_options = { :record => :once }
|
20
|
+
|
21
|
+
vcr.before_record do |vc|
|
22
|
+
vc.request.uri.sub!(Impermium.api_key, conf[:api_key_replacement])
|
23
|
+
end
|
24
|
+
|
25
|
+
vcr.before_playback do |vc|
|
26
|
+
vc.request.uri.sub!(conf[:api_key_replacement], Impermium.api_key)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
RSpec.configure do |conf|
|
31
|
+
conf.extend VCR::RSpec::Macros
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,433 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: impermium
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Juanjo Bazán
|
9
|
+
- Bosko Ivanisevic
|
10
|
+
- Neil Berkman
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2012-03-06 00:00:00.000000000 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: faraday
|
18
|
+
requirement: &2152468160 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ~>
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.7.4
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *2152468160
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: &2152467600 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.7.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *2152467600
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: hashie
|
40
|
+
requirement: &2152467100 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.1.0
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *2152467100
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: yajl-ruby
|
51
|
+
requirement: &2152466600 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 0.8.3
|
57
|
+
type: :runtime
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *2152466600
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: multi_json
|
62
|
+
requirement: &2152466220 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *2152466220
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rspec
|
73
|
+
requirement: &2152373820 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 2.8.0
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *2152373820
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: webmock
|
84
|
+
requirement: &2152372720 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.8.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: *2152372720
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: vcr
|
95
|
+
requirement: &2152371800 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ~>
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: 2.0.0
|
101
|
+
type: :development
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: *2152371800
|
104
|
+
description: Ruby wrapper for the Impermium social spam API
|
105
|
+
email:
|
106
|
+
- jjbazan@gmail.com
|
107
|
+
executables: []
|
108
|
+
extensions: []
|
109
|
+
extra_rdoc_files: []
|
110
|
+
files:
|
111
|
+
- .gitignore
|
112
|
+
- .rspec
|
113
|
+
- .rvmrc
|
114
|
+
- Gemfile
|
115
|
+
- MIT-LICENSE.txt
|
116
|
+
- README.md
|
117
|
+
- Rakefile
|
118
|
+
- impermium.gemspec
|
119
|
+
- lib/faraday/raise_4xx.rb
|
120
|
+
- lib/impermium.rb
|
121
|
+
- lib/impermium/client.rb
|
122
|
+
- lib/impermium/configuration.rb
|
123
|
+
- lib/impermium/content.rb
|
124
|
+
- lib/impermium/content/blog_post.rb
|
125
|
+
- lib/impermium/content/bookmark.rb
|
126
|
+
- lib/impermium/content/comment.rb
|
127
|
+
- lib/impermium/content/connection.rb
|
128
|
+
- lib/impermium/content/listing.rb
|
129
|
+
- lib/impermium/errors.rb
|
130
|
+
- lib/impermium/user.rb
|
131
|
+
- lib/impermium/user/account.rb
|
132
|
+
- lib/impermium/user/profile.rb
|
133
|
+
- lib/impermium/version.rb
|
134
|
+
- spec/.gitignore
|
135
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
136
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_blog_post_id.yml
|
137
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
138
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/successful_request.yml
|
139
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_id.yml
|
140
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_permalink.yml
|
141
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_url.yml
|
142
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_content.yml
|
143
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_enduser_ip.yml
|
144
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_user_id.yml
|
145
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/successful_blog_post_request.yml
|
146
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
147
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_blog_post_id.yml
|
148
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_desired_result.yml
|
149
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
150
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
151
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/successful_request.yml
|
152
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
153
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_bookmark_id.yml
|
154
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
155
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/successful_request.yml
|
156
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_id.yml
|
157
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_url.yml
|
158
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_enduser_ip.yml
|
159
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_like_value.yml
|
160
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_user_id.yml
|
161
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/successful_request.yml
|
162
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_id.yml
|
163
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_url.yml
|
164
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_enduser_ip.yml
|
165
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_user_id.yml
|
166
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/successful_request.yml
|
167
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
168
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_bookmark_id.yml
|
169
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_desired_result.yml
|
170
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
171
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
172
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/successful_request.yml
|
173
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
174
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_comment_id.yml
|
175
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
176
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/successful_request.yml
|
177
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_article_permalink.yml
|
178
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_id.yml
|
179
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_permalink.yml
|
180
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_content.yml
|
181
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_enduser_ip.yml
|
182
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_user_id.yml
|
183
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/successful_request.yml
|
184
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
185
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_comment_id.yml
|
186
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_desired_result.yml
|
187
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
188
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
189
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/successful_request.yml
|
190
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/invalid_connection_type_value.yml
|
191
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
192
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_id.yml
|
193
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_type.yml
|
194
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
195
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/successful_request.yml
|
196
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_connection_type_value.yml
|
197
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_operation_value.yml
|
198
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_id.yml
|
199
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_type.yml
|
200
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_enduser_ip.yml
|
201
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_requester_user_id.yml
|
202
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_responder_user_id.yml
|
203
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_request.yml
|
204
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_response.yml
|
205
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_request.yml
|
206
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_response.yml
|
207
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_connection_type_value.yml
|
208
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
209
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_id.yml
|
210
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_type.yml
|
211
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_desired_result.yml
|
212
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
213
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
214
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/successful_request.yml
|
215
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
216
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
217
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_listing_id.yml
|
218
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/successful_request.yml
|
219
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_content.yml
|
220
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_enduser_ip.yml
|
221
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_id.yml
|
222
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_permalink.yml
|
223
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_user_id.yml
|
224
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/successful_request.yml
|
225
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
226
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_desired_result.yml
|
227
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_listing_id.yml
|
228
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
229
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
230
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/successful_request.yml
|
231
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
232
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_user_id.yml
|
233
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/successful_account_analyst_feedback_method_request.yml
|
234
|
+
- spec/cassettes/user_API_section/account_object/account_attempt_method/missing_arguments.yml
|
235
|
+
- spec/cassettes/user_API_section/account_object/account_attempt_method/successful_account_attempt_request.yml
|
236
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_enduser_ip.yml
|
237
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_user_id.yml
|
238
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/successful_account_login_request.yml
|
239
|
+
- spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_enduser_ip.yml
|
240
|
+
- spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_user_id.yml
|
241
|
+
- spec/cassettes/user_API_section/account_object/account_method/successful_account_method_request.yml
|
242
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
243
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_desired_result.yml
|
244
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
245
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
246
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_user_id.yml
|
247
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/successful_request.yml
|
248
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_analyst_id.yml
|
249
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_desired_result.yml
|
250
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_profile_id.yml
|
251
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/successful_request.yml
|
252
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_enduser_ip.yml
|
253
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_profile_id.yml
|
254
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_user_id.yml
|
255
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/successful_request.yml
|
256
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
257
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_desired_result.yml
|
258
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_profile_id.yml
|
259
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
260
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
261
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/successful_request.yml
|
262
|
+
- spec/configuration.yml.sample
|
263
|
+
- spec/impermium/client_spec.rb
|
264
|
+
- spec/impermium/content/blog_post_spec.rb
|
265
|
+
- spec/impermium/content/bookmark_spec.rb
|
266
|
+
- spec/impermium/content/comment_spec.rb
|
267
|
+
- spec/impermium/content/connection_spec.rb
|
268
|
+
- spec/impermium/content/listing_spec.rb
|
269
|
+
- spec/impermium/user/account_spec.rb
|
270
|
+
- spec/impermium/user/profile_spec.rb
|
271
|
+
- spec/spec_helper.rb
|
272
|
+
homepage: https://github.com/weheartit/impermium
|
273
|
+
licenses: []
|
274
|
+
post_install_message:
|
275
|
+
rdoc_options: []
|
276
|
+
require_paths:
|
277
|
+
- lib
|
278
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
279
|
+
none: false
|
280
|
+
requirements:
|
281
|
+
- - ! '>='
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '0'
|
284
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
|
+
none: false
|
286
|
+
requirements:
|
287
|
+
- - ! '>='
|
288
|
+
- !ruby/object:Gem::Version
|
289
|
+
version: '0'
|
290
|
+
requirements: []
|
291
|
+
rubyforge_project:
|
292
|
+
rubygems_version: 1.8.15
|
293
|
+
signing_key:
|
294
|
+
specification_version: 3
|
295
|
+
summary: Impermium API wrapper
|
296
|
+
test_files:
|
297
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
298
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_blog_post_id.yml
|
299
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
300
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_analyst_feedback_method/successful_request.yml
|
301
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_id.yml
|
302
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_post_permalink.yml
|
303
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_blog_url.yml
|
304
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_content.yml
|
305
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_enduser_ip.yml
|
306
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/missing_arguments/missing_user_id.yml
|
307
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_method/successful_blog_post_request.yml
|
308
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
309
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_blog_post_id.yml
|
310
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_desired_result.yml
|
311
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
312
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
313
|
+
- spec/cassettes/content_API_section/blog_post_object/blog_post_user_feedback_method/successful_request.yml
|
314
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
315
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_bookmark_id.yml
|
316
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
317
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_analyst_feedback_method/successful_request.yml
|
318
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_id.yml
|
319
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_bookmark_url.yml
|
320
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_enduser_ip.yml
|
321
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_like_value.yml
|
322
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/missing_arguments/missing_user_id.yml
|
323
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_like_method/successful_request.yml
|
324
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_id.yml
|
325
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_bookmark_url.yml
|
326
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_enduser_ip.yml
|
327
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/missing_arguments/missing_user_id.yml
|
328
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_method/successful_request.yml
|
329
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
330
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_bookmark_id.yml
|
331
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_desired_result.yml
|
332
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
333
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
334
|
+
- spec/cassettes/content_API_section/bookmark_object/bookmark_user_feedback_method/successful_request.yml
|
335
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
336
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_comment_id.yml
|
337
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
338
|
+
- spec/cassettes/content_API_section/comment_object/comment_analyst_feedback_method/successful_request.yml
|
339
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_article_permalink.yml
|
340
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_id.yml
|
341
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_comment_permalink.yml
|
342
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_content.yml
|
343
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_enduser_ip.yml
|
344
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/missing_arguments/missing_user_id.yml
|
345
|
+
- spec/cassettes/content_API_section/comment_object/comment_method/successful_request.yml
|
346
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
347
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_comment_id.yml
|
348
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_desired_result.yml
|
349
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
350
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
351
|
+
- spec/cassettes/content_API_section/comment_object/comment_user_feedback_method/successful_request.yml
|
352
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/invalid_connection_type_value.yml
|
353
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
354
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_id.yml
|
355
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_connection_type.yml
|
356
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
357
|
+
- spec/cassettes/content_API_section/connection_object/connection_analyst_feedback_method/successful_request.yml
|
358
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_connection_type_value.yml
|
359
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/invalid_operation_value.yml
|
360
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_id.yml
|
361
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_connection_type.yml
|
362
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_enduser_ip.yml
|
363
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_requester_user_id.yml
|
364
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/missing_arguments/missing_responder_user_id.yml
|
365
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_request.yml
|
366
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_follow_connection_response.yml
|
367
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_request.yml
|
368
|
+
- spec/cassettes/content_API_section/connection_object/connection_method/successful_friend_connection_response.yml
|
369
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_connection_type_value.yml
|
370
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
371
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_id.yml
|
372
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_connection_type.yml
|
373
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_desired_result.yml
|
374
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
375
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
376
|
+
- spec/cassettes/content_API_section/connection_object/connection_user_feedback_method/successful_request.yml
|
377
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
378
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_desired_result.yml
|
379
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/missing_arguments/missing_listing_id.yml
|
380
|
+
- spec/cassettes/content_API_section/listing_object/listing_analyst_feedback_method/successful_request.yml
|
381
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_content.yml
|
382
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_enduser_ip.yml
|
383
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_id.yml
|
384
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_listing_permalink.yml
|
385
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/missing_arguments/missing_user_id.yml
|
386
|
+
- spec/cassettes/content_API_section/listing_object/listing_method/successful_request.yml
|
387
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
388
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_desired_result.yml
|
389
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_listing_id.yml
|
390
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
391
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
392
|
+
- spec/cassettes/content_API_section/listing_object/listing_user_feedback_method/successful_request.yml
|
393
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_analyst_id.yml
|
394
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/missing_arguments/missing_user_id.yml
|
395
|
+
- spec/cassettes/user_API_section/account_object/account_analyst_feedback_method/successful_account_analyst_feedback_method_request.yml
|
396
|
+
- spec/cassettes/user_API_section/account_object/account_attempt_method/missing_arguments.yml
|
397
|
+
- spec/cassettes/user_API_section/account_object/account_attempt_method/successful_account_attempt_request.yml
|
398
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_enduser_ip.yml
|
399
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/missing_arguments/missing_user_id.yml
|
400
|
+
- spec/cassettes/user_API_section/account_object/account_login_method/successful_account_login_request.yml
|
401
|
+
- spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_enduser_ip.yml
|
402
|
+
- spec/cassettes/user_API_section/account_object/account_method/missing_arguments/missing_user_id.yml
|
403
|
+
- spec/cassettes/user_API_section/account_object/account_method/successful_account_method_request.yml
|
404
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
405
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_desired_result.yml
|
406
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
407
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
408
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/missing_arguments/missing_user_id.yml
|
409
|
+
- spec/cassettes/user_API_section/account_object/account_user_feedback_method/successful_request.yml
|
410
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_analyst_id.yml
|
411
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_desired_result.yml
|
412
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/missing_params/missing_profile_id.yml
|
413
|
+
- spec/cassettes/user_API_section/profile_object/profile_analyst_feedback_method/successful_request.yml
|
414
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_enduser_ip.yml
|
415
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_profile_id.yml
|
416
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/missing_arguments/missing_user_id.yml
|
417
|
+
- spec/cassettes/user_API_section/profile_object/profile_method/successful_request.yml
|
418
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/invalid_reporter_user_type.yml
|
419
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_desired_result.yml
|
420
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_profile_id.yml
|
421
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_ip.yml
|
422
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/missing_arguments/missing_reporter_user_id.yml
|
423
|
+
- spec/cassettes/user_API_section/profile_object/profile_user_feedback_method/successful_request.yml
|
424
|
+
- spec/configuration.yml.sample
|
425
|
+
- spec/impermium/client_spec.rb
|
426
|
+
- spec/impermium/content/blog_post_spec.rb
|
427
|
+
- spec/impermium/content/bookmark_spec.rb
|
428
|
+
- spec/impermium/content/comment_spec.rb
|
429
|
+
- spec/impermium/content/connection_spec.rb
|
430
|
+
- spec/impermium/content/listing_spec.rb
|
431
|
+
- spec/impermium/user/account_spec.rb
|
432
|
+
- spec/impermium/user/profile_spec.rb
|
433
|
+
- spec/spec_helper.rb
|