expressir 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3fd063ff8bda58c8b99abd22ca3a4d8d8846d06f7f371f87c627cad46a855bb6
4
- data.tar.gz: ce6a2989af582ba1836937c6a04795166ac2398376fa811f225dfd60fb98c386
3
+ metadata.gz: 90636f5b51e37945b5d09af405067c5ef6112b0a102c44b635c090fd131b6079
4
+ data.tar.gz: dcf949e38b11c0924f155bb5148a9de6aa56fd36462fc661fab7a281c98a06dd
5
5
  SHA512:
6
- metadata.gz: d293a8eedf84ddbfa53fa6232f09d11a1bdf9fe3d5ea3e330c3f5e8d31a1b4bb64d893f11166c2e211a4748ddf94d91d018c1cb14c70763dd3514ed33ba0fe75
7
- data.tar.gz: 4ce13703d746e26dedac16efe9f7d9e4283c570d8a20e4deda770a6896257c36e4acaa0c58be440d5fd0809acc4f5450e6697bfcdbd61808a8abf7e2564ee47f
6
+ metadata.gz: 7d5a3c69aa4993f017492d0af109bcf28edfa50e4a7456b420d5147640ef02b5cd1622b4c3a44460471b409bd13d65cefae73161233b05f59c31451bd8a33e2d
7
+ data.tar.gz: d60a953be1fe08916538bb83a6eb0d45c29cf8b008342c821c4d735821a04e03831edbd7c6d9a669fa44e9c7779d31176c39b87c3977d58a643a8ee30240a39c
@@ -34,6 +34,8 @@ module Expressir
34
34
  visitor = Visitor.new(parser.tokens)
35
35
  repo = visitor.visit(parse_tree)
36
36
 
37
+ repo.schemas.each{|schema| schema.file = file}
38
+
37
39
  repo
38
40
  end
39
41
 
@@ -1,6 +1,8 @@
1
1
  module Expressir
2
2
  module Model
3
3
  class Schema < ModelElement
4
+ attr_accessor :file
5
+
4
6
  include Identifier
5
7
 
6
8
  attr_accessor :head_source
@@ -16,6 +18,8 @@ module Expressir
16
18
  attr_accessor :rules
17
19
 
18
20
  def initialize(options = {})
21
+ @file = options[:file]
22
+
19
23
  @id = options[:id]
20
24
  @remarks = options.fetch(:remarks, [])
21
25
  @source = options[:source]
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "0.2.13".freeze
2
+ VERSION = "0.2.14".freeze
3
3
  end
@@ -8,10 +8,15 @@ RSpec.describe Expressir::ExpressExp::Parser do
8
8
 
9
9
  schemas = repo.schemas
10
10
  expect(schemas.count).to eq(5)
11
+ expect(schemas[0].file).to eq(sample_files[0])
11
12
  expect(schemas[0].id).to eq("syntax_schema")
13
+ expect(schemas[1].file).to eq(sample_files[1])
12
14
  expect(schemas[1].id).to eq("remark_schema")
15
+ expect(schemas[2].file).to eq(sample_files[2])
13
16
  expect(schemas[2].id).to eq("entity_schema")
17
+ expect(schemas[3].file).to eq(sample_files[2])
14
18
  expect(schemas[3].id).to eq("version_entity_schema")
19
+ expect(schemas[4].file).to eq(sample_files[2])
15
20
  expect(schemas[4].id).to eq("version_interface_entity_schema")
16
21
  end
17
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-25 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri