eventdb 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +4 -2
- data/README.md +48 -23
- data/bin/kickoff +18 -0
- data/lib/eventdb/database.rb +6 -1
- data/lib/eventdb/{beerfest.rb → datasets/beerfest.rb} +6 -2
- data/lib/eventdb/datasets/football.rb +44 -0
- data/lib/eventdb/{rubyconf.rb → datasets/rubyconf.rb} +6 -2
- data/lib/eventdb/models.rb +46 -0
- data/lib/eventdb/reader.rb +39 -12
- data/lib/eventdb/schema.rb +2 -0
- data/lib/eventdb/version.rb +1 -1
- data/lib/eventdb.rb +3 -3
- data/test/test_calendar.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7354bd8a2d3f10f919d50e6c6d1bda249bd2e076
|
4
|
+
data.tar.gz: a13aea328e4e0fc4772649eaf5c3ddfb615753db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa749db10bce863a77b3458bee269369fc040641e4bb08953461b405e69e575725a4aaea82bf5f3ff5f0f8f56684206d6b57916ad1d9a2c7edb3e883e0016e3f
|
7
|
+
data.tar.gz: 7fcf7970a79751124501c75b9d0c81dfbeb82680beca921aa1cbe5de74c941723e91710c2f3102b17e6e22fbc48cc107c545b142fd68ae6fb1e2d2183686e34f
|
data/Manifest.txt
CHANGED
@@ -3,14 +3,16 @@ Manifest.txt
|
|
3
3
|
README.md
|
4
4
|
Rakefile
|
5
5
|
bin/beerfest
|
6
|
+
bin/kickoff
|
6
7
|
bin/rubyconf
|
7
8
|
lib/eventdb.rb
|
8
|
-
lib/eventdb/beerfest.rb
|
9
9
|
lib/eventdb/calendar.rb
|
10
10
|
lib/eventdb/database.rb
|
11
|
+
lib/eventdb/datasets/beerfest.rb
|
12
|
+
lib/eventdb/datasets/football.rb
|
13
|
+
lib/eventdb/datasets/rubyconf.rb
|
11
14
|
lib/eventdb/models.rb
|
12
15
|
lib/eventdb/reader.rb
|
13
|
-
lib/eventdb/rubyconf.rb
|
14
16
|
lib/eventdb/schema.rb
|
15
17
|
lib/eventdb/version.rb
|
16
18
|
templates/CALENDAR.md.erb
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ event.db models n tools
|
|
12
12
|
## Command-Line Tool Usage
|
13
13
|
|
14
14
|
The eventdb gem includes command-line tools
|
15
|
-
to list upcoming events (ruby conferences, beer festivals. etc.).
|
15
|
+
to list upcoming events (ruby conferences, football tournaments, beer festivals. etc.).
|
16
16
|
|
17
17
|
|
18
18
|
### Upcoming Ruby Conferences
|
@@ -28,24 +28,47 @@ to list upcoming Ruby (un)conferences from around the world. Will print:
|
|
28
28
|
~~~
|
29
29
|
Upcoming Ruby Conferences:
|
30
30
|
|
31
|
-
Jul/1+2 - RubyMotion Conference - #inspect @ Paris, France › Europe
|
32
|
-
Jul/20 - Brighton Ruby Conference @ Brighton, East Sussex › England (en) › Western Europe › Europe
|
33
|
-
Jul/31-Aug/2 - European Ruby Camp - eurucamp @ Berlin (Potsdam), Germany › Europe
|
34
|
-
Jul/31 - JRuby Conference Europe - JRubyConf EU @ Berlin (Potsdam), Germany › Europe
|
35
|
-
Aug/1+2 - Burlington Ruby Conference @ Burlington, Vermont › New England › United States (us) › North America › America
|
36
|
-
Aug/21+22 - Madison+ Ruby @ Madison, Wisconsin › Great Lakes › United States (us) › North America › America
|
37
|
-
|
38
|
-
|
39
|
-
Sep/14+15 - RubyConf Portugal @ Braga › Portugal (pt) › Southern Europe › Europe
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
Oct/1+2 - ArrrCamp @ Ghent, Oost-Vlaanderen › Belgium / België / Belgique (be) › Western Europe › Europe
|
44
|
-
Oct/15+16 - RubyConf Colombia @ Medellin › Colombia (co) › South America › America
|
45
|
-
Oct/17+18 - European Ruby Konference - EuRuKo @ Salzburg, Austria › Europe
|
46
|
-
Nov/11+12 - RubyWorld Conference @ Matsue › Japan (jp) › Asia
|
31
|
+
in 8d Wed+Thu Jul/1+2 (2d) - RubyMotion Conference - #inspect @ Paris, France › Europe
|
32
|
+
in 27d Mon Jul/20 (1d) - Brighton Ruby Conference @ Brighton, East Sussex › England (en) › Western Europe › Europe
|
33
|
+
in 38d Fri-Sun Jul/31-Aug/2 (3d) - European Ruby Camp - eurucamp @ Berlin (Potsdam), Germany › Europe
|
34
|
+
in 38d Fri Jul/31 (1d) - JRuby Conference Europe - JRubyConf EU @ Berlin (Potsdam), Germany › Europe
|
35
|
+
in 39d Sat+Sun Aug/1+2 (2d) - Burlington Ruby Conference @ Burlington, Vermont › New England › United States (us) › North America › America
|
36
|
+
in 59d Fri+Sat Aug/21+22 (2d) - Madison+ Ruby @ Madison, Wisconsin › Great Lakes › United States (us) › North America › America
|
37
|
+
in 70d Tue-Sat Sep/1-5 (5d) - Full Stack Fest - Barcelona Ruby Conference (BaRuCo) + Barcelona Future JS @ Barcelona, Catalonia › Spain / España (es) › Southern Europe › Europe
|
38
|
+
in 80d Fri+Sat Sep/11+12 (2d) - RubyConf Taiwan @ Taipei › Taiwan (tw) › Asia
|
39
|
+
in 83d Mon+Tue Sep/14+15 (2d) - RubyConf Portugal @ Braga › Portugal (pt) › Southern Europe › Europe
|
40
|
+
in 87d Fri+Sat Sep/18+19 (2d) - RubyConf Brasil @ São Paulo › Brazil / Brasil (br) › South America › America
|
41
|
+
in 92d Wed-Fri Sep/23-25 (3d) - Rocky Mountain Ruby Conference @ Boulder, Colorado › Rocky Mountains › United States (us) › North America › America
|
42
|
+
in 95d Sat Sep/26 (1d) - Ruby Open Source Software (ROSS) Conference - ROSSConf @ Berlin, Germany › Europe
|
43
|
+
in 100d Thu+Fri Oct/1+2 (2d) - ArrrCamp @ Ghent, Oost-Vlaanderen › Belgium / België / Belgique (be) › Western Europe › Europe
|
44
|
+
in 114d Thu+Fri Oct/15+16 (2d) - RubyConf Colombia @ Medellin › Colombia (co) › South America › America
|
45
|
+
in 116d Sat+Sun Oct/17+18 (2d) - European Ruby Konference - EuRuKo @ Salzburg, Austria › Europe
|
46
|
+
in 141d Wed+Thu Nov/11+12 (2d) - RubyWorld Conference @ Matsue › Japan (jp) › Asia
|
47
|
+
...
|
47
48
|
~~~
|
48
49
|
|
50
|
+
|
51
|
+
### Upcoming Football Tournaments
|
52
|
+
|
53
|
+
Use
|
54
|
+
|
55
|
+
~~~
|
56
|
+
$ kickoff
|
57
|
+
~~~
|
58
|
+
|
59
|
+
to list upcoming football tournaments from around the world. Will print:
|
60
|
+
|
61
|
+
~~~
|
62
|
+
Upcoming Football Tournaments:
|
63
|
+
|
64
|
+
in 14d Tue-Sun Jul/7-26 (20d) - Gold Cup / Copa de Oro 2015 @ United States+Canada › North America (CONCACAF)
|
65
|
+
in 346d Fri-Sun Jun/3-26 (24d) - Copa América 2016 @ United States › South America (CONMEBOL)
|
66
|
+
in 353d Fri-Sun Jun/10-Jul/10 (31d) - European Championship (Euro) 2016 @ France › Europe (UEFA)
|
67
|
+
in 1087d Thu-Sun Jun/14-Jul/15 (32d) - World Cup 2018 @ Russia › World (FIFA)
|
68
|
+
...
|
69
|
+
~~~
|
70
|
+
|
71
|
+
|
49
72
|
### Upcoming Beerfests
|
50
73
|
|
51
74
|
Use
|
@@ -59,18 +82,20 @@ to list upcoming beer festivals from around the world. Will print:
|
|
59
82
|
~~~
|
60
83
|
Upcoming Beerfests:
|
61
84
|
|
62
|
-
Jul/2-
|
63
|
-
Jul/24-Aug/3 - Annafest ("Auf den Kellern") @ Forchheim › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
64
|
-
Jul/25-Aug/2 - Kulmbacher Bierwoche @ Kulmbach › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
65
|
-
Aug/20-24 - Sandwerka (Sandkirchweih) @ Bamberg › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
66
|
-
|
67
|
-
Oct/24+25 - Biermesse Ried (Festival der Biervielfalt) @ Ried i. Innkreis › Upper Austria / Oberösterreich › Austria / Österreich (at) › Central Europe › Europe
|
85
|
+
in 9d Thu-Wed Jul/2-Sep/2 (63d) - Ottakringer Braukultur Wochen (9 Brauereien in 9 Wochen) @ 16., Ottakring › Vienna / Wien › Austria / Österreich (at) › Central Europe › Europe
|
86
|
+
in 31d Fri-Mon Jul/24-Aug/3 (11d) - Annafest ("Auf den Kellern") @ Forchheim › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
87
|
+
in 32d Sat-Sun Jul/25-Aug/2 (9d) - Kulmbacher Bierwoche @ Kulmbach › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
88
|
+
in 58d Thu-Mon Aug/20-24 (5d) - Sandwerka (Sandkirchweih) @ Bamberg › Upper Franconia / Oberfranken › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
89
|
+
in 88d Sat-Sun Sep/19-Oct/4 (16d) - Oktoberfest ("Die Wiesn") @ Munich / München › Upper Bavaria / Oberbayern › Bavaria / Bayern › Germany / Deutschland (de) › Central Europe › Europe
|
90
|
+
in 123d Sat+Sun Oct/24+25 (2d) - Biermesse Ried (Festival der Biervielfalt) @ Ried i. Innkreis › Upper Austria / Oberösterreich › Austria / Österreich (at) › Central Europe › Europe
|
91
|
+
...
|
68
92
|
~~~
|
69
93
|
|
70
94
|
|
71
95
|
## Public Event Datasets
|
72
96
|
|
73
97
|
- [awesome-events @ Planet Ruby](https://github.com/planetruby/awesome-events) - a collection of awesome Ruby events (meetups, conferences, camps, etc.) from around the world
|
98
|
+
- [calendar @ football.db](https://github.com/openfootball/calendar) - a collection of awesome football tournaments, cups, etc. from around the world
|
74
99
|
- [calendar @ beer.db](https://github.com/openbeer/calendar) - a collection of awesome beer events (oktoberfest, starkbierfest, etc.) from around the world
|
75
100
|
|
76
101
|
|
data/bin/kickoff
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
###################
|
4
|
+
# == DEV TIPS:
|
5
|
+
#
|
6
|
+
# For local testing run like:
|
7
|
+
#
|
8
|
+
# ruby -Ilib bin/kickoff
|
9
|
+
#
|
10
|
+
# Set the executable bit in Linux. Example:
|
11
|
+
#
|
12
|
+
# % chmod a+x bin/kickoff
|
13
|
+
#
|
14
|
+
|
15
|
+
require 'eventdb'
|
16
|
+
|
17
|
+
EventDb::Football.new.print
|
18
|
+
|
data/lib/eventdb/database.rb
CHANGED
@@ -35,7 +35,12 @@ class Database
|
|
35
35
|
title: title,
|
36
36
|
place: ev.place,
|
37
37
|
date: ev.date,
|
38
|
-
start_date: ev.start_date
|
38
|
+
start_date: ev.start_date,
|
39
|
+
end_date: ev.end_date,
|
40
|
+
## note: (pre)calculate duration in days
|
41
|
+
## -- mjd == Modified Julian Day Number
|
42
|
+
## -- note: 0 = same day (end==start), thus always add plus one (for one day event)
|
43
|
+
days: ev.end_date.mjd - ev.start_date.mjd + 1
|
39
44
|
)
|
40
45
|
end
|
41
46
|
end
|
@@ -17,9 +17,12 @@ class BeerFest
|
|
17
17
|
|
18
18
|
def print
|
19
19
|
## get next 17 events
|
20
|
+
|
21
|
+
today = Date.today
|
22
|
+
|
20
23
|
up = EventDb::Model::Event.limit( 17 )
|
21
24
|
.order( 'start_date' )
|
22
|
-
.where( 'start_date >= ?',
|
25
|
+
.where( 'start_date >= ?', today )
|
23
26
|
## pp up.to_sql
|
24
27
|
## pp up
|
25
28
|
|
@@ -28,7 +31,8 @@ class BeerFest
|
|
28
31
|
puts "Upcoming Beerfests:"
|
29
32
|
puts ''
|
30
33
|
up.each do |e|
|
31
|
-
|
34
|
+
diff_days = e.start_date.mjd - today.mjd ## note: mjd == Modified Julian Day Number
|
35
|
+
puts " in #{diff_days}d #{e.date_str} (#{e.days}d) - #{e.title} @ #{e.place}"
|
32
36
|
end
|
33
37
|
puts ''
|
34
38
|
puts " More @ github.com/openbeer/calendar"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module EventDb
|
4
|
+
|
5
|
+
class Football
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
## turn down logger (default :debug?)
|
9
|
+
LogUtils::Logger.root.level = :info
|
10
|
+
|
11
|
+
r = EventDb::EventReader.from_url( "https://github.com/openfootball/calendar/raw/master/README.md" )
|
12
|
+
events = r.read
|
13
|
+
|
14
|
+
@db = EventDb::Database.new
|
15
|
+
@db.add( events )
|
16
|
+
end
|
17
|
+
|
18
|
+
def print
|
19
|
+
## get next 17 events
|
20
|
+
|
21
|
+
today = Date.today
|
22
|
+
|
23
|
+
up = EventDb::Model::Event.limit( 17 )
|
24
|
+
.order( 'start_date' )
|
25
|
+
.where( 'start_date >= ?', today )
|
26
|
+
## pp up.to_sql
|
27
|
+
## pp up
|
28
|
+
|
29
|
+
puts ''
|
30
|
+
puts ''
|
31
|
+
puts "Upcoming Football Tournaments:"
|
32
|
+
puts ''
|
33
|
+
up.each do |e|
|
34
|
+
diff_days = e.start_date.mjd - today.mjd ## note: mjd == Modified Julian Day Number
|
35
|
+
puts " in #{diff_days}d #{e.date_str} (#{e.days}d) - #{e.title} #{e.start_date.year} @ #{e.place}"
|
36
|
+
end
|
37
|
+
puts ''
|
38
|
+
puts " More @ github.com/openfootball/calendar"
|
39
|
+
puts ''
|
40
|
+
end
|
41
|
+
|
42
|
+
end # class Football
|
43
|
+
|
44
|
+
end # module EventDb
|
@@ -17,9 +17,12 @@ class RubyConf
|
|
17
17
|
|
18
18
|
def print
|
19
19
|
## get next 17 events
|
20
|
+
|
21
|
+
today = Date.today
|
22
|
+
|
20
23
|
up = EventDb::Model::Event.limit( 17 )
|
21
24
|
.order( 'start_date' )
|
22
|
-
.where( 'start_date >= ?',
|
25
|
+
.where( 'start_date >= ?', today )
|
23
26
|
## pp up.to_sql
|
24
27
|
## pp up
|
25
28
|
|
@@ -28,7 +31,8 @@ class RubyConf
|
|
28
31
|
puts "Upcoming Ruby Conferences:"
|
29
32
|
puts ''
|
30
33
|
up.each do |e|
|
31
|
-
|
34
|
+
diff_days = e.start_date.mjd - today.mjd ## note: mjd == Modified Julian Day Number
|
35
|
+
puts " in #{diff_days}d #{e.date_str} (#{e.days}d) - #{e.title} @ #{e.place}"
|
32
36
|
end
|
33
37
|
puts ''
|
34
38
|
puts " More @ github.com/planetruby/awesome-events"
|
data/lib/eventdb/models.rb
CHANGED
@@ -5,6 +5,52 @@ module EventDb
|
|
5
5
|
|
6
6
|
class Event < ActiveRecord::Base
|
7
7
|
|
8
|
+
def date_str # date pretty printed (pre-formatted) as string
|
9
|
+
|
10
|
+
## note: wday - (0-6, Sunday is zero).
|
11
|
+
if days == 1
|
12
|
+
buf = ''
|
13
|
+
buf << Date::ABBR_DAYNAMES[start_date.wday]
|
14
|
+
buf << ' '
|
15
|
+
buf << Date::ABBR_MONTHNAMES[start_date.month]
|
16
|
+
buf << '/'
|
17
|
+
buf << start_date.day.to_s
|
18
|
+
elsif days == 2
|
19
|
+
buf = ''
|
20
|
+
buf << Date::ABBR_DAYNAMES[start_date.wday]
|
21
|
+
buf << '+'
|
22
|
+
buf << Date::ABBR_DAYNAMES[end_date.wday]
|
23
|
+
buf << ' '
|
24
|
+
buf << Date::ABBR_MONTHNAMES[start_date.month]
|
25
|
+
buf << '/'
|
26
|
+
buf << start_date.day.to_s
|
27
|
+
buf << '+'
|
28
|
+
if start_date.month != end_date.month
|
29
|
+
buf << Date::ABBR_MONTHNAMES[end_date.month]
|
30
|
+
buf << '/'
|
31
|
+
end
|
32
|
+
buf << end_date.day.to_s
|
33
|
+
else ## assume multi day
|
34
|
+
buf = ''
|
35
|
+
buf << Date::ABBR_DAYNAMES[start_date.wday]
|
36
|
+
buf << '-'
|
37
|
+
buf << Date::ABBR_DAYNAMES[end_date.wday]
|
38
|
+
buf << ' '
|
39
|
+
buf << Date::ABBR_MONTHNAMES[start_date.month]
|
40
|
+
buf << '/'
|
41
|
+
buf << start_date.day.to_s
|
42
|
+
buf << '-'
|
43
|
+
if start_date.month != end_date.month
|
44
|
+
buf << Date::ABBR_MONTHNAMES[end_date.month]
|
45
|
+
buf << '/'
|
46
|
+
end
|
47
|
+
buf << end_date.day.to_s
|
48
|
+
end
|
49
|
+
|
50
|
+
buf
|
51
|
+
end # method date_str
|
52
|
+
|
53
|
+
|
8
54
|
end # class Event
|
9
55
|
|
10
56
|
end # module Model
|
data/lib/eventdb/reader.rb
CHANGED
@@ -9,7 +9,7 @@ class EventReader
|
|
9
9
|
include LogUtils::Logging
|
10
10
|
|
11
11
|
|
12
|
-
Event = Struct.new( :title, :place, :date, :start_date)
|
12
|
+
Event = Struct.new( :title, :place, :date, :start_date, :end_date, :days)
|
13
13
|
|
14
14
|
def self.from_url( src ) # note: src assumed a string
|
15
15
|
worker = Fetcher::Worker.new
|
@@ -58,9 +58,17 @@ class EventReader
|
|
58
58
|
[^;]+ ## use ; as separator between place and date
|
59
59
|
;
|
60
60
|
\s+
|
61
|
-
(?<
|
61
|
+
(?<start_month_en>#{MONTH_EN})
|
62
62
|
\/
|
63
|
-
(?<
|
63
|
+
(?<start_day>[0-9]{1,2}) ## start date
|
64
|
+
(?:
|
65
|
+
[+\-] ## use + for two days, - for more than two days
|
66
|
+
(?:
|
67
|
+
(?<end_month_en>#{MONTH_EN})
|
68
|
+
\/
|
69
|
+
)? ## optional end_month
|
70
|
+
(?<end_day>[0-9]{1,2})
|
71
|
+
)? ## optional end_date
|
64
72
|
/x
|
65
73
|
|
66
74
|
|
@@ -84,7 +92,11 @@ class EventReader
|
|
84
92
|
|
85
93
|
last_link_entry = nil
|
86
94
|
|
87
|
-
|
95
|
+
# note: cut out; remove all html comments e.g. <!-- -->
|
96
|
+
# supports multi-line comments too (e.g. uses /m - make dot match newlines)
|
97
|
+
text = @text.gsub( /<!--.+?-->/m, '' ) ## todo/fix: track/log cut out comments!!!
|
98
|
+
|
99
|
+
text.each_line do |line|
|
88
100
|
|
89
101
|
logger.debug "line: >#{line}<"
|
90
102
|
line = line.rstrip ## remove (possible) trailing newline
|
@@ -130,15 +142,30 @@ class EventReader
|
|
130
142
|
s.skip( /[ ]*-[ ]*/ ) ## skip leading list
|
131
143
|
last_link_entry = s.rest.rstrip ## remove trailing spaces to
|
132
144
|
elsif( m=DATE_ENTRY_REGEX.match( line ) )
|
133
|
-
year
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
145
|
+
year = m[:year]
|
146
|
+
|
147
|
+
start_month_en = m[:start_month_en]
|
148
|
+
start_day = m[:start_day]
|
149
|
+
|
150
|
+
start_month = MONTH_EN_TO_MM[ start_month_en ]
|
151
|
+
start_date = Date.new( year.to_i, start_month.to_i, start_day.to_i )
|
152
|
+
|
153
|
+
|
154
|
+
end_month_en = m[:end_month_en]
|
155
|
+
end_month_en = start_month_en if end_month_en.nil? # no end month; use same as start
|
156
|
+
|
157
|
+
end_day = m[:end_day]
|
158
|
+
end_day = start_day if end_day.nil? # no end day; single day event (use start day)
|
159
|
+
|
160
|
+
end_month = MONTH_EN_TO_MM[ end_month_en ]
|
161
|
+
end_date = Date.new( year.to_i, end_month.to_i, end_day.to_i )
|
162
|
+
|
138
163
|
## pp start_date
|
139
164
|
|
140
|
-
logger.debug " date entry: #{line}"
|
141
|
-
logger.debug " start_date: #{start_date}, year: #{year},
|
165
|
+
logger.debug " date entry: #{line}"
|
166
|
+
logger.debug " start_date: #{start_date}, year: #{year}, start_month_en: #{start_month_en}, start_month: #{start_month} start_day: #{start_day} => #{last_link_entry}"
|
167
|
+
logger.debug " end_date: #{end_date}, end_month_en: #{end_month_en}, end_day_en: #{end_day}"
|
168
|
+
|
142
169
|
|
143
170
|
s = StringScanner.new( line )
|
144
171
|
s.skip( /[ ]*-[ ]*/ ) ## skip leading list
|
@@ -159,7 +186,7 @@ class EventReader
|
|
159
186
|
|
160
187
|
title = last_link_entry
|
161
188
|
|
162
|
-
event = Event.new( title, place, date, start_date )
|
189
|
+
event = Event.new( title, place, date, start_date, end_date )
|
163
190
|
## pp event
|
164
191
|
events << event
|
165
192
|
else
|
data/lib/eventdb/schema.rb
CHANGED
@@ -12,6 +12,8 @@ create_table :events do |t|
|
|
12
12
|
t.string :place, null: false
|
13
13
|
t.string :date, null: false # note: full date range (start to end) for now as *string*
|
14
14
|
t.date :start_date, null: false ## use (rename) to start_at - why? why not?
|
15
|
+
t.date :end_date, null: false ## use (rename) to end_at - why? why not?
|
16
|
+
t.integer :days, null: false
|
15
17
|
|
16
18
|
t.timestamps
|
17
19
|
end
|
data/lib/eventdb/version.rb
CHANGED
data/lib/eventdb.rb
CHANGED
@@ -26,9 +26,9 @@ require 'eventdb/models'
|
|
26
26
|
require 'eventdb/database'
|
27
27
|
|
28
28
|
|
29
|
-
require 'eventdb/beerfest'
|
30
|
-
require 'eventdb/rubyconf'
|
31
|
-
|
29
|
+
require 'eventdb/datasets/beerfest' ## used by beerfest bin(ary) tool
|
30
|
+
require 'eventdb/datasets/rubyconf' ## used by rubyconf bin(ary) tool
|
31
|
+
require 'eventdb/datasets/football' ## used by kickoff bin(ary) tool
|
32
32
|
|
33
33
|
|
34
34
|
|
data/test/test_calendar.rb
CHANGED
@@ -22,7 +22,7 @@ class TestCalendar < MiniTest::Test
|
|
22
22
|
# Ruby Conference Calendar
|
23
23
|
|
24
24
|
NOTE: This page gets auto-generated from the [awesome-events](README.md) page @ Planet Ruby.
|
25
|
-
(Last update on
|
25
|
+
(Last update on #{Date.today}.) Do NOT edit this page, please update or edit conferences, camps, meetups etc.
|
26
26
|
on the [awesome-events](README.md) page. Anything missing? Contributions welcome. Thanks!
|
27
27
|
|
28
28
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: props
|
@@ -182,6 +182,7 @@ description: eventdb - event.db models n tools
|
|
182
182
|
email: ruby-talk@ruby-lang.org
|
183
183
|
executables:
|
184
184
|
- beerfest
|
185
|
+
- kickoff
|
185
186
|
- rubyconf
|
186
187
|
extensions: []
|
187
188
|
extra_rdoc_files:
|
@@ -195,14 +196,16 @@ files:
|
|
195
196
|
- README.md
|
196
197
|
- Rakefile
|
197
198
|
- bin/beerfest
|
199
|
+
- bin/kickoff
|
198
200
|
- bin/rubyconf
|
199
201
|
- lib/eventdb.rb
|
200
|
-
- lib/eventdb/beerfest.rb
|
201
202
|
- lib/eventdb/calendar.rb
|
202
203
|
- lib/eventdb/database.rb
|
204
|
+
- lib/eventdb/datasets/beerfest.rb
|
205
|
+
- lib/eventdb/datasets/football.rb
|
206
|
+
- lib/eventdb/datasets/rubyconf.rb
|
203
207
|
- lib/eventdb/models.rb
|
204
208
|
- lib/eventdb/reader.rb
|
205
|
-
- lib/eventdb/rubyconf.rb
|
206
209
|
- lib/eventdb/schema.rb
|
207
210
|
- lib/eventdb/version.rb
|
208
211
|
- templates/CALENDAR.md.erb
|