Skip to content
Permalink
Browse files

provide dockerfile for dev

  • Loading branch information
melekes committed Apr 26, 2015
1 parent 11bc1f8 commit cfb4e8e451c54bb94176577811de72a01740d501
Showing with 38 additions and 6 deletions.
  1. +2 −0 .dockerignore
  2. +10 −0 Dockerfile
  3. +7 −0 Makefile
  4. +18 −1 README.md
  5. +0 −3 lib/valle/version.rb
  6. +1 −2 valle.gemspec
@@ -0,0 +1,2 @@
pkg/
temp/
@@ -0,0 +1,10 @@
FROM ruby:2.2.2

RUN mkdir -p /usr/src/lib
WORKDIR /usr/src/lib

COPY Gemfile* /usr/src/lib/
COPY *.gemspec /usr/src/lib/
RUN bundle install

COPY . /usr/src/lib/
@@ -0,0 +1,7 @@
docker_build:
docker build -t valle .

docker_test:
docker run -it --rm -v "$(PWD)":/usr/src/lib valle bundle exec rake

.PHONY: docker_build docker_test
@@ -36,7 +36,7 @@ Or install it yourself:

$ gem install valle

If you are using other framework than Rails (e.g. Sinatra), call `Valle::Hooks.init` method during the boot process.
If you are using other framework than Rails (e.g. Sinatra), call `Valle::Hooks.init` method during the boot process.

## Usage

@@ -74,6 +74,23 @@ end

There is a similar gem, called [validates_lengths_from_database](http://github.com/rubiety/validates_lengths_from_database). It solves only one part of the problem — applicable to strings. Valle, however, is designed to work with all possible field types.

## Docker container

If you have [docker](http://www.docker.com/) installed on your machine, you can
spin up a sandbox and run test suite in a few seconds:

```
$ docker build -t valle .
$ docker run -it --rm -v "$PWD":/usr/src/lib valle bundle exec rake
```

Or simply use Makefile commands:

```
$ make docker_build
$ make docker_test
```

## Contributing

1. Fork it

This file was deleted.

@@ -1,5 +1,4 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/valle/version', __FILE__)

Gem::Specification.new do |gem|
gem.authors = ["Anton Kalyaev"]
@@ -14,7 +13,7 @@ Gem::Specification.new do |gem|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "valle"
gem.require_paths = ["lib"]
gem.version = Valle::VERSION
gem.version = "1.0.1"

gem.add_dependency 'activerecord', '>= 3.0'
gem.add_dependency 'activesupport'

0 comments on commit cfb4e8e

Please sign in to comment.
You can’t perform that action at this time.