meetupevents 0.2 → 0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 61835a14671f9e1e79c1c548d448973a9cc138e7
4
- data.tar.gz: c50ee7dc408c15fdb6d642091b0879cc4e72d72a
3
+ metadata.gz: 5cd725579b857f81b36fd498fb68d1d3041cc3b3
4
+ data.tar.gz: 342f303b279f5f55b9ea1ea2df776515279c1f03
5
5
  SHA512:
6
- metadata.gz: 1735a1a51de0e17e27a78082c1b4bea86778e0e99be9e38c18302a804d89bb72d15234f183a8ce85208f92874c07662d435a33dd912a5b41ea71cb9eb6c1df77
7
- data.tar.gz: 8ea757e4528046b8255dd4f9cbc93d9a940f90f7edd69f7361a55a33af4978ada5255d6a42e49afc21c7bc3c911b28d426ca83205898597d04a0f15a56c13672
6
+ metadata.gz: 8d4bf69d6f20b1808fbcbb106335e79407234e3bee0bfd1807ad3c0ead749104929eaae52ab998459966aaeff3ee9181b398d6f49d56d9ff2b7bc5d807cdf1f6
7
+ data.tar.gz: c709c04bf436c5ff2539daee7b3cffc5caf73ee97e81b33c0f848d6dc93d3778e740f9a21720985e632bab1fbf33371a5c0545d8bbf35741af708ce58f8c451c
data/.gitignore CHANGED
@@ -1,5 +1,4 @@
1
1
  config/credentials.yml
2
2
  spec/fixtures/
3
3
  coverage/
4
- Gemfile.lock
5
4
  *.gem
data/Gemfile CHANGED
@@ -7,3 +7,4 @@ gem 'flay'
7
7
  gem 'rake'
8
8
  gem 'minitest'
9
9
  gem 'minitest-rg'
10
+ gem 'concurrent-ruby'
@@ -0,0 +1,66 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ addressable (2.4.0)
5
+ concurrent-ruby (1.0.4)
6
+ crack (0.4.3)
7
+ safe_yaml (~> 1.0.0)
8
+ docile (1.1.5)
9
+ domain_name (0.5.20161021)
10
+ unf (>= 0.0.5, < 1.0.0)
11
+ erubis (2.7.0)
12
+ flay (2.8.1)
13
+ erubis (~> 2.7.0)
14
+ path_expander (~> 1.0)
15
+ ruby_parser (~> 3.0)
16
+ sexp_processor (~> 4.0)
17
+ hashdiff (0.3.0)
18
+ http (2.0.3)
19
+ addressable (~> 2.3)
20
+ http-cookie (~> 1.0)
21
+ http-form_data (~> 1.0.1)
22
+ http_parser.rb (~> 0.6.0)
23
+ http-cookie (1.0.3)
24
+ domain_name (~> 0.5)
25
+ http-form_data (1.0.1)
26
+ http_parser.rb (0.6.0)
27
+ json (2.0.2)
28
+ minitest (5.9.1)
29
+ minitest-rg (5.2.0)
30
+ minitest (~> 5.0)
31
+ path_expander (1.0.0)
32
+ rake (11.3.0)
33
+ ruby_parser (3.8.3)
34
+ sexp_processor (~> 4.1)
35
+ safe_yaml (1.0.4)
36
+ sexp_processor (4.7.0)
37
+ simplecov (0.12.0)
38
+ docile (~> 1.1.0)
39
+ json (>= 1.8, < 3)
40
+ simplecov-html (~> 0.10.0)
41
+ simplecov-html (0.10.0)
42
+ unf (0.1.4)
43
+ unf_ext
44
+ unf_ext (0.0.7.2)
45
+ vcr (3.0.3)
46
+ webmock (2.1.0)
47
+ addressable (>= 2.3.6)
48
+ crack (>= 0.3.2)
49
+ hashdiff
50
+
51
+ PLATFORMS
52
+ ruby
53
+
54
+ DEPENDENCIES
55
+ concurrent-ruby
56
+ flay
57
+ http
58
+ minitest
59
+ minitest-rg
60
+ rake
61
+ simplecov
62
+ vcr
63
+ webmock
64
+
65
+ BUNDLED WITH
66
+ 1.13.5
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require_relative 'meetupevents'
3
3
  require_relative 'location'
4
+ require 'concurrent'
4
5
 
5
6
  module Meetup
6
7
  # Class to set up a Meetup Event
@@ -45,12 +46,14 @@ module Meetup
45
46
  def initialize(country:, city:, topic: 'none')
46
47
  raw_events = MeetupApi.get_events_city(country, city, topic)
47
48
  @events = raw_events.map do |g|
48
- Meetup::Event.new(name: g['name'], status: g['status'],
49
- city: city,
50
- description: g['description'],
51
- venue: g['venue'] ? g['venue']['name'] : '', # may nil
52
- time: g['time'], location: get_event_location(g),
53
- url: g['event_url'], topic: topic)
49
+ Concurrent::Promise.execute {
50
+ Meetup::Event.new(name: g['name'], status: g['status'],
51
+ city: city,
52
+ description: g['description'],
53
+ venue: g['venue'] ? g['venue']['name'] : '', # may nil
54
+ time: g['time'], location: get_event_location(g),
55
+ url: g['event_url'], topic: topic)
56
+ }
54
57
  end
55
58
  end
56
59
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require_relative 'meetupevents'
3
3
  require_relative 'location'
4
+ require 'concurrent'
4
5
 
5
6
  module Meetup
6
7
  # Class to set up a Meetup Group
@@ -37,11 +38,13 @@ module Meetup
37
38
  def initialize(country:, location_raw_text:)
38
39
  raw_groups = MeetupApi.get_groups(country, location_raw_text)
39
40
  @groups = raw_groups.map do |g|
40
- Meetup::Group.new(
41
- name: g['name'], urlname: g['urlname'], city: g['city'],
42
- location: Meetup::Location.new(g['lat'], g['lon']),
43
- country: g['country']
44
- )
41
+ Concurrent::Promise.execute {
42
+ Meetup::Group.new(
43
+ name: g['name'], urlname: g['urlname'], city: g['city'],
44
+ location: Meetup::Location.new(g['lat'], g['lon']),
45
+ country: g['country']
46
+ )
47
+ }
45
48
  end
46
49
  end
47
50
  end
@@ -1,3 +1,3 @@
1
1
  module Meetup
2
- VERSION = '0.2'.freeze
2
+ VERSION = '0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meetupevents
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isaac Martinez, Fabio Daio, Roberto Yebra