ruby-jmeter 2.11.19 → 2.11.20

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: c01b93ed077157ad34415552de0af94f32a1f088
4
- data.tar.gz: 3dd4076c9fcc6fbe5e40f55b2f806ee752f338ad
3
+ metadata.gz: ba607adc6f5aba491cf943b03531c8aa26ada8aa
4
+ data.tar.gz: 207aa979afca804ab2222c2233c6ad3e0f19f744
5
5
  SHA512:
6
- metadata.gz: 3b2975d85b926717a6a6d94bcb042f6050c6aef6e16eaa574909c4157c41179eb99c9adabdb83c2a092bb6447e3575eb4b3398190747363d42651cbfa2e92f9b
7
- data.tar.gz: d65504dce116eb33ffbea03dd004fa893f9aaae06dd1dc0865ee1519a8a88d49d9ca2f5991c602eb3f74623fabb8e7af5f06af5cd33e23a44a265e9c2ed39c1f
6
+ metadata.gz: 2226041404c7cdbae95f6307250a2becbec5ec2abff17b6cf47638a251236bdf1759d559e3464ee84bf0e93b1c8371d0eeb3b558d4bb7119a6f8354158bc7368
7
+ data.tar.gz: f8e508f4fdc2628b70411e6da0de7e147ab9bf549fec10b3f1c7b903d9cfb5e38e7734538fdf731357b147392112c4e0f5cabcbf39636aaf5a3f8af949e66748
@@ -0,0 +1,16 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ require 'ruby-jmeter'
3
+
4
+ test do
5
+ csv_data_set_config filename: 'demo.csv',
6
+ variableNames: 'fruit'
7
+
8
+ threads count: 1 do
9
+ visit name: 'Home Page', url: 'http://127.0.0.1/?fruit=${fruit}'
10
+ end
11
+ end.flood('fyxequ4bsLhjgvGqQnD1', {
12
+ name: 'Fruity demo with additional CSV',
13
+ region: 'us-west-2',
14
+ endpoint: 'dev.api.flood.io:8000',
15
+ files: ["#{Dir.pwd}/examples/demo.csv"]
16
+ })
data/examples/demo.csv ADDED
@@ -0,0 +1,3 @@
1
+ apples
2
+ oranges
3
+ pears
@@ -507,6 +507,11 @@ module RubyJmeter
507
507
  file.write(doc.to_xml(:indent => 2))
508
508
  file.rewind
509
509
 
510
+ flood_files = {
511
+ file: File.new("#{file.path}", 'rb')
512
+ }.merge(Hash[params[:files].map.with_index { |value, index| [index, File.new(value, 'rb')] }])
513
+ params.delete(:files)
514
+
510
515
  response = RestClient.post "#{params[:endpoint] ? params[:endpoint] : 'https://api.flood.io'}/floods?auth_token=#{token}",
511
516
  {
512
517
  :flood => {
@@ -524,9 +529,7 @@ module RubyJmeter
524
529
  :started => params[:started],
525
530
  :stopped => params[:stopped]
526
531
  },
527
- :flood_files => {
528
- :file => File.new("#{file.path}", 'rb')
529
- },
532
+ :flood_files => flood_files,
530
533
  :results => (File.new("#{params[:jtl] ? params[:jtl] : 'jmeter.jtl'}", 'rb') if params[:region] == 'local'),
531
534
  :region => params[:region],
532
535
  :multipart => true,
@@ -1,3 +1,3 @@
1
1
  module RubyJmeter
2
- VERSION = "2.11.19"
2
+ VERSION = "2.11.20"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-jmeter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.19
4
+ version: 2.11.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-30 00:00:00.000000000 Z
11
+ date: 2014-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -64,6 +64,7 @@ files:
64
64
  - examples/basic_extract.rb
65
65
  - examples/basic_flood.rb
66
66
  - examples/basic_flood_real.rb
67
+ - examples/basic_flood_with_csv.rb
67
68
  - examples/basic_foreach.rb
68
69
  - examples/basic_gc_dummy_sampler.rb
69
70
  - examples/basic_gc_results.rb
@@ -89,6 +90,7 @@ files:
89
90
  - examples/basic_throughput_controller.rb
90
91
  - examples/basic_throughput_shaping_timer.rb
91
92
  - examples/basic_user_defined_variables.rb
93
+ - examples/demo.csv
92
94
  - examples/etsy_login_browse.rb
93
95
  - examples/real_flood_test_data.rb
94
96
  - examples/real_immi.gov.au_visa.rb