trice 0.3.0 → 0.3.1

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: fa6a812f48e2ff75b38005bb4426d83f6fb2fdd0
4
- data.tar.gz: 2c867264f3ab2ae6d7b68ed6643a96ec54fec0ad
3
+ metadata.gz: 63fa02cc3d97319917e2757566d0d649904a92b4
4
+ data.tar.gz: 19a0437e485f9657f441b57d5cbcac9e7681b7c2
5
5
  SHA512:
6
- metadata.gz: 9af6bac720d848e047ebd44d1cada130fcae04538112896e7c3d49186ccb6e25c39f687bb28515bb98dfbb5db17f086791efc94e2e2459aa9409e3373081ada9
7
- data.tar.gz: 9a25a63b135af4b903f0b50108dbc3f1ab05ebfa6be9008d78f3bd80babea8d0b2580df451979daee5ab0e39da63cac276c63bab1a07f8ea70dd4b5095a7148d
6
+ metadata.gz: e3a6d68da65511c1ec34cc2c6267d4033e17b3ae14cc1e883c2c4c5a750bb5680e73998dd82702c642eaa27b2b1d00682ba4fd54d890b3cfc292f9b182769983
7
+ data.tar.gz: 12ff1eedfb1f55c19cc277f6fa7205f3cbab785e6c07371ce6d2b8dba67ffd5c1cf9e2953685c1c16e96c0798b6f4b6a13941034530062660a35b36b4d7a01fb
@@ -1,7 +1,15 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
- - 2.2.4
4
+ - 2.2.7
5
+ - 2.3.4
6
+ - 2.4.1
7
+ - ruby-head
4
8
  gemfile:
5
9
  - gemfiles/as4.gemfile
6
10
  - gemfiles/as5.gemfile
7
- before_install: gem install bundler -v 1.11.2
11
+ matrix:
12
+ allow_failures:
13
+ - rvm: ruby-head
14
+ script:
15
+ - xvfb-run bundle exec rake
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Trice
2
+ [![Build Status](https://travis-ci.org/cookpad/trice.svg?branch=master)](https://travis-ci.org/cookpad/trice)
2
3
 
3
4
  Provides **reference time** concept to application. Use it instead of ad-hoc `Time.now`.
4
5
 
@@ -28,7 +28,16 @@ module Trice
28
28
  when :controller
29
29
  request.headers['X-Requested-At'] = time.iso8601
30
30
  when :feature
31
- page.driver.header 'X-Requested-At', time.iso8601
31
+ case
32
+ when page.driver.respond_to?(:header)
33
+ # rack-test, capybara-webkit
34
+ page.driver.header('X-Requested-At', time.iso8601)
35
+ when page.driver.respond_to?(:add_header)
36
+ # poltergeist
37
+ page.driver.add_header('X-Requested-At', time.iso8601)
38
+ else
39
+ raise Trice::TestStubbingNotSupported, "Test stubbing for driver #{page.driver.class} is not supported"
40
+ end
32
41
  else
33
42
  raise Trice::TestStubbingNotSupported, "Test stubbing for type: #{ex.metadata[:type]} is not supported"
34
43
  end
@@ -1,3 +1,3 @@
1
1
  module Trice
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -28,4 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_development_dependency "pry"
29
29
  spec.add_development_dependency "rails-controller-testing"
30
30
  spec.add_development_dependency "appraisal"
31
+ spec.add_development_dependency "capybara"
32
+ spec.add_development_dependency "capybara-webkit"
33
+ spec.add_development_dependency "poltergeist"
31
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - moro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-01 00:00:00.000000000 Z
11
+ date: 2017-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -136,6 +136,48 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: capybara
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: capybara-webkit
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: poltergeist
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
139
181
  description:
140
182
  email:
141
183
  - kyosuke-morohashi@cookpad.com