Skip to content

Commit 5f11063

Browse files
committed
Add cities and initializers
1 parent 3228d87 commit 5f11063

File tree

11 files changed

+218
-35
lines changed

11 files changed

+218
-35
lines changed

.bundle/install.log

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Logfile created on 2014-02-18 23:29:29 +0100 by logger.rb/44203
2+
I, [2014-02-18T23:29:29.338464 #58243] INFO -- : 2: blankslate (2.1.2.4) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/blankslate-2.1.2.4.gemspec
3+
I, [2014-02-18T23:29:29.338382 #58241] INFO -- : 0: rake (10.1.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/rake-10.1.1.gemspec
4+
I, [2014-02-18T23:29:29.339300 #58242] INFO -- : 1: colorator (0.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/colorator-0.1.gemspec
5+
I, [2014-02-18T23:29:29.342469 #58243] INFO -- : 2: highline (1.6.20) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/highline-1.6.20.gemspec
6+
I, [2014-02-18T23:29:29.343484 #58241] INFO -- : 0: ffi (1.9.3) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/ffi-1.9.3.gemspec
7+
I, [2014-02-18T23:29:29.344314 #58243] INFO -- : 2: liquid (2.5.5) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/liquid-2.5.5.gemspec
8+
I, [2014-02-18T23:29:29.343867 #58244] INFO -- : 3: fast-stemmer (1.0.2) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/fast-stemmer-1.0.2.gemspec
9+
I, [2014-02-18T23:29:29.345506 #58241] INFO -- : 0: rb-fsevent (0.9.4) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/rb-fsevent-0.9.4.gemspec
10+
I, [2014-02-18T23:29:29.346850 #58244] INFO -- : 3: posix-spawn (0.3.8) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/posix-spawn-0.3.8.gemspec
11+
I, [2014-02-18T23:29:29.347149 #58241] INFO -- : 0: yajl-ruby (1.1.0) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/yajl-ruby-1.1.0.gemspec
12+
I, [2014-02-18T23:29:29.346706 #58243] INFO -- : 2: maruku (0.7.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/maruku-0.7.1.gemspec
13+
I, [2014-02-18T23:29:29.348469 #58244] INFO -- : 3: redcarpet (2.3.0) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/redcarpet-2.3.0.gemspec
14+
I, [2014-02-18T23:29:29.348862 #58241] INFO -- : 0: safe_yaml (0.9.7) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/safe_yaml-0.9.7.gemspec
15+
I, [2014-02-18T23:29:29.348937 #58243] INFO -- : 2: bundler (1.5.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/bundler-1.5.1.gemspec
16+
I, [2014-02-18T23:29:29.350224 #58241] INFO -- : 0: parslet (1.5.0) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/parslet-1.5.0.gemspec
17+
I, [2014-02-18T23:29:29.350309 #58243] INFO -- : 2: commander (4.1.6) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/commander-4.1.6.gemspec
18+
I, [2014-02-18T23:29:29.351399 #58244] INFO -- : 3: rb-inotify (0.9.3) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/rb-inotify-0.9.3.gemspec
19+
I, [2014-02-18T23:29:29.352002 #58243] INFO -- : 2: rb-kqueue (0.2.0) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/rb-kqueue-0.2.0.gemspec
20+
I, [2014-02-18T23:29:29.352961 #58241] INFO -- : 0: classifier (1.3.4) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/classifier-1.3.4.gemspec
21+
I, [2014-02-18T23:29:29.353996 #58244] INFO -- : 3: pygments.rb (0.5.4) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/pygments.rb-0.5.4.gemspec
22+
I, [2014-02-18T23:29:29.355636 #58241] INFO -- : 0: listen (1.3.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/listen-1.3.1.gemspec
23+
I, [2014-02-18T23:29:30.635936 #58243] INFO -- : 2: toml (0.1.1) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/toml-0.1.1.gemspec
24+
I, [2014-02-18T23:29:30.637312 #58244] INFO -- : 3: jekyll (1.4.3) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/jekyll-1.4.3.gemspec
25+
I, [2014-02-18T23:29:30.832856 #58242] INFO -- : 1: geocoder (1.1.9) from /opt/boxen/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/specifications/geocoder-1.1.9.gemspec

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'rake'
4+
gem 'jekyll'
5+
gem 'geocoder'

Gemfile.lock

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
blankslate (2.1.2.4)
5+
classifier (1.3.4)
6+
fast-stemmer (>= 1.0.0)
7+
colorator (0.1)
8+
commander (4.1.6)
9+
highline (~> 1.6.11)
10+
fast-stemmer (1.0.2)
11+
ffi (1.9.3)
12+
geocoder (1.1.9)
13+
highline (1.6.20)
14+
jekyll (1.4.3)
15+
classifier (~> 1.3)
16+
colorator (~> 0.1)
17+
commander (~> 4.1.3)
18+
liquid (~> 2.5.5)
19+
listen (~> 1.3)
20+
maruku (~> 0.7.0)
21+
pygments.rb (~> 0.5.0)
22+
redcarpet (~> 2.3.0)
23+
safe_yaml (~> 0.9.7)
24+
toml (~> 0.1.0)
25+
liquid (2.5.5)
26+
listen (1.3.1)
27+
rb-fsevent (>= 0.9.3)
28+
rb-inotify (>= 0.9)
29+
rb-kqueue (>= 0.2)
30+
maruku (0.7.1)
31+
parslet (1.5.0)
32+
blankslate (~> 2.0)
33+
posix-spawn (0.3.8)
34+
pygments.rb (0.5.4)
35+
posix-spawn (~> 0.3.6)
36+
yajl-ruby (~> 1.1.0)
37+
rake (10.1.1)
38+
rb-fsevent (0.9.4)
39+
rb-inotify (0.9.3)
40+
ffi (>= 0.5.0)
41+
rb-kqueue (0.2.0)
42+
ffi (>= 0.5.0)
43+
redcarpet (2.3.0)
44+
safe_yaml (0.9.7)
45+
toml (0.1.1)
46+
parslet (~> 1.5.0)
47+
yajl-ruby (1.1.0)
48+
49+
PLATFORMS
50+
ruby
51+
52+
DEPENDENCIES
53+
geocoder
54+
jekyll
55+
rake

Rakefile

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
desc "compile and run the site"
2+
task :default do
3+
pids = [
4+
spawn("jekyll"),
5+
spawn("scss --watch assets:stylesheets"),
6+
]
7+
8+
trap "INT" do
9+
Process.kill "INT", *pids
10+
exit 1
11+
end
12+
13+
loop do
14+
sleep 1
15+
end
16+
end
17+
18+
desc "Generate a page for your city!"
19+
task :city do
20+
unless name = ENV["NAME"]
21+
abort "Usage: rake city NAME='YOUR_CITY_NAME, COUNTRY' [ADDRESS='number street city state zip']"
22+
end
23+
24+
require 'fileutils'
25+
require 'yaml'
26+
require 'geocoder'
27+
28+
# 'Banana City' => 'banana_city'
29+
# 'Banana City, NY' => 'banana_city'
30+
directory = name.split(',')[0].downcase.gsub(/\s+/, '_')
31+
FileUtils.mkdir_p(directory)
32+
File.open(File.join(directory, "index.markdown"), "w") do |file|
33+
file.write <<-EOF
34+
---
35+
layout: default
36+
title: RubyBurgers - #{name}
37+
---
38+
39+
## #{name}
40+
41+
![Photo of your meetup or city!](/#{directory}/FILL_ME_IN.png)
42+
43+
### Info
44+
45+
Put some info about when and where your meetup is here.
46+
47+
EOF
48+
49+
if ENV["ADDRESS"]
50+
results = Geocoder.search(ENV["ADDRESS"])
51+
else
52+
results = Geocoder.search(name)
53+
end
54+
config = YAML.load_file("_config.yml")
55+
cities = config["cities"]
56+
cities << {directory => {
57+
"name" => name,
58+
"latitude" => results.first.latitude,
59+
"longitude" => results.first.longitude
60+
}}
61+
config["cities"] = cities.map(&:to_a).sort.map { |city| Hash[city] }
62+
63+
File.open("_config.yml", "w") do |file|
64+
file.write config.to_yaml
65+
end
66+
end
67+
end

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1+
---
12
name: RubyBurgers - Meetup for Rubyists
23
pygments: true
4+
cities:
5+
- brussels:
6+
name: Brussels, Belgium
7+
latitude: 50.8503396
8+
longitude: 4.3517103

_layouts/default.html

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6-
<link rel="icon" type="image/png" href="favicon.png" />
7-
<title>{{ page.title }}</title>
8-
<meta name="viewport" content="width=device-width">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6+
<link rel="icon" type="image/png" href="favicon.png" />
7+
<title>{{ page.title }}</title>
8+
<meta name="viewport" content="width=device-width">
99

10-
<!-- syntax highlighting CSS -->
11-
<link rel="stylesheet" href="/css/syntax.css">
10+
<!-- syntax highlighting CSS -->
11+
<link rel="stylesheet" href="/css/syntax.css">
1212

13-
<!-- Custom CSS -->
14-
<link rel="stylesheet" href="/css/main.css">
13+
<!-- Custom CSS -->
14+
<link rel="stylesheet" href="/css/main.css">
1515

16-
</head>
17-
<body>
16+
</head>
17+
<body>
18+
<div class="container">
19+
<div class="site">
20+
<div class="header">
21+
<h1 class="title">
22+
<a href="/"><img src='/images/logo.png' alt='logo' /></a>
23+
</h1>
24+
</div>
1825

19-
<div class="container">
20-
<div class="site">
21-
<div class="header">
22-
<h1 class="title">
23-
<a href="/"><img src='/images/logo.png' alt='logo' /></a>
24-
</h1>
25-
</div>
26+
{{ content }}
2627

27-
{{ content }}
28+
<hr/>
29+
<div class="groups" >
30+
<h2>Current Meals</h2>
31+
{% for city in site.cities %}
32+
<a class="extra" href="/{{ city.first.first }}">{{ city.first.last.name }}</a>
33+
{% endfor %}
34+
<a class="extra" href="http://ruby_boulets.eventbrite.com/">Rubyboulets - Liège</a>
35+
<a class="extra" href="http://www.meetup.com/ruby_burgers_austin-rb/">Rubyburgers - Austin, TX</a>
36+
<a class="extra" href="http://hamburg.onruby.de/events/ruby-burgers-oktober" title="Rubyburgers - Hamburg">Rubyburgers - Hamburg, Germany</a>
37+
<a class="extra" href="http://leipzig.onruby.de/events/lor-november-2013" title="Rubyburgers - Leipzig">Rubyburgers - Leipzig, Germany</a>
38+
<a class="extra" href="http://www.meetup.com/malmo-ruby/" title="Malmö Ruby User Group">Rubyburgers - Malmö, Sweden</a>
39+
</div>
40+
{% include footer.html %}
41+
</div>
42+
</div> <!-- /container -->
2843

29-
{% include footer.html %}
30-
</div>
31-
</div> <!-- /container -->
32-
33-
</body>
44+
</body>
3445
</html>

brussels/burger.jpg

230 KB
Loading

brussels/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
layout: default
3+
title: Brussels - Belgium
4+
city: true
5+
---

brussels/index.markdown

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: default
3+
title: RubyBurgers - Brussels, Belgium
4+
---
5+
6+
## Brussels, Belgium
7+
8+
![](/brussels/burger.jpg)
9+
10+
### Info
11+
12+
Ruby lovers meet burger lovers. Join us to talk about ruby AND burgers in the best burger places in Brussels.
13+
14+
15+
[Our meetup page](http://www.meetup.com/ruby_burgers-rb)
16+

css/main.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ ul.posts span {
135135
.site .footer .rss img {
136136
border: 0;
137137
}
138-
138+
.site img {
139+
width: 100%;
140+
}
139141
/*****************************************************************************/
140142
/*
141143
/* Posts

0 commit comments

Comments
 (0)