cosch 1.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 78c5f598170235eba9003d511397b95370587ead
4
+ data.tar.gz: 4f965bf7eb2a5939bc961b6cdae9cb67220ee406
5
+ SHA512:
6
+ metadata.gz: aae6eb7e42bcf73d68bd886e80c3dcf19438b6a63b22acecc402f473cc050c7803c54e8ec49a0e2852d86afb7171c459bf90619f8d56fde33a36b751d3b328b5
7
+ data.tar.gz: 3143dd37e9de4d8aa749bafdca856f173edf6734dc8e16e29051893401df36a0b77a45122ae9e5eb04f38c7f5e27cee0d0bff3229a89f802ba7f1676e29c658e
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/schedule_generator'
3
+ RapidSchedule::ScheduleGenerator.new(ARGV.dup).execute!
@@ -0,0 +1,32 @@
1
+ require 'digest'
2
+
3
+ class AppcachePathGenerator
4
+
5
+ def initialize source_dir
6
+ @source_dir = source_dir
7
+ end
8
+
9
+ def paths
10
+ resources = []
11
+ # cd into dir so glob does not contain first path part prefix in paths
12
+ # e.g. if dir is build/ glob would contain build/foo/bat, but we want foo/bat
13
+ Dir.chdir(@source_dir) do
14
+ resources = Dir["**/*"].reject { |i| File.directory? i }
15
+ end
16
+ resources.sort
17
+ end
18
+
19
+ # might be better placed elsewhere
20
+ def appcache_version
21
+
22
+ md5 = Digest::MD5.new
23
+ content = ''
24
+
25
+ paths.each do |file|
26
+ content << File.read(File.join(@source_dir, file))
27
+ end
28
+
29
+ md5.hexdigest content
30
+ end
31
+
32
+ end
@@ -0,0 +1,9 @@
1
+ module RapidSchedule
2
+ class Asker
3
+ def self.confirm?(what)
4
+ p what
5
+ p "Ok? [y/n]"
6
+ gets.chomp == 'y'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,148 @@
1
+ require 'liquid'
2
+ require 'fileutils'
3
+ require 'yaml'
4
+ require_relative '../appcache_path_generator'
5
+ require_relative '../location_data_generator'
6
+ require 'find'
7
+
8
+ VIEW_PATH_ROOT = File.join('views')
9
+
10
+ module RapidSchedule
11
+ module Commands
12
+ class Build
13
+ def execute!
14
+ p 'Building site'
15
+ @config = YAML.load_file 'schedule.yml'
16
+ @days = days = @config["days"]
17
+ @location_data_generator = RapidSchedule::LocationDataGenerator.new(@days)
18
+
19
+ Liquid::Template.file_system = Liquid::LocalFileSystem.new(VIEW_PATH_ROOT)
20
+
21
+
22
+ @days = decorate_days_with_file_names(days)
23
+
24
+ FileUtils.mkdir_p('build/')
25
+ FileUtils.rm_rf(Dir.glob('build/*'))
26
+
27
+
28
+ @days.each do |day|
29
+ create_day_view_for_day(day, @location_data_generator.locations_for_day(day))
30
+ create_location_views_for_day(day)
31
+ end
32
+
33
+ copy_static_to_build
34
+
35
+ appcache_generator = AppcachePathGenerator.new 'build'
36
+ appcache_content = generate_appcache_content(appcache_generator.paths)
37
+
38
+ appcache_content << "#VERSION:" + appcache_generator.appcache_version + '#'
39
+
40
+ File.open('build/' + 'cache.appcache', 'w') { |file| file.write(appcache_content) }
41
+ end
42
+
43
+ private
44
+
45
+ def create_day_view_for_day(day, locations)
46
+ day_html = generate_day_html(day, locations)
47
+ write_with_wrapper_markup(day_html, 'build/' + day['file_name'] + '.html')
48
+ end
49
+
50
+ def create_location_views_for_day(day)
51
+ locations = @location_data_generator.locations_for_day(day)
52
+
53
+ locations.each do |location|
54
+ html = generate_location_html(location, @location_data_generator.talks_for_location_for_day(location, day), day)
55
+ write_with_wrapper_markup(html, generate_location_path_for_day(day, location))
56
+ end
57
+
58
+ end
59
+
60
+ def generate_location_html(location, talks, day)
61
+ html_path = File.join(VIEW_PATH_ROOT, 'location.html')
62
+ file_content = File.new(html_path).read
63
+
64
+ Liquid::Template.parse(file_content).render(
65
+ {
66
+ 'day' => day,
67
+ 'talks' => talks,
68
+ 'days' => @days,
69
+ 'title' => @config['title'],
70
+ 'location' => location
71
+ })
72
+ end
73
+
74
+ def generate_location_path_for_day(day, location)
75
+ 'build/' + day['file_name'] + '_' + sanitize_filename(location) + '.html'
76
+ end
77
+
78
+ # XXX file names not unique anymore! Could be overridden
79
+ def decorate_days_with_file_names(days)
80
+ days_decorated = days.map do |day|
81
+ index = days.index day
82
+ day['file_name'] = sanitize_filename(day["name"])
83
+
84
+ if index === 0
85
+ day['file_name'] = 'index'
86
+ end
87
+
88
+ # sanitize location paths
89
+ day['slots'].each do |slot|
90
+ slot['talks'].each do |talk|
91
+ talk['location_file_name'] = sanitize_filename(talk['location'])
92
+ end
93
+ end
94
+
95
+ day
96
+ end
97
+ end
98
+
99
+ def write_with_wrapper_markup(html, path)
100
+ wrapper_path = File.join(VIEW_PATH_ROOT, 'wrapper.html')
101
+ html = Liquid::Template.parse(File.new(wrapper_path).read).render('content' => html)
102
+
103
+ File.open(path, 'w') { |file| file.write(html) }
104
+ end
105
+
106
+ def generate_day_html(day, locations)
107
+ html_path = File.join(VIEW_PATH_ROOT, 'day.html')
108
+ file_content = File.new(html_path).read
109
+
110
+ Liquid::Template.parse(file_content).render(
111
+ {
112
+ 'day' => day,
113
+ 'days' => @days,
114
+ 'active_name' => day['name'],
115
+ 'title' => @config['title']
116
+ })
117
+ end
118
+
119
+ def generate_appcache_content(paths)
120
+ Liquid::Template.parse(File.new(File.join(VIEW_PATH_ROOT, 'cache.appcache')).read).render 'resources' => paths
121
+ end
122
+
123
+ def copy_static_to_build
124
+ static_folder_path = 'static'
125
+
126
+ return unless Dir.exist? static_folder_path
127
+
128
+ FileUtils.cp_r(Dir[static_folder_path + '/*'], 'build')
129
+ end
130
+
131
+ def sanitize_filename(filename)
132
+ # Split the name when finding a period which is preceded by some
133
+ # character, and is followed by some character other than a period,
134
+ # if there is no following period that is followed by something
135
+ # other than a period (yeah, confusing, I know)
136
+ fn = filename.split /(?<=.)\.(?=[^.])(?!.*\.[^.])/m
137
+
138
+ # We now have one or two parts (depending on whether we could find
139
+ # a suitable period). For each of these parts, replace any unwanted
140
+ # sequence of characters with an underscore
141
+ fn.map! { |s| s.gsub /[^a-z0-9\-]+/i, '_' }
142
+
143
+ # Finally, join the parts with a period and return the result
144
+ return fn.join '.'
145
+ end
146
+ end
147
+ end
148
+ end
@@ -0,0 +1,22 @@
1
+ require_relative '../deploy_to_github_pages'
2
+ require_relative '../asker'
3
+
4
+ module RapidSchedule
5
+ module Commands
6
+ class DeployToGithubPages
7
+ def execute!(options = {})
8
+ gh_remote_url = options["remote"]
9
+
10
+ unless gh_remote_url
11
+ gh_remote_url = RapidSchedule::DeployToGithubPages.retrieve_remote_url
12
+ end
13
+
14
+ ok = RapidSchedule::Asker.confirm? "Will push to: #{gh_remote_url} gh-pages branch"
15
+
16
+ if ok
17
+ RapidSchedule::DeployToGithubPages.deploy gh_remote_url
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,18 @@
1
+
2
+
3
+ module RapidSchedule
4
+ module Commands
5
+ class New
6
+ def execute!(args, options = {})
7
+ template_path = File.expand_path(File.join(__FILE__, '..', '..', 'template'))
8
+
9
+ raise ArgumentError.new("You need to provide a PATH") if args.empty?
10
+
11
+ destination = File.expand_path(args.join(" "), Dir.pwd)
12
+
13
+ FileUtils.mkdir_p(destination)
14
+ FileUtils.cp_r(Dir[File.join(template_path, '*')], destination)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ module RapidSchedule
2
+ class DeployToGithubPages
3
+ def self.deploy(remote_url)
4
+ script_path = File.join(File.dirname(__FILE__), 'scripts', 'deploy_to_github_pages.sh')
5
+ system(script_path, remote_url)
6
+ end
7
+
8
+ # xxx handle no git rep
9
+ def self.retrieve_remote_url
10
+ `git remote show -n origin | grep 'Push' | awk '{print $NF}'`.strip
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,43 @@
1
+ module RapidSchedule
2
+ class LocationDataGenerator
3
+ def initialize(days)
4
+ @days = days
5
+ end
6
+
7
+ def talks_for_location_for_day(location, day)
8
+ day = day_by_name(day["name"])
9
+ talks_at_location = []
10
+
11
+ day['slots'].each do |slot|
12
+ slot['talks'].each do |talk|
13
+ if talk["location"] === location
14
+ talk["start"] = slot["start"]
15
+ talk["end"] = slot["end"]
16
+
17
+ talks_at_location << talk
18
+
19
+ end
20
+ end
21
+ end
22
+ talks_at_location
23
+ end
24
+
25
+ def locations_for_day(day)
26
+ day = day_by_name(day["name"])
27
+ locations = []
28
+
29
+ day['slots'].each do |slot|
30
+ slot['talks'].each do |talk|
31
+ locations << talk['location'] unless locations.include?(talk['location'])
32
+ end
33
+ end
34
+ locations
35
+ end
36
+
37
+ private
38
+
39
+ def day_by_name(name)
40
+ @days.each { |day| return day if name === day["name"] }
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,72 @@
1
+ body
2
+ font-size: 16px
3
+ font-family: Helvetica Neue
4
+ margin: 0
5
+ padding: 0
6
+
7
+ .content
8
+ width: 95%
9
+ margin: 10px auto
10
+
11
+ body *
12
+ box-sizing: border-box
13
+
14
+ .slot-container
15
+ margin-bottom: 30px
16
+ margin-right: -5px
17
+
18
+ .talks-container
19
+ display: -webkit-flex
20
+ display: flex
21
+
22
+ width: 100%
23
+
24
+ -webkit-flex-wrap: wrap
25
+ -ms-flex-wrap: wrap
26
+ flex-wrap: wrap
27
+
28
+ .talk-footer
29
+ font-size: 0.75em
30
+ position: absolute
31
+ bottom: 0
32
+ height: 30px
33
+
34
+ .talk-speaker, .talk-location
35
+ min-height: 1em
36
+
37
+ .talk-title
38
+ padding-bottom: 30px
39
+
40
+ .talk-container
41
+
42
+ -webkit-flex-grow: 1
43
+ -webkit-flex-shrink: 1
44
+
45
+ -ms-flex-grow: 1
46
+ -ms-flex-shrink: 1
47
+
48
+ flex-grow: 1
49
+ flex-shrink: 1
50
+
51
+ min-width: 200px
52
+ width: 200px
53
+ padding: 10px
54
+ border: 1px solid #e5e5e5
55
+ border-radius: 2px
56
+ background-color: #fff
57
+ margin: 5px
58
+ margin-left: 0px
59
+ box-shadow: 0px 3px rgba(0, 0, 0, 0.1)
60
+ min-height: 100px
61
+ position: relative
62
+
63
+ nav ul
64
+ padding: 0
65
+
66
+ nav ul li
67
+ list-style-type: none
68
+ display: inline-block
69
+ &.active
70
+ font-weight: bold
71
+
72
+ /*# sourceMappingURL=style.css.map
@@ -0,0 +1,63 @@
1
+ require_relative 'commands/build'
2
+ require_relative 'commands/deploy_to_github_pages'
3
+ require_relative 'commands/new'
4
+ require 'mercenary'
5
+
6
+ module RapidSchedule
7
+
8
+ class ScheduleGenerator
9
+ def initialize(argv, stdin=STDIN, stdout=STDOUT, stderr=STDERR, kernel=Kernel)
10
+ @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
11
+ end
12
+
13
+ def execute!
14
+ Mercenary.program(:cosch) do |p|
15
+ p.version '1.0.1'
16
+ p.description 'Generate your conference schedule easily'
17
+ p.syntax "cosch <subcommand>"
18
+
19
+ # blatantly stolen from jekyll XXX needs tests
20
+ p.action do |args|
21
+ if args.empty?
22
+ puts p
23
+ else
24
+ unless p.has_command?(args.first)
25
+ raise ArgumentError.new("Invalid command. Use --help for more information")
26
+ end
27
+ end
28
+ end
29
+
30
+ p.command(:build) do |c|
31
+ c.syntax "build"
32
+ c.description "builds the static site"
33
+
34
+ c.action do |args, options|
35
+ RapidSchedule::Commands::Build.new.execute!
36
+ end
37
+ end
38
+
39
+ p.command(:deploy) do |c|
40
+ c.syntax "deploy"
41
+ c.description "deploys site to Github pages."
42
+ c.option 'remote', '--remote [REMOTE_URL]', 'Set the git remote url where gh-pages branch is pushed to.'
43
+
44
+ c.action do |args, options|
45
+ RapidSchedule::Commands::DeployToGithubPages.new.execute! options
46
+ end
47
+ end
48
+
49
+ p.command(:new) do |c|
50
+ c.syntax "new PATH"
51
+ c.description "creates a new schedule skeleton at PATH."
52
+
53
+ c.action do |args, options|
54
+ RapidSchedule::Commands::New.new.execute! args, options
55
+ end
56
+ end
57
+
58
+ end
59
+ @kernel.exit 0
60
+ end
61
+ end
62
+
63
+ end
@@ -0,0 +1,30 @@
1
+ #!/bin/bash -e
2
+ echo "Going to deploy the joy. Buckle up."
3
+
4
+ GIT_REMOTE_URL=$1
5
+
6
+ # thanks http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
7
+ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
8
+
9
+ if [ -z "$GIT_REMOTE_URL" ]; then
10
+ echo "Missing git remote url. Aborting"
11
+ exit 1
12
+ fi
13
+
14
+
15
+ # xxx there must be a better way
16
+ # why isn't even possible to call the script with ../../ in the first place?
17
+ ABSOLUTE_SCRIPT_PATH=$(cd "$DIR/../../bin/" && pwd)
18
+
19
+ "$ABSOLUTE_SCRIPT_PATH/cosch.rb" build
20
+
21
+ cd build
22
+ rm -rf .git
23
+ git init
24
+ git add .
25
+ git commit -m 'Deployment'
26
+ git push "$GIT_REMOTE_URL" master:gh-pages --force
27
+ rm -rf .git
28
+
29
+ echo "Deployment done"
30
+
@@ -0,0 +1,33 @@
1
+ title: My awesome conference
2
+ days:
3
+ - name: Saturday
4
+ slots:
5
+ - start: '12:00'
6
+ end: '13:00'
7
+
8
+ talks:
9
+ - speaker: Robin Drexler
10
+ title: How Geloet will save us all
11
+ location: H1
12
+
13
+ - speaker: Katrin Werner
14
+ title: Geloet is jsut not worth it
15
+ location: H2
16
+
17
+ - start: '12:00'
18
+ end: '13:00'
19
+
20
+ talks:
21
+ - speaker: Peter
22
+ title: Wurst is good
23
+ location: H1
24
+
25
+ - name: Sunday
26
+ slots:
27
+ - start: '15:00'
28
+ end: '16:00'
29
+
30
+ talks:
31
+ - speaker: Robin Drexler
32
+ title: How Geloet will save us all pt 2
33
+ location: H1
@@ -0,0 +1 @@
1
+ awesomeconf.example.org
@@ -0,0 +1,68 @@
1
+ body {
2
+ font-size: 16px;
3
+ font-family: Helvetica Neue;
4
+ margin: 0;
5
+ padding: 0; }
6
+
7
+ .content {
8
+ width: 95%;
9
+ margin: 10px auto; }
10
+
11
+ body * {
12
+ box-sizing: border-box; }
13
+
14
+ .slot-container {
15
+ margin-bottom: 30px;
16
+ margin-right: -5px; }
17
+
18
+ .talks-container {
19
+ display: -webkit-flex;
20
+ display: flex;
21
+ width: 100%;
22
+ -webkit-flex-wrap: wrap;
23
+ -ms-flex-wrap: wrap;
24
+ flex-wrap: wrap; }
25
+
26
+ .talk-footer {
27
+ font-size: 0.75em;
28
+ position: absolute;
29
+ bottom: 0;
30
+ height: 30px; }
31
+
32
+ .talk-speaker, .talk-location {
33
+ min-height: 1em; }
34
+
35
+ .talk-title {
36
+ padding-bottom: 30px; }
37
+
38
+ .talk-container {
39
+ -webkit-flex-grow: 1;
40
+ -webkit-flex-shrink: 1;
41
+ -ms-flex-grow: 1;
42
+ -ms-flex-shrink: 1;
43
+ flex-grow: 1;
44
+ flex-shrink: 1;
45
+ min-width: 200px;
46
+ width: 200px;
47
+ padding: 10px;
48
+ border: 1px solid #e5e5e5;
49
+ border-radius: 2px;
50
+ background-color: #fff;
51
+ margin: 5px;
52
+ margin-left: 0px;
53
+ box-shadow: 0px 3px rgba(0, 0, 0, 0.1);
54
+ min-height: 100px;
55
+ position: relative; }
56
+
57
+ nav ul {
58
+ padding: 0; }
59
+
60
+ nav ul li {
61
+ list-style-type: none;
62
+ display: inline-block; }
63
+ nav ul li.active {
64
+ font-weight: bold; }
65
+
66
+ /*# sourceMappingURL=style.css.map */
67
+
68
+ /*# sourceMappingURL=style.css.map */
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "mappings": "AAAA,IAAI;EACA,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,cAAc;EAC3B,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;;AAEd,QAAQ;EACJ,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,SAAS;;AAErB,MAAM;EACF,UAAU,EAAE,UAAU;;AAE1B,eAAe;EACX,aAAa,EAAE,IAAI;EACnB,YAAY,EAAE,IAAI;;AAEtB,gBAAgB;EACZ,OAAO,EAAE,YAAY;EACrB,OAAO,EAAE,IAAI;EAEb,KAAK,EAAE,IAAI;EAEX,iBAAiB,EAAE,IAAI;EACvB,aAAa,EAAE,IAAI;EACnB,SAAS,EAAE,IAAI;;AAEnB,YAAY;EACR,SAAS,EAAE,MAAM;EACjB,QAAQ,EAAE,QAAQ;EAClB,MAAM,EAAE,CAAC;EACT,MAAM,EAAE,IAAI;;AAEhB,6BAA6B;EACzB,UAAU,EAAE,GAAG;;AAEnB,WAAW;EACP,cAAc,EAAE,IAAI;;AAExB,eAAe;EAEX,iBAAiB,EAAE,CAAC;EACpB,mBAAmB,EAAE,CAAC;EAEtB,aAAa,EAAE,CAAC;EAChB,eAAe,EAAE,CAAC;EAElB,SAAS,EAAE,CAAC;EACZ,WAAW,EAAE,CAAC;EAEd,SAAS,EAAE,KAAK;EAChB,KAAK,EAAE,KAAK;EACZ,OAAO,EAAE,IAAI;EACb,MAAM,EAAE,iBAAiB;EACzB,aAAa,EAAE,GAAG;EAClB,gBAAgB,EAAE,IAAI;EACtB,MAAM,EAAE,GAAG;EACX,WAAW,EAAE,GAAG;EAChB,UAAU,EAAE,0BAA0B;EACtC,UAAU,EAAE,KAAK;EACjB,QAAQ,EAAE,QAAQ;;AAEtB,MAAM;EACF,OAAO,EAAE,CAAC;;AAEd,SAAS;EACL,eAAe,EAAE,IAAI;EACrB,OAAO,EAAE,YAAY;EACrB,gBAAQ;IACJ,WAAW,EAAE,IAAI",
4
+ "sources": ["../../sass/style.sass"],
5
+ "names": [],
6
+ "file": "style.css"
7
+ }
@@ -0,0 +1,10 @@
1
+ <nav>
2
+ <ul>
3
+ {% for day in days %}
4
+ <li class="{% if active_name == day.name %}active{% else %}{% endif %}">
5
+ <a href="{{ day.file_name }}.html">{{ day.name }}</a>
6
+ </li>
7
+ {% endfor %}
8
+
9
+ </ul>
10
+ </nav>
@@ -0,0 +1,3 @@
1
+ CACHE MANIFEST
2
+ {% for resource in resources %}{{ resource }}
3
+ {% endfor %}
@@ -0,0 +1,28 @@
1
+ <header>
2
+ <h1>{{ title }}</h1>
3
+ </header>
4
+
5
+
6
+ {% include 'navigation'%}
7
+
8
+ <h2>{{day.name}}</h2>
9
+
10
+ {% for slot in day.slots %}
11
+ <div class="slot-container">
12
+ <span class="slot-time-start">{{ slot.start }}</span> -
13
+ <span class="slot-time-end">{{ slot.end }}</span>
14
+
15
+ <div class="talks-container">
16
+ {% for talk in slot.talks %}
17
+ <div class="talk-container">
18
+ <div class="talk-title">{{ talk.title }}</div>
19
+ <div class="talk-footer">
20
+ <div class="talk-speaker">{{ talk.speaker }}</div>
21
+ <div class="talk-location"><a href="{{day.file_name}}_{{talk.location_file_name}}.html">{{ talk.location }}</a></div>
22
+ <div style="clear: both;"></div>
23
+ </div>
24
+ </div>
25
+ {% endfor %}
26
+ </div>
27
+ </div>
28
+ {% endfor %}
@@ -0,0 +1,25 @@
1
+ <header>
2
+ <h1>{{ title }}</h1>
3
+ </header>
4
+
5
+ <a href="index.html">Home</a>
6
+
7
+ <h2>{{location}} - {{day.name}}</h2>
8
+
9
+ {% for talk in talks%}
10
+ <div class="slot-container">
11
+ <span class="slot-time-start">{{ talk.start }}</span> -
12
+ <span class="slot-time-end">{{ talk.end }}</span>
13
+
14
+ <div class="talks-container">
15
+ <div class="talk-container">
16
+ <div class="talk-title">{{ talk.title }}</div>
17
+ <div class="talk-footer">
18
+ <div class="talk-speaker">{{ talk.speaker }}</div>
19
+ <div class="talk-location">{{ talk.location }}</div>
20
+ <div style="clear: both;"></div>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ {% endfor %}
@@ -0,0 +1,32 @@
1
+ <html manifest="cache.appcache">
2
+ <head>
3
+ <link rel="stylesheet" href="style.css"/>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ </head>
6
+
7
+ <body>
8
+ <div class="content">
9
+ {{ content }}
10
+ </div>
11
+
12
+ <script type="application/javascript">
13
+ (function () {
14
+ if (!window.applicationCache) {
15
+ return;
16
+ }
17
+ window.addEventListener('load', function (e) {
18
+ window.applicationCache.addEventListener('updateready', function (e) {
19
+ if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
20
+ if (confirm('Schedule has updated. Want to reload?')) {
21
+ window.location.reload();
22
+ }
23
+ }
24
+ }, false);
25
+
26
+ }, false);
27
+ })();
28
+
29
+ </script>
30
+ </body>
31
+
32
+ </html>
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cosch
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Robin Drexler
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: liquid
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 2.6.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 2.6.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: mercenary
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: sass
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: 3.4.4
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 3.4.4
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 3.1.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 3.1.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: 1.6.3.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: 1.6.3.1
83
+ description: 'See: https://github.com/robin-drexler/cosch'
84
+ email: drexler.robin@gmail.com
85
+ executables:
86
+ - cosch
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - bin/cosch
91
+ - lib/.sass-cache/6db5b649d55c02176445ff137b903182b0c690b5/style.sassc
92
+ - lib/appcache_path_generator.rb
93
+ - lib/asker.rb
94
+ - lib/commands/build.rb
95
+ - lib/commands/deploy_to_github_pages.rb
96
+ - lib/commands/new.rb
97
+ - lib/deploy_to_github_pages.rb
98
+ - lib/location_data_generator.rb
99
+ - lib/sass/style.sass
100
+ - lib/schedule_generator.rb
101
+ - lib/scripts/deploy_to_github_pages.sh
102
+ - lib/template/schedule.yml
103
+ - lib/template/static/CNAME_
104
+ - lib/template/static/style.css
105
+ - lib/template/static/style.css.map
106
+ - lib/template/views/_navigation.liquid
107
+ - lib/template/views/cache.appcache
108
+ - lib/template/views/day.html
109
+ - lib/template/views/location.html
110
+ - lib/template/views/wrapper.html
111
+ homepage:
112
+ licenses:
113
+ - MIT
114
+ metadata: {}
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - '>='
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - '>='
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ requirements: []
130
+ rubyforge_project:
131
+ rubygems_version: 2.0.3
132
+ signing_key:
133
+ specification_version: 4
134
+ summary: Generate your conference schedule easily
135
+ test_files: []