docker-rspec 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4fd8e3e27d4773c2866ebd98ae73e121853e4337
4
+ data.tar.gz: dbd7bfc7ffbf11ab3379ea3d3200d25832e12f22
5
+ SHA512:
6
+ metadata.gz: 7f83c37ccd1b84328c4c0ebdf88b5968a174871b49b2a92cbb249829125a0a8a7eb4d362db595febc95b519396d4c75491c26d513b3454974bec9a7fe243cefe
7
+ data.tar.gz: efdd02ba7665fe4a7b9becf7ff655ccd4573d5b970b897c547703597bbd30e0cdacf0f737f74cfbecb1381317067e6a59d68cc60ee1ac07cde18a2003c8c0512
@@ -0,0 +1,36 @@
1
+ # Docker::Rspec
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/docker/rspec`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'docker-rspec'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install docker-rspec
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/docker-rspec.
36
+
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+
5
+ options = {}
6
+
7
+ opt_parser = OptionParser.new do |opt|
8
+ opt.banner = "Usage: docker-rspec [OPTIONS]"
9
+ opt.separator ""
10
+ opt.separator "Options"
11
+
12
+ opt.on("-d","--docker OPTION", "--docker='OPTION1 OPTION2'", String, "options to pass to docker-compose") do |opt|
13
+ options[:docker] = opt
14
+ end
15
+
16
+ opt.on("-c", "--container NAME", String, "name of the target container (default: test)") do |opt|
17
+ options[:container] = opt
18
+ end
19
+
20
+ opt.on("-r","--rspec OPTION", "--rspec='OPTION1 OPTION2'", String, "options to pass to rspec") do |opt|
21
+ options[:rspec] = opt
22
+ end
23
+
24
+ opt.on("-h","--help","help") do
25
+ puts opt_parser
26
+ exit(0)
27
+ end
28
+ end
29
+
30
+ opt_parser.parse!
31
+
32
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
33
+
34
+ require 'docker/rspec/run'
35
+
36
+ Docker::RSpec::Run.new(options)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,22 @@
1
+ require "docker/rspec/version"
2
+
3
+ module Docker
4
+ module RSpec
5
+ class Run
6
+ def initialize(options = {})!
7
+ @container = options[:container] || 'rspec'
8
+ @docker_options = options[:docker]
9
+ @rspec_options = options[:rspec]
10
+ run!
11
+ end
12
+
13
+ def command
14
+ @command ||= "docker-compose #{@docker_options} exec #{@container} rspec #{@rspec_options}"
15
+ end
16
+
17
+ def run!
18
+ $stdout.puts exec command
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ module Docker
2
+ module RSpec
3
+ VERSION = '0.0.3'
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: docker-rspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Frank
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.14'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.14'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description: Executes RSpec commands on a Docker container using Compose.
42
+ email:
43
+ - francoisbelanger1993@hotmail.com
44
+ executables:
45
+ - docker-rspec
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - README.md
50
+ - bin/docker-rspec
51
+ - bin/setup
52
+ - lib/docker/rspec/run.rb
53
+ - lib/docker/rspec/version.rb
54
+ homepage: https://github.com/frank184/docker-rspec
55
+ licenses:
56
+ - MIT
57
+ metadata: {}
58
+ post_install_message:
59
+ rdoc_options: []
60
+ require_paths:
61
+ - lib
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.9.3
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
72
+ requirements: []
73
+ rubyforge_project:
74
+ rubygems_version: 2.6.10
75
+ signing_key:
76
+ specification_version: 4
77
+ summary: Executes RSpec commands on a Docker container using Compose.
78
+ test_files: []