gnawrnip 0.5.0 → 0.6.0

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: 8f4cbee0de7794f368dc529136e5856db3286272
4
- data.tar.gz: 5041bc937b37cb9a79a13a0560f1cbc4c55e975a
3
+ metadata.gz: fd3cc4e3bd4c40fafbfbde1de7033497a6511ca6
4
+ data.tar.gz: 5432c3e4daaf56b0c4195993876006a2ae1918c1
5
5
  SHA512:
6
- metadata.gz: e1eca5945df5d2954d850a91baffc1795aa794eca22a70e872cc612e946165d195498e734196b922312b493116b6a849e418df98eedd706945cc664a21050a9b
7
- data.tar.gz: cbeddac5d29e601fd03ca266555b5468d926979963f2e068cb2e02285a751f7ca9f51a9c4d33c3868426d8a22aec026a8cccfb8d370167c41b71b882f36529d4
6
+ metadata.gz: 87f46301167ab4ff8eb05a5a22210bedd13a8a4fd992fef69415d2df0ab665cb93ec702b0997d2fe3c261760ee8b48bbce1ef80347b3d7de45978f6bba19261f
7
+ data.tar.gz: 11e7c2b073ae305b1f207dc10684a3a8a369009ef6c5e1f2380feb108e46105cbde18e6efcf04a93584baf04bfb4e1f81af188594f67df477e0fa8542098e256
data/.travis.yml CHANGED
@@ -8,13 +8,13 @@ branches:
8
8
  - master
9
9
 
10
10
  rvm:
11
- - 2.1
12
- - 2.2
11
+ - 2.2.2
13
12
  - 2.3.0
13
+ - 2.4.0
14
14
 
15
15
  script: bundle exec rspec
16
16
 
17
17
  gemfile:
18
- - gemfiles/Gemfile-rspec-3.3.x
19
18
  - gemfiles/Gemfile-rspec-3.4.x
19
+ - gemfiles/Gemfile-rspec-3.5.x
20
20
 
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec :path => '..'
4
- gem 'rspec', '~> 3.3.0'
4
+ gem 'rspec', '~> 3.5.0'
data/gnawrnip.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'capybara', "~> 2.2"
22
- spec.add_dependency 'turnip_formatter', '~> 0.5.0'
22
+ spec.add_dependency 'turnip_formatter', '~> 0.6.0'
23
23
  spec.add_dependency 'oily_png'
24
24
  spec.add_development_dependency "bundler", "~> 1.3"
25
25
  spec.add_development_dependency "rake"
@@ -1,16 +1,19 @@
1
- require 'turnip_formatter/step_template/exception'
1
+ require 'turnip_formatter/step_template/base'
2
2
  require 'gnawrnip/developer'
3
3
 
4
4
  module Gnawrnip
5
- class StepScreenshot < TurnipFormatter::StepTemplate::Exception
5
+ class StepScreenshot < TurnipFormatter::StepTemplate::Base
6
6
  on_failed :build
7
7
 
8
8
  def self.css
9
9
  File.read(File.dirname(__FILE__) + '/gnawrnip.css')
10
10
  end
11
11
 
12
- def build(example)
13
- images = example.metadata[:gnawrnip][:screenshot]
12
+ #
13
+ # @param [TurnipFormatter::Resource::Step::Failure] step
14
+ #
15
+ def build(step)
16
+ images = step.example.metadata[:gnawrnip][:screenshot]
14
17
 
15
18
  case images.length
16
19
  when 0
@@ -1,3 +1,3 @@
1
1
  module Gnawrnip
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -10,12 +10,15 @@ module Gnawrnip
10
10
  allow(template).to receive(:develop).and_return('')
11
11
  end
12
12
 
13
- let(:example) do
13
+ let(:step) do
14
14
  metadata = { gnawrnip: { screenshot: paths } }
15
- double('example', metadata: metadata)
15
+
16
+ double('step', example: { metadata: metadata }).tap do |step|
17
+ allow(step).to receive_message_chain(:example, :metadata) { metadata }
18
+ end
16
19
  end
17
20
 
18
- subject { template.build(example) }
21
+ subject { template.build(step) }
19
22
 
20
23
  context 'has multiple data' do
21
24
  let(:paths) do
data/spec/spec_helper.rb CHANGED
@@ -32,3 +32,14 @@ module Capybara
32
32
  GnawrnipTest::Session.new
33
33
  end
34
34
  end
35
+
36
+ require 'rspec/core/sandbox'
37
+
38
+ RSpec.configure do |c|
39
+ c.around :each do |ex|
40
+ RSpec::Core::Sandbox.sandboxed do |config|
41
+ load 'gnawrnip/rspec.rb'
42
+ ex.run
43
+ end
44
+ end
45
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gnawrnip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wataru MIYAGUNI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-10 00:00:00.000000000 Z
11
+ date: 2017-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.0
33
+ version: 0.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.5.0
40
+ version: 0.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: oily_png
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -128,8 +128,8 @@ files:
128
128
  - example/spec/spec_helper.rb
129
129
  - example/spec/steps/hello_steps.rb
130
130
  - example/web.rb
131
- - gemfiles/Gemfile-rspec-3.3.x
132
131
  - gemfiles/Gemfile-rspec-3.4.x
132
+ - gemfiles/Gemfile-rspec-3.5.x
133
133
  - gnawrnip.gemspec
134
134
  - lib/gnawrnip.rb
135
135
  - lib/gnawrnip/developer.rb
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  version: '0'
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 2.4.5
173
+ rubygems_version: 2.5.1
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Add-on for TurnipFormatter with Capybara