daddy 0.3.36 → 0.3.37

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: 00c428afd1f9735c149dee419744e8146fd21ef7
4
- data.tar.gz: a3605267f0f3057728251b1aca893b82d0106898
3
+ metadata.gz: 9c0bb2d8aba8973fe59bacc0dcd1daa81e214fbc
4
+ data.tar.gz: e2f9ed6a88ddba78f8e20b8481c109e268714988
5
5
  SHA512:
6
- metadata.gz: 355fbdd82374eae1acc94210c6e448ff7312b3a9311c45de3d50aedb2c1dbe6b56ffb21476a676d7c627d9f94f77bef74ff69d25f5fa00abe0f846bf4282873d
7
- data.tar.gz: 2f5a8fd9465c919290c2b79ffbea4f06494438fe588f5d9fe1f013ff2266902cb05f76aecf270bf90b80a56b2b190538da2161489696d58439a5549e9f035b63
6
+ metadata.gz: 15e4c7f8f5c0a29f1788efbb8a72df9e23a49f72fd74b411e9225703e2a22c4d34faf4d9503696d95a3b034ed03617c4163d8c8ada9726daf940149e86209bcf
7
+ data.tar.gz: 44925a6c65323dc6bf593728abbc905fea724d7cfc384a930d05d27242d5060986a713e10274db626cc721bf645dd657ca7c8ab42210ff8b0ddf6306c4699e9f
@@ -1,10 +1,3 @@
1
- require 'daddy'
2
-
3
- if defined?(Rails)
4
- require 'capybara/rails'
5
- ActionController::Base.allow_rescue = false
6
- end
7
-
8
1
  require 'daddy/git'
9
2
  require 'differ'
10
3
  require_relative 'differ/html_patch.rb'
@@ -1,3 +1,16 @@
1
+ require 'closer/helpers'
2
+
3
+ if defined?(Rails)
4
+ env_caller = File.dirname(caller.detect{ |f| f =~ /\/env\.rb:/ }) if caller.detect{ |f| f =~ /\/env\.rb:/ }
5
+ ENV['RAILS_ENV'] ||= 'test'
6
+ ENV['RAILS_ROOT'] ||= File.expand_path(env_caller + '/../..')
7
+ require File.expand_path(ENV['RAILS_ROOT'] + '/config/environment')
8
+ require 'rails/test_help'
9
+ MultiTest.disable_autorun
10
+
11
+ require 'capybara/rails'
12
+ end
13
+
1
14
  Dir::glob(File.dirname(__FILE__) + '/helpers/*.rb').each do |file|
2
15
  require file
3
16
  end
data/lib/daddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Daddy
2
- VERSION = '0.3.36'
2
+ VERSION = '0.3.37'
3
3
  end
data/lib/tasks/test.rake CHANGED
@@ -4,7 +4,6 @@ namespace :dad do
4
4
 
5
5
  desc 'Cucumberを使用してテストを実行します。'
6
6
  task :test => :environment do
7
- ENV['FORMAT'] ||= 'Daddy::Formatter::Html'
8
7
  Rake::Task['close'].invoke
9
8
  end
10
9
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.36
4
+ version: 0.3.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-31 00:00:00.000000000 Z
11
+ date: 2015-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -30,28 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.1'
41
- - !ruby/object:Gem::Dependency
42
- name: cucumber-rails
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '1.4'
33
+ version: '0.2'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '1.4'
40
+ version: '0.2'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: ci_reporter
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +266,6 @@ files:
280
266
  - lib/daddy/cucumber.rb
281
267
  - lib/daddy/cucumber/helpers.rb
282
268
  - lib/daddy/cucumber/helpers/assert.rb
283
- - lib/daddy/cucumber/helpers/capture.rb
284
269
  - lib/daddy/cucumber/helpers/diff.rb
285
270
  - lib/daddy/cucumber/helpers/html.rb
286
271
  - lib/daddy/cucumber/helpers/pause.rb
@@ -292,14 +277,6 @@ files:
292
277
  - lib/daddy/cucumber/step_definitions/fill_in.rb
293
278
  - lib/daddy/cucumber/step_definitions/select.rb
294
279
  - lib/daddy/differ/html_patch.rb
295
- - lib/daddy/formatter/cucumber.css
296
- - lib/daddy/formatter/daddy.css
297
- - lib/daddy/formatter/daddy.js
298
- - lib/daddy/formatter/daddy_html.rb
299
- - lib/daddy/formatter/html.rb
300
- - lib/daddy/formatter/jquery-min.js
301
- - lib/daddy/formatter/menu.html.erb
302
- - lib/daddy/formatter/screenshot.js
303
280
  - lib/daddy/git.rb
304
281
  - lib/daddy/helpers/html_helper.rb
305
282
  - lib/daddy/http_client.rb
@@ -1,67 +0,0 @@
1
- module Daddy
2
- module Cucumber
3
- module Capture
4
- feature_dir = 'features'
5
- ARGV.each_with_index do |arg, i|
6
- if arg == '-r'
7
- feature_dir = ARGV[i + 1]
8
- break
9
- end
10
- end
11
- REPORT_DIR = File.join(feature_dir, 'reports')
12
- IMAGE_DIR = 'images'
13
- FileUtils.mkdir_p("#{REPORT_DIR}/#{IMAGE_DIR}")
14
-
15
- @@_screen_count = 0
16
- @@_images = []
17
-
18
- def capture(options = {})
19
- options ||= {}
20
- options = {:title => options} if options.is_a?(String)
21
-
22
- pause
23
- return if ENV['FORMAT'] == 'junit'
24
-
25
- url = Rack::Utils.unescape(current_url)
26
-
27
- @@_screen_count += 1
28
-
29
- image = "#{IMAGE_DIR}/#{@@_screen_count}.png"
30
- page.driver.save_screenshot("#{REPORT_DIR}/#{image}", :full => true)
31
-
32
- image_tag = "<img class=\"screenshot\" src=\"#{image}\" title=\"#{options[:title]}\" alt=\"#{url}\"/>"
33
-
34
- if options[:flash]
35
- puts image_tag
36
- else
37
- @@_images << image_tag
38
- end
39
- end
40
-
41
- def resize_window(width, height)
42
- case Capybara.current_driver
43
- when :poltergeist
44
- Capybara.current_session.driver.resize(width, height)
45
- when :selenium
46
- Capybara.current_session.driver.browser.manage.window.resize_to(width, height)
47
- when :webkit
48
- # TODO
49
- end
50
- end
51
-
52
- def flash_image_tags
53
- if @@_images.size > 0
54
- puts @@_images.join("\n")
55
- @@_images.clear
56
- end
57
- end
58
-
59
- end
60
- end
61
- end
62
-
63
- World(Daddy::Cucumber::Capture)
64
-
65
- AfterStep do |step|
66
- flash_image_tags
67
- end
@@ -1,285 +0,0 @@
1
- /* cucumber.css is generated from cucumber.sass */
2
- /* Regenerate with rake sass */
3
- body {
4
- font-size: 0px;
5
- color: white;
6
- margin: 0px;
7
- padding: 0px;
8
- }
9
-
10
- .cucumber, td, th {
11
- font: normal 11px "Lucida Grande", Helvetica, sans-serif;
12
- background: white;
13
- color: black;
14
- }
15
- .cucumber #cucumber-header, td #cucumber-header, th #cucumber-header {
16
- background: #65c400;
17
- color: white;
18
- height: 6em;
19
- }
20
- .cucumber #cucumber-header #expand-collapse p, td #cucumber-header #expand-collapse p, th #cucumber-header #expand-collapse p {
21
- float: right;
22
- margin: 0 0 0 10px;
23
- }
24
- .cucumber .scenario h3, td .scenario h3, th .scenario h3, .background h3 {
25
- font-size: 11px;
26
- padding: 3px;
27
- margin: 0;
28
- background: #65c400;
29
- color: white;
30
- font-weight: bold;
31
- }
32
-
33
- .background h3 {
34
- font-size: 1.2em;
35
- background: #666;
36
- }
37
-
38
- .cucumber h1, td h1, th h1 {
39
- margin: 0px 10px 0px 10px;
40
- padding: 10px;
41
- font-family: "Lucida Grande", Helvetica, sans-serif;
42
- font-size: 2em;
43
- position: absolute;
44
- }
45
- .cucumber h4, td h4, th h4 {
46
- margin-bottom: 2px;
47
- }
48
- .cucumber div.feature, td div.feature, th div.feature {
49
- padding: 2px;
50
- margin: 0px 10px 5px 10px;
51
- }
52
- .cucumber div.examples, td div.examples, th div.examples {
53
- padding: 0em 0em 0em 1em;
54
- }
55
- .cucumber .stats, td .stats, th .stats {
56
- margin: 2em;
57
- }
58
- .cucumber .summary ul.features li, td .summary ul.features li, th .summary ul.features li {
59
- display: inline;
60
- }
61
- .cucumber .step_name, td .step_name, th .step_name {
62
- float: left;
63
- }
64
- .cucumber .step_file, td .step_file, th .step_file {
65
- text-align: right;
66
- color: #999999;
67
- }
68
- .cucumber .step_file a, td .step_file a, th .step_file a {
69
- color: #999999;
70
- }
71
- .cucumber .scenario_file, td .scenario_file, th .scenario_file {
72
- float: right;
73
- color: #999999;
74
- }
75
- .cucumber .tag, td .tag, th .tag {
76
- font-weight: bold;
77
- color: #246ac1;
78
- }
79
- .cucumber .backtrace, td .backtrace, th .backtrace {
80
- margin-top: 0;
81
- margin-bottom: 0;
82
- margin-left: 1em;
83
- color: black;
84
- }
85
- .cucumber a, td a, th a {
86
- text-decoration: none;
87
- color: #be5c00;
88
- }
89
- .cucumber a:hover, td a:hover, th a:hover {
90
- text-decoration: underline;
91
- }
92
- .cucumber a:visited, td a:visited, th a:visited {
93
- font-weight: normal;
94
- }
95
- .cucumber a div.examples, td a div.examples, th a div.examples {
96
- margin: 5px 0px 5px 15px;
97
- color: black;
98
- }
99
- .cucumber .outline table, td .outline table, th .outline table {
100
- margin: 0px 0px 5px 10px;
101
- }
102
- .cucumber table, td table, th table {
103
- border-collapse: collapse;
104
- }
105
- .cucumber table td, td table td, th table td {
106
- padding: 3px 3px 3px 5px;
107
- }
108
- .cucumber table td.failed, .cucumber table td.passed, .cucumber table td.skipped, .cucumber table td.pending, .cucumber table td.undefined, td table td.failed, td table td.passed, td table td.skipped, td table td.pending, td table td.undefined, th table td.failed, th table td.passed, th table td.skipped, th table td.pending, th table td.undefined {
109
- padding-left: 18px;
110
- padding-right: 10px;
111
- }
112
- .cucumber table td.failed, td table td.failed, th table td.failed {
113
- border-left: 5px solid #c20000;
114
- border-bottom: 1px solid #c20000;
115
- background: #fffbd3;
116
- color: #c20000;
117
- }
118
- .cucumber table td.passed, td table td.passed, th table td.passed {
119
- border-left: 5px solid #65c400;
120
- border-bottom: 1px solid #65c400;
121
- background: #dbffb4;
122
- color: #3d7700;
123
- }
124
- .cucumber table td.skipped, td table td.skipped, th table td.skipped {
125
- border-left: 5px solid aqua;
126
- border-bottom: 1px solid aqua;
127
- background: #e0ffff;
128
- color: #001111;
129
- }
130
- .cucumber table td.pending, td table td.pending, th table td.pending {
131
- border-left: 5px solid #faf834;
132
- border-bottom: 1px solid #faf834;
133
- background: #fcfb98;
134
- color: #131313;
135
- }
136
- .cucumber table td.undefined, td table td.undefined, th table td.undefined {
137
- border-left: 5px solid #faf834;
138
- border-bottom: 1px solid #faf834;
139
- background: #fcfb98;
140
- color: #131313;
141
- }
142
- .cucumber table td.message, td table td.message, th table td.message {
143
- border-left: 5px solid aqua;
144
- border-bottom: 1px solid aqua;
145
- background: #e0ffff;
146
- color: #001111;
147
- }
148
- .cucumber ol, td ol, th ol {
149
- list-style: none;
150
- margin: 0px;
151
- padding: 0px;
152
- }
153
- .cucumber ol li.step, td ol li.step, th ol li.step {
154
- padding: 3px 3px 3px 18px;
155
- margin: 5px 0px 5px 5px;
156
- }
157
- .cucumber ol li, td ol li, th ol li {
158
- margin: 0em 0em 0em 1em;
159
- padding: 0em 0em 0em 0.2em;
160
- }
161
- .cucumber ol li span.param, td ol li span.param, th ol li span.param {
162
- font-weight: bold;
163
- }
164
- .cucumber ol li.failed, td ol li.failed, th ol li.failed {
165
- border-left: 5px solid #c20000;
166
- border-bottom: 1px solid #c20000;
167
- background: #fffbd3;
168
- color: #c20000;
169
- }
170
- .cucumber ol li.passed, td ol li.passed, th ol li.passed {
171
- border-left: 5px solid #65c400;
172
- border-bottom: 1px solid #65c400;
173
- background: #dbffb4;
174
- color: #3d7700;
175
- }
176
- .cucumber ol li.skipped, td ol li.skipped, th ol li.skipped {
177
- border-left: 5px solid aqua;
178
- border-bottom: 1px solid aqua;
179
- background: #e0ffff;
180
- color: #001111;
181
- }
182
- .cucumber ol li.pending, td ol li.pending, th ol li.pending {
183
- border-left: 5px solid #faf834;
184
- border-bottom: 1px solid #faf834;
185
- background: #fcfb98;
186
- color: #131313;
187
- }
188
- .cucumber ol li.undefined, td ol li.undefined, th ol li.undefined {
189
- border-left: 5px solid #faf834;
190
- border-bottom: 1px solid #faf834;
191
- background: #fcfb98;
192
- color: #131313;
193
- }
194
- .cucumber ol li.message, td ol li.message, th ol li.message {
195
- border-left: 5px solid aqua;
196
- border-bottom: 1px solid aqua;
197
- background: #e0ffff;
198
- color: #001111;
199
- margin-left: 10px;
200
- }
201
- .cucumber #summary, td #summary, th #summary {
202
- margin: 0px;
203
- padding: 5px 10px;
204
- text-align: right;
205
- top: 0px;
206
- right: 0px;
207
- float: right;
208
- }
209
- .cucumber #summary p, td #summary p, th #summary p {
210
- margin: 0 0 0 2px;
211
- }
212
- .cucumber #summary #totals, td #summary #totals, th #summary #totals {
213
- font-size: 1.2em;
214
- }
215
-
216
- .ruby {
217
- font-size: 12px;
218
- font-family: monospace;
219
- color: white;
220
- background: black;
221
- padding: 0.1em 0 0.2em 0;
222
- }
223
- .ruby .keyword {
224
- color: #ff6600;
225
- }
226
- .ruby .constant {
227
- color: #339999;
228
- }
229
- .ruby .attribute {
230
- color: white;
231
- }
232
- .ruby .global {
233
- color: white;
234
- }
235
- .ruby .module {
236
- color: white;
237
- }
238
- .ruby .class {
239
- color: white;
240
- }
241
- .ruby .string {
242
- color: #66ff00;
243
- }
244
- .ruby .ident {
245
- color: white;
246
- }
247
- .ruby .method {
248
- color: #ffcc00;
249
- }
250
- .ruby .number {
251
- color: white;
252
- }
253
- .ruby .char {
254
- color: white;
255
- }
256
- .ruby .comment {
257
- color: #9933cc;
258
- }
259
- .ruby .symbol {
260
- color: white;
261
- }
262
- .ruby .regex {
263
- color: #44b4cc;
264
- }
265
- .ruby .punct {
266
- color: white;
267
- }
268
- .ruby .escape {
269
- color: white;
270
- }
271
- .ruby .interp {
272
- color: white;
273
- }
274
- .ruby .expr {
275
- color: white;
276
- }
277
- .ruby .offending {
278
- background: #333333;
279
- }
280
- .ruby .linenum {
281
- width: 75px;
282
- padding: 0.1em 1em 0.2em 0;
283
- color: black;
284
- background: #fffbd3;
285
- }