eventbrite-api 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: da0d1fa3ff35e940e47b6c8a058d3054462b0e58
4
- data.tar.gz: 1faff04eb360db32366c200732e0d55911dce091
3
+ metadata.gz: 140621c5c9c7a54c96c87598def7bd942119e260
4
+ data.tar.gz: 7263bb0a70ffffb170dc4ca88eddf04eeced0ba9
5
5
  SHA512:
6
- metadata.gz: b6b04527e23e44f27839c4739db4c27bcf347503256ab21c086942f38ea06cd5ecc9c35fab2185a72508bfd2b16926ccb6845d435bdd30a059738e079ac7857f
7
- data.tar.gz: c1917909e0645650f37cfc79018e45270ecb8406236450108c4f25b0c1349788def81e8a11d6343ae7c25f489300e6b152706fde87620c81f16aac35d6e4407e
6
+ metadata.gz: 23fe0365e0906dc879a185d14b5f779a3b16e4ef0d639939c82c429039751283e536438d0b6b922288a2878da4f0482164a896ee60a6e2ba0801476d6505f676
7
+ data.tar.gz: fde00feba5f8d807eb09945ae1869bb97465cfd64ce8a0d102a3002a75b2cda9b136c66b628fd7d0516fc8cda3d452c65ac14962972e8b8cb37769a4dd237c88
@@ -1 +1 @@
1
- ruby-2.2.0@eventbrite-api
1
+ ruby-2.3.3@eventbrite-api
@@ -5,8 +5,5 @@ language: ruby
5
5
  cache: bundler
6
6
 
7
7
  rvm:
8
- - 2.2.0
9
- - 2.1.3
10
- - 2.0.0
11
- - 1.9.3
12
- - jruby-19mode
8
+ - 2.3.4
9
+ - 2.2.7
data/Gemfile CHANGED
@@ -1,14 +1,15 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
- gem "oauth2"
3
+ gem 'oauth2'
4
+ gem 'deep_merge', require: 'deep_merge/rails_compat'
4
5
 
5
6
  group :development do
6
- gem "jeweler"
7
+ gem 'jeweler'
7
8
  end
8
9
 
9
10
  group :test do
10
- gem "rspec"
11
- gem "webmock"
12
- gem "timecop"
13
- gem "simplecov", :require => false
11
+ gem 'rspec'
12
+ gem 'webmock'
13
+ gem 'timecop'
14
+ gem 'simplecov', require: false
14
15
  end
@@ -1,90 +1,96 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.3.7)
5
- builder (3.2.2)
6
- crack (0.4.2)
4
+ addressable (2.4.0)
5
+ builder (3.2.3)
6
+ crack (0.4.3)
7
7
  safe_yaml (~> 1.0.0)
8
+ deep_merge (1.1.1)
8
9
  descendants_tracker (0.0.4)
9
10
  thread_safe (~> 0.3, >= 0.3.1)
10
- diff-lcs (1.2.5)
11
+ diff-lcs (1.3)
11
12
  docile (1.1.5)
12
- faraday (0.9.1)
13
+ faraday (0.9.2)
13
14
  multipart-post (>= 1.2, < 3)
14
- git (1.2.9.1)
15
- github_api (0.12.3)
16
- addressable (~> 2.3)
15
+ git (1.3.0)
16
+ github_api (0.16.0)
17
+ addressable (~> 2.4.0)
17
18
  descendants_tracker (~> 0.0.4)
18
19
  faraday (~> 0.8, < 0.10)
19
- hashie (>= 3.3)
20
- multi_json (>= 1.7.5, < 2.0)
21
- nokogiri (~> 1.6.3)
22
- oauth2
23
- hashie (3.4.0)
24
- highline (1.7.1)
25
- jeweler (2.0.1)
20
+ hashie (>= 3.4)
21
+ mime-types (>= 1.16, < 3.0)
22
+ oauth2 (~> 1.0)
23
+ hashdiff (0.3.5)
24
+ hashie (3.5.6)
25
+ highline (1.7.8)
26
+ jeweler (2.3.7)
26
27
  builder
27
- bundler (>= 1.0)
28
+ bundler (>= 1)
28
29
  git (>= 1.2.5)
29
- github_api
30
+ github_api (~> 0.16.0)
30
31
  highline (>= 1.6.15)
31
32
  nokogiri (>= 1.5.10)
33
+ psych (~> 2.2)
32
34
  rake
33
35
  rdoc
34
- json (1.8.2)
35
- json (1.8.2-java)
36
- jwt (1.4.1)
37
- mini_portile (0.6.2)
38
- multi_json (1.11.0)
39
- multi_xml (0.5.5)
36
+ semver2
37
+ json (2.1.0)
38
+ jwt (1.5.6)
39
+ mime-types (2.99.3)
40
+ mini_portile2 (2.2.0)
41
+ multi_json (1.12.1)
42
+ multi_xml (0.6.0)
40
43
  multipart-post (2.0.0)
41
- nokogiri (1.6.6.2)
42
- mini_portile (~> 0.6.0)
43
- nokogiri (1.6.6.2-java)
44
- oauth2 (1.0.0)
45
- faraday (>= 0.8, < 0.10)
44
+ nokogiri (1.8.0)
45
+ mini_portile2 (~> 2.2.0)
46
+ oauth2 (1.4.0)
47
+ faraday (>= 0.8, < 0.13)
46
48
  jwt (~> 1.0)
47
49
  multi_json (~> 1.3)
48
50
  multi_xml (~> 0.5)
49
- rack (~> 1.2)
50
- rack (1.6.0)
51
- rake (10.4.2)
52
- rdoc (4.2.0)
53
- json (~> 1.4)
54
- rspec (3.2.0)
55
- rspec-core (~> 3.2.0)
56
- rspec-expectations (~> 3.2.0)
57
- rspec-mocks (~> 3.2.0)
58
- rspec-core (3.2.2)
59
- rspec-support (~> 3.2.0)
60
- rspec-expectations (3.2.0)
51
+ rack (>= 1.2, < 3)
52
+ psych (2.2.4)
53
+ rack (2.0.3)
54
+ rake (12.0.0)
55
+ rdoc (5.1.0)
56
+ rspec (3.6.0)
57
+ rspec-core (~> 3.6.0)
58
+ rspec-expectations (~> 3.6.0)
59
+ rspec-mocks (~> 3.6.0)
60
+ rspec-core (3.6.0)
61
+ rspec-support (~> 3.6.0)
62
+ rspec-expectations (3.6.0)
61
63
  diff-lcs (>= 1.2.0, < 2.0)
62
- rspec-support (~> 3.2.0)
63
- rspec-mocks (3.2.1)
64
+ rspec-support (~> 3.6.0)
65
+ rspec-mocks (3.6.0)
64
66
  diff-lcs (>= 1.2.0, < 2.0)
65
- rspec-support (~> 3.2.0)
66
- rspec-support (3.2.2)
67
+ rspec-support (~> 3.6.0)
68
+ rspec-support (3.6.0)
67
69
  safe_yaml (1.0.4)
68
- simplecov (0.9.2)
70
+ semver2 (3.4.2)
71
+ simplecov (0.14.1)
69
72
  docile (~> 1.1.0)
70
- multi_json (~> 1.0)
71
- simplecov-html (~> 0.9.0)
72
- simplecov-html (0.9.0)
73
- thread_safe (0.3.5)
74
- thread_safe (0.3.5-java)
75
- timecop (0.7.3)
76
- webmock (1.20.4)
73
+ json (>= 1.8, < 3)
74
+ simplecov-html (~> 0.10.0)
75
+ simplecov-html (0.10.1)
76
+ thread_safe (0.3.6)
77
+ timecop (0.9.1)
78
+ webmock (3.0.1)
77
79
  addressable (>= 2.3.6)
78
80
  crack (>= 0.3.2)
81
+ hashdiff
79
82
 
80
83
  PLATFORMS
81
- java
82
84
  ruby
83
85
 
84
86
  DEPENDENCIES
87
+ deep_merge
85
88
  jeweler
86
89
  oauth2
87
90
  rspec
88
91
  simplecov
89
92
  timecop
90
93
  webmock
94
+
95
+ BUNDLED WITH
96
+ 1.15.1
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  eventbrite-api
2
2
  ===============
3
3
 
4
- [![Build Status](https://secure.travis-ci.org/BrunoChauvet/eventbrite-api.png?branch=master)](http://travis-ci.org/BrunoChauvet/eventbrite-api)
4
+ [![Build Status](https://secure.travis-ci.org/maestrano/eventbrite-api.png?branch=master)](http://travis-ci.org/maestrano/eventbrite-api)
5
5
 
6
6
  ## Eventbrite API client
7
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -2,18 +2,18 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: eventbrite-api 0.0.3 ruby lib
5
+ # stub: eventbrite-api 0.0.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
- s.name = "eventbrite-api"
9
- s.version = "0.0.3"
8
+ s.name = "eventbrite-api".freeze
9
+ s.version = "0.0.4"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["BrunoChauvet"]
14
- s.date = "2015-08-10"
15
- s.description = "Integrate with Eventbrite API"
16
- s.email = "it@maestrano.com"
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["BrunoChauvet".freeze]
14
+ s.date = "2017-08-08"
15
+ s.description = "Integrate with Eventbrite API".freeze
16
+ s.email = "it@maestrano.com".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
19
  "README.md"
@@ -44,6 +44,8 @@ Gem::Specification.new do |s|
44
44
  "lib/eventbrite/api/model/owned_event_attendee.rb",
45
45
  "lib/eventbrite/api/model/owned_event_order.rb",
46
46
  "lib/eventbrite/api/model/user.rb",
47
+ "lib/eventbrite/api/model/user_contact.rb",
48
+ "lib/eventbrite/api/model/user_contact_list.rb",
47
49
  "lib/eventbrite/api/model/user_order.rb",
48
50
  "lib/eventbrite/api/model/user_organizer.rb",
49
51
  "lib/eventbrite/api/model/user_venue.rb",
@@ -68,24 +70,27 @@ Gem::Specification.new do |s|
68
70
  "spec/fixtures/users/me.json",
69
71
  "spec/spec_helper.rb"
70
72
  ]
71
- s.homepage = "http://github.com/BrunoChauvet/eventbrite-api"
72
- s.licenses = ["MIT"]
73
- s.rubygems_version = "2.4.5"
74
- s.summary = "Integrate with Eventbrite API"
73
+ s.homepage = "http://github.com/BrunoChauvet/eventbrite-api".freeze
74
+ s.licenses = ["MIT".freeze]
75
+ s.rubygems_version = "2.6.12".freeze
76
+ s.summary = "Integrate with Eventbrite API".freeze
75
77
 
76
78
  if s.respond_to? :specification_version then
77
79
  s.specification_version = 4
78
80
 
79
81
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
80
- s.add_runtime_dependency(%q<oauth2>, [">= 0"])
81
- s.add_development_dependency(%q<jeweler>, [">= 0"])
82
+ s.add_runtime_dependency(%q<oauth2>.freeze, [">= 0"])
83
+ s.add_runtime_dependency(%q<deep_merge>.freeze, [">= 0"])
84
+ s.add_development_dependency(%q<jeweler>.freeze, [">= 0"])
82
85
  else
83
- s.add_dependency(%q<oauth2>, [">= 0"])
84
- s.add_dependency(%q<jeweler>, [">= 0"])
86
+ s.add_dependency(%q<oauth2>.freeze, [">= 0"])
87
+ s.add_dependency(%q<deep_merge>.freeze, [">= 0"])
88
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
85
89
  end
86
90
  else
87
- s.add_dependency(%q<oauth2>, [">= 0"])
88
- s.add_dependency(%q<jeweler>, [">= 0"])
91
+ s.add_dependency(%q<oauth2>.freeze, [">= 0"])
92
+ s.add_dependency(%q<deep_merge>.freeze, [">= 0"])
93
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
89
94
  end
90
95
  end
91
96
 
@@ -9,9 +9,12 @@ require 'eventbrite/api/model/category.rb'
9
9
  require 'eventbrite/api/model/format.rb'
10
10
  require 'eventbrite/api/model/event_ticket_class.rb'
11
11
  require 'eventbrite/api/model/order.rb'
12
+ require 'eventbrite/api/model/user_contact.rb'
13
+ require 'eventbrite/api/model/user_contact_list.rb'
12
14
  require 'eventbrite/api/model/user_order.rb'
13
15
  require 'eventbrite/api/model/user_venue.rb'
14
16
  require 'eventbrite/api/model/user_organizer.rb'
15
17
  require 'eventbrite/api/model/owned_event.rb'
16
18
  require 'eventbrite/api/model/owned_event_attendee.rb'
17
- require 'eventbrite/api/model/owned_event_order.rb'
19
+ require 'eventbrite/api/model/owned_event_order.rb'
20
+ require 'deep_merge/rails_compat'
@@ -17,6 +17,8 @@ module Eventbrite
17
17
  model :Category
18
18
  model :Format
19
19
  model :EventTicketClass
20
+ model :UserContact
21
+ model :UserContactList
20
22
  model :UserOrder
21
23
  model :UserVenue
22
24
  model :UserOrganizer
@@ -27,7 +29,7 @@ module Eventbrite
27
29
  @redirect_uri = options[:redirect_uri]
28
30
  @consumer = options[:consumer]
29
31
  @access_token = options[:access_token]
30
-
32
+
31
33
  @client = OAuth2::Client.new(@consumer[:key], @consumer[:secret], {
32
34
  :site => 'https://www.eventbrite.com',
33
35
  :authorize_url => '/oauth/authorize',
@@ -8,13 +8,6 @@ class String
8
8
  end
9
9
  end
10
10
 
11
- class ::Hash
12
- def deep_merge(second)
13
- merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : Array === v1 && Array === v2 ? v1 | v2 : [:undefined, nil, :nil].include?(v2) ? v1 : v2 }
14
- self.merge(second.to_h, &merger)
15
- end
16
- end
17
-
18
11
  module Eventbrite
19
12
  module Api
20
13
  module Helpers
@@ -6,7 +6,7 @@ module Eventbrite
6
6
  def initialize(client, model_name=nil)
7
7
  @client = client
8
8
  @model_name = model_name || 'Base'
9
-
9
+
10
10
  @pagination = nil
11
11
  @endpoint = nil
12
12
  end
@@ -35,7 +35,7 @@ module Eventbrite
35
35
  def all(opts)
36
36
  all_pages = get(opts)
37
37
  while @pagination && @pagination['page_number'] < @pagination['page_count']
38
- all_pages = all_pages.deep_merge(next_page(opts))
38
+ all_pages = all_pages.deeper_merge(next_page(opts))
39
39
  end
40
40
  all_pages
41
41
  end
@@ -65,13 +65,13 @@ protected
65
65
  end
66
66
  target
67
67
  end
68
-
68
+
69
69
  def resource_url(opts={})
70
70
  target = "https://www.eventbriteapi.com/v3/#{model_route}"
71
71
  opts.each { |k,v| target.gsub!(":#{k}", v) if v.is_a?(String) } unless opts.empty?
72
72
  target
73
73
  end
74
-
74
+
75
75
  def perform_request(target)
76
76
  response = @client.connection.get(target, {:headers => @client.headers})
77
77
  hash = JSON.parse(response.body)
@@ -0,0 +1,11 @@
1
+ module Eventbrite
2
+ module Api
3
+ module Model
4
+ class UserContact < Base
5
+ def model_route
6
+ 'users/:user_id/contact_lists/:contact_list_id/contacts'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Eventbrite
2
+ module Api
3
+ module Model
4
+ class UserContactList < Base
5
+ def model_route
6
+ 'users/:user_id/contact_lists'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventbrite-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - BrunoChauvet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2017-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth2
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: deep_merge
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: jeweler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -71,6 +85,8 @@ files:
71
85
  - lib/eventbrite/api/model/owned_event_attendee.rb
72
86
  - lib/eventbrite/api/model/owned_event_order.rb
73
87
  - lib/eventbrite/api/model/user.rb
88
+ - lib/eventbrite/api/model/user_contact.rb
89
+ - lib/eventbrite/api/model/user_contact_list.rb
74
90
  - lib/eventbrite/api/model/user_order.rb
75
91
  - lib/eventbrite/api/model/user_organizer.rb
76
92
  - lib/eventbrite/api/model/user_venue.rb
@@ -114,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
130
  version: '0'
115
131
  requirements: []
116
132
  rubyforge_project:
117
- rubygems_version: 2.4.5
133
+ rubygems_version: 2.6.12
118
134
  signing_key:
119
135
  specification_version: 4
120
136
  summary: Integrate with Eventbrite API