commit 189d577c64216b3a544bdf0a25231cf3249eb347 Author: Sdogruyol Date: Sat Apr 9 17:37:46 2016 +0300 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..37a3029 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/doc/ +/libs/ +/.crystal/ +/.shards/ + + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ffc7b6a --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +language: crystal diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e59859f --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Sdogruyol + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b75f1d --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# spec-kemal + +Kemal helpers for `spec` for easy testing. + +## Installation + + +TODO: Write installation instructions here + + +## Usage + + + +TODO: Write usage instructions here + +## Development + +TODO: Write development instructions here + +## Contributing + +1. Fork it ( https://github.com/[your-github-name]/spec-kemal/fork ) +2. Create your feature branch (git checkout -b my-new-feature) +3. Commit your changes (git commit -am 'Add some feature') +4. Push to the branch (git push origin my-new-feature) +5. Create a new Pull Request + +## Contributors + +- [[your-github-name]](https://github.com/[your-github-name]) Sdogruyol - creator, maintainer diff --git a/shard.lock b/shard.lock new file mode 100644 index 0000000..b2f91c9 --- /dev/null +++ b/shard.lock @@ -0,0 +1,14 @@ +version: 1.0 +shards: + kemal: + github: sdogruyol/kemal + commit: 65d0af5b5f953c9c263d0e4c657517c4d64567ce + + kilt: + github: jeromegn/kilt + version: 0.3.3 + + radix: + github: luislavena/radix + version: 0.1.1 + diff --git a/shard.yml b/shard.yml new file mode 100644 index 0000000..14d5d2b --- /dev/null +++ b/shard.yml @@ -0,0 +1,12 @@ +name: spec-kemal +version: 0.1.0 + +dependencies: + kemal: + github: sdogruyol/kemal + branch: master + +authors: + - Sdogruyol + +license: MIT diff --git a/spec/spec-kemal_spec.cr b/spec/spec-kemal_spec.cr new file mode 100644 index 0000000..70adcf2 --- /dev/null +++ b/spec/spec-kemal_spec.cr @@ -0,0 +1,9 @@ +require "./spec_helper" + +describe Spec::Kemal do + # TODO: Write tests + + it "works" do + false.should eq(true) + end +end diff --git a/spec/spec_helper.cr b/spec/spec_helper.cr new file mode 100644 index 0000000..82a81e1 --- /dev/null +++ b/spec/spec_helper.cr @@ -0,0 +1,2 @@ +require "spec" +require "../src/spec-kemal" diff --git a/src/spec-kemal.cr b/src/spec-kemal.cr new file mode 100644 index 0000000..a4f12ec --- /dev/null +++ b/src/spec-kemal.cr @@ -0,0 +1,19 @@ +require "spec" +require "kemal" + +Kemal.config.env = "test" + +Spec.before_each do + spawn do + Kemal.run + Kemal.config.server.listen + end + sleep 0.00001 +end + +Spec.after_each do + spawn do + Kemal.run + Kemal.config.server.listen + end +end diff --git a/src/spec-kemal/version.cr b/src/spec-kemal/version.cr new file mode 100644 index 0000000..034c9d2 --- /dev/null +++ b/src/spec-kemal/version.cr @@ -0,0 +1,3 @@ +module Spec::Kemal + VERSION = "0.1.0" +end