tinder_client 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1680f3d5e9fc8228f27dd1343e3fc52ef25b4f0a2340d154c06d6160566f0b5
4
- data.tar.gz: 524599743c59d1b775e00966b4c31a1fd69a1c12ebc7d42b260f9e72d44b2f8e
3
+ metadata.gz: 4ed345df67d63946c331dff8a6761abf893db474b727d350715c62468939a92e
4
+ data.tar.gz: ccab26f332ee7e3151e9d6935ff48a149109b148954e4dcd8cc72c10a44633c6
5
5
  SHA512:
6
- metadata.gz: 21d0fa6b3697ade316a0981c69718b004200eb2488b6a3952e6416eae77827d4348a5a2883808eed08ee3fabb2f86a044cc393849d6464e181c590622f591cbe
7
- data.tar.gz: cd1c5a3bb96c5e5b35ee8ba72028d04d2bcf796eccd4a8130e94892fb3b596d9ca49e023ad15e60520d7abf734de2de447258bfc33f8192bf4267879ce34a5e1
6
+ metadata.gz: 2772f7e1b70e7243e132a4d2b535cb9053462a7a2557752577da958437987425f0634d176c706f84fc6f7df7a2c00c75251d4a5a7e51ab8ce73f55474fd0908b
7
+ data.tar.gz: bbb9a23c0b84322adb7c833834c36c6ba528d71e64920126ced91d89ba75c2d0a4a7d626add9013fc3008e54968dfde75d02e7a5adcc049bfa8ab2cbfb6d2c3d
data/.circleci/config.yml CHANGED
@@ -3,25 +3,16 @@ jobs:
3
3
  build:
4
4
  parallelism: 1
5
5
  docker:
6
- - image: circleci/ruby:2.6.3
6
+ - image: circleci/ruby:2.6.4
7
7
  environment:
8
8
  BUNDLE_JOBS: 2
9
9
  BUNDLE_RETRY: 3
10
- BUNDLE_PATH: ~/.cache/bundler
10
+ BUNDLE_PATH: ~/.bundler
11
11
  steps:
12
12
  - checkout
13
- - run:
14
- name: bundle lock
15
- command: mkdir -p ~/.cache; bundle lock --update
16
- - restore_cache:
17
- key: bundle-{{ checksum "Gemfile.lock" }}
18
13
  - run:
19
14
  name: bundle install
20
15
  command: bundle check &>/dev/null || bundle install
21
- - save_cache:
22
- key: bundle-{{ checksum "Gemfile.lock" }}
23
- paths:
24
- - ~/.cache/bundler
25
16
  - run:
26
17
  name: rspec
27
18
  path: .
data/.gitignore CHANGED
@@ -66,3 +66,4 @@ Gemfile.lock
66
66
 
67
67
  # RubyMine IDE
68
68
  /.idea/
69
+ /tinder_access_token.txt
data/Gemfile CHANGED
@@ -1,9 +1,12 @@
1
1
  source "https://rubygems.org"
2
+ gem 'bundler', '~> 1.17.2'
3
+
4
+ gem 'codecov'
2
5
 
3
6
  gem 'faraday', '~> 0.15.0'
4
7
  gem 'hashdiff', ['>= 1.0.0.beta1'] # fix for webmock
5
8
  gem 'rspec', '~> 3.8'
6
- gem 'webmock', '~> 3.6.0'
9
+ gem 'webmock', '3.6.0'
7
10
 
8
11
  gem 'dry-initializer', git: 'https://github.com/dry-rb/dry-initializer.git'
9
12
  gem 'dry-struct', git: 'https://github.com/dry-rb/dry-struct.git'
data/README.md CHANGED
@@ -1,50 +1,53 @@
1
1
  RSpec Tests: [![CircleCI](https://circleci.com/gh/patrickclery/tinder_client.svg?style=svg)](https://circleci.com/gh/patrickclery/tinder_client)
2
2
 
3
- # TinderClient
4
-
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/tinder_client`. To experiment with that code, run `bin/console` for an interactive prompt.
6
-
7
- TODO: Delete this and the text above, and describe your gem
8
-
9
- ## Installation
10
-
11
- Add this line to your application's Gemfile:
12
-
13
- ```ruby
14
- gem 'tinder_client'
15
- ```
3
+ Code Coverage: [![codecov](https://codecov.io/gh/patrickclery/tinder_client/branch/master/graph/badge.svg)](https://codecov.io/gh/patrickclery/tinder_client)
16
4
 
17
- And then execute:
18
-
19
- $ bundle
20
-
21
- Or install it yourself as:
5
+ # TinderClient
22
6
 
23
- $ gem install tinder_client
7
+ A Ruby gem to interact with Tinder's REST API.
24
8
 
25
9
  ## Usage
26
10
 
11
+ ### Rake Commands
12
+
27
13
  ```ruby
28
- rake tinder:get_updates # Fetch updates
14
+ rake tinder:updates # Fetch updates
29
15
  rake tinder:profile # Fetch my profile
30
16
  rake tinder:recommendations # Fetch recommendations
31
17
  rake tinder:save_token # Save an API token to $token_path ake tinder:get_updates # Fetch updates
32
18
  ```
33
19
 
34
- ## Development
20
+ To grab a token, call a rake command & specify the `phone_number` or `api_token` in your environment variables.
35
21
 
36
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
22
+ ### `rake tinder:save_token`
37
23
 
38
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
24
+ ```
25
+ $ rake tinder:save_token \
26
+ phone_number=15556667777 \
27
+ tinder_token_path=/tmp
28
+ Enter the confirmation code sent to 15556667777>
29
+ 123456
30
+ Validating...
31
+ Done!
32
+ Your refresh token is eyJhbGciOiJIUzI1NiJ9.MTc3ODk5MDk4MDM.5q4R0H08rE0Dd9KgxMPp6jcTfIBLCXgEuVZfC9znJTE
33
+ Logging in...
34
+ Done!
35
+ Your tinder API token is 12a3bc45-a123-123a-1a23-1234abc4de5f
36
+ Saved to /tmp/tinder_access_token.txt
37
+ ```
39
38
 
40
- ## Contributing
41
39
 
42
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/tinder_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
40
+ ### Use Tinder Test-Helpers in your RSpec Tests
43
41
 
44
- ## License
42
+ `tinder_client` has _[webmock](https://github.com/bblimke/webmock) stubs_ you can include in your project to get fake responses back from Tinder:
45
43
 
46
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
44
+ ```ruby
45
+ gem_dir = Gem::Specification.find_by_name("tinder_client").gem_dir
46
+ require "#{gem_dir}/spec/tinder/contexts/http_request_stubs"
47
47
 
48
- ## Code of Conduct
48
+ RSpec.describe 'some test' do
49
+ include_context 'http_request_stubs'
49
50
 
50
- Everyone interacting in the TinderClient project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/tinder_client/blob/master/CODE_OF_CONDUCT.md).
51
+ # Your tests that use Tinder HTTP requests go here
52
+ end
53
+ ```
data/lib/dry_helper.rb ADDED
@@ -0,0 +1,36 @@
1
+ require 'dry-types'
2
+ require 'dry-struct'
3
+
4
+ # This automatically transforms keys to symbols when you pass Structs a hash
5
+ # that has string keys
6
+ class Dry::Struct
7
+ transform_keys(&:to_sym)
8
+ end
9
+
10
+ # The following allow you to access types with Types.<type reference>
11
+ #
12
+ # ```ruby
13
+ # email = Types.string.constrained(
14
+ # format: /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
15
+ # )
16
+ # drinking_age = Types.integer.constrained(gt: 21)
17
+ # ````
18
+ module Types
19
+ include Dry.Types()
20
+
21
+ class << self
22
+
23
+ # @param String The key of the Dry::Type -- see Dry::Types.type_keys
24
+ def [] (type_key)
25
+ Dry::Types[type_key]
26
+ end
27
+
28
+ # This aliases all the Dry::Types keys as class methods
29
+ Dry::Types.type_keys.each do |method_name|
30
+ define_method method_name do
31
+ Dry::Types[method_name]
32
+ end
33
+ end
34
+ end
35
+
36
+ end
@@ -9,7 +9,7 @@ require "tinder"
9
9
  # `tinder_token_path` - where to store access_token.txt
10
10
 
11
11
  def fetch_token(phone_number)
12
- client = Tinder::Client
12
+ client = Tinder::Client.new
13
13
 
14
14
  # Request a code
15
15
  client.request_code(phone_number)
@@ -50,7 +50,7 @@ namespace :tinder do
50
50
 
51
51
  desc 'Fetch my profile'
52
52
  task :profile do
53
- client = Tinder::Client
53
+ client = Tinder::Client.new
54
54
  client.api_token = IO.read(token_path).chomp
55
55
  profile = client.profile
56
56
  puts profile
@@ -58,18 +58,18 @@ namespace :tinder do
58
58
 
59
59
  desc 'Fetch recommendations'
60
60
  task :recommendations do
61
- client = Tinder::Client
61
+ client = Tinder::Client.new
62
62
  client.api_token = IO.read(token_path).chomp
63
63
 
64
- feed = client.get_recommended_users(:recommendations)
64
+ feed = client.get_recommended_users
65
65
  feed.each do |person|
66
66
  puts person
67
67
  end
68
68
  end
69
69
 
70
70
  desc 'Fetch updates'
71
- task :get_updates do
72
- client = Tinder::Client
71
+ task :updates do
72
+ client = Tinder::Client.new
73
73
  client.api_token = IO.read(token_path).chomp
74
74
 
75
75
  updates = client.get_updates
data/lib/tinder/client.rb CHANGED
@@ -1,26 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "tinder"
4
+ require "faraday"
5
+
1
6
  module Tinder
2
7
 
3
8
  class Client
4
9
  # Always prefer V2 endpoints as the API is less buggy than V1
5
- BASE_URI = 'https://api.gotinder.com/v2'
10
+ BASE_URI = 'https://api.gotinder.com'
6
11
  ENDPOINTS = {
7
- request_code: "/auth/sms/send?auth_type=sms",
8
- login: "/auth/login/sms",
9
- validate: "/auth/sms/validate?auth_type=sms"
12
+ request_code: "/v2/auth/sms/send?auth_type=sms",
13
+ login: "/v2/auth/login/sms",
14
+ validate: "/v2/auth/sms/validate?auth_type=sms",
15
+ recommendations: "/v2/recs/core",
16
+ updates: "/updates"
10
17
  }
11
18
 
12
19
  attr_accessor :api_token
13
20
  attr_accessor :refresh_token
14
21
 
15
22
  def post(url, **data)
16
- response = Faraday.post(url, JSON.generate(data), headers(@api_token))
17
- JSON.parse(response.body)
23
+ response = Faraday.post(url, JSON.generate(data), headers)
24
+ JSON.parse(response.body) unless response.body.nil?
18
25
  end
19
26
 
20
27
  def get(url, **data)
21
28
  # GET requests won't get a response using JSON
22
- response = Faraday.get(url, data, headers(@api_token))
23
- JSON.parse(response.body)
29
+ response = Faraday.get(url, data, headers)
30
+ JSON.parse(response.body) unless response.body.nil?
24
31
  end
25
32
 
26
33
  # @param phone_number String
@@ -60,10 +67,10 @@ module Tinder
60
67
 
61
68
  protected
62
69
 
63
- def headers(api_token)
70
+ def headers
64
71
  {
65
- 'app_version': '6.9.4',
66
- 'platform': 'ios',
72
+ "app_version": "6.9.4",
73
+ "platform": "ios",
67
74
  "content-type": "application/json",
68
75
  "User-agent": "Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)",
69
76
  "Accept": "application/json",
@@ -6,7 +6,7 @@ module Tinder
6
6
  yield get_recommended_users && return
7
7
  end
8
8
 
9
- data = get("https://api.gotinder.com/recs/core")
9
+ data = get(endpoint(:recommendations))
10
10
 
11
11
  fail 'Connection Timeout' unless data.dig('data', 'timeout').nil?
12
12
 
@@ -18,62 +18,66 @@ module Tinder
18
18
  results = Array(data.dig('data', 'results'))
19
19
  return [] if results.first.is_a?(String) && results.first == 'You are out of likes today. Come back later to continue swiping on more people.'
20
20
 
21
- JSON.parse(results.first).map { |user_data| RecommendedUser.new(user_data) }
21
+ results.map { |user_data| RecommendedUser.new(user_data) }
22
22
  end
23
23
  end
24
24
 
25
+ # Return this object
25
26
  class RecommendedUser < Dry::Struct
26
27
 
27
- attribute :type, Dry::Types['string']
28
+ attribute :type, Types.string
28
29
  attribute :user do
29
- attribute :_id, Dry::Types['string']
30
- attribute :bio, Dry::Types['string']
31
- attribute :birth_date, Dry::Types['string']
32
- attribute :name, Dry::Types['string']
33
- attribute :photos, Dry::Types['array'] do
34
- attribute :id, Dry::Types['string']
35
- attribute :crop_info do
36
- attribute :user do
37
- attribute :width_pct, Dry::Types['float']
38
- attribute :x_offset_pct, Dry::Types['float']
39
- attribute :height_pct, Dry::Types['float']
40
- attribute :y_offset_pct, Dry::Types['float']
30
+ attribute :_id, Types.string
31
+ attribute :bio, Types.string
32
+ attribute :birth_date, Types.string
33
+ attribute :name, Types.string
34
+ attribute :photos, Types.array do
35
+ attribute :id, Types.string
36
+ attribute? :crop_info do
37
+ attribute? :user do
38
+ attribute :width_pct, Types.float
39
+ attribute :x_offset_pct, Types.float
40
+ attribute :height_pct, Types.float
41
+ attribute :y_offset_pct, Types.float
41
42
  end
42
- attribute :algo do
43
- attribute :width_pct, Dry::Types['float']
44
- attribute :x_offset_pct, Dry::Types['float']
45
- attribute :height_pct, Dry::Types['float']
46
- attribute :y_offset_pct, Dry::Types['float']
43
+ attribute? :algo do
44
+ attribute :width_pct, Types.float
45
+ attribute :x_offset_pct, Types.float
46
+ attribute :height_pct, Types.float
47
+ attribute :y_offset_pct, Types.float
47
48
  end
48
- attribute :processed_by_bullseye, Dry::Types['bool']
49
- attribute :user_customized, Dry::Types['bool']
50
- attribute :url, Dry::Types['string'].meta(omittable: true)
51
- attribute :processedFiles, Dry::Types['array'].meta(omittable: true)
52
- attribute :fileName, Dry::Types['string'].meta(omittable: true)
53
- attribute :extension, Dry::Types['string'].meta(omittable: true)
49
+ attribute :processed_by_bullseye, Types.bool
50
+ attribute :user_customized, Types.bool
51
+ attribute? :url, Types.string
52
+ attribute? :processedFiles, Types.array
53
+ attribute? :fileName, Types.string
54
+ attribute? :extension, Types.string
54
55
  end
55
56
  end
56
- attribute :gender, Dry::Types['integer']
57
- attribute :jobs, Dry::Types['array']
58
- attribute :schools, Dry::Types['array'] do
59
- attribute :name, Dry::Types['string']
57
+ attribute :gender, Types.integer
58
+ attribute :jobs, Types.array
59
+ attribute :schools, Types.array do
60
+ attribute :name, Types.string
60
61
  end
61
- attribute :is_traveling, Dry::Types['bool'].meta(omittable: true)
62
- attribute :hide_age, Dry::Types['bool'].meta(omittable: true)
63
- attribute :hide_distance, Dry::Types['bool'].meta(omittable: true)
62
+ attribute? :city do
63
+ attribute :name, Types.string
64
+ end
65
+ attribute? :is_traveling, Types.bool
66
+ attribute? :hide_age, Types.bool
67
+ attribute? :hide_distance, Types.bool
64
68
  end
65
69
  attribute :facebook do
66
- attribute :common_connections, Dry::Types['array']
67
- attribute :connection_count, Dry::Types['integer']
68
- attribute :common_interests, Dry::Types['array']
70
+ attribute :common_connections, Types.array
71
+ attribute :connection_count, Types.integer
72
+ attribute :common_interests, Types.array
69
73
  end
70
- attribute :spotify, Dry::Types['hash']
71
- attribute :distance_mi, Dry::Types['integer']
72
- attribute :content_hash, Dry::Types['string']
73
- attribute :s_number, Dry::Types['integer']
74
- attribute :teasers, Dry::Types['array'] do
75
- attribute :type, Dry::Types['string']
76
- attribute :string, Dry::Types['string']
74
+ attribute :spotify, Types.hash
75
+ attribute :distance_mi, Types.integer
76
+ attribute :content_hash, Types.string
77
+ attribute :s_number, Types.integer
78
+ attribute :teasers, Types.array do
79
+ attribute :type, Types.string
80
+ attribute :string, Types.string
77
81
  end
78
82
  end
79
83
  end
@@ -1,9 +1,8 @@
1
1
  module Tinder
2
-
3
2
  class Client
4
3
  # This includes the matches, as well as the messages, so must be parsed
5
4
  def get_updates(since = Time.now)
6
- response = get("https://api.gotinder.com/updates")
5
+ response = post(endpoint(:updates))
7
6
 
8
7
  fail 'Connection Timeout' unless response.dig('data', 'timeout').nil?
9
8
  fail 'Rate Limited' if response.dig('error', 'message') == 'RATE_LIMITED'
@@ -16,69 +15,69 @@ module Tinder
16
15
 
17
16
  class Updates < Dry::Struct
18
17
 
19
- attribute :blocks, Dry::Types['array'].of(Dry::Types['string'])
20
- attribute :deleted_lists, Dry::Types['array']
21
- attribute :goingout, Dry::Types['array']
22
- attribute :harassing_messages, Dry::Types['array']
23
- attribute :inbox, Dry::Types['array'] do
24
- attribute :_id, Dry::Types['string']
25
- attribute :match_id, Dry::Types['string']
26
- attribute :sent_date, Dry::Types['string']
27
- attribute :message, Dry::Types['string']
28
- attribute :to, Dry::Types['string']
29
- attribute :from, Dry::Types['string']
30
- attribute :created_date, Dry::Types['string']
31
- attribute :timestamp, Dry::Types['coercible.string']
18
+ attribute :blocks, Types.array.of(Types.string)
19
+ attribute :deleted_lists, Types.array
20
+ attribute :goingout, Types.array
21
+ attribute :harassing_messages, Types.array
22
+ attribute :inbox, Types.array do
23
+ attribute :_id, Types.string
24
+ attribute :match_id, Types.string
25
+ attribute :sent_date, Types.string
26
+ attribute :message, Types.string
27
+ attribute :to, Types.string
28
+ attribute :from, Types.string
29
+ attribute :created_date, Types.string
30
+ attribute :timestamp, Types.send('coercible.string')
32
31
  end
33
- attribute :poll_interval, Dry::Types['hash']
34
- attribute :liked_messages, Dry::Types['array'] do
35
- attribute :message_id, Dry::Types['string']
36
- attribute :updated_at, Dry::Types['string']
37
- attribute :liker_id, Dry::Types['string']
38
- attribute :match_id, Dry::Types['string']
39
- attribute :is_liked, Dry::Types['bool']
32
+ attribute :poll_interval, Types.hash
33
+ attribute :liked_messages, Types.array do
34
+ attribute :message_id, Types.string
35
+ attribute :updated_at, Types.string
36
+ attribute :liker_id, Types.string
37
+ attribute :match_id, Types.string
38
+ attribute :is_liked, Types.bool
40
39
  end
41
- attribute :lists, Dry::Types['array']
42
- attribute :matches, Dry::Types['array'] do
43
- attribute :_id, Dry::Types['string']
44
- attribute :closed, Dry::Types['bool']
45
- attribute :common_friend_count, Dry::Types['integer']
46
- attribute :common_like_count, Dry::Types['integer']
47
- attribute :created_date, Dry::Types['string']
48
- attribute :dead, Dry::Types['bool']
49
- attribute :following, Dry::Types['bool']
50
- attribute :following_moments, Dry::Types['bool']
51
- attribute :id, Dry::Types['string']
52
- attribute :is_boost_match, Dry::Types['bool']
53
- attribute :is_fast_match, Dry::Types['bool']
54
- attribute :is_super_like, Dry::Types['bool']
55
- attribute :last_activity_date, Dry::Types['string']
56
- attribute :message_count, Dry::Types['integer']
57
- attribute :messages, Dry::Types['array'] do
58
- attribute :_id, Dry::Types['string']
59
- attribute :match_id, Dry::Types['string']
60
- attribute :sent_date, Dry::Types['string']
61
- attribute :message, Dry::Types['string']
62
- attribute :to, Dry::Types['string']
63
- attribute :from, Dry::Types['string']
64
- attribute :created_date, Dry::Types['string']
65
- attribute :timestamp, Dry::Types['coercible.string']
40
+ attribute :lists, Types.array
41
+ attribute :matches, Types.array do
42
+ attribute :_id, Types.string
43
+ attribute :closed, Types.bool
44
+ attribute :common_friend_count, Types.integer
45
+ attribute :common_like_count, Types.integer
46
+ attribute :created_date, Types.string
47
+ attribute :dead, Types.bool
48
+ attribute :following, Types.bool
49
+ attribute :following_moments, Types.bool
50
+ attribute :id, Types.string
51
+ attribute :is_boost_match, Types.bool
52
+ attribute :is_fast_match, Types.bool
53
+ attribute :is_super_like, Types.bool
54
+ attribute :last_activity_date, Types.string
55
+ attribute :message_count, Types.integer
56
+ attribute :messages, Types.array do
57
+ attribute :_id, Types.string
58
+ attribute :match_id, Types.string
59
+ attribute :sent_date, Types.string
60
+ attribute :message, Types.string
61
+ attribute :to, Types.string
62
+ attribute :from, Types.string
63
+ attribute :created_date, Types.string
64
+ attribute :timestamp, Types.send('coercible.string')
66
65
  end
67
- attribute :muted, Dry::Types['bool']
68
- attribute :participants, Dry::Types['array']
69
- attribute :pending, Dry::Types['bool']
66
+ attribute :muted, Types.bool
67
+ attribute :participants, Types.array
68
+ attribute :pending, Types.bool
70
69
  attribute :person do
71
- attribute :bio, Dry::Types['string'].meta(omittable: true)
72
- attribute :birth_date, Dry::Types['string']
73
- attribute :gender, Dry::Types['integer']
74
- attribute :name, Dry::Types['string']
75
- attribute :ping_time, Dry::Types['string']
76
- attribute :photos, Dry::Types['array']
70
+ attribute? :bio, Types.string
71
+ attribute :birth_date, Types.string
72
+ attribute :gender, Types.integer
73
+ attribute :name, Types.string
74
+ attribute :ping_time, Types.string
75
+ attribute :photos, Types.array
77
76
  end
78
- attribute :readreceipt, Dry::Types['hash']
79
- attribute :seen, Dry::Types['hash']
77
+ attribute :readreceipt, Types.hash
78
+ attribute :seen, Types.hash
80
79
  end
81
- attribute :squads, Dry::Types['array']
80
+ attribute :squads, Types.array
82
81
 
83
82
  end
84
83
  end
@@ -1,3 +1,3 @@
1
1
  module Tinder
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/tinder.rb CHANGED
@@ -1,9 +1,5 @@
1
- require 'dry-struct'
2
- class Dry::Struct
3
- transform_keys(&:to_sym)
4
- end
1
+ require 'dry_helper.rb'
5
2
 
6
- require 'dry-types'
7
3
  require "json"
8
4
  require 'faraday'
9
5
  require 'tinder/client'
@@ -31,4 +27,3 @@ module Tinder
31
27
  end
32
28
 
33
29
  end
34
-
@@ -27,12 +27,12 @@ Gem::Specification.new do |spec|
27
27
  spec.require_paths = ["lib"]
28
28
 
29
29
  spec.add_dependency "bundler"
30
- spec.add_dependency "dry-initializer", "~> 3.0"
31
- spec.add_dependency "dry-struct", "~> 1.0"
32
- spec.add_dependency "dry-types", "~> 1.0"
33
- spec.add_dependency "faraday", "~> 0.15.0"
34
- spec.add_dependency "hashdiff", ">= 1.0.0.beta1"
35
- spec.add_dependency "rake", "~> 10.0"
36
- spec.add_dependency "rspec", "~> 3.8"
37
- spec.add_dependency "webmock", "~> 3.6.0"
30
+ spec.add_dependency "dry-initializer"
31
+ spec.add_dependency "dry-struct"
32
+ spec.add_dependency "dry-types"
33
+ spec.add_dependency "faraday"
34
+ spec.add_dependency "hashdiff"
35
+ spec.add_dependency "rake"
36
+ spec.add_dependency "rspec"
37
+ spec.add_dependency "webmock"
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinder_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Clery
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-02 00:00:00.000000000 Z
11
+ date: 2019-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -28,114 +28,114 @@ dependencies:
28
28
  name: dry-initializer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '3.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: dry-struct
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: dry-types
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: faraday
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.15.0
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
- version: 0.15.0
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: hashdiff
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.0.0.beta1
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
- version: 1.0.0.beta1
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '10.0'
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
- version: '10.0'
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '3.8'
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
- version: '3.8'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: webmock
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 3.6.0
131
+ version: '0'
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
- version: 3.6.0
138
+ version: '0'
139
139
  description: A client for Tinder written in Ruby
140
140
  email:
141
141
  - patrick.clery@gmail.com
@@ -156,6 +156,7 @@ files:
156
156
  - Rakefile
157
157
  - bin/console
158
158
  - bin/setup
159
+ - lib/dry_helper.rb
159
160
  - lib/tasks/tinder.rake
160
161
  - lib/tinder.rb
161
162
  - lib/tinder/account_settings.rb