ruby-jmeter 3.0.9 → 3.0.10

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: 78108c12eef77ede9a55c1b424a21db222942f61
4
- data.tar.gz: 340a7d5fe1226b8903741f07cf234d24b916a157
3
+ metadata.gz: b4785d4a5ace5391994c0a2817ff9765313458c0
4
+ data.tar.gz: 4a033a8abeb542553085a0c588e79611b040b69d
5
5
  SHA512:
6
- metadata.gz: 2ce5be696ae8cf5dc7d8bdeb46b806abf6cf622d39ad02e416cbf71e2d439769fe99e35ff3d6873773db54d97f2e43a6f641c877737581d04a94f9a79fa3ad6a
7
- data.tar.gz: d1d0f3ec729b2273f8e010abeb98a4abb37a50351aef53c79030ab739e5469ce67026d7a9a7d31e9c468041fbaff343b4622b56373b7f2e460117298afb13de3
6
+ metadata.gz: fc951df3c6b8d3115117211b1d02b9339dded389397e88a164976c340754d3d8388885c140f649170b5fc48340233aebbc85a132d2e484d1de89dd4302507cc0
7
+ data.tar.gz: 8d77801b337ce12781875ee22e3f1d3d09b7a2f90f6fea40c78b56fd4c8a888dd1d0a70814d3c67448e77ac014ff1f1adcdd094e8f4e62f9acaec198d8af005a
@@ -0,0 +1,13 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 1 do
6
+ visit name: 'Home', url: 'https://flooded.io'
7
+ end
8
+ end.flood ENV['FLOOD_API_TOKEN'],
9
+ privacy: 'public',
10
+ name: ENV['FLOOD_NAME'] ||= 'Simple Demo',
11
+ project: 'workspace',
12
+ region: ENV['REGION'] ||= 'us-west-2',
13
+ override_parameters: '-Dsun.net.inetaddr.ttl=30'
@@ -0,0 +1,21 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ threads count: 1 do
6
+ visit name: 'Home', url: 'https://flooded.io'
7
+ end
8
+ end.flood ENV['FLOOD_API_TOKEN'],
9
+ privacy: 'public',
10
+ name: ENV['FLOOD_NAME'] ||= 'Simple Demo',
11
+ project: 'Workspace',
12
+ override_parameters: '-Dsun.net.inetaddr.ttl=30',
13
+ grids: [
14
+ {
15
+ infrastructure: 'demand',
16
+ instance_type: 'm4.xlarge',
17
+ instance_quantity: 1,
18
+ region: 'us-west-2',
19
+ stop_after: 60
20
+ }
21
+ ]
@@ -3,7 +3,7 @@ require 'ruby-jmeter'
3
3
 
4
4
  test do
5
5
  threads count: 1 do
6
- visit name: 'Home', url: 'https://flood.io' do
6
+ visit name: 'Home', url: 'https://flooded.io' do
7
7
  regex pattern: "content='(.+?)' name='csrf-token'", name: 'csrf-token', match_number: 1, default: '424242'
8
8
  regex pattern: 'pattern', name: 'jmeter_variable_regex', variable: 'test'
9
9
  end
@@ -16,8 +16,7 @@ module RubyJmeter
16
16
  params.delete(:files)
17
17
  end
18
18
 
19
- response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}",
20
- {
19
+ post_params = {
21
20
  flood: {
22
21
  tool: 'jmeter',
23
22
  name: params[:name],
@@ -31,12 +30,15 @@ module RubyJmeter
31
30
  started: params[:started],
32
31
  stopped: params[:stopped],
33
32
  privacy_flag: params[:privacy] || 'private',
34
- },
33
+ grids: params[:grids]
34
+ }.select { |_, value| !value.nil? },
35
35
  flood_files: flood_files,
36
36
  region: params[:region],
37
37
  multipart: true,
38
38
  content_type: 'application/octet-stream'
39
- }.merge(params)
39
+ }.merge(params).select { |_, value| !value.nil? }
40
+
41
+ response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}", post_params
40
42
  if response.code == 201
41
43
  logger.info "Flood results at: #{JSON.parse(response)["permalink"]}"
42
44
  else
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = '3.0.9'
2
+ VERSION = '3.0.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.9
4
+ version: 3.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
@@ -66,6 +66,8 @@ files:
66
66
  - examples/duration_assertion.rb
67
67
  - examples/etsy_login_browse.rb
68
68
  - examples/extract.rb
69
+ - examples/flood.rb
70
+ - examples/flood_grids.rb
69
71
  - examples/foreach_controller.rb
70
72
  - examples/header_manager.rb
71
73
  - examples/http_cache_manager.rb