blabla_client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +7 -0
- data/blabla_client.gemspec +27 -0
- data/lib/blabla_client/attribute_helper.rb +11 -0
- data/lib/blabla_client/trip.rb +81 -0
- data/lib/blabla_client/version.rb +3 -0
- data/lib/blabla_client.rb +79 -0
- data/test/blabla_client/trip_test.rb +63 -0
- data/test/blabla_client_test.rb +24 -0
- metadata +156 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 jeanbaptistevilain
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# BlablaClient
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'blabla_client'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install blabla_client
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'blabla_client/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "blabla_client"
|
8
|
+
spec.version = BlablaClient::VERSION
|
9
|
+
spec.authors = ["jeanbaptistevilain"]
|
10
|
+
spec.email = ["jbvilain@gmail.com"]
|
11
|
+
spec.description = "A simple client for the BlaBlaCar API (valid credentials required)"
|
12
|
+
spec.summary = "A simple client for the BlaBlaCar API (valid credentials required)"
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "test-unit"
|
24
|
+
spec.add_development_dependency "shoulda"
|
25
|
+
spec.add_runtime_dependency "oauth2"
|
26
|
+
spec.add_runtime_dependency "json"
|
27
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'blabla_client/attribute_helper'
|
3
|
+
|
4
|
+
class Trip
|
5
|
+
|
6
|
+
include AttributeHelper
|
7
|
+
|
8
|
+
WHITELISTED_ATTRS = [:departure_date, :departure_place, :arrival_place, :price, :seats_left, :duration, :distance, :car, :links]
|
9
|
+
|
10
|
+
attr_reader *WHITELISTED_ATTRS
|
11
|
+
|
12
|
+
def initialize(hash)
|
13
|
+
self.attributes = hash.keep_if {|k,v| WHITELISTED_ATTRS.include?(k)}
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.parse_response(json_response)
|
17
|
+
response = {}
|
18
|
+
response_hash = JSON.parse json_response, :symbolize_names => true
|
19
|
+
unless response_hash[:trips].nil?
|
20
|
+
response[:trips] = response_hash[:trips].collect {|t| Trip.new(t)}
|
21
|
+
end
|
22
|
+
unless response_hash[:pager].nil?
|
23
|
+
response[:page] = response_hash[:pager][:page]
|
24
|
+
response[:pages] = response_hash[:pager][:pages]
|
25
|
+
response[:count] = response_hash[:pager][:total]
|
26
|
+
end
|
27
|
+
response
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_url
|
31
|
+
links[:_front]
|
32
|
+
end
|
33
|
+
|
34
|
+
def get_price
|
35
|
+
{:value => price[:value], :currency => price[:symbol], :color => price[:price_color].downcase}
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_departure_date
|
39
|
+
departure_fields = departure_date.split(' ')
|
40
|
+
date_fields = departure_fields[0].split('/')
|
41
|
+
time_fields = departure_fields[1].split(':')
|
42
|
+
Time.new(date_fields[2].to_i, date_fields[1].to_i, date_fields[0].to_i, time_fields[0].to_i, time_fields[1].to_i, time_fields[2].to_i)
|
43
|
+
end
|
44
|
+
|
45
|
+
def get_departure_place
|
46
|
+
full_address = departure_place[:address]
|
47
|
+
full_address += ", #{departure_place[:city_name]}" unless departure_place[:address].include?(departure_place[:city_name])
|
48
|
+
full_address
|
49
|
+
end
|
50
|
+
|
51
|
+
def get_arrival_place
|
52
|
+
full_address = arrival_place[:address]
|
53
|
+
full_address += ", #{arrival_place[:city_name]}" unless arrival_place[:address].include?(arrival_place[:city_name])
|
54
|
+
full_address
|
55
|
+
end
|
56
|
+
|
57
|
+
def get_duration
|
58
|
+
duration_hash = {}
|
59
|
+
unless duration.nil? || duration.empty?
|
60
|
+
if duration[:unity] == 's'
|
61
|
+
duration_hash[:hours] = (duration[:value].to_f/3600).floor
|
62
|
+
duration_hash[:minutes] = ((duration[:value] - duration_hash[:hours]*3600).to_f/60).floor
|
63
|
+
end
|
64
|
+
end
|
65
|
+
duration_hash
|
66
|
+
end
|
67
|
+
|
68
|
+
def get_distance
|
69
|
+
distance[:value] unless distance.nil?
|
70
|
+
end
|
71
|
+
|
72
|
+
def get_car
|
73
|
+
car_hash = {}
|
74
|
+
unless car.nil? || car.empty?
|
75
|
+
car_hash[:model] = car[:make]
|
76
|
+
car_hash[:model] += " #{car[:model]}" unless car[:model].nil?
|
77
|
+
car_hash[:comfort] = car[:comfort_nb_star]
|
78
|
+
end
|
79
|
+
car_hash
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'oauth2'
|
2
|
+
require 'blabla_client/version'
|
3
|
+
require 'blabla_client/trip'
|
4
|
+
|
5
|
+
module BlablaClient
|
6
|
+
|
7
|
+
# Note : token expiration is ignored for now (current token expires on 15/03/2015)
|
8
|
+
CURRENT_TOKEN = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MjY0MjY5NTUsImNsaWVudCI6ImE3NzM3ODdhNmI2YjM0NzlhMjk5NTg0MDUwMmUwNDZkNGE0NDNjYmE2MDFjMDk2Y2U1NGI4OTcyYjRkZTdjNzkiLCJzY29wZSI6IiIsInVzZXIiOm51bGx9.dOZF0wbZtW6_Vfa5dU6_X831yGCJlsSZE7gkdp2lldg'
|
9
|
+
|
10
|
+
# token "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0MjY0MjY5NTUsImNsaWVudCI6ImE3NzM3ODdhNmI2YjM0NzlhMjk5NTg0MDUwMmUwNDZkNGE0NDNjYmE2MDFjMDk2Y2U1NGI4OTcyYjRkZTdjNzkiLCJzY29wZSI6IiIsInVzZXIiOm51bGx9.dOZF0wbZtW6_Vfa5dU6_X831yGCJlsSZE7gkdp2lldg"
|
11
|
+
# expires_at : 1426426958
|
12
|
+
# expires_in : 2419200
|
13
|
+
|
14
|
+
# Configuration defaults (as of API v3)
|
15
|
+
@config = {
|
16
|
+
:auth_site => 'http://www.blablacar.fr',
|
17
|
+
:token_path => '/oauth/v2/access_token',
|
18
|
+
:client_id => '',
|
19
|
+
:client_secret => '',
|
20
|
+
:api_url => 'http://api.blablacar.fr/api/v2/trips'
|
21
|
+
}
|
22
|
+
|
23
|
+
@valid_config_keys = @config.keys
|
24
|
+
@logger = Logger.new(STDOUT)
|
25
|
+
|
26
|
+
# Configure through hash
|
27
|
+
def self.configure(opts = {})
|
28
|
+
opts.each {|k,v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym}
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.config
|
32
|
+
@config
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.available_trips(departure, arrival, date_range_start, date_range_end, page = 1)
|
36
|
+
trips = []
|
37
|
+
range_start = normalize_date(date_range_start)
|
38
|
+
range_end = normalize_date(date_range_end)
|
39
|
+
begin
|
40
|
+
response = get_response(departure, arrival, range_start, range_end, page)
|
41
|
+
trips = Trip.parse_response(response.body)
|
42
|
+
@logger.info("Retrieved #{trips[:trips].length} trips for page #{page} of request #{departure}-#{arrival} from #{range_start} to #{range_end}")
|
43
|
+
rescue OAuth2::Error => e
|
44
|
+
@logger.error("An error occurred while calling the API on #{@config[:api_url]}")
|
45
|
+
@logger.error("Response : #{e.response}")
|
46
|
+
@logger.error("Code : #{e.code}")
|
47
|
+
@logger.error("Description : #{e.description}")
|
48
|
+
end
|
49
|
+
trips
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.normalize_date(date)
|
53
|
+
if date.is_a?(Date) || date.is_a?(DateTime) || date.is_a?(Time)
|
54
|
+
date_as_object = date
|
55
|
+
else
|
56
|
+
date_as_object = Date.parse(date)
|
57
|
+
end
|
58
|
+
date_as_object.strftime('%d-%m-%Y')
|
59
|
+
end
|
60
|
+
|
61
|
+
private
|
62
|
+
|
63
|
+
def self.get_response(departure, arrival, date_range_start, date_range_end, page)
|
64
|
+
client = OAuth2::Client.new(@config[:client_id], @config[:client_secret], :site => @config[:auth_site], :token_url => @config[:token_path])
|
65
|
+
# token = client.client_credentials.get_token
|
66
|
+
token = OAuth2::AccessToken.new(client, CURRENT_TOKEN, :mode => :query)
|
67
|
+
token.get(@config[:api_url],
|
68
|
+
:params => {
|
69
|
+
:_format => 'json',
|
70
|
+
:fn => departure,
|
71
|
+
:tn => arrival,
|
72
|
+
:db => date_range_start,
|
73
|
+
:de => date_range_end,
|
74
|
+
:seats => '1',
|
75
|
+
:page => page
|
76
|
+
}
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
gem 'shoulda'
|
5
|
+
require 'test/unit'
|
6
|
+
require 'shoulda'
|
7
|
+
require 'blabla_client/trip'
|
8
|
+
|
9
|
+
class TripTest < Test::Unit::TestCase
|
10
|
+
|
11
|
+
RESPONSE_BODY =
|
12
|
+
'{"links":{"_self":"http://api.blablacar.fr/api/v2/trips"},"pager":{"page":1,"pages":68,"total":674,"limit":10},' +
|
13
|
+
'"trips":[' +
|
14
|
+
'{"links":{"_self":"http://api.blablacar.fr/api/v2/trips/95946679-lyon-grenoble","_front":"http://www.covoiturage.fr/trajet-lyon-grenoble-95946679","_threads":"http://api.blablacar.fr/api/v2/trips/95946679-lyon-grenoble/threads"},"frequency":"UNIQUE","departure_date":"15/02/2015 15:15:00","departure_place":{"city_name":"Lyon","address":"Lyon","latitude":45.764043,"longitude":4.835659},"arrival_place":{"city_name":"Grenoble","address":"Grenoble","latitude":45.188529,"longitude":5.724524},"price":{"value":7,"currency":"EUR","symbol":"\u20ac","string_value":"7\u00a0\u20ac","price_color":"GREEN"},"seats_left":0,"seats":2,"duration":{"value":3600,"unity":"s"},"distance":{"value":111,"unity":"km"},"permanent_id":"95946679-lyon-grenoble","car":{"model":"SCENIC III","make":"RENAULT","comfort":"Confort","comfort_nb_star":3},"viaggio_rosa":false,"freeway":true,"answer_delay":3,"booking_mode":"manual","booking_type":"online"},' +
|
15
|
+
'{"links":{"_self":"http://api.blablacar.fr/api/v2/trips/98529037-lyon-grenoble","_front":"http://www.covoiturage.fr/trajet-lyon-grenoble-98529037","_threads":"http://api.blablacar.fr/api/v2/trips/98529037-lyon-grenoble/threads"},"frequency":"UNIQUE","departure_date":"15/02/2015 15:20:00","departure_place":{"city_name":"Lyon","address":"Lyon","latitude":45.7640299,"longitude":4.8350211},"arrival_place":{"city_name":"Grenoble","address":"Grenoble","latitude":45.188529,"longitude":5.724524},"price":{"value":7,"currency":"EUR","symbol":"\u20ac","string_value":"7\u00a0\u20ac","price_color":"GREEN"},"seats_left":1,"seats":3,"duration":{"value":4800,"unity":"s"},"distance":{"value":111,"unity":"km"},"permanent_id":"98529037-lyon-grenoble","car":{"model":"PASSAT","make":"VOLKSWAGEN","comfort":"Confort","comfort_nb_star":3},"viaggio_rosa":false,"freeway":true,"answer_delay":1,"booking_mode":"manual","booking_type":"online"},' +
|
16
|
+
'{"links":{"_self":"http://api.blablacar.fr/api/v2/trips/97965469-lyon-grenoble","_front":"http://www.covoiturage.fr/trajet-lyon-grenoble-97965469","_threads":"http://api.blablacar.fr/api/v2/trips/97965469-lyon-grenoble/threads"},"frequency":"UNIQUE","departure_date":"15/02/2015 15:30:00","departure_place":{"city_name":"Lyon","address":"Place Jean Jaur\u00e8s, Lyon","latitude":45.7390393,"longitude":4.8395687},"arrival_place":{"city_name":"Grenoble","address":"Grenoble","latitude":45.188529,"longitude":5.724524},"price":{"value":5,"currency":"EUR","symbol":"\u20ac","string_value":"5\u00a0\u20ac","price_color":"GREEN"},"seats_left":2,"seats":4,"duration":{"value":6000,"unity":"s"},"distance":{"value":105,"unity":"km"},"permanent_id":"97965469-lyon-grenoble","car":{"model":"206","make":"PEUGEOT","comfort":"Normal","comfort_nb_star":2},"viaggio_rosa":false,"freeway":true,"answer_delay":6,"booking_mode":"manual","booking_type":"online"}' +
|
17
|
+
']}'
|
18
|
+
|
19
|
+
should 'populate trips objects with the parsed json response' do
|
20
|
+
trips = Trip.parse_response(RESPONSE_BODY)[:trips]
|
21
|
+
|
22
|
+
assert_equal 3, trips.length
|
23
|
+
assert_equal ['15/02/2015 15:15:00', '15/02/2015 15:20:00', '15/02/2015 15:30:00'], trips.collect {|t| t.departure_date}
|
24
|
+
assert_equal [{:value => 7, :currency => '€', :color => 'green'}, {:value => 7, :currency => '€', :color => 'green'},
|
25
|
+
{:value => 5, :currency => '€', :color => 'green'}], trips.collect {|t| t.get_price}
|
26
|
+
assert_equal ['Lyon', 'Lyon', 'Place Jean Jaurès, Lyon'], trips.collect {|t| t.get_departure_place}
|
27
|
+
assert_equal ['Grenoble', 'Grenoble', 'Grenoble'], trips.collect {|t| t.get_arrival_place}
|
28
|
+
assert_equal [0, 1, 2], trips.collect {|t| t.seats_left}
|
29
|
+
assert_equal [{:hours => 1, :minutes => 0}, {:hours => 1, :minutes => 20}, {:hours => 1, :minutes => 40}], trips.collect {|t| t.get_duration}
|
30
|
+
assert_equal [111, 111, 105], trips.collect {|t| t.get_distance}
|
31
|
+
end
|
32
|
+
|
33
|
+
should 'return departure date as a time object' do
|
34
|
+
assert_equal Time.new(2015, 2, 15, 15, 15, 0), Trip.new({:departure_date => '15/02/2015 15:15:00'}).get_departure_date
|
35
|
+
end
|
36
|
+
|
37
|
+
should 'return the trip url' do
|
38
|
+
assert_equal 'http://www.covoiturage.fr/trajet-lyon-grenoble-95946679', Trip.new({:links => {:_front => 'http://www.covoiturage.fr/trajet-lyon-grenoble-95946679'}}).get_url
|
39
|
+
end
|
40
|
+
|
41
|
+
should 'return paging fields included in the response' do
|
42
|
+
response = Trip.parse_response(RESPONSE_BODY)
|
43
|
+
|
44
|
+
assert_equal 1, response[:page]
|
45
|
+
assert_equal 68, response[:pages]
|
46
|
+
assert_equal 674, response[:count]
|
47
|
+
end
|
48
|
+
|
49
|
+
should 'return a trip duration hash' do
|
50
|
+
assert_equal({:hours => 1, :minutes => 0}, Trip.new({:duration => {:value => 3600, :unity => 's'}}).get_duration)
|
51
|
+
assert_equal({:hours => 2, :minutes => 0}, Trip.new({:duration => {:value => 7200, :unity => 's'}}).get_duration)
|
52
|
+
assert_equal({:hours => 1, :minutes => 30}, Trip.new({:duration => {:value => 5400, :unity => 's'}}).get_duration)
|
53
|
+
assert_equal({:hours => 0, :minutes => 40}, Trip.new({:duration => {:value => 2400, :unity => 's'}}).get_duration)
|
54
|
+
assert_equal({:hours => 0, :minutes => 45}, Trip.new({:duration => {:value => 2710, :unity => 's'}}).get_duration)
|
55
|
+
assert_equal({:hours => 1, :minutes => 0}, Trip.new({:duration => {:value => 3620, :unity => 's'}}).get_duration)
|
56
|
+
end
|
57
|
+
|
58
|
+
should 'return a data hash with the car information' do
|
59
|
+
assert_equal({:model => 'RENAULT SCENIC III', :comfort => 3},
|
60
|
+
Trip.new({:car => {:model => 'SCENIC III', :make => 'RENAULT', :comfort => 'Confort', :comfort_nb_star => 3}}).get_car)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
gem 'shoulda'
|
3
|
+
require 'test/unit'
|
4
|
+
require 'shoulda'
|
5
|
+
require 'blabla_client'
|
6
|
+
|
7
|
+
class BlablaClientTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
# should 'test a real call to the trips API' do
|
10
|
+
# response = BlablaClient.available_trips('lyon', 'grenoble', Date.today, Date.today)
|
11
|
+
# assert_not_nil response
|
12
|
+
# assert_not_empty response[:trips]
|
13
|
+
# assert_equal 1, response[:page]
|
14
|
+
# end
|
15
|
+
|
16
|
+
should 'normalize input dates' do
|
17
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date('2015-10-17')
|
18
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date('17-10-2015')
|
19
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date('20151017')
|
20
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date(Date.new(2015, 10, 17))
|
21
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date(DateTime.new(2015, 10, 17))
|
22
|
+
assert_equal '17-10-2015', BlablaClient.normalize_date(Time.new(2015, 10, 17))
|
23
|
+
end
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: blabla_client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- jeanbaptistevilain
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: test-unit
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: shoulda
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: oauth2
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: json
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
description: A simple client for the BlaBlaCar API (valid credentials required)
|
111
|
+
email:
|
112
|
+
- jbvilain@gmail.com
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- .gitignore
|
118
|
+
- Gemfile
|
119
|
+
- LICENSE.txt
|
120
|
+
- README.md
|
121
|
+
- Rakefile
|
122
|
+
- blabla_client.gemspec
|
123
|
+
- lib/blabla_client.rb
|
124
|
+
- lib/blabla_client/attribute_helper.rb
|
125
|
+
- lib/blabla_client/trip.rb
|
126
|
+
- lib/blabla_client/version.rb
|
127
|
+
- test/blabla_client/trip_test.rb
|
128
|
+
- test/blabla_client_test.rb
|
129
|
+
homepage: ''
|
130
|
+
licenses:
|
131
|
+
- MIT
|
132
|
+
post_install_message:
|
133
|
+
rdoc_options: []
|
134
|
+
require_paths:
|
135
|
+
- lib
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
144
|
+
requirements:
|
145
|
+
- - ! '>='
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '0'
|
148
|
+
requirements: []
|
149
|
+
rubyforge_project:
|
150
|
+
rubygems_version: 1.8.24
|
151
|
+
signing_key:
|
152
|
+
specification_version: 3
|
153
|
+
summary: A simple client for the BlaBlaCar API (valid credentials required)
|
154
|
+
test_files:
|
155
|
+
- test/blabla_client/trip_test.rb
|
156
|
+
- test/blabla_client_test.rb
|