aranha-parsers 0.1.0 → 0.1.1

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: 5685f5cd07ae6f7ff6adb9f03c7ebd286a0279f508157706460617feb377937e
4
- data.tar.gz: 3e02eb80a205bd5b26397728d6a680a3ac4bf65afdb9cd45a3e831e75b5193e2
3
+ metadata.gz: 9bd9b607e666c0b3b4ef0a54f1289891d5f958bbc9d72ad8632e4fc75858fef4
4
+ data.tar.gz: a462e661c567337abb7184ae5d1bc8555def424742b351e9bc83e9bad7bb88f3
5
5
  SHA512:
6
- metadata.gz: 468f57861a6182901b9aca6361115ae0e9bbdb192e91f9c10d34b99e4af11338b3f727a17734a70c85493495ddde7f633078560d3f52e0b4677a013fc58cd234
7
- data.tar.gz: 56fafe12e79122cc78dafc92d8bde7721b3f1daad69ca959fc36c58e7c314af326f8cf017516ce102fb3109a1c652c86102a2d37859192849f39b104ba3037e9
6
+ metadata.gz: 85566b737941e252dbdf0f446f926c2cb9421d800c0547f207df3a5350d847bb61e303d9f278b3a8071182291814a64c6213d8f35a575ac93bb793adfeb463d3
7
+ data.tar.gz: 6f969ca1107f35c3aa41e52288d9e41da1b5f8f3a2efd9c13adf151a8d09e07810f8818d6a05e88e2800f02ed1fcaffc051a5bc1a886ec25d1cb373c79b6b507
@@ -1,10 +1,12 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
 
4
+ require 'active_support/core_ext/object'
5
+ require 'active_support/core_ext/string'
4
6
  require 'yaml'
5
7
 
6
8
  module Aranha
7
- module Spec
9
+ module Parsers
8
10
  # Lists pairs of source/target files in a directory.
9
11
  class SourceTargetFixtures
10
12
  class << self
@@ -22,7 +24,8 @@ module Aranha
22
24
 
23
25
  def source_target_files
24
26
  sources_targets_basenames.map do |basename|
25
- OpenStruct.new(source: source_file(basename), target: target_file(basename))
27
+ OpenStruct.new(basename: basename, source: source_file(basename),
28
+ target: target_file(basename))
26
29
  end
27
30
  end
28
31
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'source_target_fixtures'
3
+ require 'aranha/parsers/source_target_fixtures'
4
4
 
5
5
  RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable Metrics/BlockLength
6
6
  let(:spec_file) { spec_file }
@@ -18,7 +18,7 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
18
18
  it 'should write target data for all files' do
19
19
  source_target_fixtures.source_files.each do |source_file|
20
20
  sd = sort_results(source_data(source_file))
21
- basename = ::Aranha::Spec::SourceTargetFixtures.source_target_basename(source_file)
21
+ basename = ::Aranha::Parsers::SourceTargetFixtures.source_target_basename(source_file)
22
22
  target_file = File.expand_path("../#{basename}.target.yaml", source_file)
23
23
  File.write(target_file, sd.to_yaml)
24
24
  end
@@ -36,7 +36,7 @@ RSpec.shared_examples 'source_target_fixtures' do |spec_file| # rubocop:disable
36
36
  end
37
37
 
38
38
  def source_target_fixtures
39
- @source_target_fixtures ||= ::Aranha::Spec::SourceTargetFixtures.new(fixtures_dir)
39
+ @source_target_fixtures ||= ::Aranha::Parsers::SourceTargetFixtures.new(fixtures_dir)
40
40
  end
41
41
 
42
42
  def assert_source_target_complete(st)
@@ -1,5 +1,5 @@
1
1
  module Aranha
2
2
  module Parsers
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.1.1'.freeze
4
4
  end
5
5
  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.1.0
4
+ version: 0.1.1
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: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -94,7 +94,7 @@ files:
94
94
  - lib/aranha/parsers/source_address/hash_http_get.rb
95
95
  - lib/aranha/parsers/source_address/hash_http_post.rb
96
96
  - lib/aranha/parsers/source_address/http_get.rb
97
- - lib/aranha/parsers/spec/source_target_fixtures.rb
97
+ - lib/aranha/parsers/source_target_fixtures.rb
98
98
  - lib/aranha/parsers/spec/source_target_fixtures_example.rb
99
99
  - lib/aranha/parsers/version.rb
100
100
  homepage: