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 +4 -4
- data/.gitignore +0 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +66 -0
- data/lib/meetupevents/event.rb +9 -6
- data/lib/meetupevents/group.rb +8 -5
- data/lib/meetupevents/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cd725579b857f81b36fd498fb68d1d3041cc3b3
|
4
|
+
data.tar.gz: 342f303b279f5f55b9ea1ea2df776515279c1f03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d4bf69d6f20b1808fbcbb106335e79407234e3bee0bfd1807ad3c0ead749104929eaae52ab998459966aaeff3ee9181b398d6f49d56d9ff2b7bc5d807cdf1f6
|
7
|
+
data.tar.gz: c709c04bf436c5ff2539daee7b3cffc5caf73ee97e81b33c0f848d6dc93d3778e740f9a21720985e632bab1fbf33371a5c0545d8bbf35741af708ce58f8c451c
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -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
|
data/lib/meetupevents/event.rb
CHANGED
@@ -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
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
data/lib/meetupevents/group.rb
CHANGED
@@ -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
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
data/lib/meetupevents/version.rb
CHANGED