jekyll-events 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -2
- data/jekyll-events.gemspec +1 -1
- data/lib/jekyll-events.rb +10 -1
- data/lib/jekyll-events/version.rb +1 -1
- metadata +18 -12
- checksums.yaml +0 -7
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# jekyll-events
|
2
2
|
|
3
|
-
Lets you create posts that represent future events. They're
|
3
|
+
Lets you create posts that represent future events. They're posts but
|
4
|
+
in the future! Great for schedules and calendars.
|
4
5
|
|
5
6
|
Basic Setup
|
6
7
|
-----------
|
@@ -15,7 +16,10 @@ In a plugin file within your Jekyll project's `_plugins` directory:
|
|
15
16
|
|
16
17
|
Bundler Setup
|
17
18
|
-------------
|
18
|
-
Using bundler to manage gems for your Jekyll project?
|
19
|
+
Using bundler to manage gems for your Jekyll project? (Which you
|
20
|
+
totally should, because its awesome.)
|
21
|
+
|
22
|
+
Just add:
|
19
23
|
|
20
24
|
gem "jekyll-events"
|
21
25
|
|
@@ -33,6 +37,11 @@ Anywhere you need some future dated events create an `_events`
|
|
33
37
|
directory. Add any [properly formatted files](http://jekyllrb.com/docs/posts/) inside this directory just
|
34
38
|
like you would with posts.
|
35
39
|
|
40
|
+
Only events dated in the future will be published, events in the past
|
41
|
+
are excluded. Remember, because its a statically generated site if you
|
42
|
+
want events to automatically expire you will have to do some crontab
|
43
|
+
scheduling or similar to autmatically republish your site.
|
44
|
+
|
36
45
|
## Contributing
|
37
46
|
|
38
47
|
1. Fork it
|
data/jekyll-events.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'jekyll', "
|
21
|
+
spec.add_runtime_dependency 'jekyll', ">= 1.2.0"
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.3"
|
23
23
|
end
|
data/lib/jekyll-events.rb
CHANGED
@@ -40,12 +40,21 @@ module Jekyll
|
|
40
40
|
entries.each do |f|
|
41
41
|
if Post.valid?(f)
|
42
42
|
event = Event.new(site, site.source, dir, f)
|
43
|
-
if event.published && event.
|
43
|
+
if event.published && end_date(event).to_i >= site.time.to_i
|
44
44
|
site.aggregate_post_info(event)
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
def end_date(event)
|
51
|
+
if event.data.key?('end_date')
|
52
|
+
event_end_date = Time.parse(event.data['end_date'].to_s)
|
53
|
+
else
|
54
|
+
event_end_date = event.date
|
55
|
+
end
|
56
|
+
event_end_date
|
57
|
+
end
|
49
58
|
end
|
50
59
|
end
|
51
60
|
end
|
metadata
CHANGED
@@ -1,41 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Zach Starkebaum
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: jekyll
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 1.2.0
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 1.2.0
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: bundler
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ~>
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '1.3'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ~>
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '1.3'
|
41
46
|
description: Lets you create posts that represent future events. They're post's but
|
@@ -46,7 +51,7 @@ executables: []
|
|
46
51
|
extensions: []
|
47
52
|
extra_rdoc_files: []
|
48
53
|
files:
|
49
|
-
-
|
54
|
+
- .gitignore
|
50
55
|
- Gemfile
|
51
56
|
- LICENSE.txt
|
52
57
|
- README.md
|
@@ -57,25 +62,26 @@ files:
|
|
57
62
|
homepage: ''
|
58
63
|
licenses:
|
59
64
|
- MIT
|
60
|
-
metadata: {}
|
61
65
|
post_install_message:
|
62
66
|
rdoc_options: []
|
63
67
|
require_paths:
|
64
68
|
- lib
|
65
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
66
71
|
requirements:
|
67
|
-
- -
|
72
|
+
- - ! '>='
|
68
73
|
- !ruby/object:Gem::Version
|
69
74
|
version: '0'
|
70
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
71
77
|
requirements:
|
72
|
-
- -
|
78
|
+
- - ! '>='
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '0'
|
75
81
|
requirements: []
|
76
82
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
83
|
+
rubygems_version: 1.8.23
|
78
84
|
signing_key:
|
79
|
-
specification_version:
|
85
|
+
specification_version: 3
|
80
86
|
summary: Simple event posts for Jekyll
|
81
87
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 4b1a9175a6fd1c13f700f58bb9197c993251f4bd
|
4
|
-
data.tar.gz: 647c64628d60d57a12e5a9e7f968529bc2336d0e
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: c1c921db66cbb0e63cb20def326997733042ef19f10f1380c0e9e35a01dc4a0cbadd720326eff00b198e6669cd32b08b027a2fbe1934ab967c70236ec056f50a
|
7
|
-
data.tar.gz: eb55e08d94cd04167ffd20ecabd17fbdd47c29a0f5fac6f03308f39f75f3d370c5fdac1f84939938b68634597c55dac62184a4b73d936cf450e31fe265946af8
|