xing-root 0.0.6 → 0.0.7
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/xing/edicts/structure-checker.rb +2 -1
- data/lib/xing/utils/import_checker.rb +18 -11
- data/spec/edicts/structure_checker_spec.rb +4 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b7cc39602a768835c8e5cf4dc7cda6884eb6670
|
4
|
+
data.tar.gz: 6738e678f71aa65d087f3e6ed8b0e62dd3c2c7c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d1d4f6ccc0eab2ba8bec3a827b10a8e504b9bd627035757087728106398c37252a3137ba264049d84a6d6b4fe9d55995c72709646efe66ae5f76d370237c267
|
7
|
+
data.tar.gz: 2fb02b3b6dc705b41069ff86e316b4df0bbab05e22729ee41f1da8649cd8a50de331305177de97aefdff2ccaf0923232d131adbafd09a01b6b61574de35f1624
|
@@ -51,7 +51,8 @@ module Xing::Edicts
|
|
51
51
|
problems.each{|prob| out_stream.puts " " + prob.to_s}
|
52
52
|
out_stream.puts
|
53
53
|
end
|
54
|
-
|
54
|
+
out_stream.puts "Problems found in ECMAScript structure"
|
55
|
+
#raise Error, "Problems found in ECMAScript structure"
|
55
56
|
end
|
56
57
|
end
|
57
58
|
|
@@ -13,7 +13,7 @@ module Xing::Utils
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def is_import_line
|
16
|
-
|
16
|
+
/^\s*import/.match(@import_line)
|
17
17
|
end
|
18
18
|
|
19
19
|
def skip_to_end_of_import
|
@@ -34,7 +34,12 @@ module Xing::Utils
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def check_empty_match
|
37
|
-
|
37
|
+
if @md.nil?
|
38
|
+
problem "doesn't seem to have a 'from' clause..."
|
39
|
+
true
|
40
|
+
else
|
41
|
+
false
|
42
|
+
end
|
38
43
|
end
|
39
44
|
|
40
45
|
def check_structure
|
@@ -60,16 +65,18 @@ module Xing::Utils
|
|
60
65
|
end
|
61
66
|
|
62
67
|
def check(&error_block)
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
begin
|
69
|
+
initialize_check(error_block)
|
70
|
+
while @lineno < @lines.length
|
71
|
+
read_next
|
72
|
+
if is_import_line
|
73
|
+
skip_to_end_of_import
|
74
|
+
match_line
|
75
|
+
check_structure if !check_empty_match
|
76
|
+
end
|
77
|
+
@lineno += 1
|
71
78
|
end
|
72
|
-
|
79
|
+
rescue
|
73
80
|
end
|
74
81
|
end
|
75
82
|
end
|
@@ -22,7 +22,9 @@ describe Xing::Edicts::StructureChecker do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should report errors" do
|
25
|
-
|
25
|
+
subject.action
|
26
|
+
#expect{subject.action}.to raise_error(Xing::Edicts::StructureChecker::Error)
|
27
|
+
expect(stdout.string).to match("Problems found in ECMAScript structure")
|
26
28
|
expect(stdout.string).to match(%r{In test-dir/problem.js})
|
27
29
|
expect(stdout.string).to match(%r{'from' includes ../})
|
28
30
|
end
|
@@ -35,6 +37,7 @@ describe Xing::Edicts::StructureChecker do
|
|
35
37
|
|
36
38
|
it "should not report errors" do
|
37
39
|
expect{subject.action}.not_to raise_error
|
40
|
+
expect(stdout.string).to be_empty
|
38
41
|
end
|
39
42
|
end
|
40
43
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xing-root
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Judson Lester
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: edict
|
@@ -99,7 +99,7 @@ rdoc_options:
|
|
99
99
|
- "--main"
|
100
100
|
- doc/README
|
101
101
|
- "--title"
|
102
|
-
- xing-root-0.0.
|
102
|
+
- xing-root-0.0.7 Documentation
|
103
103
|
require_paths:
|
104
104
|
- lib/
|
105
105
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project: xing-root
|
117
|
-
rubygems_version: 2.4.
|
117
|
+
rubygems_version: 2.4.3
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: The Root of all Xing
|