Skip to content

Commit e8786d6

Browse files
author
Joel Courtney
committed
Woo upgraded to Ruby 2.5.3
1 parent 68b9a5a commit e8786d6

File tree

8 files changed

+148
-35
lines changed

8 files changed

+148
-35
lines changed

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
*.gem
2+
*.rbc
3+
/.config
4+
/coverage/
5+
/InstalledFiles
6+
/pkg/
7+
/spec/reports/
8+
/spec/examples.txt
9+
/test/tmp/
10+
/test/version_tmp/
11+
/tmp/
12+
13+
# Used by dotenv library to load environment variables.
14+
# .env
15+
16+
## Specific to RubyMotion:
17+
.dat*
18+
.repl_history
19+
build/
20+
*.bridgesupport
21+
build-iPhoneOS/
22+
build-iPhoneSimulator/
23+
24+
## Specific to RubyMotion (use of CocoaPods):
25+
#
26+
# We recommend against adding the Pods directory to your .gitignore. However
27+
# you should judge for yourself, the pros and cons are mentioned at:
28+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29+
#
30+
# vendor/Pods/
31+
32+
## Documentation cache and generated files:
33+
/.yardoc/
34+
/_yardoc/
35+
/doc/
36+
/rdoc/
37+
/.sass-cache/
38+
39+
## Environment normalization:
40+
/.bundle/
41+
/vendor/bundle
42+
/lib/bundler/man/
43+
44+
# for a library or gem, you might want to ignore these files since the code is
45+
# intended to run in multiple environments; otherwise, check them in:
46+
# Gemfile.lock
47+
# .ruby-version
48+
# .ruby-gemset
49+
50+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
51+
.rvmrc

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ruby '2.5.3'
2+
3+
source 'https://rubygems.org' do
4+
gem 'coffee-script'
5+
gem 'haml'
6+
gem 'linguistics'
7+
gem 'rack'
8+
gem 'sass'
9+
gem 'sinatra'
10+
end

Gemfile.lock

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
coffee-script (2.4.1)
5+
coffee-script-source
6+
execjs
7+
coffee-script-source (1.12.2)
8+
execjs (2.7.0)
9+
ffi (1.9.25)
10+
haml (5.0.4)
11+
temple (>= 0.8.0)
12+
tilt
13+
linguistics (2.1.0)
14+
loggability (~> 0.11)
15+
loggability (0.14.0)
16+
mustermann (1.0.3)
17+
rack (2.0.6)
18+
rack-protection (2.0.4)
19+
rack
20+
rb-fsevent (0.10.3)
21+
rb-inotify (0.9.10)
22+
ffi (>= 0.5.0, < 2)
23+
sass (3.7.2)
24+
sass-listen (~> 4.0.0)
25+
sass-listen (4.0.0)
26+
rb-fsevent (~> 0.9, >= 0.9.4)
27+
rb-inotify (~> 0.9, >= 0.9.7)
28+
sinatra (2.0.4)
29+
mustermann (~> 1.0)
30+
rack (~> 2.0)
31+
rack-protection (= 2.0.4)
32+
tilt (~> 2.0)
33+
temple (0.8.0)
34+
tilt (2.0.9)
35+
36+
PLATFORMS
37+
ruby
38+
39+
DEPENDENCIES
40+
coffee-script!
41+
haml!
42+
linguistics!
43+
rack!
44+
sass!
45+
sinatra!
46+
47+
RUBY VERSION
48+
ruby 2.5.3p105
49+
50+
BUNDLED WITH
51+
1.17.1

config.ru

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
require 'jmc_calendar'
2-
run Sinatra::Application
1+
require_relative './jmc_calendar'
2+
3+
run Sinatra::Application

jmc_calendar.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'sinatra'
33

44
require 'haml'
5-
set :haml, :format => :html5
5+
set :haml, format: :html5
66
require 'sass'
77
require 'coffee-script'
88

@@ -28,14 +28,14 @@
2828
@start = Date.new(@today.year,@today.month-1,1)
2929
end
3030
@end = @start>>(12)
31-
31+
3232
haml :index
3333
end
3434

3535
# ----------------------------------
3636
# Year - calendar for a particular year
3737
# ----------------------------------
38-
get %r{/(\d+)$} do
38+
get %r{\/(\d+)} do
3939
# TODO: use of GMT over server timezone; Localised timezone support
4040
params[:tz] ||= 0
4141
# /TODO

views/annual.haml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@
2727
- for month_number in 1..12
2828
- last_day = Date.parse("#{@year+1}-01-01")
2929
- last_day = Date.parse("#{@year}-#{month_number + 1}-01") if month_number < 12
30-
%li{:class => " month #{'past' if last_day < today } #{'current' if last_day == today } #{'future' if last_day > today }" }
30+
%li{class: " month #{'past' if last_day < today } #{'current' if last_day == today } #{'future' if last_day > today }" }
3131
%dl
32-
%dt{:class => " month #{'past' if last_day < today } #{'current' if last_day == today } #{'future' if last_day > today }" }
32+
%dt{class: " month #{'past' if last_day < today } #{'current' if last_day == today } #{'future' if last_day > today }" }
3333
= Date.parse("#{@year}-#{month_number}-01").strftime('%B')
3434
- # While this is the same month
3535
- for day in 1..(Date.new(@year,12,31)<<(12-month_number)).day
3636
- d = Date.parse("#{@year}-#{month_number}-#{day}")
37-
%dd{:class => " day #{'past' if d < today } #{'current' if d == today } #{'future' if d > today } commercial-day-#{d.cwday} #{ 'fifteen' if day == 15 } #{'row-1' if day <= 15} #{'row-2' if day > 15}", :title => d.strftime }
37+
%dd{class: " day #{'past' if d < today } #{'current' if d == today } #{'future' if d > today } commercial-day-#{d.cwday} #{ 'fifteen' if day == 15 } #{'row-1' if day <= 15} #{'row-2' if day > 15}", title: d.strftime }
3838
= d.strftime('%e')
3939
%span.overlay &middot;
4040
.navigation
4141
.column.span-3
4242
.prev
43-
%a{ :href => "/#{@year-1}"}
43+
%a{ href: "/#{@year-1}"}
4444
= "&larr; #{@year-1}"
4545
.coumn.span-12
4646
.content
4747
A collaboration between
48-
%a{ :href => "http://pecorarodesign.com/" } Stephen Pecoraro
48+
%a{ href: "http://pecorarodesign.com/" } Stephen Pecoraro
4949
and
50-
%a{ :href => "http://euphemize.net/" } Joel Courtney
50+
%a{ href: "http://euphemize.net/" } Joel Courtney
5151
\.
5252
.column.span-3.last
5353
.next
54-
%a{ :href => "/#{@year+1}"}
55-
= "#{@year+1} &rarr;"
54+
%a{ href: "/#{@year+1}"}
55+
= "#{@year+1} &rarr;"

views/index.haml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,35 +21,35 @@
2121
.hidden
2222
= @year
2323
.column.span-18.last
24-
%ol{ :style => "counter-reset: item #{@start.month - 1}" }
24+
%ol{ style: "counter-reset: item #{@start.month - 1}" }
2525
- day = @start
2626
- while ( day >= @start && day < @end )
2727
- last_day = Date.new(day.year, day.month, (Date.new(day.year,12,31)<<(12-day.month)).day)
2828
- if day.day == 1
29-
%li{ :class => " month #{'past' if ( last_day < @today ) } #{'current' if last_day == @today } #{'future' if last_day > @today }", :style => "#{ 'counter-reset: item 0' if day.year != @start.year && day.month == 1 }" }
29+
%li{ class: " month #{'past' if ( last_day < @today ) } #{'current' if last_day == @today } #{'future' if last_day > @today }", style: "#{ 'counter-reset: item 0' if day.year != @start.year && day.month == 1 }" }
3030
%dl
31-
%dt{:class => " month #{'past' if last_day < @today } #{'current' if last_day == @today } #{'future' if last_day > @today }" }
31+
%dt{class: " month #{'past' if last_day < @today } #{'current' if last_day == @today } #{'future' if last_day > @today }" }
3232
= day.strftime('%B')
3333
- while ( day <= last_day )
3434
- # While this is the same month
35-
%dd{:class => " day #{'past' if day < @today } #{'current' if day == @today } #{'future' if day > @today } commercial-day-#{day.cwday} #{ 'fifteen' if day.day == 15 } #{'row-1' if day.day <= 15} #{'row-2' if day.day > 15}", :title => day.strftime }
35+
%dd{class: " day #{'past' if day < @today } #{'current' if day == @today } #{'future' if day > @today } commercial-day-#{day.cwday} #{ 'fifteen' if day.day == 15 } #{'row-1' if day.day <= 15} #{'row-2' if day.day > 15}", title: day.strftime }
3636
= day.strftime('%e')
3737
%span.overlay &middot;
3838
- day = day.next()
3939

4040
.navigation
4141
.column.span-3
4242
.prev
43-
%a{ :href => "/#{@year}"}
43+
%a{ href: "/#{@year}"}
4444
= "&larr; #{@year}"
4545
.coumn.span-12
4646
.content
4747
A collaboration between
48-
%a{ :href => "http://pecorarodesign.com/" } Stephen Pecoraro
48+
%a{ href: "https://www.behance.net/specoraro" } Stephen Pecoraro
4949
and
50-
%a{ :href => "http://euphemize.net/" } Joel Courtney
50+
%a{ href: "https://github.com/jufemaiz" } Joel Courtney
5151
\.
5252
.column.span-3.last
5353
.next
54-
%a{ :href => "/#{@year+1}"}
55-
= "#{@year+1} &rarr;"
54+
%a{ href: "/#{@year+1}"}
55+
= "#{@year+1} &rarr;"

views/layout.haml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
%head
44
%title
55
= "#{@year} Calendar"
6-
6+
77
%meta(http-equiv="content-type" content="html/text; charset=utf-8")
8-
%meta{:charset => 'utf-8'}
8+
%meta{charset: 'utf-8'}
99
%meta(name="MSSmartTagsPreventParsing" content="true")
1010
%meta(name="robots" content="noindex, nofollow")
1111
%meta(name="description" content="A cute little calendar")
1212
%meta(name="keywords" content="2011 Calendar")
1313
%meta(name="author" content="Joel Courtney, http://euphemize.net")
1414
%meta(name="author" content="Stephen Pecoraro, http://pecorarodesign.com/")
15-
16-
%link{ :type => 'text/css', :rel => 'stylesheet', :media => 'screen,handheld,projection', :title => 'standard', :href => '/css/blueprint/screen.css' }
17-
%link{ :type => 'text/css', :rel => 'stylesheet', :media => 'screen,handheld,projection', :title => 'standard', :href => '/css/styles.css' }
1815

19-
%script{ :type => "text/javascript", :src => "/js/jquery/jquery.min.js" }
16+
%link{ type: 'text/css', rel: 'stylesheet', media: 'screen,handheld,projection', title: 'standard', href: '/css/blueprint/screen.css' }
17+
%link{ type: 'text/css', rel: 'stylesheet', media: 'screen,handheld,projection', title: 'standard', href: '/css/styles.css' }
18+
19+
%script{ type: "text/javascript", src: "/js/jquery/jquery.min.js" }
2020

21-
%script{ :type => "text/javascript", :src => "/js/test.coffee.js"}
21+
%script{ type: "text/javascript", src: "/js/test.coffee.js"}
2222

2323
%body.home
2424

@@ -32,13 +32,13 @@
3232
<!-- Footer -->
3333
#footer
3434
.container
35-
&copy 2010 -
35+
&copy 2010 -
3636
= Time.now.year
37-
%a{ :href => "http://euphemize.net/" }
37+
%a{ href: "http://euphemize.net/" }
3838
Joel Courtney
3939
&amp;
40-
%a{ :href => "http://pecorarodesign.com/" }
40+
%a{ href: "http://pecorarodesign.com/" }
4141
Stephen Pecoraro
42-
43-
44-
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-113700-16']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
42+
43+
44+
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-113700-16']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>

0 commit comments

Comments
 (0)