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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 224214a3348a5a289b7b64913d28f8a12e77d7c4
4
- data.tar.gz: f632c404e5314285cb9814425b06980ff644dabf
3
+ metadata.gz: 3b7cc39602a768835c8e5cf4dc7cda6884eb6670
4
+ data.tar.gz: 6738e678f71aa65d087f3e6ed8b0e62dd3c2c7c5
5
5
  SHA512:
6
- metadata.gz: b0c21dbafff125764618ff9edf2ed9f6b0fb9056b305658745b4b1fa95b873b6d0218f6a9a4a764ff261a27f0350d3614dfb62af24686bb49e4fb968f141f7a7
7
- data.tar.gz: d0744229a4f6272591e1fed511933cd71463657676a7eb832f0c43222a94a244203b7175fea26b12393da504521104fc60ea56b182f7d23d90f667201ff693df
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
- raise Error, "Problems found in ECMAScript structure"
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
- /\s*import/.match(@import_line)
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
- problem "doesn't seem to have a 'from' clause..." if @md.nil?
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
- initialize_check(error_block)
64
- while @lineno < @lines.length
65
- read_next
66
- if is_import_line
67
- skip_to_end_of_import
68
- match_line
69
- check_empty_match
70
- check_structure
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
- @lineno += 1
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
- expect{subject.action}.to raise_error(Xing::Edicts::StructureChecker::Error)
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.6
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-13 00:00:00.000000000 Z
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.6 Documentation
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.8
117
+ rubygems_version: 2.4.3
118
118
  signing_key:
119
119
  specification_version: 4
120
120
  summary: The Root of all Xing