aranha-parsers 0.3.0 → 0.4.0

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: b5dea73c22dac3845360b773ca5b07d3c122dbc5d108c1e24c9bd778187aedd3
4
- data.tar.gz: 836cae17dea5908018ca41e0a73566bebc35c2df67709b0c8ea2ea3509eaaeb9
3
+ metadata.gz: 0dadc530b038db01e0c406f7b6a63e41a110368248cc161bcf0b3a1868c6d6a5
4
+ data.tar.gz: 7f37a14996bca222758745f0f8ce458b6b9501546f010d013387bd81eebc291f
5
5
  SHA512:
6
- metadata.gz: 199a2471fd78740fa54ef4f31446e8ff7f4ea74ea03d32328a5b9ee56ab99be31db87c217a544d070ce5d743cab3211847d570363d41acbe820169031a6b2715
7
- data.tar.gz: b4a9d90a266fedd2a11d497565d0ac9a10295f8ce87835689d10ab4a71b5c0bae4e2d654afe0089a9dfe190861b0bc77d77f26bcac188b772b05dc491d18b660
6
+ metadata.gz: cbd70b4d4e8bba0613a20532fd32718dc6b45b59ef1d53ce8b779373e9dd9d6b095a14d08bbdc3fb11194df5018e46ff0b661099a00c35aa6bc146e84526d834
7
+ data.tar.gz: d31695d31dbb56f1a2aba09b2b2dc81e28cf1c258a9e9c46334e5c6c0e4df55f0bc61cebd6c695ed5a34753bdb1d3d93786d4ffade6e1e6d841a865e48911885
@@ -36,6 +36,14 @@ module Aranha
36
36
  r
37
37
  end
38
38
 
39
+ def target_files
40
+ r = []
41
+ source_target_files.each do |st|
42
+ r << st.target if st.target
43
+ end
44
+ r
45
+ end
46
+
39
47
  def target_file(basename)
40
48
  fixture_file(basename, 'target')
41
49
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'aranha/parsers/source_target_fixtures'
4
+ require 'yaml'
4
5
 
5
6
  RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable Metrics/BlockLength
6
7
  let(:spec_file) { spec_file }
@@ -9,7 +10,7 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
9
10
  expect(::File.directory?(fixtures_dir)).to be true
10
11
  end
11
12
 
12
- context 'in fixtures directory' do
13
+ context 'with fixtures directory' do
13
14
  it 'has at least one file' do
14
15
  expect(source_target_fixtures.source_target_files.count).to be > 0 # rubocop:disable Style/NumericPredicate
15
16
  end
@@ -28,7 +29,7 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
28
29
  source_target_fixtures.source_target_files.each do |st|
29
30
  assert_source_target_complete(st)
30
31
  sd = source_data(st.source)
31
- td = YAML.load_file(st.target)
32
+ td = target_data(st.target)
32
33
  expect(sort_results(sd)).to eq(sort_results(td))
33
34
  end
34
35
  end
@@ -58,4 +59,8 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
58
59
  def sort_results(results)
59
60
  results
60
61
  end
62
+
63
+ def target_data(target_file)
64
+ ::YAML.load_file(target_file)
65
+ end
61
66
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranha-parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-01 00:00:00.000000000 Z
11
+ date: 2020-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -73,19 +73,19 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.8.3
75
75
  - !ruby/object:Gem::Dependency
76
- name: rspec
76
+ name: eac_ruby_gem_support
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '3.8'
81
+ version: '0.1'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '3.8'
88
+ version: '0.1'
89
89
  description:
90
90
  email:
91
91
  executables: []