xmp2assert 13 → 14
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/lib/xmp2assert/converter.rb +3 -2
- data/lib/xmp2assert/template.erb +3 -2
- data/lib/xmp2assert/version.rb +1 -1
- data/lib/xmp2assert/xmp2rexp.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65892e6017608a18fa23ea592867ced1341486d5
|
4
|
+
data.tar.gz: 4406ecb00f9f72056c30cd60820fc0c0cfd629d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a82ceac5e13819b380baa4a9039c8b466303e089002ab803cfe9c15f7f49f30772e510fb0e9f00db9fd9ecc8f3955a829664c9f0696315f02cb2dc61c5f2eb26
|
7
|
+
data.tar.gz: 5819e605413a3cbd8fb88abc6731ea8c70460d4f87b14a16297c60bfda1aec3effbae22e6bfac47a53011498a6261a719b2c41fc7484a3ba06237a13a8e1e98e
|
data/lib/xmp2assert/converter.rb
CHANGED
@@ -83,11 +83,12 @@ class XMP2Assert::Converter
|
|
83
83
|
private_constant :Namespace
|
84
84
|
|
85
85
|
def gen_tap tok
|
86
|
-
xmp = tok.to_s.chomp.dump
|
87
86
|
case tok.to_sym
|
88
87
|
when :'~>' then
|
88
|
+
xmp = "#<#{tok.to_s.chomp}>".dump
|
89
89
|
return sprintf " rescue (xmp2assert_assert(%s, $!) and raise)", xmp
|
90
90
|
when :'=>' then
|
91
|
+
xmp = tok.to_s.chomp.dump
|
91
92
|
nam = gensym xmp
|
92
93
|
return sprintf ".tap {|%s| xmp2assert_assert(%s, %s) }", nam, xmp, nam
|
93
94
|
end
|
@@ -368,7 +369,7 @@ class XMP2Assert::Converter
|
|
368
369
|
buf[sym] = tok.to_s << buf[sym]
|
369
370
|
tok.yylex = :comment
|
370
371
|
tok.yylval = "#\n"
|
371
|
-
when :sp, :nl then
|
372
|
+
when :sp, :nl, :comment then
|
372
373
|
next
|
373
374
|
else
|
374
375
|
break
|
data/lib/xmp2assert/template.erb
CHANGED
@@ -59,8 +59,9 @@ rescue Exception => e
|
|
59
59
|
b = e.backtrace
|
60
60
|
b.reject! {|i| i.start_with? __FILE__ }
|
61
61
|
e.set_backtrace b
|
62
|
-
expected = <%= exception.dump
|
63
|
-
xmp2assert_assert expected, e, e.backtrace
|
62
|
+
expected = <%= exception.dump %>.lines #=
|
63
|
+
xmp2assert_assert expected[0], e.class, e.backtrace
|
64
|
+
xmp2assert_assert expected[1].chomp.inspect, e.message, e.backtrace
|
64
65
|
end
|
65
66
|
% else
|
66
67
|
eval src, saved_binding, file, line
|
data/lib/xmp2assert/version.rb
CHANGED
data/lib/xmp2assert/xmp2rexp.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xmp2assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '14'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Urabe, Shyouhei
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|