sdltm_importer 0.1.0 → 0.2.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
  SHA1:
3
- metadata.gz: 7718a812dafcc0bcd536981d537d0e2399772d3f
4
- data.tar.gz: 3c794c070302a2f8584a0f8f057b204e73eccec6
3
+ metadata.gz: 5d080567f5974f3da6d43c1a5e37e83189959302
4
+ data.tar.gz: bbe88864aa94cae644eb217725bf27d25b70a139
5
5
  SHA512:
6
- metadata.gz: d3d8d68a8af176e447094c6dbe274fa5fd97226cd17672886f5167248f942bdcf18bf98b225a4b29b945e0fae294cc338c97d9b3549b019e294744b0fd0d8836
7
- data.tar.gz: 30c885b5125333beff959f419bc4db15a33a88eaa80c57eaad39c1c66b4dd2faef76997e40de28c0327f742e4daf14dcc02766e1af6aa04a3d43d8eb98d1ed9a
6
+ metadata.gz: af1bc11feecdd54c8ca7d4d29591dad5dc0fd5bbc51b1e571bc95a83b4dd6d3dc9cbe5f3cb29bc2c961bae96f9e16bd4e7b2d8d3d0fc0c60655cb676d70b3c71
7
+ data.tar.gz: 8c0df97471e1dd9b89a2f66d9ab9af804a93fda3133598dfe088e0eab2988151609df93722998adc0cb4bb144259b412f069bc4444f736cf81c16eb5a196aecc
@@ -1,3 +1,3 @@
1
1
  module SdltmImporter
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -62,7 +62,7 @@ module SdltmImporter
62
62
  [4, 6].each do |i|
63
63
  language = segment[i].scan(TUV_LANG_REGEX).flatten[0]
64
64
  tags = create_tags(segment[i].scan(TUV_TAGS_REGEX), segment, i)
65
- segment_text = PrettyStrings::Cleaner.new(parse_segment_text(segment, tags, i)).pretty
65
+ segment_text = PrettyStrings::Cleaner.new(parse_segment_text(segment, tags, i)).pretty.gsub("\\","\").gsub("'",%q(\\\'))
66
66
  word_count = segment_text.gsub("\s+", ' ').split(' ').length
67
67
  if i.eql?(4)
68
68
  @doc[:source_language] = language
@@ -35,7 +35,7 @@ describe SdltmImporter do
35
35
  it 'imports a .sdltm file 3' do
36
36
  file_path = File.expand_path('../sdltm_importer/spec/sample_test_files/sample.sdltm')
37
37
  sdltm = SdltmImporter::Sdltm.new(file_path: file_path)
38
- expect(sdltm.import[1][-1][4]).to eq("Your website's URL")
38
+ expect(sdltm.import[1][-1][4]).to eq("Your website\\'s URL")
39
39
  end
40
40
 
41
41
  it 'imports a .sdltm file 4' do
@@ -61,5 +61,11 @@ describe SdltmImporter do
61
61
  sdltm = SdltmImporter::Sdltm.new(file_path: file_path)
62
62
  expect(sdltm.import[0][1][0]).to eq(sdltm.import[1][3][0])
63
63
  end
64
+
65
+ it 'imports a .sdltm file 7' do
66
+ file_path = File.expand_path('../sdltm_importer/spec/sample_test_files/sample.sdltm')
67
+ sdltm = SdltmImporter::Sdltm.new(file_path: file_path)
68
+ expect(sdltm.import[0][1][0]).to eq(sdltm.import[1][3][0])
69
+ end
64
70
  end
65
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdltm_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias