eventify 2.1.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tool-versions +1 -0
- data/Gemfile +0 -9
- data/eventify.gemspec +2 -3
- data/lib/eventify/provider/apollo_kino.rb +1 -1
- data/lib/eventify/provider/livenation.rb +1 -1
- data/lib/eventify/provider/piletilevi.rb +4 -2
- data/lib/eventify/version.rb +1 -1
- data/spec/eventify/configuration_spec.rb +1 -1
- data/spec/eventify/provider/piletilevi_spec.rb +1 -1
- data/spec/eventify_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +12 -27
- data/.ruby-version +0 -1
- data/Guardfile +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd35658a298a68c09bba8dd2fb5d1fece295d85896d413f9ff71e3f6bec59045
|
4
|
+
data.tar.gz: 992323d93ed64553ccc2d92f26c98082a75cda566ca91eebc2529bee796d257f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a516c267b2f36c12e5e8698d164b8e0e343177f8a440eb2841443d9e4c8fa7e27dd2d4f12d969d58f3f2cdc01009318a2983fd5b0f3b17c841df8e20bd790e0
|
7
|
+
data.tar.gz: c2471416f81f9a3ed312149205ac0e0ee4772b511e6085a0d3d105354a721dcd17a445122799aa543d9e815b80bd93311e63adb3c07d4a26473ec9dc39518a2a
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.2.2
|
data/Gemfile
CHANGED
@@ -1,14 +1,5 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
group :development do
|
4
|
-
gem "guard"
|
5
|
-
gem "guard-rspec"
|
6
|
-
gem "guard-bundler"
|
7
|
-
gem "wdm", platform: :mingw
|
8
|
-
gem "win32console", platform: :mingw
|
9
|
-
gem "ruby_gntp"
|
10
|
-
end
|
11
|
-
|
12
3
|
gemspec
|
13
4
|
|
14
5
|
gem "coveralls", require: false
|
data/eventify.gemspec
CHANGED
@@ -19,11 +19,10 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency "simple-rss"
|
22
|
-
spec.add_dependency "nokogiri"
|
22
|
+
spec.add_dependency "nokogiri"
|
23
23
|
spec.add_dependency "sqlite3"
|
24
|
-
spec.add_dependency "mail"
|
24
|
+
spec.add_dependency "mail"
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
27
26
|
spec.add_development_dependency "rake"
|
28
27
|
spec.add_development_dependency "rspec"
|
29
28
|
spec.add_development_dependency "webmock"
|
@@ -8,7 +8,7 @@ module Eventify::Provider
|
|
8
8
|
|
9
9
|
class << self
|
10
10
|
def fetch
|
11
|
-
doc = Nokogiri::HTML(open(URI.join(URL, "eng/soon"), {"Accept-Encoding" => "gzip,deflate"}))
|
11
|
+
doc = Nokogiri::HTML(URI.open(URI.join(URL, "eng/soon"), {"Accept-Encoding" => "gzip,deflate"}))
|
12
12
|
doc.search(".EventList-container > div").map do |item|
|
13
13
|
title_node = item.at("h2 a")
|
14
14
|
url = URI.join(URL, title_node["href"]).to_s
|
@@ -9,7 +9,7 @@ module Eventify::Provider
|
|
9
9
|
|
10
10
|
class << self
|
11
11
|
def fetch
|
12
|
-
doc = Nokogiri::HTML(open(URL))
|
12
|
+
doc = Nokogiri::HTML(URI.open(URL))
|
13
13
|
doc.search("script[type='application/ld+json']").map do |raw_item|
|
14
14
|
item = JSON.parse(raw_item.content)
|
15
15
|
next unless item["name"]
|
@@ -17,13 +17,15 @@ module Eventify::Provider
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def fetch_page(number)
|
20
|
-
JSON.parse(open("#{URL}/page:#{number}").read)
|
20
|
+
JSON.parse(URI.open("#{URL}/page:#{number}").read)
|
21
21
|
end
|
22
22
|
|
23
23
|
def events(json)
|
24
24
|
entries = json["responseData"]["event"]
|
25
25
|
entries.map do |entry|
|
26
|
-
|
26
|
+
link = URI.parse(entry["link"])
|
27
|
+
link.scheme = "https" unless link.scheme
|
28
|
+
new id: entry["id"], title: entry["title"], link: link.to_s, date: Time.at(entry["startTime"]["stamp"])
|
27
29
|
end
|
28
30
|
end
|
29
31
|
end
|
data/lib/eventify/version.rb
CHANGED
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Eventify::Configuration do
|
4
4
|
before do
|
5
5
|
stub_const "Eventify::Configuration::PATH", File.join(Dir.tmpdir, "eventify-config.yml")
|
6
|
-
File.delete Eventify::Configuration::PATH if File.
|
6
|
+
File.delete Eventify::Configuration::PATH if File.exist? Eventify::Configuration::PATH
|
7
7
|
end
|
8
8
|
|
9
9
|
context "#initialize" do
|
@@ -16,7 +16,7 @@ describe Eventify::Provider::Piletilevi do
|
|
16
16
|
),
|
17
17
|
Eventify::Provider::Piletilevi.new(
|
18
18
|
title: "Huumoriteater ''ENSV kohvik''",
|
19
|
-
link: "
|
19
|
+
link: "https://www.kinkekaart.ee/est/piletid/teater/komoodia/huumoriteater-ensv-kohvik-318916/",
|
20
20
|
date: Time.at(1577898000),
|
21
21
|
id: 21428
|
22
22
|
),
|
data/spec/eventify_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Eventify do
|
4
4
|
before do
|
5
5
|
stub_const "Eventify::Configuration::PATH", File.join(Dir.tmpdir, "eventify-config.yml")
|
6
|
-
File.delete Eventify::Configuration::PATH if File.
|
6
|
+
File.delete Eventify::Configuration::PATH if File.exist? Eventify::Configuration::PATH
|
7
7
|
end
|
8
8
|
|
9
9
|
context "#initialize" do
|
data/spec/spec_helper.rb
CHANGED
@@ -19,7 +19,7 @@ RSpec.configure do |config|
|
|
19
19
|
|
20
20
|
sqlite = Eventify::Database.instance_variable_get(:@sqlite)
|
21
21
|
sqlite.close if sqlite
|
22
|
-
File.delete database_path if File.
|
22
|
+
File.delete database_path if File.exist? database_path
|
23
23
|
Eventify::Database.instance_variable_set(:@sqlite, nil)
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarmo Pertman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple-rss
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
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:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,30 +56,16 @@ dependencies:
|
|
56
56
|
name: mail
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 2.7.0.rc1
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: bundler
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '1.3'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
66
|
+
- - ">="
|
81
67
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
68
|
+
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rake
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,10 +130,9 @@ extensions: []
|
|
144
130
|
extra_rdoc_files: []
|
145
131
|
files:
|
146
132
|
- ".gitignore"
|
147
|
-
- ".
|
133
|
+
- ".tool-versions"
|
148
134
|
- ".travis.yml"
|
149
135
|
- Gemfile
|
150
|
-
- Guardfile
|
151
136
|
- LICENSE
|
152
137
|
- README.md
|
153
138
|
- Rakefile
|
@@ -193,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
193
178
|
- !ruby/object:Gem::Version
|
194
179
|
version: '0'
|
195
180
|
requirements: []
|
196
|
-
rubygems_version: 3.
|
181
|
+
rubygems_version: 3.4.12
|
197
182
|
signing_key:
|
198
183
|
specification_version: 4
|
199
184
|
summary: Get notifications about upcoming events from different providers/organizers.
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.5.5
|
data/Guardfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
notification :ruby_gntp
|
2
|
-
#interactor :off
|
3
|
-
|
4
|
-
guard 'rspec', version: 2 do
|
5
|
-
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
7
|
-
watch('spec/spec_helper.rb') { "spec" }
|
8
|
-
end
|
9
|
-
|
10
|
-
guard 'bundler' do
|
11
|
-
watch('Gemfile')
|
12
|
-
end
|