flood-capybara 0.0.3 → 0.0.4

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: c0842e4845b2859966c1e7becf2bcb8d6a16ae42
4
- data.tar.gz: e1db53d2b668d2b461112d31f497c83c478c0b7c
3
+ metadata.gz: cdf3c82eb9a5559caf956be7d4e2023041da0fef
4
+ data.tar.gz: ba56f712584300a4804564def378f8d943ce54e2
5
5
  SHA512:
6
- metadata.gz: b36653205744714f47b1e0b1cb4e8e318a8ed9053060a6312d3ef79f845de4a78190caaa7f4e806ef3a0f15cef38baccd1bcd80bc94a93ef5d66859175d26c45
7
- data.tar.gz: 1c361af3839908f3f26e5bcfc3d8c2308851971415c213c0cf019ac29f80f71e6b8ccb08eba853b9be8911bccd2d9841b827b4953bb5ac8fbbdeee2ce121d54a
6
+ metadata.gz: df970122fb619af787b4679936b0ab9731b33570503948ac2bebf8b15cc722c1e3e7b8727e8ab551a7dae006919d30d41113a3cd573dfe2d8036d7829258d4b5
7
+ data.tar.gz: f8d2fbfe41ed9a66f392ea1e77bb8804759690d5819bb4982e7daabb11f09c1a370f0420d723816cfdd6ac527b717dd0bad947a50361ae21b05908cef94639f3
data/README.md CHANGED
@@ -30,7 +30,7 @@ $ flood-capybara spec \
30
30
  --grid=1QNtoBftrokSErYJdTHRQg \
31
31
  --rampup=60 \
32
32
  --duration=120 \
33
- --url=https://flood.io
33
+ --url=https://flood-newrelic-ruby-kata.herokuapp.com
34
34
  ```
35
35
 
36
36
  or as a rake task e.g. `lib/tasks/flood.rake`
@@ -40,10 +40,11 @@ namespace :flood do
40
40
  task run: :environment do
41
41
  system %{
42
42
  flood-capybara spec
43
+ --tag flood
43
44
  --api_token=#{ENV['FLOOD_API_TOKEN']}
44
45
  --rampup=#{ENV['RAMPUP'] || 60}
45
46
  --duration=#{ENV['DURATION'] || 300}
46
- --url=#{ENV['URL'] || 'https://flood-newrelic-ruby-kata.herokuapp.com/'}
47
+ --url=#{ENV['URL'] || 'https://flood-newrelic-ruby-kata.herokuapp.com'}
47
48
  }.squish
48
49
  end
49
50
  end
@@ -11,6 +11,7 @@ class FloodCapybara
11
11
  option :duration
12
12
  option :name
13
13
  option :url
14
+ option :tag
14
15
  option :endpoint
15
16
  def spec
16
17
  specs = FloodCapybara.new
@@ -10,7 +10,9 @@ class FloodCapybara
10
10
  config.instance_variable_set(:@reporter, reporter)
11
11
  reporter.register_listener(formatter, *notifications)
12
12
 
13
- RSpec::Core::Runner.run(['spec', '--dry-run'])
13
+ tags = ['--tag', args[:tag]] if args[:tag]
14
+
15
+ RSpec::Core::Runner.run(['spec', '--dry-run'] + tags)
14
16
 
15
17
  specs = formatter.output_hash
16
18
 
@@ -59,6 +61,10 @@ class FloodCapybara
59
61
  if (child.to_a.first.children & [:it]).present?
60
62
  @steps << Unparser.unparse(child)
61
63
  end
64
+
65
+ if (child.to_a.first.children & [:scenario]).present?
66
+ @steps << Unparser.unparse(child)
67
+ end
62
68
  rescue
63
69
  end
64
70
  iterate(child) if child.is_a?(AST::Node)
@@ -100,7 +106,7 @@ class FloodCapybara
100
106
  override_parameters: args[:override_parameters],
101
107
  started: args[:started],
102
108
  stopped: args[:stopped],
103
- meta: git_info
109
+ meta: git_info.to_json
104
110
  },
105
111
  flood_files: flood_files,
106
112
  region: args[:region],
@@ -1,5 +1,5 @@
1
1
  module Flood
2
2
  module Capybara
3
- VERSION = '0.0.3'
3
+ VERSION = '0.0.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flood-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Koopmans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-07 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler