This is the demo application for our Rails Workshop, a yearly event held by makandra to tell students about the Ruby on Rails framework and test-driven development.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy this to features/support/ssl_fix.rb to make Capybara work with sites that switch between HTTP and HTTPS | |
module Capybara::Driver::RackTest::SslFix | |
[:get, :post, :put, :delete].each do |method| | |
define_method method do |*args| | |
args[0] = path_to_ssl_aware_url(args[0]) | |
super(*args) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Contract do | |
describe '.overlapping' do | |
it 'should match a contract partially overlapping the given contract' do | |
match = Contract.make(:start_date => Date.today + 5, :end_date => Date.today + 10) | |
given = Contract.new(:start_date => Date.today + 7, :end_date => Date.today + 12) | |
Contract.overlapping(given).all.should == [match] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xml.instruct! | |
xml.rss :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do | |
xml.channel do | |
xml.title "makandra cards for #{@user.public_name}" | |
xml.link sites_url | |
xml.language 'en' | |
xml.tag! 'atom:link', :rel => 'self', :type => 'application/rss+xml', :href => sites_url | |
for note in @notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Headline 1 | |
## Headline 2 | |
### Headline 3 | |
#### Headline 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Foo Bar | |
--- | |
Bar bam |
- Twitter: @triskweline
- Website or Blog: https://makandracards.com/makandra
- Company: makandra GmbH http://www.makandra.com
- Github: https://github.com/makandra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am henning-koch on github. | |
* I am triskweline (https://keybase.io/triskweline) on keybase. | |
* I have a public key whose fingerprint is 17CF 7D9F 8992 66DA CB28 7332 9169 5476 8F13 232D | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL = %r{ | |
\A # Beginning of string | |
(http|https) # $1: Scheme | |
:\/\/ # :// | |
([\w\-_]+(?:\.[\w\-_]+)*) # $2: Hostname. Does not begin or end with a dot. No two dots in a row. | |
(?::(\d+)) # $3: Port (without leading colon) | |
(/[^/\?\#]*) # $4: Path (with leading slash) | |
(?:\?([^\#]*)) # $4: Query (without leading question mark) | |
(?:\#(.*)) # $5: Hash (without leading hash) | |
\z # End of string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ul.tree | |
cursor: pointer | |
$self_color: desaturate($COLOR_MIDNIGHT_BLUE - 10, 20) | |
$darkening_per_level: 10 | |
$indent: 28px | |
.self | |
background-color: $self_color |
OlderNewer