tinderbot 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/tinderbot/cli/application.rb +7 -0
- data/lib/tinderbot/client.rb +17 -2
- data/lib/tinderbot/version.rb +1 -1
- data/spec/fixtures/recommended_users_with_all_limit_reached.json +166 -0
- data/spec/fixtures/recommended_users_with_one_limit_reached.json +166 -0
- data/spec/tinder/client_spec.rb +40 -7
- metadata +29 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 373ef09ae538bb0455a11ebabf55f7beaf029c94
|
4
|
+
data.tar.gz: e0641623266b9a40aa09aad6ced30482535bc8c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e314aa567be369d926b373f3c4fb69a7c9fade8fda377d8a07ffd5c92f9169a0fc2b2ae1b0961a7f2bd482b4e57e0ae954c7459b3381e771040adf9708132f3b
|
7
|
+
data.tar.gz: 9bf88b631fa0f23bb2d15951574a4ee07174cbd9ea72ab0c8e17767dd353d551fa2b257623bf3aba7277ebb406ac597447fbeecea24ff2667e8704f213583ecd
|
data/README.md
CHANGED
@@ -75,8 +75,12 @@ tinder_client.update_location '40.7313029,-73.9884189'
|
|
75
75
|
# you can provide a user instance or a user id to like or dislike users
|
76
76
|
tinder_client.like user
|
77
77
|
tinder_client.like user.id
|
78
|
+
|
78
79
|
tinder_client.dislike user
|
79
80
|
tinder_client.dislike user.id
|
81
|
+
|
82
|
+
tinder_client.remove user
|
83
|
+
tinder_client.remove user.id
|
80
84
|
```
|
81
85
|
|
82
86
|
### Using the bot
|
@@ -98,6 +102,7 @@ Commands:
|
|
98
102
|
tinderbot location ALTITUDE,LONGITUDE # Update location using latitude and longitude, e.g. tinderbot location 40.7313029,-73.9884189
|
99
103
|
tinderbot profile # Get your profile data
|
100
104
|
tinderbot recommended # Get recommended users
|
105
|
+
tinderbot remove USER_ID # Remove previously liked user
|
101
106
|
tinderbot send USER_ID MESSAGE # Send message to user
|
102
107
|
tinderbot updates # Get updates
|
103
108
|
tinderbot user USER_ID # Get user profile data
|
@@ -113,4 +118,4 @@ Feel free to contribute!
|
|
113
118
|
5. Create a new Pull Request
|
114
119
|
|
115
120
|
## License
|
116
|
-
Released under the MIT License, which can be found in `LICENSE.txt`.
|
121
|
+
Released under the MIT License, which can be found in `LICENSE.txt`.
|
@@ -47,6 +47,13 @@ module Tinderbot
|
|
47
47
|
tinder_client.dislike user_id
|
48
48
|
end
|
49
49
|
|
50
|
+
desc 'remove USER_ID', 'Remove previously liked user'
|
51
|
+
|
52
|
+
def remove(user_id)
|
53
|
+
tinder_client = sign_in
|
54
|
+
tinder_client.remove user_id
|
55
|
+
end
|
56
|
+
|
50
57
|
desc 'send USER_ID MESSAGE', 'Send message to user'
|
51
58
|
|
52
59
|
def send(user_id, message)
|
data/lib/tinderbot/client.rb
CHANGED
@@ -33,7 +33,8 @@ module Tinderbot
|
|
33
33
|
|
34
34
|
def recommended_users
|
35
35
|
json_results = JSON.parse(@connection.post('user/recs').body)['results']
|
36
|
-
json_results.map { |r| Tinderbot::Model::User.build_from_tinder_json r } if json_results
|
36
|
+
users = json_results.select { |r| r['name'] != 'Tinder Team' }.map { |r| Tinderbot::Model::User.build_from_tinder_json r } if json_results
|
37
|
+
users || []
|
37
38
|
end
|
38
39
|
|
39
40
|
def like(user_or_user_id)
|
@@ -56,6 +57,16 @@ module Tinderbot
|
|
56
57
|
end
|
57
58
|
end
|
58
59
|
|
60
|
+
def remove(user_or_user_id)
|
61
|
+
if user_or_user_id.is_a? Tinderbot::Model::User
|
62
|
+
remove_from_user_id(user_or_user_id.id)
|
63
|
+
puts "Removed #{user_or_user_id.id} (#{user_or_user_id.name})" if @logs_enabled
|
64
|
+
else
|
65
|
+
remove_from_user_id(user_or_user_id)
|
66
|
+
puts "Removed #{user_or_user_id}" if @logs_enabled
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
59
70
|
def send_message(user_id, message)
|
60
71
|
@connection.post("user/matches/#{user_id}", {message: message})
|
61
72
|
puts "Sent message to #{user_id}" if @logs_enabled
|
@@ -88,6 +99,10 @@ module Tinderbot
|
|
88
99
|
@connection.get "pass/#{user_id}"
|
89
100
|
end
|
90
101
|
|
102
|
+
def remove_from_user_id(user_id)
|
103
|
+
@connection.delete "user/matches/#{user_id}"
|
104
|
+
end
|
105
|
+
|
91
106
|
def build_connection
|
92
107
|
@connection = Faraday.new(url: TINDER_API_URL) do |faraday|
|
93
108
|
faraday.request :json
|
@@ -96,4 +111,4 @@ module Tinderbot
|
|
96
111
|
@connection.headers[:user_agent] = CONNECTION_USER_AGENT
|
97
112
|
end
|
98
113
|
end
|
99
|
-
end
|
114
|
+
end
|
data/lib/tinderbot/version.rb
CHANGED
@@ -0,0 +1,166 @@
|
|
1
|
+
{
|
2
|
+
"results": [
|
3
|
+
{
|
4
|
+
"_id": "user_1_id",
|
5
|
+
"bio": "user bio",
|
6
|
+
"birth_date": "1989-02-06T00:00:00.000Z",
|
7
|
+
"gender": 0,
|
8
|
+
"name": "Tinder Team",
|
9
|
+
"ping_time": "2014-08-25T18:01:50.032Z",
|
10
|
+
"photos": [
|
11
|
+
{
|
12
|
+
"url": "http://images.gotinder.com/user_1_id/image_1_id.jpg",
|
13
|
+
"processedFiles": [
|
14
|
+
{
|
15
|
+
"url": "http://images.gotinder.com/user_1_id/640x640_image_1_id.jpg",
|
16
|
+
"height": 640,
|
17
|
+
"width": 640
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"url": "http://images.gotinder.com/user_1_id/320x320_image_1_id.jpg",
|
21
|
+
"height": 320,
|
22
|
+
"width": 320
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"url": "http://images.gotinder.com/user_1_id/172x172_image_1_id.jpg",
|
26
|
+
"height": 172,
|
27
|
+
"width": 172
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"url": "http://images.gotinder.com/user_1_id/84x84_image_1_id.jpg",
|
31
|
+
"height": 84,
|
32
|
+
"width": 84
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"extension": "jpg",
|
36
|
+
"fileName": "image_1_id.jpg",
|
37
|
+
"main": true,
|
38
|
+
"ydistance_percent": 1,
|
39
|
+
"yoffset_percent": 0,
|
40
|
+
"xoffset_percent": 0.1235275,
|
41
|
+
"id": "image_1_id",
|
42
|
+
"xdistance_percent": 0.7529297
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"url": "http://images.gotinder.com/user_1_id/image_2_id.jpg",
|
46
|
+
"processedFiles": [
|
47
|
+
{
|
48
|
+
"url": "http://images.gotinder.com/user_1_id/640x640_image_2_id.jpg",
|
49
|
+
"height": 640,
|
50
|
+
"width": 640
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"url": "http://images.gotinder.com/user_1_id/320x320_image_2_id.jpg",
|
54
|
+
"height": 320,
|
55
|
+
"width": 320
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"url": "http://images.gotinder.com/user_1_id/172x172_image_2_id.jpg",
|
59
|
+
"height": 172,
|
60
|
+
"width": 172
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"url": "http://images.gotinder.com/user_1_id/84x84_image_2_id.jpg",
|
64
|
+
"height": 84,
|
65
|
+
"width": 84
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"extension": "jpg",
|
69
|
+
"fileName": "image_2_id.jpg",
|
70
|
+
"main": false,
|
71
|
+
"ydistance_percent": 0.8473684,
|
72
|
+
"yoffset_percent": 0.005296052,
|
73
|
+
"xoffset_percent": 0,
|
74
|
+
"id": "image_2_id",
|
75
|
+
"xdistance_percent": 1
|
76
|
+
}
|
77
|
+
],
|
78
|
+
"birth_date_info": "fuzzy birthdate active, not displaying real birth_date",
|
79
|
+
"common_friends": ["common_friend_1_facebook_id", "common_friend_2_facebook_id"],
|
80
|
+
"common_like_count": 130,
|
81
|
+
"common_friend_count": 309,
|
82
|
+
"distance_mi": 1
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"_id": "user_2_id",
|
86
|
+
"bio": "user bio",
|
87
|
+
"birth_date": "1989-02-06T00:00:00.000Z",
|
88
|
+
"gender": 0,
|
89
|
+
"name": "Tinder Team",
|
90
|
+
"ping_time": "2014-08-25T18:01:50.032Z",
|
91
|
+
"photos": [
|
92
|
+
{
|
93
|
+
"url": "http://images.gotinder.com/user_2_id/image_1_id.jpg",
|
94
|
+
"processedFiles": [
|
95
|
+
{
|
96
|
+
"url": "http://images.gotinder.com/user_2_id/640x640_image_1_id.jpg",
|
97
|
+
"height": 640,
|
98
|
+
"width": 640
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"url": "http://images.gotinder.com/user_2_id/320x320_image_1_id.jpg",
|
102
|
+
"height": 320,
|
103
|
+
"width": 320
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"url": "http://images.gotinder.com/user_2_id/172x172_image_1_id.jpg",
|
107
|
+
"height": 172,
|
108
|
+
"width": 172
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"url": "http://images.gotinder.com/user_2_id/84x84_image_1_id.jpg",
|
112
|
+
"height": 84,
|
113
|
+
"width": 84
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"extension": "jpg",
|
117
|
+
"fileName": "image_1_id.jpg",
|
118
|
+
"main": true,
|
119
|
+
"ydistance_percent": 1,
|
120
|
+
"yoffset_percent": 0,
|
121
|
+
"xoffset_percent": 0.1235275,
|
122
|
+
"id": "image_1_id",
|
123
|
+
"xdistance_percent": 0.7529297
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"url": "http://images.gotinder.com/user_2_id/image_2_id.jpg",
|
127
|
+
"processedFiles": [
|
128
|
+
{
|
129
|
+
"url": "http://images.gotinder.com/user_2_id/640x640_image_2_id.jpg",
|
130
|
+
"height": 640,
|
131
|
+
"width": 640
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"url": "http://images.gotinder.com/user_2_id/320x320_image_2_id.jpg",
|
135
|
+
"height": 320,
|
136
|
+
"width": 320
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"url": "http://images.gotinder.com/user_2_id/172x172_image_2_id.jpg",
|
140
|
+
"height": 172,
|
141
|
+
"width": 172
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"url": "http://images.gotinder.com/user_2_id/84x84_image_2_id.jpg",
|
145
|
+
"height": 84,
|
146
|
+
"width": 84
|
147
|
+
}
|
148
|
+
],
|
149
|
+
"extension": "jpg",
|
150
|
+
"fileName": "image_2_id.jpg",
|
151
|
+
"main": false,
|
152
|
+
"ydistance_percent": 0.8473684,
|
153
|
+
"yoffset_percent": 0.005296052,
|
154
|
+
"xoffset_percent": 0,
|
155
|
+
"id": "image_2_id",
|
156
|
+
"xdistance_percent": 1
|
157
|
+
}
|
158
|
+
],
|
159
|
+
"birth_date_info": "fuzzy birthdate active, not displaying real birth_date",
|
160
|
+
"common_friends": ["common_friend_1_facebook_id", "common_friend_2_facebook_id"],
|
161
|
+
"common_like_count": 130,
|
162
|
+
"common_friend_count": 309,
|
163
|
+
"distance_mi": 1
|
164
|
+
}
|
165
|
+
]
|
166
|
+
}
|
@@ -0,0 +1,166 @@
|
|
1
|
+
{
|
2
|
+
"results": [
|
3
|
+
{
|
4
|
+
"_id": "user_1_id",
|
5
|
+
"bio": "user bio",
|
6
|
+
"birth_date": "1989-02-06T00:00:00.000Z",
|
7
|
+
"gender": 0,
|
8
|
+
"name": "User 1",
|
9
|
+
"ping_time": "2014-08-25T18:01:50.032Z",
|
10
|
+
"photos": [
|
11
|
+
{
|
12
|
+
"url": "http://images.gotinder.com/user_1_id/image_1_id.jpg",
|
13
|
+
"processedFiles": [
|
14
|
+
{
|
15
|
+
"url": "http://images.gotinder.com/user_1_id/640x640_image_1_id.jpg",
|
16
|
+
"height": 640,
|
17
|
+
"width": 640
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"url": "http://images.gotinder.com/user_1_id/320x320_image_1_id.jpg",
|
21
|
+
"height": 320,
|
22
|
+
"width": 320
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"url": "http://images.gotinder.com/user_1_id/172x172_image_1_id.jpg",
|
26
|
+
"height": 172,
|
27
|
+
"width": 172
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"url": "http://images.gotinder.com/user_1_id/84x84_image_1_id.jpg",
|
31
|
+
"height": 84,
|
32
|
+
"width": 84
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"extension": "jpg",
|
36
|
+
"fileName": "image_1_id.jpg",
|
37
|
+
"main": true,
|
38
|
+
"ydistance_percent": 1,
|
39
|
+
"yoffset_percent": 0,
|
40
|
+
"xoffset_percent": 0.1235275,
|
41
|
+
"id": "image_1_id",
|
42
|
+
"xdistance_percent": 0.7529297
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"url": "http://images.gotinder.com/user_1_id/image_2_id.jpg",
|
46
|
+
"processedFiles": [
|
47
|
+
{
|
48
|
+
"url": "http://images.gotinder.com/user_1_id/640x640_image_2_id.jpg",
|
49
|
+
"height": 640,
|
50
|
+
"width": 640
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"url": "http://images.gotinder.com/user_1_id/320x320_image_2_id.jpg",
|
54
|
+
"height": 320,
|
55
|
+
"width": 320
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"url": "http://images.gotinder.com/user_1_id/172x172_image_2_id.jpg",
|
59
|
+
"height": 172,
|
60
|
+
"width": 172
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"url": "http://images.gotinder.com/user_1_id/84x84_image_2_id.jpg",
|
64
|
+
"height": 84,
|
65
|
+
"width": 84
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"extension": "jpg",
|
69
|
+
"fileName": "image_2_id.jpg",
|
70
|
+
"main": false,
|
71
|
+
"ydistance_percent": 0.8473684,
|
72
|
+
"yoffset_percent": 0.005296052,
|
73
|
+
"xoffset_percent": 0,
|
74
|
+
"id": "image_2_id",
|
75
|
+
"xdistance_percent": 1
|
76
|
+
}
|
77
|
+
],
|
78
|
+
"birth_date_info": "fuzzy birthdate active, not displaying real birth_date",
|
79
|
+
"common_friends": ["common_friend_1_facebook_id", "common_friend_2_facebook_id"],
|
80
|
+
"common_like_count": 130,
|
81
|
+
"common_friend_count": 309,
|
82
|
+
"distance_mi": 1
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"_id": "user_2_id",
|
86
|
+
"bio": "user bio",
|
87
|
+
"birth_date": "1989-02-06T00:00:00.000Z",
|
88
|
+
"gender": 0,
|
89
|
+
"name": "Tinder Team",
|
90
|
+
"ping_time": "2014-08-25T18:01:50.032Z",
|
91
|
+
"photos": [
|
92
|
+
{
|
93
|
+
"url": "http://images.gotinder.com/user_2_id/image_1_id.jpg",
|
94
|
+
"processedFiles": [
|
95
|
+
{
|
96
|
+
"url": "http://images.gotinder.com/user_2_id/640x640_image_1_id.jpg",
|
97
|
+
"height": 640,
|
98
|
+
"width": 640
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"url": "http://images.gotinder.com/user_2_id/320x320_image_1_id.jpg",
|
102
|
+
"height": 320,
|
103
|
+
"width": 320
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"url": "http://images.gotinder.com/user_2_id/172x172_image_1_id.jpg",
|
107
|
+
"height": 172,
|
108
|
+
"width": 172
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"url": "http://images.gotinder.com/user_2_id/84x84_image_1_id.jpg",
|
112
|
+
"height": 84,
|
113
|
+
"width": 84
|
114
|
+
}
|
115
|
+
],
|
116
|
+
"extension": "jpg",
|
117
|
+
"fileName": "image_1_id.jpg",
|
118
|
+
"main": true,
|
119
|
+
"ydistance_percent": 1,
|
120
|
+
"yoffset_percent": 0,
|
121
|
+
"xoffset_percent": 0.1235275,
|
122
|
+
"id": "image_1_id",
|
123
|
+
"xdistance_percent": 0.7529297
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"url": "http://images.gotinder.com/user_2_id/image_2_id.jpg",
|
127
|
+
"processedFiles": [
|
128
|
+
{
|
129
|
+
"url": "http://images.gotinder.com/user_2_id/640x640_image_2_id.jpg",
|
130
|
+
"height": 640,
|
131
|
+
"width": 640
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"url": "http://images.gotinder.com/user_2_id/320x320_image_2_id.jpg",
|
135
|
+
"height": 320,
|
136
|
+
"width": 320
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"url": "http://images.gotinder.com/user_2_id/172x172_image_2_id.jpg",
|
140
|
+
"height": 172,
|
141
|
+
"width": 172
|
142
|
+
},
|
143
|
+
{
|
144
|
+
"url": "http://images.gotinder.com/user_2_id/84x84_image_2_id.jpg",
|
145
|
+
"height": 84,
|
146
|
+
"width": 84
|
147
|
+
}
|
148
|
+
],
|
149
|
+
"extension": "jpg",
|
150
|
+
"fileName": "image_2_id.jpg",
|
151
|
+
"main": false,
|
152
|
+
"ydistance_percent": 0.8473684,
|
153
|
+
"yoffset_percent": 0.005296052,
|
154
|
+
"xoffset_percent": 0,
|
155
|
+
"id": "image_2_id",
|
156
|
+
"xdistance_percent": 1
|
157
|
+
}
|
158
|
+
],
|
159
|
+
"birth_date_info": "fuzzy birthdate active, not displaying real birth_date",
|
160
|
+
"common_friends": ["common_friend_1_facebook_id", "common_friend_2_facebook_id"],
|
161
|
+
"common_like_count": 130,
|
162
|
+
"common_friend_count": 309,
|
163
|
+
"distance_mi": 1
|
164
|
+
}
|
165
|
+
]
|
166
|
+
}
|
data/spec/tinder/client_spec.rb
CHANGED
@@ -46,22 +46,36 @@ describe Tinderbot::Client do
|
|
46
46
|
|
47
47
|
describe '.recommended_users' do
|
48
48
|
let(:recommended_users_tinder_raw_json) { open('spec/fixtures/recommended_users.json').read }
|
49
|
-
|
49
|
+
|
50
50
|
before { expect(connection).to receive(:post).with('user/recs').and_return(connection) }
|
51
51
|
before { expect(connection).to receive(:body).and_return(recommended_users_tinder_raw_json) }
|
52
|
-
|
52
|
+
|
53
53
|
subject { tinder_client.recommended_users }
|
54
|
-
|
55
|
-
context 'with recommended_users' do
|
54
|
+
|
55
|
+
context 'with recommended_users' do
|
56
56
|
let(:recommended_users_tinder_raw_json) { open('spec/fixtures/recommended_users.json').read }
|
57
57
|
|
58
58
|
it { should eq JSON.parse(recommended_users_tinder_raw_json)['results'].map { |r| Tinderbot::Model::User.build_from_tinder_json r } }
|
59
59
|
end
|
60
60
|
|
61
|
-
context '
|
61
|
+
context 'limit is reached' do
|
62
|
+
context 'there is still users in the result' do
|
63
|
+
let(:recommended_users_tinder_raw_json) { open('spec/fixtures/recommended_users_with_one_limit_reached.json').read }
|
64
|
+
|
65
|
+
it { should eq [Tinderbot::Model::User.build_from_tinder_json(JSON.parse(recommended_users_tinder_raw_json)['results'][0])] }
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'there is only limit reached users' do
|
69
|
+
let(:recommended_users_tinder_raw_json) { open('spec/fixtures/recommended_users_with_all_limit_reached.json').read }
|
70
|
+
|
71
|
+
it { should eq [] }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'with timeout from tinder API' do
|
62
76
|
let(:recommended_users_tinder_raw_json) { open('spec/fixtures/timeout_recommended_users.json').read }
|
63
77
|
|
64
|
-
it { should
|
78
|
+
it { should eq [] }
|
65
79
|
end
|
66
80
|
end
|
67
81
|
|
@@ -103,6 +117,25 @@ describe Tinderbot::Client do
|
|
103
117
|
end
|
104
118
|
end
|
105
119
|
|
120
|
+
describe '.remove' do
|
121
|
+
context 'from user id' do
|
122
|
+
let(:user_id) { 'user_id' }
|
123
|
+
|
124
|
+
before { expect(connection).to receive(:delete).with("user/matches/#{user_id}") }
|
125
|
+
|
126
|
+
it { tinder_client.remove user_id }
|
127
|
+
end
|
128
|
+
|
129
|
+
context 'from user model' do
|
130
|
+
let(:user_tinder_json) { JSON.parse(open('spec/fixtures/user.json').read)['results'] }
|
131
|
+
let(:user) { Tinderbot::Model::User.build_from_tinder_json user_tinder_json }
|
132
|
+
|
133
|
+
before { expect(connection).to receive(:delete).with("user/matches/#{user.id}") }
|
134
|
+
|
135
|
+
it { tinder_client.remove user }
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
106
139
|
describe '.send_message' do
|
107
140
|
let(:user_id) { 'user_id' }
|
108
141
|
let(:message) { 'message' }
|
@@ -133,4 +166,4 @@ describe Tinderbot::Client do
|
|
133
166
|
it { expect(-> { tinder_client.update_location location }).to raise_error(Tinderbot::Error) }
|
134
167
|
end
|
135
168
|
end
|
136
|
-
end
|
169
|
+
end
|
metadata
CHANGED
@@ -1,139 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinderbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Venezia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.7'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: thor
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: faraday
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: faraday_middleware
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - ~>
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - ~>
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: watir-webdriver
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - ~>
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - ~>
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: json
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - ~>
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '1.8'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - ~>
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.8'
|
139
139
|
description: 'Ruby wrapper for the Tinder API and automatic liker bot. '
|
@@ -144,8 +144,8 @@ executables:
|
|
144
144
|
extensions: []
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
|
-
- .gitignore
|
148
|
-
- .travis.yml
|
147
|
+
- ".gitignore"
|
148
|
+
- ".travis.yml"
|
149
149
|
- Gemfile
|
150
150
|
- LICENSE.txt
|
151
151
|
- README.md
|
@@ -161,6 +161,8 @@ files:
|
|
161
161
|
- lib/tinderbot/version.rb
|
162
162
|
- spec/fixtures/profile.json
|
163
163
|
- spec/fixtures/recommended_users.json
|
164
|
+
- spec/fixtures/recommended_users_with_all_limit_reached.json
|
165
|
+
- spec/fixtures/recommended_users_with_one_limit_reached.json
|
164
166
|
- spec/fixtures/timeout_recommended_users.json
|
165
167
|
- spec/fixtures/updates.json
|
166
168
|
- spec/fixtures/user.json
|
@@ -179,23 +181,25 @@ require_paths:
|
|
179
181
|
- lib
|
180
182
|
required_ruby_version: !ruby/object:Gem::Requirement
|
181
183
|
requirements:
|
182
|
-
- -
|
184
|
+
- - ">="
|
183
185
|
- !ruby/object:Gem::Version
|
184
186
|
version: '0'
|
185
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
188
|
requirements:
|
187
|
-
- -
|
189
|
+
- - ">="
|
188
190
|
- !ruby/object:Gem::Version
|
189
191
|
version: '0'
|
190
192
|
requirements: []
|
191
193
|
rubyforge_project:
|
192
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.3
|
193
195
|
signing_key:
|
194
196
|
specification_version: 4
|
195
197
|
summary: Ruby wrapper for the Tinder API and automatic liker bot.
|
196
198
|
test_files:
|
197
199
|
- spec/fixtures/profile.json
|
198
200
|
- spec/fixtures/recommended_users.json
|
201
|
+
- spec/fixtures/recommended_users_with_all_limit_reached.json
|
202
|
+
- spec/fixtures/recommended_users_with_one_limit_reached.json
|
199
203
|
- spec/fixtures/timeout_recommended_users.json
|
200
204
|
- spec/fixtures/updates.json
|
201
205
|
- spec/fixtures/user.json
|