dockerspec 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 794905fa7c771fafdc3a8c70f0e627d6c8b07318
4
- data.tar.gz: 61298693130d6e894c580c5772bb754a8ab15f06
3
+ metadata.gz: dd013b5823ada5c23159d17d58bd211fec5483b7
4
+ data.tar.gz: e3f277e9881e6244924bc332d98c1928a08d2636
5
5
  SHA512:
6
- metadata.gz: '0943f23c9caab1cc22b6489b23e67e70f4a0ed7bf41d1e565e69739791c3a3f5f46aad185886f36cd02ff9b6552a0afbea965218a8eaabf4c4a0b5dbde4a8389'
7
- data.tar.gz: 46fe2d680c8647d1cf4a0166e4b45b2b2c70ec8c5c2d4f6f67f4e5d2f910fd2c136f2bc75c4ec70410a676005b2de996f0f2d283bf23223be34c2a5372b0a0d7
6
+ metadata.gz: 5d1144d83b1c3d021ea8df962c994767774cb3a01984c3122a854c2777ab39008f2da393b41e2fed437e82a516e2563ebe621e057361b7125f56404b326932ff
7
+ data.tar.gz: 111c0bf63a768db3198985be9d4fcecd1e044a2d8f83a417f713cc0c05a5aa08a711ad15051fe3870866cdb05b6983848e9e98b028f045ed6c93a28cb55dc6c8
@@ -4,12 +4,27 @@ All notable changes to the [`dockerspec`](https://rubygems.org/gems/dockerspec/)
4
4
 
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [Unreleased]
8
+ [![Travis CI master Build Status](http://img.shields.io/travis/zuazo/dockerspec.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
9
+
10
+ ## [0.5.0] - 2017-08-30
11
+ [![Travis CI 0.5.0 Build Status](http://img.shields.io/travis/zuazo/dockerspec/0.5.0.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
12
+
13
+ ### Added in 0.5.0
14
+ - Support specifying a build path when building images from a string ([issue #13](https://github.com/zuazo/dockerspec/issues/13), thanks [John Meichle](https://github.com/jmeichle)).
15
+
16
+ ### Fixed in 0.5.0
17
+ - Fix OS detection with Specinfra `2.71`.
18
+ - README: Fix small grammar error.
19
+
7
20
  ## [0.4.1] - 2017-03-21
21
+ [![Travis CI 0.4.1 Build Status](http://img.shields.io/travis/zuazo/dockerspec/0.4.1.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
22
+
8
23
  ### Fixed in 0.4.1
9
24
  - README: Fix latest dockerspec version in the instructions.
10
25
 
11
26
  ## [0.4.0] - 2017-03-20
12
- [![Travis CI master Build Status](http://img.shields.io/travis/zuazo/dockerspec.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
27
+ [![Travis CI 0.4.0 Build Status](http://img.shields.io/travis/zuazo/dockerspec/0.4.0.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
13
28
 
14
29
  ### Added in 0.4.0
15
30
  - Integrate with [rspec-retry](https://github.com/NoRedInk/rspec-retry) gem.
@@ -92,7 +107,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
92
107
 
93
108
  - Initial release of `dockerspec`.
94
109
 
95
- [Unreleased]: https://github.com/zuazo/dockerspec/compare/0.4.1...HEAD
110
+ [Unreleased]: https://github.com/zuazo/dockerspec/compare/0.5.0...HEAD
111
+ [0.5.0]: https://github.com/zuazo/dockerspec/compare/0.4.1...0.5.0
96
112
  [0.4.1]: https://github.com/zuazo/dockerspec/compare/0.4.0...0.4.1
97
113
  [0.4.0]: https://github.com/zuazo/dockerspec/compare/0.3.0...0.4.0
98
114
  [0.3.0]: https://github.com/zuazo/dockerspec/compare/0.2.0...0.3.0
data/README.md CHANGED
@@ -6,9 +6,9 @@
6
6
  [![Gem Version](https://badge.fury.io/rb/dockerspec.svg)](https://rubygems.org/gems/dockerspec)
7
7
  [![Dependency Status](http://img.shields.io/gemnasium/zuazo/dockerspec.svg?style=flat)](https://gemnasium.com/zuazo/dockerspec)
8
8
  [![Code Climate](http://img.shields.io/codeclimate/github/zuazo/dockerspec.svg?style=flat)](https://codeclimate.com/github/zuazo/dockerspec)
9
- [![Travis CI Build Status](http://img.shields.io/travis/zuazo/dockerspec/0.4.1.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
9
+ [![Travis CI Build Status](http://img.shields.io/travis/zuazo/dockerspec/0.5.0.svg?style=flat)](https://travis-ci.org/zuazo/dockerspec)
10
10
  [![Circle CI Build Status](https://circleci.com/gh/zuazo/dockerspec/tree/master.svg?style=shield)](https://circleci.com/gh/zuazo/dockerspec/tree/master)
11
- [![Coverage Status](http://img.shields.io/coveralls/zuazo/dockerspec/0.4.1.svg?style=flat)](https://coveralls.io/github/zuazo/dockerspec?branch=0.4.1)
11
+ [![Coverage Status](http://img.shields.io/coveralls/zuazo/dockerspec/0.5.0.svg?style=flat)](https://coveralls.io/github/zuazo/dockerspec?branch=master)
12
12
  [![Inline docs](http://inch-ci.org/github/zuazo/dockerspec.svg?branch=master&style=flat)](http://inch-ci.org/github/zuazo/dockerspec)
13
13
 
14
14
  A small Ruby Gem to run RSpec, [Serverspec](http://serverspec.org/), [Infrataster](https://github.com/ryotarai/infrataster) and [Capybara](http://jnicklas.github.io/capybara/) tests against Dockerfiles or Docker images easily.
@@ -55,7 +55,7 @@ $ gem install dockerspec
55
55
  Or you can add this line to the *Gemfile* of your application:
56
56
 
57
57
  ```ruby
58
- gem 'dockerspec', '~> 0.4.1'
58
+ gem 'dockerspec', '~> 0.5.0'
59
59
  ```
60
60
 
61
61
  And then execute:
@@ -201,7 +201,7 @@ describe docker_run('mariadb'), retry: 30 do
201
201
  end
202
202
  ```
203
203
 
204
- The same applies for `its_container` blocks.
204
+ The same applies to `its_container` blocks.
205
205
 
206
206
  ### Run HTTP Tests Using Infrataster
207
207
 
@@ -392,7 +392,7 @@ If you are new to Ruby, you can follow these steps:
392
392
 
393
393
  source 'https://rubygems.org'
394
394
 
395
- gem 'dockerspec', '~> 0.4.1'
395
+ gem 'dockerspec', '~> 0.5.0'
396
396
  ```
397
397
 
398
398
  #### 2. Create the *spec/* directory:
@@ -502,6 +502,7 @@ See [TODO.md](https://github.com/zuazo/dockerspec/blob/master/TODO.md).
502
502
  | | |
503
503
  |:---------------------|:-----------------------------------------|
504
504
  | **Author:** | [Xabier de Zuazo](https://github.com/zuazo) (<xabier@zuazo.org>)
505
+ | **Contributor:** | [John Meichle](https://github.com/jmeichle)
505
506
  | **Copyright:** | Copyright (c) 2015-2016 Xabier de Zuazo
506
507
  | **License:** | Apache License, Version 2.0
507
508
 
@@ -64,6 +64,10 @@ module Dockerspec
64
64
  # environment variable and uses `'.'` if it is not set.
65
65
  # @option opts [String] :string Use this string as *Dockerfile* instead of
66
66
  # `:path`. Not set by default.
67
+ # @option opts [String] :string_build_path Used to specify the path that is
68
+ # used for the docker build of a string *Dockerfile*. This enables ADD
69
+ # statements in the Dockerfile to access files that are outside of .
70
+ # Not set by default and overrides the default '.'
67
71
  # @option opts [String] :template Use this [Erubis]
68
72
  # (http://www.kuwata-lab.com/erubis/users-guide.html) template file as
69
73
  # *Dockerfile*.
@@ -274,13 +278,16 @@ module Dockerspec
274
278
  #
275
279
  # @param string [String] The Dockerfile content.
276
280
  # @param dir [String] The directory to copy the files from. Files that are
277
- # required by the Dockerfile passed in *string*.
281
+ # required by the Dockerfile passed in *string*. If not passed, then
282
+ # the 'string_build_path' option is used. If that is not used, '.' is
283
+ # assumed.
278
284
  #
279
285
  # @return void
280
286
  #
281
287
  # @api private
282
288
  #
283
289
  def build_from_string(string, dir = '.')
290
+ dir = @options[:string_build_path] if @options[:string_build_path]
284
291
  Dir.mktmpdir do |tmpdir|
285
292
  FileUtils.cp_r("#{dir}/.", tmpdir)
286
293
  dockerfile = File.join(tmpdir, 'Dockerfile')
@@ -53,5 +53,6 @@ Specinfra::Backend::Base.class_eval do
53
53
  #
54
54
  def self.host_reset
55
55
  property[:host_inventory] = property[:os] = nil
56
+ Specinfra.backend.instance_variable_set(:@os_info, nil)
56
57
  end
57
58
  end
@@ -25,5 +25,5 @@ module Dockerspec
25
25
  #
26
26
  # Dockerspec Ruby Gem version.
27
27
  #
28
- VERSION = '0.4.1'.freeze
28
+ VERSION = '0.5.0'.freeze
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xabier de Zuazo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker-api