stormforge 0.7.0 → 0.8.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a87bf765a24f8440cbd0e50555d347ff624c7243
4
- data.tar.gz: cf4d86449b0fef9f9e6df96cc6f84a6218aafcec
3
+ metadata.gz: 278ff58a80f0ea482d5072ddd204e7036281f3ff
4
+ data.tar.gz: b4fdb9c77c087f2d6910c80359aa79cc06ed8177
5
5
  SHA512:
6
- metadata.gz: c52c56da34474a7735ab52eba05a45cfddb86be06477397720e8b985210e1e7f00929c14c84da5f7d3869e06e2811e4eaeeab09cbca282c643ea65e29309e8cf
7
- data.tar.gz: da1a75a9e865f9dd1999b6eb59378027f4d040e45e129fe916c911820d2241db9c6687e30c5ab439b640cbc4f309744f83d23cd38cd6616b521fb5f82fbab242
6
+ metadata.gz: 4212036675721ebc408c516b13a1deafca628299e0180721de1b00f99119ebf18030173991e77fda692ebb0a5c6cdcff300f08645993b6410472e9cdf4fbd44c
7
+ data.tar.gz: ed102a09a05930f0cbb1a100036e9f509e697f8b74cf81b46202b4c533f5ba1b16343ca89e673d1c863704104d4611711ed92b209060b7c018476cc4889e5a0b
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ Gemfile.lock
4
4
  examples/fixtures/tmp
5
5
  pkg
6
6
  .bundle/
7
+ sandbox/
data/.travis.yml CHANGED
@@ -5,6 +5,7 @@ rvm:
5
5
  - ruby-head
6
6
  - 2.0.0
7
7
  - 2.1.0
8
+ - 2.1.1
8
9
  - 1.9.3
9
10
  - jruby-19mode
10
11
  - rbx-2.2.1
@@ -16,4 +17,3 @@ matrix:
16
17
  - rvm: ruby-head
17
18
  - rvm: jruby-19mode
18
19
  - rvm: rbx-2.2.1
19
-
data/Guardfile CHANGED
@@ -3,4 +3,3 @@ guard :rspec do
3
3
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
4
  watch('spec/spec_helper.rb') { "spec" }
5
5
  end
6
-
data/README.md CHANGED
@@ -19,6 +19,8 @@ stormorge supports
19
19
 
20
20
  * Ruby 1.9.3
21
21
  * Ruby 2.0.0
22
+ * Ruby 2.1.0
23
+ * Ruby 2.1.1
22
24
  * JRuby 1.7.8 (1.9 mode only)
23
25
 
24
26
 
@@ -0,0 +1,15 @@
1
+ StormForge.define_case :https_test do
2
+ title "Testing HTTPS requests"
3
+ version "0.1"
4
+ description "Testing HTTPS Requests."
5
+
6
+ targets "stormforger.com", ssl: true
7
+
8
+ arrival_phase duration: 5.minutes, rate: 1.per_second
9
+
10
+ session "hit start page", 100.percent do
11
+
12
+ # hit https://stormforger.com/
13
+ get "/"
14
+ end
15
+ end
@@ -1,5 +1,3 @@
1
- require "active_support/core_ext/numeric/time"
2
-
3
1
  class Fixnum
4
2
  def percent
5
3
  self
@@ -0,0 +1,5 @@
1
+ unless String.respond_to? :undent
2
+ class String
3
+ alias_method :undent, :strip_heredoc
4
+ end
5
+ end
data/lib/stormforge.rb CHANGED
@@ -1,12 +1,15 @@
1
- require "core_ext/fixnum"
2
-
3
1
  require "active_support"
4
2
  require "active_support/core_ext"
5
- class String
6
- alias_method :undent, :strip_heredoc
7
- end
3
+
4
+ require "core_ext/fixnum"
5
+ require "core_ext/string"
6
+
8
7
  require "active_model"
9
8
 
9
+ unless defined?(Rails)
10
+ I18n.enforce_available_locales = false
11
+ end
12
+
10
13
  module StormForge
11
14
  end
12
15
 
@@ -69,8 +69,13 @@ class StormForge::Dsl::TestCase::Definition
69
69
  end
70
70
 
71
71
  def targets(*targets)
72
+ options = {}
73
+
74
+ options = targets.pop if targets.last.is_a? Hash
75
+
72
76
  return @attributes[:targets] if targets.length == 0
73
77
  @attributes[:targets] = targets.flatten
78
+ @attributes[:target_options] = options
74
79
  end
75
80
 
76
81
  ARRIVAL_PHASE_OPTIONS = {
@@ -99,6 +104,7 @@ class StormForge::Dsl::TestCase::Definition
99
104
  :description,
100
105
  :version,
101
106
  :targets,
107
+ :target_options,
102
108
  :arrival_phases,
103
109
  :sessions,
104
110
  :cloud,
@@ -1,3 +1,3 @@
1
1
  module StormForge
2
- VERSION = "0.7.0"
2
+ VERSION = "0.8.0"
3
3
  end
@@ -69,7 +69,7 @@ describe StormForge::Dsl::TestCase::Definition do
69
69
  test_case = StormForge::Dsl::TestCase::Definition.new :my_1st_case_title do
70
70
  title "my 1st case title"
71
71
  version "version"
72
- targets "a1"
72
+ targets "a1", ssl: true
73
73
  arrival_phase duration: 1.hour, rate: 100.per_second
74
74
  session "GET /", 100.percent, Proc.new {}
75
75
  end
@@ -84,6 +84,9 @@ describe StormForge::Dsl::TestCase::Definition do
84
84
  title: "my 1st case title",
85
85
  version: "version",
86
86
  targets: ["a1"],
87
+ target_options: {
88
+ ssl: true
89
+ },
87
90
  arrival_phases: [
88
91
  {
89
92
  warmup: false,
@@ -46,6 +46,7 @@ describe "Test Case" do
46
46
  version: "0.5",
47
47
 
48
48
  targets: [ "api.example.com" ],
49
+ target_options: {},
49
50
 
50
51
  arrival_phases: [
51
52
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stormforge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Cohnen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -286,10 +286,12 @@ files:
286
286
  - examples/file_upload.rb
287
287
  - examples/fixtures/requests.csv
288
288
  - examples/fixtures/users.csv
289
+ - examples/https_test.rb
289
290
  - examples/simple_and_long.rb
290
291
  - examples/simple_and_short.rb
291
292
  - examples/test_case_definition_v1.rb
292
293
  - lib/core_ext/fixnum.rb
294
+ - lib/core_ext/string.rb
293
295
  - lib/stormforge.rb
294
296
  - lib/stormforge/client.rb
295
297
  - lib/stormforge/dsl.rb