axr 0.7.2 → 0.8.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
  SHA256:
3
- metadata.gz: e3de25792f5279b1918dfa22beecb381809df02aa009cf362ae159cf7f334560
4
- data.tar.gz: ce18ec5fa4219904a0f99d899b1c5472f5376e2ba20c8ca37accfd2e874c4e80
3
+ metadata.gz: 1c1451590219c2fdac14e2352ef0a6af39dd388b60cc8caa5c1a86fac06e901a
4
+ data.tar.gz: 54b6490d145aff76491361d3cfa05c892aeb4ada42f743617ebe0598a0e428bc
5
5
  SHA512:
6
- metadata.gz: 212f3cff71975a870ec4957414470dd4651d2bbb817cada0e58f93f21cc167ab20386248688b54b16905ee8dbadb527d6f9ef9d3a4ebbc2d9af365d08fcc947a
7
- data.tar.gz: 3eae71dbfef42ac45e4835e0e8de782898e318307dfc5d23d2d347dcb0153c2357339747c757eb3391d016f4a21efcbedde46bab020c16a71b51e7bcf7ea7837
6
+ metadata.gz: 464f7640c98b92353df69f233210d896a7036a9b0e19a723e3b1480743e93bcfd40cd2c79affb4469eb48a1ffaf485984a95b0f8677c2384a77a30cbfac58468
7
+ data.tar.gz: 878bc7e2300eea09534bae0e33d24e303903a1b7be0479f12207da6e35822cb825460ee595c74a7955e7b507e44094e85357119367c025a92ea4bc7d3c200987
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- axr (0.7.1)
4
+ axr (0.8.0)
5
5
  colorize (~> 0.8.1)
6
6
  thor (~> 0.20)
7
7
 
@@ -21,13 +21,14 @@ module AxR
21
21
 
22
22
  line_detection = AxR.app.layer_names.detect { |layer| line.include?(layer) }
23
23
  line_detection = check_space_before(line, line_detection)
24
- context_detection = AxR.app.layer_names.detect { |layer| line.include?("module #{layer}") }
24
+ line_detection = nil if context && module_definition?(line, line_detection)
25
+ context_detection = AxR.app.layer_names.detect { |layer| module_definition?(line, layer) }
25
26
 
26
- next unless line_detection || context_detection
27
+ next unless context_detection || line_detection
27
28
 
28
29
  detect_context(context_detection, line, loc_num) if context_detection && !context
29
30
  detect_dependency(line_detection, line, loc_num)
30
- detect_warning(line_detection, line, loc_num) if context
31
+ detect_warning(line_detection, line, loc_num) if context && line_detection
31
32
  end
32
33
 
33
34
  self
@@ -66,5 +67,11 @@ module AxR
66
67
 
67
68
  line_detection if line[line.index(line_detection) - 1] == SPACE
68
69
  end
70
+
71
+ MODULE = 'module'
72
+
73
+ def module_definition?(line, layer)
74
+ line.include?("#{MODULE} #{layer}")
75
+ end
69
76
  end
70
77
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AxR
4
- VERSION = '0.7.2'
4
+ VERSION = '0.8.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodya Sveredyuk
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-25 00:00:00.000000000 Z
11
+ date: 2020-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize