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
| puts "app.use(require('./routes/#{route_name}'));" |
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
| File.open("./routes/#{route_name}.js", 'w') do |f| | |
| f.puts TEMPLATE | |
| .gsub(/\{route_name\}/, route_name) | |
| .gsub(/\{properties\}/, properties.join(",\n ")); | |
| end |
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
| route_name = File.basename(doc, '.md') | |
| properties = File.open(doc, 'r', &:read).scan(/^Faker\.(\w+)\.(\w+)/).map {|match| | |
| "#{match[1]}: Faker.#{match[0]}.#{match[1]}()" | |
| }.uniq |
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
| using Nancy; | |
| namespace NancyApp | |
| { | |
| public class HomeModule : NancyModule | |
| { | |
| public HomeModule() | |
| : base("/") | |
| { | |
| Get["/"] = Index; |
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
| using Owin; | |
| namespace Tempest.Authorization.Web | |
| { | |
| public class Startup | |
| { | |
| public void Configuration(IAppBuilder app) | |
| { | |
| app.UseNancy(); | |
| } |
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
| version: '2' | |
| services: | |
| db: | |
| image: postgres:9.4.1 | |
| ports: | |
| - "5432:5432" | |
| web: | |
| build: . |
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
| default: &default | |
| adapter: postgresql | |
| pool: 5 | |
| username: postgres | |
| host: db | |
| development: | |
| <<: *default | |
| database: my-awesome-app_development |
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
| FROM ruby:2.3.1 | |
| RUN apt-get update -qq && apt-get install -y build-essential | |
| # for postgres | |
| RUN apt-get install -y libpq-dev | |
| # for nokogiri | |
| RUN apt-get install -y libxml2-dev libxslt1-dev |
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
| using Nancy; | |
| namespace NancyBooks.Modules | |
| { | |
| public class HomeModule : NancyModule | |
| { | |
| public HomeModule() | |
| { | |
| Get["/"] = _ => | |
| { |
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
| using Microsoft.Owin; | |
| using Owin; | |
| [assembly: OwinStartup(typeof(NancyBooks.Startup))] | |
| namespace NancyBooks | |
| { | |
| public class Startup | |
| { | |
| public void Configuration(IAppBuilder app) | |
| { |
NewerOlder