scripref 1.1.1 → 1.1.2

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: 5799e584189e442c2d2f4c5dbf56ae36e26a461280ac94f656527897d0995dab
4
- data.tar.gz: 68e9ab8f3c1422eb2cc77a1d81e66390711b616b981556af1c9bd1ddf10d82f2
3
+ metadata.gz: 307a7c3809c70de6386b29d42030f15f11500fbbcb4610eda7ce3316a10413d9
4
+ data.tar.gz: bf6c3dbe9bf855fdc9be762e5aca9e356b586276341e1b770506e0ae39aeaf69
5
5
  SHA512:
6
- metadata.gz: db67b8fc06cea9e737b7cbc89b7f0e26fb2c9604da8dbdb7dd871a3ea38c1ce2df6d154cdd7b6c74fd3e3be42ca870c59ff63f36a9f3f320e249f387995f2936
7
- data.tar.gz: 6f65fe7594467f62542022e560f7f873f69dc2b7d0758cc8eca048583d16c59fec351803c9256be26834a52abd6184c2f908e28fd217cea5191364691431bdb4
6
+ metadata.gz: 10045f4c2a5b3faae38ace17eab90c256ad1bfdb01ffea1dafc9bb8b0e58617c38c1eff92d8ab9f06b54efb8cd6b671e417667f6cc68efac5d994988a9561e7e
7
+ data.tar.gz: 6a5eb88141c66149b450ff9eb847475fd5f446050520bb9b7cce2dac99dd3d6a74b4e38a7a815e5a07663673435fe156e6630830e8ae47e6ae030c460d2e3a9b
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 1.1.2
2
+ Fix bug in Formatter with books with only one chapter.
3
+
1
4
  1.1.1
2
5
  Fix Bookname#to_s and add license to gemspec.
3
6
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'scripref/const_reader'
4
+ require_relative 'const_reader'
5
5
 
6
6
  module Scripref
7
7
 
@@ -109,7 +109,12 @@ module Scripref
109
109
  push_sep cv_separator
110
110
  end
111
111
  else
112
- push_space
112
+ case last_token
113
+ when Verse
114
+ push_sep verse_separator
115
+ else
116
+ push_space
117
+ end
113
118
  end
114
119
  push_verse v1
115
120
  @last_v = v1
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'scripref/const_reader'
4
+ require_relative 'const_reader'
5
5
 
6
6
  module Scripref
7
7
 
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'scripref'
4
+ require_relative '../scripref'
5
5
 
6
6
  include Scripref
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: false
3
3
 
4
- require 'scripref/basic_methods'
4
+ require_relative 'basic_methods'
5
5
  require 'strscan'
6
6
 
7
7
  module Scripref
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
+ require_relative 'basic_methods'
4
5
  require 'strscan'
5
- require 'scripref/basic_methods'
6
6
 
7
7
  module Scripref
8
8
 
data/lib/scripref.rb CHANGED
@@ -5,16 +5,16 @@ require 'delegate'
5
5
 
6
6
  module Scripref
7
7
 
8
- VERSION = '1.1.1'
9
-
10
- autoload :Bookname, 'scripref/bookname'
11
- autoload :Bookorder, 'scripref/bookorder'
12
- autoload :English, 'scripref/english'
13
- autoload :Formatter, 'scripref/formatter'
14
- autoload :German, 'scripref/german'
15
- autoload :Parser, 'scripref/parser'
16
- autoload :Passage, 'scripref/passage'
17
- autoload :Processor, 'scripref/processor'
8
+ VERSION = '1.1.2'
9
+
10
+ require_relative 'scripref/bookname'
11
+ require_relative 'scripref/bookorder'
12
+ require_relative 'scripref/english'
13
+ require_relative 'scripref/formatter'
14
+ require_relative 'scripref/german'
15
+ require_relative 'scripref/parser'
16
+ require_relative 'scripref/passage'
17
+ require_relative 'scripref/processor'
18
18
 
19
19
  class Token < DelegateClass(String)
20
20
  def initialize *args
data/regtest/formatter.rb CHANGED
@@ -1,6 +1,9 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
1
4
  require 'ostruct'
2
5
  require 'regtest'
3
- require 'scripref'
6
+ require_relative '../lib/scripref'
4
7
 
5
8
  include Scripref
6
9
 
data/regtest/parser.rb CHANGED
@@ -1,5 +1,8 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
1
4
  require 'regtest'
2
- require 'scripref'
5
+ require_relative '../lib/scripref'
3
6
 
4
7
  include Scripref
5
8
 
data/regtest/processor.rb CHANGED
@@ -1,5 +1,8 @@
1
+ # encoding: utf-8
2
+ # frozen_string_literal: true
3
+
1
4
  require 'regtest'
2
- require 'scripref'
5
+ require_relative '../lib/scripref'
3
6
 
4
7
  include Scripref
5
8
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestBookname < Test::Unit::TestCase
7
7
 
data/test/test_english.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestEnglish < Test::Unit::TestCase
7
7
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestFormatter < Test::Unit::TestCase
7
7
 
@@ -168,6 +168,11 @@ class TestFormatter < Test::Unit::TestCase
168
168
  assert_formated_text_for_ast text, [pass(text: t1, b1: :Ruth, c1: 2, v1: 5, b2: :Ruth, c2: 2, v2: 5), semi, pass(text: t2, b1: :Mark, c1: 4, b2: :Mark, c2: 4)]
169
169
  end
170
170
 
171
+ def test_two_refs_with_book_with_only_one_chapter
172
+ text = 'Obadja 3.5'
173
+ assert_formated_text_for_ast text, [pass(text: text, b1: :Obad, c1: 1, v1: 3, b2: :Obad, c2: 1, v2: 3), pass(b1: :Obad, c1: 1, v1: 5, b2: :Obad, c2: 1, v2: 5)]
174
+ end
175
+
171
176
  ######################################################################
172
177
  # mixed variants of more than one passage
173
178
  ######################################################################
data/test/test_german.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestGerman < Test::Unit::TestCase
7
7
 
data/test/test_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'scripref'
4
+ require_relative '../lib/scripref'
5
5
  require 'test/unit'
6
6
 
7
7
  module Test::Helper
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestIntegration < Test::Unit::TestCase
7
7
 
data/test/test_parser.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestParser < Test::Unit::TestCase
7
7
 
data/test/test_passage.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # encoding: utf-8
2
- require 'test_helper'
3
2
  # frozen_string_literal: true
4
3
 
4
+ require_relative 'test_helper'
5
+
5
6
  class TestPassage < Test::Unit::TestCase
6
7
 
7
8
  include Scripref
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestPipelining < Test::Unit::TestCase
7
7
 
@@ -17,7 +17,7 @@ class TestPipelining < Test::Unit::TestCase
17
17
  end
18
18
 
19
19
  def test_left_to_right
20
- require 'scripref/pipelining'
20
+ require_relative '../lib/scripref/pipelining'
21
21
  text = 'Hebräer 13,8'
22
22
  parser = Parser.new(German)
23
23
  formatter = Formatter.new(English)
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'test_helper'
4
+ require_relative 'test_helper'
5
5
 
6
6
  class TestProcessorIterators < Test::Unit::TestCase
7
7
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scripref
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
- original_platform: ''
7
6
  authors:
8
7
  - Jan Friedrich
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-11-30 00:00:00.000000000 Z
10
+ date: 2025-01-03 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -111,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
110
  - !ruby/object:Gem::Version
112
111
  version: '0'
113
112
  requirements: []
114
- rubygems_version: 3.6.0.dev
113
+ rubygems_version: 3.7.0.dev
115
114
  specification_version: 4
116
115
  summary: Library for parsing scripture references in real texts.
117
116
  test_files: []