eventify 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/README.md +3 -3
- data/lib/eventify/mail.rb +1 -1
- data/lib/eventify/version.rb +1 -1
- metadata +2 -5
- data/lib/eventify/scheduler.rb +0 -31
- data/spec/eventify/scheduler_spec.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f43fcee04664c33c7b6024bf9fefe4ca31373b1
|
4
|
+
data.tar.gz: 48e20206f3816ae0cd8342193f6168fa4f10c535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c80b3ca2635bff7a521406d043a2a120dde122bdc116f92c60189458fc02868c28fc676437282aac83573d903ccfd670641141a711da1e1f0e4d7ac66df35ba
|
7
|
+
data.tar.gz: aa580080bbe38f6869ade370cf131df176d0456e514783e09b37578a06b199301c58051981f253b20212b73cb25cf147e96579726155ddb7d8ab352c5a64d3da
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -22,17 +22,17 @@ providers/organizers.
|
|
22
22
|
|
23
23
|
* Create configuration file with your e-mail address:
|
24
24
|
|
25
|
-
|
25
|
+
`$ ruby -reventify -e "Eventify::Configuration.new(subscribers: ['foo@bar.com']).save"`
|
26
26
|
|
27
27
|
* Run it from command line and add it into `cron`:
|
28
28
|
|
29
|
-
|
29
|
+
`$ ruby -reventify -e "Eventify.new.process_new_events"`
|
30
30
|
|
31
31
|
* Check your e-mail for information about upcoming events.
|
32
32
|
|
33
33
|
* Edit configuration settings if defaults won't work for you:
|
34
34
|
|
35
|
-
|
35
|
+
`$ vi ~/.eventify/config.yaml`
|
36
36
|
|
37
37
|
## Supported Providers
|
38
38
|
|
data/lib/eventify/mail.rb
CHANGED
data/lib/eventify/version.rb
CHANGED
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: 1.
|
4
|
+
version: 1.1.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: 2014-
|
11
|
+
date: 2014-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple-rss
|
@@ -159,7 +159,6 @@ files:
|
|
159
159
|
- lib/eventify/provider/fbi.rb
|
160
160
|
- lib/eventify/provider/piletilevi.rb
|
161
161
|
- lib/eventify/provider/ticketpro.rb
|
162
|
-
- lib/eventify/scheduler.rb
|
163
162
|
- lib/eventify/version.rb
|
164
163
|
- spec/eventify/configuration_spec.rb
|
165
164
|
- spec/eventify/database_spec.rb
|
@@ -168,7 +167,6 @@ files:
|
|
168
167
|
- spec/eventify/provider/fbi_spec.rb
|
169
168
|
- spec/eventify/provider/piletilevi_spec.rb
|
170
169
|
- spec/eventify/provider/ticketpro_spec.rb
|
171
|
-
- spec/eventify/scheduler_spec.rb
|
172
170
|
- spec/eventify_spec.rb
|
173
171
|
- spec/spec_helper.rb
|
174
172
|
- spec/support/fbi.html
|
@@ -208,7 +206,6 @@ test_files:
|
|
208
206
|
- spec/eventify/provider/fbi_spec.rb
|
209
207
|
- spec/eventify/provider/piletilevi_spec.rb
|
210
208
|
- spec/eventify/provider/ticketpro_spec.rb
|
211
|
-
- spec/eventify/scheduler_spec.rb
|
212
209
|
- spec/eventify_spec.rb
|
213
210
|
- spec/spec_helper.rb
|
214
211
|
- spec/support/fbi.html
|
data/lib/eventify/scheduler.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require "logger"
|
2
|
-
require File.expand_path("../eventify", __dir__)
|
3
|
-
|
4
|
-
class Eventify::Scheduler
|
5
|
-
def call(_)
|
6
|
-
L("Fetch events.")
|
7
|
-
eventify = Eventify.new
|
8
|
-
eventify.process_new_events
|
9
|
-
L("Fetch done with #{eventify.new_events.size} new events out of #{eventify.all_events.size} events.")
|
10
|
-
rescue Exception => e
|
11
|
-
L("Fetch failed with an error \"#{e.message}\": #{e.backtrace.join("\n")}")
|
12
|
-
end
|
13
|
-
|
14
|
-
private
|
15
|
-
|
16
|
-
def L(message)
|
17
|
-
FileUtils.mkdir_p File.expand_path("../../logs", __dir__)
|
18
|
-
@logger ||= Logger.new(File.expand_path("../../logs/eventify.log", __dir__))
|
19
|
-
@logger.debug message
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
if $PROGRAM_NAME == __FILE__
|
25
|
-
require "rufus-scheduler"
|
26
|
-
|
27
|
-
scheduler = Rufus::Scheduler.new
|
28
|
-
scheduler.every("6h", Eventify::Scheduler, first_in: Time.now + 5)
|
29
|
-
|
30
|
-
scheduler.join
|
31
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
require File.expand_path("../../lib/eventify/scheduler", __dir__)
|
3
|
-
|
4
|
-
describe Eventify::Scheduler do
|
5
|
-
before do
|
6
|
-
Eventify::Scheduler.any_instance.stub(:L)
|
7
|
-
end
|
8
|
-
|
9
|
-
it "#call invokes Eventify#process_new_events" do
|
10
|
-
Eventify.any_instance.should_receive(:process_new_events)
|
11
|
-
|
12
|
-
Eventify::Scheduler.new.call nil
|
13
|
-
end
|
14
|
-
end
|