jasmine 2.9.0 → 2.99.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: 4e322feb877809e531aadc247cdf6612d25f935c
4
- data.tar.gz: 51987c03847a3fff87bffdd084932bea5c7b2168
3
+ metadata.gz: 7dca92f4ae805f2cc25a016c14ea264f01203015
4
+ data.tar.gz: 94e7e8bf349a37d47ae0ebfe935831f710b4fc5f
5
5
  SHA512:
6
- metadata.gz: 46148ac0d235b83d1b154c537ac9002ee9a5e50ea31b99880082dfd1b5f835f2034516cb0be5193f6286e3423f6185a7daef0c2d409244102a2a2678d1517980
7
- data.tar.gz: 78da51755fc86ef0f92f15a05ad055158ccb1f48c68a72f20a70c33e0d93e9c7f85683c0eec9afef9e43c6d34e387d9e87488989ba09a5a936e9115d3f7ea5eb
6
+ metadata.gz: 5858e72e685a34c81be4a7e24dc9744c05c587fd8027f47dbf8654f44eb322471e82c01e276c483b509804569a558bc5ba68e7bc22f715ff4d00f2d471b26f19
7
+ data.tar.gz: cd60b36656f747677b4550a983adc23fa7e104950dca8f800a1d13d21e92965b7564941175b635374fe65b554db61596cd73665ccbd0b1177f88dc03bce880bd
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
41
41
  s.add_development_dependency 'nokogiri'
42
42
  end
43
43
 
44
- s.add_dependency 'jasmine-core', '>= 2.9.0', '< 3.0.0'
44
+ s.add_dependency 'jasmine-core', '>= 2.99.0', '< 3.0.0'
45
45
  s.add_dependency 'rack', '>= 1.2.1'
46
46
  s.add_dependency 'rake'
47
47
  s.add_dependency 'phantomjs'
@@ -14,7 +14,7 @@ module Jasmine
14
14
  def done(run_details)
15
15
  outputter.puts
16
16
 
17
- global_failure_details(run_details)
17
+ run_result = global_failure_details(run_details)
18
18
 
19
19
  failure_count = results.count(&:failed?)
20
20
  if failure_count > 0
@@ -29,6 +29,14 @@ module Jasmine
29
29
  outputter.puts(pending(@results))
30
30
  outputter.puts
31
31
  end
32
+
33
+ deprecationWarnings = (@results + [run_result]).map(&:deprecation_warnings).flatten
34
+ if deprecationWarnings.size > 0
35
+ outputter.puts('Deprecations:')
36
+ outputter.puts(deprecations(deprecationWarnings))
37
+ outputter.puts
38
+ end
39
+
32
40
  summary = "#{pluralize(results.size, 'spec')}, " +
33
41
  "#{pluralize(failure_count, 'failure')}"
34
42
 
@@ -52,13 +60,17 @@ module Jasmine
52
60
  results.select(&:pending?).map { |spec| pending_message(spec) }.join("\n\n")
53
61
  end
54
62
 
63
+ def deprecations(warnings)
64
+ warnings.map { |w| expectation_message(w) }.join("\n\n")
65
+ end
66
+
55
67
  def global_failure_details(run_details)
56
- fails = run_details.fetch('failedExpectations', [])
57
- if fails.size > 0
58
- fail_result = Jasmine::Result.new('fullName' => 'Error occurred in afterAll', 'description' => '', 'failedExpectations' => fails)
59
- outputter.puts(failure_message(fail_result))
68
+ result = Jasmine::Result.new(run_details.merge('fullName' => 'Error occurred in afterAll', 'description' => ''))
69
+ if (result.failed_expectations.size > 0)
70
+ outputter.puts(failure_message(result))
60
71
  outputter.puts
61
72
  end
73
+ result
62
74
  end
63
75
 
64
76
  def chars(results)
@@ -10,7 +10,8 @@ module Jasmine
10
10
  @status = attrs["status"]
11
11
  @full_name = attrs["fullName"]
12
12
  @description = attrs["description"]
13
- @failed_expectations = map_failures(attrs["failedExpectations"])
13
+ @failed_expectations = map_failures(attrs.fetch("failedExpectations", []))
14
+ @deprecation_warnings = map_failures(attrs.fetch("deprecationWarnings", []))
14
15
  @suite_name = full_name.slice(0, full_name.size - description.size - 1)
15
16
  @pending_reason = attrs["pendingReason"]
16
17
  end
@@ -31,7 +32,7 @@ module Jasmine
31
32
  status == 'disabled'
32
33
  end
33
34
 
34
- attr_reader :full_name, :description, :failed_expectations, :suite_name, :pending_reason
35
+ attr_reader :full_name, :description, :failed_expectations, :deprecation_warnings, :suite_name, :pending_reason
35
36
 
36
37
  private
37
38
  attr_reader :status, :show_full_stack_trace
@@ -1,3 +1,3 @@
1
1
  module Jasmine
2
- VERSION = "2.9.0"
2
+ VERSION = "2.99.0"
3
3
  end
@@ -0,0 +1,13 @@
1
+ # Jasmine Gem 2.99 Release Notes
2
+
3
+ ## Summary
4
+
5
+ This release is part of the upgrade path to Jasmine 3.0. Please see the [release notes for Jasmine-Core](https://github.com/jasmine/jasmine/blob/master/release_notes/2.99.md)
6
+
7
+ ## Changes
8
+
9
+ * Report deprecation warnings in CI output
10
+
11
+ ------
12
+
13
+ _Release Notes generated with _[Anchorman](http://github.com/infews/anchorman)_
@@ -176,6 +176,15 @@ describe Jasmine::Formatters::Console do
176
176
  expect(outputter_output).to match(/more info/)
177
177
  end
178
178
  end
179
+
180
+ it 'shows deprecation warnings' do
181
+ console = Jasmine::Formatters::Console.new(outputter)
182
+ console.format([Jasmine::Result.new(deprecation_raw_result)])
183
+ console.done({ 'deprecationWarnings' => [{ 'message' => 'globally deprecated', 'stack' => nil }] })
184
+
185
+ expect(outputter_output).to match(/deprecated call/)
186
+ expect(outputter_output).to match(/globally deprecated/)
187
+ end
179
188
  end
180
189
 
181
190
  def failing_result
@@ -64,15 +64,37 @@ module Kernel
64
64
  end
65
65
 
66
66
  def passing_raw_result
67
- {'id' => 123, 'status' => 'passed', 'fullName' => 'Passing test', 'description' => 'Passing', 'failedExpectations' => []}
67
+ {
68
+ 'id' => 123,
69
+ 'status' => 'passed',
70
+ 'fullName' => 'Passing test',
71
+ 'description' => 'Passing',
72
+ 'failedExpectations' => [],
73
+ 'deprecationWarnings' => []
74
+ }
68
75
  end
69
76
 
70
77
  def pending_raw_result
71
- {'id' => 123, 'status' => 'pending', 'fullName' => 'Passing test', 'description' => 'Pending', 'failedExpectations' => [], 'pendingReason' => 'I pend because'}
78
+ {
79
+ 'id' => 123,
80
+ 'status' => 'pending',
81
+ 'fullName' => 'Passing test',
82
+ 'description' => 'Pending',
83
+ 'failedExpectations' => [],
84
+ 'pendingReason' => 'I pend because',
85
+ 'deprecationWarnings' => []
86
+ }
72
87
  end
73
88
 
74
89
  def disabled_raw_result
75
- {'id' => 123, 'status' => 'disabled', 'fullName' => 'Disabled test', 'description' => 'Disabled', 'failedExpectations' => []}
90
+ {
91
+ 'id' => 123,
92
+ 'status' => 'disabled',
93
+ 'fullName' => 'Disabled test',
94
+ 'description' => 'Disabled',
95
+ 'failedExpectations' => [],
96
+ 'deprecationWarnings' => []
97
+ }
76
98
  end
77
99
 
78
100
  def failing_raw_result
@@ -86,7 +108,8 @@ def failing_raw_result
86
108
  'message' => 'a failure message',
87
109
  'stack' => 'a stack trace'
88
110
  }
89
- ]
111
+ ],
112
+ 'deprecationWarnings' => []
90
113
  }
91
114
  end
92
115
 
@@ -101,7 +124,22 @@ def failing_result_no_stack_trace
101
124
  'message' => 'a failure message, but no stack',
102
125
  'stack' => nil
103
126
  }
104
- ]
127
+ ],
128
+ 'deprecationWarnings' => []
129
+ }
130
+ end
131
+
132
+ def deprecation_raw_result
133
+ {
134
+ 'id' => 123,
135
+ 'status' => 'passed',
136
+ 'fullName' => 'test with deprecated calls',
137
+ 'description' => 'Deprecations',
138
+ 'failedExpectations' => [],
139
+ 'deprecationWarnings' => [{
140
+ 'message' => 'deprecated call',
141
+
142
+ }]
105
143
  }
106
144
  end
107
145
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.99.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Van Hove
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-18 00:00:00.000000000 Z
11
+ date: 2018-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -86,7 +86,7 @@ dependencies:
86
86
  requirements:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.9.0
89
+ version: 2.99.0
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
92
  version: 3.0.0
@@ -96,7 +96,7 @@ dependencies:
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: 2.9.0
99
+ version: 2.99.0
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
102
  version: 3.0.0
@@ -224,6 +224,7 @@ files:
224
224
  - release_notes/v2.7.0.md
225
225
  - release_notes/v2.8.0.md
226
226
  - release_notes/v2.9.0.md
227
+ - release_notes/v2.99.md
227
228
  - spec/application_integration_spec.rb
228
229
  - spec/application_spec.rb
229
230
  - spec/base_spec.rb