This file contains hidden or 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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu/xenial64" | |
| config.vm.network "forwarded_port", guest: 8080, host: 8082, host_ip: "127.0.0.1" | |
| config.vm.synced_folder ".", "/app" | |
| config.vm.provision "shell", inline: <<-SHELL | |
| eval "$(curl -sL https://apt.vapor.sh)" | |
| sudo apt-get -y install swift vapor postgresql postgresql-contrib |
This file contains hidden or 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
| extension NSRegularExpression { | |
| func actuallyUsableMatch(in string: String) -> (fullMatch: String, captures: [String])? { | |
| let nsString = string as NSString | |
| let range = NSMakeRange(0, nsString.length) | |
| guard let match = firstMatch(in: string, range: range) else { | |
| return nil | |
| } | |
| let fullMatch = nsString.substring(with: match.range) | |
| var captures: [String] = [] |
This file contains hidden or 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
| # https://github.com/bbatsov/rubocop/blob/master/config/default.yml | |
| AllCops: | |
| TargetRubyVersion: 2.2 | |
| # Don't check Ruby files that aren't application code | |
| Exclude: | |
| - 'Gemfile' | |
| - 'Rakefile' | |
| - 'bin/**/*' | |
| - 'config/**/*' |
This file contains hidden or 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
| vagrant@homestead:~/code/learntdd.in/laravel$ phpunit | |
| PHPUnit 4.8.26 by Sebastian Bergmann and contributors. | |
| F | |
| Time: 4.32 seconds, Memory: 12.00MB | |
| There was 1 failure: | |
| 1) CreatingABlogPostTest::testCreatingABlogPost |
This file contains hidden or 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
| def render_with_block(partial) | |
| render partial, yielded: capture { yield } | |
| end |
NewerOlder