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-alpine | |
| RUN apk add --update alpine-sdk && \ | |
| apk add --update mysql-dev && \ | |
| apk add --update libxslt-dev libxml2-dev && \ | |
| apk add --update ruby-dev && \ | |
| apk add --update libxslt libxml2 && \ | |
| apk add --update xz-dev && \ | |
| apk add --update zlib-dev && \ | |
| apk add --update linux-headers && \ |
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: | |
| app-dev: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile-dev | |
| image: devops-jumpstart-dev:latest | |
| ports: | |
| - "80:8080" | |
| volumes: |
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
| String basePath = 'project-x' | |
| String checkoutAndBuild = 'checkout-and-build' | |
| String integrationTest = 'integration-test' | |
| String deployInTest = 'deploy-test' | |
| String acceptanceTest = 'acceptance-test' | |
| String deployInProduction = 'deploy-production' | |
| folder(basePath) { | |
| description 'Mega project' | |
| } |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDU4++o/U3NFKtNE8RanQTyNrbVygHbFUaoSE41MAjfdnDnvq/MBzgbQ9Zluq1M5/ihlHsZS318erV0wifo7o6oGaLv0bGEoEUhhD7rYxMC1z9XLUg+TzxgwBN6SfwivapejzOvMXa6M+NPt/UmFS9PTD6BGAYN2d8REQvQ3Z5ZSZRxfp6G+9IeB4RfoOwpUuHOF8XnmcArL9wqJOOGUcKIic8RRvgniklor9jSW7ZFoHsYQI4WdzsoD4hb/ZQrb1lg+hXGychABqzqSs8tQqLup8rRZLfHSQGkhjW37Bi3Du5kgqWzvxf/yQYIdWudrNz1LHUVSxXFKG1TmEzrIMB7 [email protected] |
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
| -----BEGIN RSA PRIVATE KEY----- | |
| MIIEpAIBAAKCAQEA1OPvqP1NzRSrTRPEWp0E8ja21coB2xVGqEhONTAI33Zw576v | |
| zAc4G0PWZbqtTOf4oZR7GUt9fHq1dMIn6O6OqBmi79GxhKBFIYQ+62MTAtc/Vy1I | |
| Pk88YMATekn8Ir2qXo8zrzF2ujPjT7f1JhUvT0w+gRgGDdnfEREL0N2eWUmUcX6e | |
| hvvSHgeEX6DsKVLhzhfF55nAKy/cKiTjhlHCiInPEUb4J4pJaK/Y0lu2RaB7GECO | |
| Fnc7KA+IW/2UK29ZYPoVxsnIQAas6krPLUKi7qfK0WS3x0kBpIY1t+wYtw7uZIKl | |
| s78X/8kGCHVrnazc9Sx1FUsVxShtU5hM6yDAewIDAQABAoIBAGhlpn8OSHrLKf3Q | |
| NbfhzC0jG6HXP/W5hz66xm9asN80a8WZQwggeikUqSyV0KooD0rdT0hmNpE2c4lg | |
| NMYLRjW07KwB/rV1CrGW8mvn18jK2Src79JudMNVLbgIU/aNX+CjBMtizEAfddb/ | |
| 9N3KAbs3Pmd76mwcbUEnRM4V/7L0dximA27deWA05UIE1t686x/bSAWXmvXFo9xr |
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
| require File.join(File.dirname(__FILE__), 'string_calculator.rb') | |
| describe StringCalculator do | |
| context "sum with an empty string" do | |
| it "returns zero" do | |
| subject.add("").should == 0 | |
| end | |
| end | |
| context "sum with a string that contains one number" do |
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
| class StringCalculator | |
| attr_reader :array_numbers | |
| def add(string) | |
| return 0 if string == '' | |
| @array_numbers = extract_array_of_numbers_from string | |
| raise "negative not allowed #{negative_numbers.to_s}" if negative_numbers.size > 0 | |
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
| require File.join(File.dirname(__FILE__), 'kata_bowling_game.rb') | |
| describe Game, "Bowling main game class" do | |
| let(:game) { Game.new } | |
| def rolls_many(n, pins) | |
| n.times { game.roll pins } | |
| end | |
| def rolls_spare |
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
| class Game | |
| def initialize | |
| @rolls = Array.new(21) {0} | |
| @current_roll = 0 | |
| end | |
| def roll(pins) | |
| @rolls[@current_roll] = pins | |
| @current_roll += 1 | |
| end |