transpec 1.3.1 → 1.4.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 +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +1 -3
- data/CHANGELOG.md +9 -0
- data/README.md +141 -24
- data/README.md.erb +136 -24
- data/lib/transpec/ast/node.rb +7 -3
- data/lib/transpec/cli.rb +1 -1
- data/lib/transpec/configuration.rb +1 -0
- data/lib/transpec/converter.rb +31 -2
- data/lib/transpec/dynamic_analyzer.rb +1 -1
- data/lib/transpec/option_parser.rb +12 -9
- data/lib/transpec/project.rb +23 -12
- data/lib/transpec/rspec_version.rb +18 -4
- data/lib/transpec/static_context_inspector.rb +0 -15
- data/lib/transpec/syntax/example.rb +83 -0
- data/lib/transpec/syntax/expect.rb +5 -0
- data/lib/transpec/syntax/have.rb +111 -54
- data/lib/transpec/syntax/method_stub.rb +58 -37
- data/lib/transpec/syntax/mixin/allow_no_message.rb +2 -0
- data/lib/transpec/syntax/mixin/any_instance.rb +2 -0
- data/lib/transpec/syntax/mixin/should_base.rb +39 -0
- data/lib/transpec/syntax/oneliner_should.rb +218 -0
- data/lib/transpec/syntax/operator_matcher.rb +1 -0
- data/lib/transpec/syntax/should.rb +3 -30
- data/lib/transpec/util.rb +54 -0
- data/lib/transpec/version.rb +2 -2
- data/spec/support/shared_context.rb +21 -29
- data/spec/transpec/ast/node_spec.rb +1 -1
- data/spec/transpec/commit_message_spec.rb +29 -23
- data/spec/transpec/configuration_spec.rb +1 -0
- data/spec/transpec/converter_spec.rb +208 -5
- data/spec/transpec/dynamic_analyzer_spec.rb +2 -2
- data/spec/transpec/option_parser_spec.rb +1 -0
- data/spec/transpec/project_spec.rb +10 -0
- data/spec/transpec/rspec_version_spec.rb +52 -28
- data/spec/transpec/static_context_inspector_spec.rb +2 -2
- data/spec/transpec/syntax/be_boolean_spec.rb +6 -13
- data/spec/transpec/syntax/be_close_spec.rb +2 -9
- data/spec/transpec/syntax/double_spec.rb +2 -9
- data/spec/transpec/syntax/example_spec.rb +249 -0
- data/spec/transpec/syntax/expect_spec.rb +1 -1
- data/spec/transpec/syntax/have_spec.rb +127 -22
- data/spec/transpec/syntax/its_spec.rb +9 -18
- data/spec/transpec/syntax/method_stub_spec.rb +193 -158
- data/spec/transpec/syntax/oneliner_should_spec.rb +653 -0
- data/spec/transpec/syntax/operator_matcher_spec.rb +7 -8
- data/spec/transpec/syntax/raise_error_spec.rb +6 -13
- data/spec/transpec/syntax/rspec_configure_spec.rb +1 -8
- data/spec/transpec/syntax/should_receive_spec.rb +19 -28
- data/spec/transpec/syntax/should_spec.rb +18 -16
- data/spec/transpec/util_spec.rb +30 -0
- data/transpec.gemspec +8 -7
- metadata +49 -28
@@ -2,20 +2,19 @@
|
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
require 'transpec/syntax/operator_matcher'
|
5
|
+
require 'transpec/syntax/should'
|
5
6
|
|
6
7
|
module Transpec
|
7
8
|
class Syntax
|
8
9
|
describe OperatorMatcher do
|
9
10
|
include ::AST::Sexp
|
10
11
|
include_context 'parsed objects'
|
11
|
-
include_context '
|
12
|
+
include_context 'syntax object', Should, :should_object
|
12
13
|
|
13
14
|
subject(:matcher) do
|
14
15
|
OperatorMatcher.new(should_object.matcher_node, source_rewriter, runtime_data)
|
15
16
|
end
|
16
17
|
|
17
|
-
let(:runtime_data) { nil }
|
18
|
-
|
19
18
|
let(:record) { matcher.report.records.first }
|
20
19
|
|
21
20
|
describe '#method_name' do
|
@@ -102,7 +101,7 @@ module Transpec
|
|
102
101
|
rewritten_source.should == expected_source
|
103
102
|
end
|
104
103
|
|
105
|
-
it 'adds record
|
104
|
+
it 'adds record `== expected` -> `eq(expected)`' do
|
106
105
|
record.original_syntax.should == '== expected'
|
107
106
|
record.converted_syntax.should == 'eq(expected)'
|
108
107
|
end
|
@@ -222,7 +221,7 @@ module Transpec
|
|
222
221
|
rewritten_source.should == expected_source
|
223
222
|
end
|
224
223
|
|
225
|
-
it 'adds record
|
224
|
+
it 'adds record `== expected` -> `eq(expected)`' do
|
226
225
|
record.original_syntax.should == '== expected'
|
227
226
|
record.converted_syntax.should == 'eq(expected)'
|
228
227
|
end
|
@@ -372,7 +371,7 @@ module Transpec
|
|
372
371
|
rewritten_source.should == expected_source
|
373
372
|
end
|
374
373
|
|
375
|
-
it "adds record
|
374
|
+
it "adds record `#{operator} expected` -> `be #{operator} expected`" do
|
376
375
|
record.original_syntax.should == "#{operator} expected"
|
377
376
|
record.converted_syntax.should == "be #{operator} expected"
|
378
377
|
end
|
@@ -424,7 +423,7 @@ module Transpec
|
|
424
423
|
rewritten_source.should == expected_source
|
425
424
|
end
|
426
425
|
|
427
|
-
it 'adds record
|
426
|
+
it 'adds record `=~ /pattern/` -> `match(/pattern/)`' do
|
428
427
|
record.original_syntax.should == '=~ /pattern/'
|
429
428
|
record.converted_syntax.should == 'match(/pattern/)'
|
430
429
|
end
|
@@ -507,7 +506,7 @@ module Transpec
|
|
507
506
|
rewritten_source.should == expected_source
|
508
507
|
end
|
509
508
|
|
510
|
-
it 'adds record
|
509
|
+
it 'adds record `=~ [1, 2]` -> `match_array([1, 2])`' do
|
511
510
|
record.original_syntax.should == '=~ [1, 2]'
|
512
511
|
record.converted_syntax.should == 'match_array([1, 2])'
|
513
512
|
end
|
@@ -7,14 +7,7 @@ module Transpec
|
|
7
7
|
class Syntax
|
8
8
|
describe RaiseError do
|
9
9
|
include_context 'parsed objects'
|
10
|
-
|
11
|
-
subject(:raise_error_object) do
|
12
|
-
ast.each_node do |node|
|
13
|
-
next unless RaiseError.target_node?(node)
|
14
|
-
return RaiseError.new(node, source_rewriter)
|
15
|
-
end
|
16
|
-
fail 'No raise_error node is found!'
|
17
|
-
end
|
10
|
+
include_context 'syntax object', RaiseError, :raise_error_object
|
18
11
|
|
19
12
|
let(:record) { raise_error_object.report.records.first }
|
20
13
|
|
@@ -231,7 +224,7 @@ module Transpec
|
|
231
224
|
end
|
232
225
|
|
233
226
|
it 'adds record ' +
|
234
|
-
'
|
227
|
+
'`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
|
235
228
|
record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
|
236
229
|
record.converted_syntax.should == 'expect { }.not_to raise_error'
|
237
230
|
end
|
@@ -289,7 +282,7 @@ module Transpec
|
|
289
282
|
end
|
290
283
|
|
291
284
|
it 'adds record ' +
|
292
|
-
'
|
285
|
+
'`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
|
293
286
|
record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
|
294
287
|
record.converted_syntax.should == 'expect { }.not_to raise_error'
|
295
288
|
end
|
@@ -321,7 +314,7 @@ module Transpec
|
|
321
314
|
end
|
322
315
|
|
323
316
|
it 'adds record ' +
|
324
|
-
'
|
317
|
+
'`expect { }.not_to raise_error(SpecificErrorClass)` -> `expect { }.not_to raise_error`' do
|
325
318
|
record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass)'
|
326
319
|
record.converted_syntax.should == 'expect { }.not_to raise_error'
|
327
320
|
end
|
@@ -353,7 +346,7 @@ module Transpec
|
|
353
346
|
end
|
354
347
|
|
355
348
|
it 'adds record ' +
|
356
|
-
'
|
349
|
+
'`expect { }.not_to raise_error(SpecificErrorClass, message)` -> `expect { }.not_to raise_error`' do
|
357
350
|
record.original_syntax.should == 'expect { }.not_to raise_error(SpecificErrorClass, message)'
|
358
351
|
record.converted_syntax.should == 'expect { }.not_to raise_error'
|
359
352
|
end
|
@@ -385,7 +378,7 @@ module Transpec
|
|
385
378
|
end
|
386
379
|
|
387
380
|
it 'adds record ' +
|
388
|
-
'
|
381
|
+
'`expect { }.not_to raise_error(message)` -> `expect { }.not_to raise_error`' do
|
389
382
|
record.original_syntax.should == 'expect { }.not_to raise_error(message)'
|
390
383
|
record.converted_syntax.should == 'expect { }.not_to raise_error'
|
391
384
|
end
|
@@ -7,14 +7,7 @@ module Transpec
|
|
7
7
|
class Syntax
|
8
8
|
describe RSpecConfigure do
|
9
9
|
include_context 'parsed objects'
|
10
|
-
|
11
|
-
subject(:rspec_configure) do
|
12
|
-
ast.each_node do |node|
|
13
|
-
next unless RSpecConfigure.target_node?(node)
|
14
|
-
return RSpecConfigure.new(node, source_rewriter)
|
15
|
-
end
|
16
|
-
fail 'No RSpec.configure node is found!'
|
17
|
-
end
|
10
|
+
include_context 'syntax object', RSpecConfigure, :rspec_configure
|
18
11
|
|
19
12
|
[
|
20
13
|
[:expectation_syntaxes, :expect_with, 'RSpec::Matchers::Configuration'],
|
@@ -7,16 +7,7 @@ module Transpec
|
|
7
7
|
class Syntax
|
8
8
|
describe ShouldReceive do
|
9
9
|
include_context 'parsed objects'
|
10
|
-
|
11
|
-
subject(:should_receive_object) do
|
12
|
-
ast.each_node do |node|
|
13
|
-
next unless ShouldReceive.target_node?(node)
|
14
|
-
return ShouldReceive.new(node, source_rewriter, runtime_data)
|
15
|
-
end
|
16
|
-
fail 'No should_receive node is found!'
|
17
|
-
end
|
18
|
-
|
19
|
-
let(:runtime_data) { nil }
|
10
|
+
include_context 'syntax object', ShouldReceive, :should_receive_object
|
20
11
|
|
21
12
|
let(:record) { should_receive_object.report.records.first }
|
22
13
|
|
@@ -47,7 +38,7 @@ module Transpec
|
|
47
38
|
rewritten_source.should == expected_source
|
48
39
|
end
|
49
40
|
|
50
|
-
it 'adds record
|
41
|
+
it 'adds record `obj.should_receive(:message)` -> `expect(obj).to receive(:message)`' do
|
51
42
|
should_receive_object.expectize!
|
52
43
|
record.original_syntax.should == 'obj.should_receive(:message)'
|
53
44
|
record.converted_syntax.should == 'expect(obj).to receive(:message)'
|
@@ -188,7 +179,7 @@ module Transpec
|
|
188
179
|
end
|
189
180
|
|
190
181
|
it 'adds record ' +
|
191
|
-
'
|
182
|
+
'`obj.should_not_receive(:message)` -> `expect(obj).not_to receive(:message)`' do
|
192
183
|
should_receive_object.expectize!
|
193
184
|
record.original_syntax.should == 'obj.should_not_receive(:message)'
|
194
185
|
record.converted_syntax.should == 'expect(obj).not_to receive(:message)'
|
@@ -211,7 +202,7 @@ module Transpec
|
|
211
202
|
end
|
212
203
|
|
213
204
|
it 'adds record ' +
|
214
|
-
'
|
205
|
+
'`obj.should_not_receive(:message)` -> `expect(obj).to_not receive(:message)`' do
|
215
206
|
should_receive_object.expectize!('to_not')
|
216
207
|
record.original_syntax.should == 'obj.should_not_receive(:message)'
|
217
208
|
record.converted_syntax.should == 'expect(obj).to_not receive(:message)'
|
@@ -435,8 +426,8 @@ module Transpec
|
|
435
426
|
rewritten_source.should == expected_source
|
436
427
|
end
|
437
428
|
|
438
|
-
it 'adds record
|
439
|
-
'-> `expect_any_instance_of(Klass).to receive(:message)`
|
429
|
+
it 'adds record `Klass.any_instance.should_receive(:message)` ' +
|
430
|
+
'-> `expect_any_instance_of(Klass).to receive(:message)`' do
|
440
431
|
should_receive_object.expectize!
|
441
432
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message)'
|
442
433
|
record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message)'
|
@@ -509,8 +500,8 @@ module Transpec
|
|
509
500
|
rewritten_source.should == expected_source
|
510
501
|
end
|
511
502
|
|
512
|
-
it 'adds record
|
513
|
-
'-> `expect_any_instance_of(Klass).to receive(:message)`
|
503
|
+
it 'adds record `Klass.any_instance.should_receive(:message)` ' +
|
504
|
+
'-> `expect_any_instance_of(Klass).to receive(:message)`' do
|
514
505
|
should_receive_object.expectize!
|
515
506
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message)'
|
516
507
|
record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message)'
|
@@ -551,8 +542,8 @@ module Transpec
|
|
551
542
|
rewritten_source.should == expected_source
|
552
543
|
end
|
553
544
|
|
554
|
-
it 'adds record
|
555
|
-
'-> `expect_any_instance_of(Klass).to receive(:message)`
|
545
|
+
it 'adds record `Klass.any_instance.should_receive(:message)` ' +
|
546
|
+
'-> `expect_any_instance_of(Klass).to receive(:message)`' do
|
556
547
|
should_receive_object.expectize!
|
557
548
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message)'
|
558
549
|
record.converted_syntax.should == 'expect_any_instance_of(Klass).to receive(:message)'
|
@@ -663,7 +654,7 @@ module Transpec
|
|
663
654
|
end
|
664
655
|
|
665
656
|
it 'adds record ' +
|
666
|
-
'
|
657
|
+
'`obj.should_receive(:message).any_number_of_times` -> `allow(obj).to receive(:message)`' do
|
667
658
|
should_receive_object.allowize_useless_expectation!
|
668
659
|
record.original_syntax.should == 'obj.should_receive(:message).any_number_of_times'
|
669
660
|
record.converted_syntax.should == 'allow(obj).to receive(:message)'
|
@@ -764,8 +755,8 @@ module Transpec
|
|
764
755
|
rewritten_source.should == expected_source
|
765
756
|
end
|
766
757
|
|
767
|
-
it 'adds record
|
768
|
-
'-> `allow_any_instance_of(Klass).to receive(:message)`
|
758
|
+
it 'adds record `Klass.any_instance.should_receive(:message).any_number_of_times` ' +
|
759
|
+
'-> `allow_any_instance_of(Klass).to receive(:message)`' do
|
769
760
|
should_receive_object.allowize_useless_expectation!
|
770
761
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message).any_number_of_times'
|
771
762
|
record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
|
@@ -798,8 +789,8 @@ module Transpec
|
|
798
789
|
rewritten_source.should == expected_source
|
799
790
|
end
|
800
791
|
|
801
|
-
it 'adds record
|
802
|
-
'-> `allow_any_instance_of(Klass).to receive(:message)`
|
792
|
+
it 'adds record `Klass.any_instance.should_receive(:message).any_number_of_times` ' +
|
793
|
+
'-> `allow_any_instance_of(Klass).to receive(:message)`' do
|
803
794
|
should_receive_object.allowize_useless_expectation!
|
804
795
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message).any_number_of_times'
|
805
796
|
record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
|
@@ -833,7 +824,7 @@ module Transpec
|
|
833
824
|
end
|
834
825
|
|
835
826
|
it 'adds record ' +
|
836
|
-
'
|
827
|
+
'`obj.should_receive(:message).at_least(0)` -> `allow(obj).to receive(:message)`' do
|
837
828
|
should_receive_object.allowize_useless_expectation!
|
838
829
|
record.original_syntax.should == 'obj.should_receive(:message).at_least(0)'
|
839
830
|
record.converted_syntax.should == 'allow(obj).to receive(:message)'
|
@@ -866,8 +857,8 @@ module Transpec
|
|
866
857
|
rewritten_source.should == expected_source
|
867
858
|
end
|
868
859
|
|
869
|
-
it 'adds record
|
870
|
-
'-> `allow_any_instance_of(Klass).to receive(:message)`
|
860
|
+
it 'adds record `Klass.any_instance.should_receive(:message).at_least(0)` ' +
|
861
|
+
'-> `allow_any_instance_of(Klass).to receive(:message)`' do
|
871
862
|
should_receive_object.allowize_useless_expectation!
|
872
863
|
record.original_syntax.should == 'Klass.any_instance.should_receive(:message).at_least(0)'
|
873
864
|
record.converted_syntax.should == 'allow_any_instance_of(Klass).to receive(:message)'
|
@@ -923,7 +914,7 @@ module Transpec
|
|
923
914
|
end
|
924
915
|
|
925
916
|
it 'adds record ' +
|
926
|
-
'
|
917
|
+
'`obj.should_receive(:message).any_number_of_times` -> `obj.stub(:message)`' do
|
927
918
|
record.original_syntax.should == 'obj.should_receive(:message).any_number_of_times'
|
928
919
|
record.converted_syntax.should == 'obj.stub(:message)'
|
929
920
|
end
|
@@ -7,7 +7,7 @@ module Transpec
|
|
7
7
|
class Syntax
|
8
8
|
describe Should do
|
9
9
|
include_context 'parsed objects'
|
10
|
-
include_context '
|
10
|
+
include_context 'syntax object', Should, :should_object
|
11
11
|
|
12
12
|
let(:record) { should_object.report.records.first }
|
13
13
|
|
@@ -179,19 +179,21 @@ module Transpec
|
|
179
179
|
end
|
180
180
|
|
181
181
|
describe '#expectize!' do
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
182
|
+
context 'when it has an operator matcher' do
|
183
|
+
let(:source) do
|
184
|
+
<<-END
|
185
|
+
describe 'example' do
|
186
|
+
it 'is 1' do
|
187
|
+
subject.should == 1
|
188
|
+
end
|
187
189
|
end
|
188
|
-
|
189
|
-
|
190
|
-
end
|
190
|
+
END
|
191
|
+
end
|
191
192
|
|
192
|
-
|
193
|
-
|
194
|
-
|
193
|
+
it 'invokes OperatorMatcher#convert_operator!' do
|
194
|
+
should_object.operator_matcher.should_receive(:convert_operator!)
|
195
|
+
should_object.expectize!
|
196
|
+
end
|
195
197
|
end
|
196
198
|
|
197
199
|
context 'when it is `subject.should` form' do
|
@@ -220,7 +222,7 @@ module Transpec
|
|
220
222
|
rewritten_source.should == expected_source
|
221
223
|
end
|
222
224
|
|
223
|
-
it 'adds record
|
225
|
+
it 'adds record `obj.should` -> `expect(obj).to`' do
|
224
226
|
should_object.expectize!
|
225
227
|
record.original_syntax.should == 'obj.should'
|
226
228
|
record.converted_syntax.should == 'expect(obj).to'
|
@@ -351,7 +353,7 @@ module Transpec
|
|
351
353
|
rewritten_source.should == expected_source
|
352
354
|
end
|
353
355
|
|
354
|
-
it 'adds record
|
356
|
+
it 'adds record `obj.should_not` -> `expect(obj).not_to`' do
|
355
357
|
should_object.expectize!
|
356
358
|
record.original_syntax.should == 'obj.should_not'
|
357
359
|
record.converted_syntax.should == 'expect(obj).not_to'
|
@@ -373,7 +375,7 @@ module Transpec
|
|
373
375
|
rewritten_source.should == expected_source
|
374
376
|
end
|
375
377
|
|
376
|
-
it 'adds record
|
378
|
+
it 'adds record `obj.should_not` -> `expect(obj).to_not`' do
|
377
379
|
should_object.expectize!('to_not')
|
378
380
|
record.original_syntax.should == 'obj.should_not'
|
379
381
|
record.converted_syntax.should == 'expect(obj).to_not'
|
@@ -467,7 +469,7 @@ module Transpec
|
|
467
469
|
rewritten_source.should == expected_source
|
468
470
|
end
|
469
471
|
|
470
|
-
it 'adds record
|
472
|
+
it 'adds record `lambda { }.should` -> `expect { }.to`' do
|
471
473
|
should_object.expectize!
|
472
474
|
record.original_syntax.should == 'lambda { }.should'
|
473
475
|
record.converted_syntax.should == 'expect { }.to'
|
data/spec/transpec/util_spec.rb
CHANGED
@@ -49,5 +49,35 @@ module Transpec
|
|
49
49
|
it { should be_false }
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
describe '#expand_range_to_adjacent_whitespaces' do
|
54
|
+
let(:node) { ast.each_node.find { |n| n.type == :block } }
|
55
|
+
let(:range) { node.loc.begin }
|
56
|
+
subject(:expanded_range) { Util.expand_range_to_adjacent_whitespaces(range) }
|
57
|
+
|
58
|
+
context 'when the range is adjacent to whitespaces' do
|
59
|
+
let(:source) do
|
60
|
+
<<-END
|
61
|
+
1.times { \t do_something }
|
62
|
+
END
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'returns expanded range that contains adjacent whitespaces' do
|
66
|
+
expanded_range.source.should == " { \t "
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context 'when the range is not adjacent to whitespaces' do
|
71
|
+
let(:source) do
|
72
|
+
<<-'END'
|
73
|
+
1.times{do_something }
|
74
|
+
END
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'returns un-expanded range' do
|
78
|
+
expanded_range.source.should == '{'
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
52
82
|
end
|
53
83
|
end
|
data/transpec.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = Transpec::Version.to_s
|
10
10
|
spec.authors = ['Yuji Nakayama']
|
11
11
|
spec.email = ['nkymyj@gmail.com']
|
12
|
-
spec.summary = '
|
13
|
-
spec.description = 'Transpec converts your specs
|
12
|
+
spec.summary = 'An RSpec syntax converter'
|
13
|
+
spec.description = 'Transpec converts your specs to the latest RSpec syntax ' +
|
14
14
|
'with static and dynamic code analysis.'
|
15
15
|
spec.homepage = 'https://github.com/yujinakayama/transpec'
|
16
16
|
spec.license = 'MIT'
|
@@ -20,11 +20,13 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
21
|
spec.require_paths = ['lib']
|
22
22
|
|
23
|
-
spec.add_runtime_dependency 'parser',
|
24
|
-
spec.add_runtime_dependency '
|
25
|
-
spec.add_runtime_dependency '
|
26
|
-
spec.add_runtime_dependency '
|
23
|
+
spec.add_runtime_dependency 'parser', '~> 2.0'
|
24
|
+
spec.add_runtime_dependency 'bundler', '~> 1.3'
|
25
|
+
spec.add_runtime_dependency 'rainbow', '~> 1.1'
|
26
|
+
spec.add_runtime_dependency 'json', '~> 1.8'
|
27
|
+
spec.add_runtime_dependency 'activesupport', '~> 4.0'
|
27
28
|
|
29
|
+
spec.add_development_dependency 'rspec', '~> 2.14'
|
28
30
|
spec.add_development_dependency 'rake', '~> 10.1'
|
29
31
|
spec.add_development_dependency 'simplecov', '~> 0.7'
|
30
32
|
spec.add_development_dependency 'rubocop', '~> 0.10'
|
@@ -32,5 +34,4 @@ Gem::Specification.new do |spec|
|
|
32
34
|
spec.add_development_dependency 'guard-rubocop', '~> 1.0'
|
33
35
|
spec.add_development_dependency 'guard-shell', '~> 0.5'
|
34
36
|
spec.add_development_dependency 'ruby_gntp', '~> 0.3'
|
35
|
-
spec.add_development_dependency 'activesupport', '~> 4.0'
|
36
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transpec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuji Nakayama
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -25,47 +25,75 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.3'
|
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: '
|
40
|
+
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rainbow
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.8'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: activesupport
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2.14'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2.14'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,22 +192,8 @@ dependencies:
|
|
164
192
|
- - ~>
|
165
193
|
- !ruby/object:Gem::Version
|
166
194
|
version: '0.3'
|
167
|
-
|
168
|
-
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ~>
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '4.0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ~>
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '4.0'
|
181
|
-
description: Transpec converts your specs into the latest RSpec syntax with static
|
182
|
-
and dynamic code analysis.
|
195
|
+
description: Transpec converts your specs to the latest RSpec syntax with static and
|
196
|
+
dynamic code analysis.
|
183
197
|
email:
|
184
198
|
- nkymyj@gmail.com
|
185
199
|
executables:
|
@@ -221,6 +235,7 @@ files:
|
|
221
235
|
- lib/transpec/syntax/be_boolean.rb
|
222
236
|
- lib/transpec/syntax/be_close.rb
|
223
237
|
- lib/transpec/syntax/double.rb
|
238
|
+
- lib/transpec/syntax/example.rb
|
224
239
|
- lib/transpec/syntax/expect.rb
|
225
240
|
- lib/transpec/syntax/have.rb
|
226
241
|
- lib/transpec/syntax/its.rb
|
@@ -231,6 +246,8 @@ files:
|
|
231
246
|
- lib/transpec/syntax/mixin/have_matcher.rb
|
232
247
|
- lib/transpec/syntax/mixin/monkey_patch.rb
|
233
248
|
- lib/transpec/syntax/mixin/send.rb
|
249
|
+
- lib/transpec/syntax/mixin/should_base.rb
|
250
|
+
- lib/transpec/syntax/oneliner_should.rb
|
234
251
|
- lib/transpec/syntax/operator_matcher.rb
|
235
252
|
- lib/transpec/syntax/raise_error.rb
|
236
253
|
- lib/transpec/syntax/rspec_configure.rb
|
@@ -261,10 +278,12 @@ files:
|
|
261
278
|
- spec/transpec/syntax/be_boolean_spec.rb
|
262
279
|
- spec/transpec/syntax/be_close_spec.rb
|
263
280
|
- spec/transpec/syntax/double_spec.rb
|
281
|
+
- spec/transpec/syntax/example_spec.rb
|
264
282
|
- spec/transpec/syntax/expect_spec.rb
|
265
283
|
- spec/transpec/syntax/have_spec.rb
|
266
284
|
- spec/transpec/syntax/its_spec.rb
|
267
285
|
- spec/transpec/syntax/method_stub_spec.rb
|
286
|
+
- spec/transpec/syntax/oneliner_should_spec.rb
|
268
287
|
- spec/transpec/syntax/operator_matcher_spec.rb
|
269
288
|
- spec/transpec/syntax/raise_error_spec.rb
|
270
289
|
- spec/transpec/syntax/rspec_configure_spec.rb
|
@@ -302,7 +321,7 @@ rubyforge_project:
|
|
302
321
|
rubygems_version: 2.0.3
|
303
322
|
signing_key:
|
304
323
|
specification_version: 4
|
305
|
-
summary:
|
324
|
+
summary: An RSpec syntax converter
|
306
325
|
test_files:
|
307
326
|
- spec/.rubocop.yml
|
308
327
|
- spec/spec_helper.rb
|
@@ -327,10 +346,12 @@ test_files:
|
|
327
346
|
- spec/transpec/syntax/be_boolean_spec.rb
|
328
347
|
- spec/transpec/syntax/be_close_spec.rb
|
329
348
|
- spec/transpec/syntax/double_spec.rb
|
349
|
+
- spec/transpec/syntax/example_spec.rb
|
330
350
|
- spec/transpec/syntax/expect_spec.rb
|
331
351
|
- spec/transpec/syntax/have_spec.rb
|
332
352
|
- spec/transpec/syntax/its_spec.rb
|
333
353
|
- spec/transpec/syntax/method_stub_spec.rb
|
354
|
+
- spec/transpec/syntax/oneliner_should_spec.rb
|
334
355
|
- spec/transpec/syntax/operator_matcher_spec.rb
|
335
356
|
- spec/transpec/syntax/raise_error_spec.rb
|
336
357
|
- spec/transpec/syntax/rspec_configure_spec.rb
|