gatling-rake 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjE3ZjY3NTEyNGEyMzdiMzVkZWRiYmIwZDQ0Njk0YThmNWEwZWFhZA==
4
+ ZDFlZmM4N2QzZTBjYjA0Njk3ZDY2MzliODMwZWU3Y2I5MjI4ZDk2Yw==
5
5
  data.tar.gz: !binary |-
6
- M2QzZjkyOWUxYzExODlkMjc4NWJiYWQ5ODkwY2MyMjI0Mzc3OTYzOA==
6
+ Y2YzNmIyODRhMTMzYjg2OTE4ZTkzZjI4ZjEwMDAyMzE3NmRkNjU1YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTRkOWQ0ZDlmNmU1MzdhNDc0YzEyZWIwYTRlYzEwOTlkM2VhNDk1ODJiMWNk
10
- OTAzNTZiMzA0ZWRlMGI1YTdjMDNkYTZiMzcxMGRlMWJlYTJjOGIyNzMxODk0
11
- MDBkMmY2YTdmNTM3MzBhZDBkYjZiY2Y1MmY1OTQ2ZDk2MGU4M2U=
9
+ ZjY5Y2RmODZiYTZlMGVlNTM0MzU4Y2FlM2Q3YTVhZDY2NGE0ZjJkYWViNGQ1
10
+ MGQ2Yzg4NzJlMWRiNzExM2Q5YmY5ZWIwZWY3ZGZmZTcyZTdiOGM5N2NiOThk
11
+ ZWE3YWI4YjE0NGM5Yzc2MDAwNWZiZDA3ZWE2OGEyZDYwZjNkNDM=
12
12
  data.tar.gz: !binary |-
13
- MzgzYTlhNmEyODNlZmMzZDE3YmFlMjFjNTZlNWM0MzNkY2ViMGY2YThiYzI1
14
- MTQyYzdjMjE1N2IxOTkzYmRlMjMyZjBhNWNhNDMwNGRjNjk1MDk1NGI0ZjJj
15
- YmJiM2JkMGI3M2U1NGZhMjQ2OGFjNzM3YzRiYTBlZDAzN2YzZDQ=
13
+ NWRmNWRkMTZjYmU1ZTA3MWEyNmNjMjVhM2Q4YjBiZWE5ZTgzZDJkZTJiZTRm
14
+ ODNkZDIyNjhkOWZkOWFlZWNlNGVmYmMwNDgwMzA4MzUyOTRiMGVlYmEwNmM0
15
+ MGI0NzNlOTIxNTgyZTFlMTk2MDZmMWZjZDRhNDk2ZjJkNjVjNjg=
data/lib/src/Gatling.rb CHANGED
@@ -1,18 +1,17 @@
1
1
  require_relative 'GatlingCommand'
2
- require_relative 'RemoveDirectoryCommand'
3
2
 
4
3
  module RakeGatling
5
4
  class Gatling
6
5
  include Commands
7
6
  def initialize(shell)
8
7
  @shell = shell
9
- @remove_directory = RemoveDirectoryCommand.new(shell)
10
8
  @run_gatling = GatlingCommand.new(shell)
11
9
  end
12
10
 
13
11
  def start(parameters)
14
- @remove_directory.execute(parameters[:results_directory])
12
+ @shell.remove_directory(parameters[:results_directory])
15
13
  @run_gatling.execute(parameters)
14
+ @shell.move_directory_contents_up(parameters[:results_directory])
16
15
  end
17
16
  end
18
17
  end
@@ -1,11 +1,10 @@
1
- require_relative 'ShellCommand'
2
1
  require_relative 'GatlingParameterBuilder'
3
2
 
4
3
  module RakeGatling
5
4
  module Commands
6
- class GatlingCommand < ShellCommand
5
+ class GatlingCommand
7
6
  def initialize(shell)
8
- super
7
+ @shell = shell
9
8
  @parameter_builder = GatlingParameterBuilder.new
10
9
  end
11
10
 
data/lib/src/Shell.rb CHANGED
@@ -7,5 +7,15 @@ module RakeGatling
7
7
  def remove_directory(directory_name)
8
8
  rm_rf directory_name
9
9
  end
10
+
11
+ def move_directory_contents_up(location)
12
+ directories = Dir.glob("#{location}/*")
13
+ Dir.glob("#{location}/*/*") {
14
+ |f| mv File.expand_path(f), location
15
+ }
16
+ directories.each do | f |
17
+ rm_rf File.expand_path(f)
18
+ end
19
+ end
10
20
  end
11
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gatling-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - iainjmitchell
@@ -20,9 +20,7 @@ files:
20
20
  - lib/src/Gatling.rb
21
21
  - lib/src/GatlingCommand.rb
22
22
  - lib/src/GatlingParameterBuilder.rb
23
- - lib/src/RemoveDirectoryCommand.rb
24
23
  - lib/src/Shell.rb
25
- - lib/src/ShellCommand.rb
26
24
  homepage: https://github.com/code-computerlove/gatling-rake
27
25
  licenses:
28
26
  - MIT
@@ -1,11 +0,0 @@
1
- require_relative 'ShellCommand'
2
-
3
- module RakeGatling
4
- module Commands
5
- class RemoveDirectoryCommand < ShellCommand
6
- def execute(directory_name)
7
- @shell.remove_directory(directory_name)
8
- end
9
- end
10
- end
11
- end
@@ -1,9 +0,0 @@
1
- module RakeGatling
2
- module Commands
3
- class ShellCommand
4
- def initialize(shell)
5
- @shell = shell
6
- end
7
- end
8
- end
9
- end