http_stub_docker 0.0.5 → 0.0.6

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: 868ae2d61f1145ae4139cde572e3e2994d1c40a2
4
- data.tar.gz: 81a27bcd02a0aa17098216736858f201c171c9cf
3
+ metadata.gz: 5bfa76e30d19a57a04a55173ea3dc94d1323752d
4
+ data.tar.gz: ccc0b10f133d5d701c6f2e53bc7fc5bc5c36787e
5
5
  SHA512:
6
- metadata.gz: a08b0fc71ae0aa16a40e42b5ffba551d6c88e3feea14783ad0d3b473f67d258218f44c3da480a1aae4a4ff849c95fec148d0adee3b4b6df309d50fb631d90d91
7
- data.tar.gz: 5a9a672fc81dbcdf85c9ec8c8b03fc0f363af0035d7ce0dc38f3e5d164bb5a467815c152d6a94c9d907107ef25fbda10de809b742f521f0c8882484ce5446df9
6
+ metadata.gz: bd30a56a11e4affa80610ea7ba04343165c224bb09e8bf5a18bc8df0061f1c0673f9c8e829364fda52f920d41a28461d7798f3c5f5428d222f55fdc2fa17eb15
7
+ data.tar.gz: 8b4ba1fdf59bdb00d30cf346161aa8da95877f4e190aeca61592b437a07fd6b0301b4309687fd181d64c423a229381b93ce20a3fcfe5c5f944e1862991abbc71
@@ -11,7 +11,7 @@ module HttpStubDocker
11
11
  private
12
12
 
13
13
  def define_clobber_task(args)
14
- desc "Removes Docker resources"
14
+ desc "Removes created Dockerfile and other resources"
15
15
  task(:clobber) do
16
16
  resources = Dir.entries("#{HttpStubDocker::BASE_DIR}/resource").find_all { |file| !File.directory?(file) }
17
17
  rm resources.map { |resource| "#{args[:stub_dir]}/#{resource}" }, force: true
@@ -19,7 +19,7 @@ module HttpStubDocker
19
19
  end
20
20
 
21
21
  def define_setup_task(args)
22
- desc "Creates Docker resources"
22
+ desc "Creates Dockerfile and other resources in stub directory"
23
23
  task(:setup) do
24
24
  cp_r "#{HttpStubDocker::BASE_DIR}/resource/.", args[:stub_dir]
25
25
  end
@@ -3,17 +3,19 @@ module HttpStubDocker
3
3
 
4
4
  class TaskGenerator < ::Rake::TaskLib
5
5
 
6
+ DEFAULT_PORT = 5000
6
7
  DOCKER_TASK_CLASSES = [
7
8
  HttpStubDocker::Rake::ResourceTasks,
8
9
  HttpStubDocker::Rake::ContainerTasks,
9
10
  HttpStubDocker::Rake::PipelineTasks
10
11
  ].freeze
11
12
 
12
- private_constant :DOCKER_TASK_CLASSES
13
+ private_constant :DEFAULT_PORT, :DOCKER_TASK_CLASSES
13
14
 
14
15
  def initialize(args)
15
16
  resolved_args = args
16
- resolved_args[:external_base_uri] ||= "http://localhost:#{args[:port]}"
17
+ resolved_args[:port] ||= DEFAULT_PORT
18
+ resolved_args[:external_base_uri] ||= "http://localhost:#{resolved_args[:port]}"
17
19
  HttpStubDocker::Rake::ServerDaemonTasks.new(resolved_args)
18
20
  namespace :docker do
19
21
  DOCKER_TASK_CLASSES.each { |task_class| task_class.new(resolved_args) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_stub_docker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - dueckes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-15 00:00:00.000000000 Z
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake