format_engine 0.7.8 → 0.7.9
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 +4 -4
- data/format_engine.gemspec +2 -3
- data/lib/format_engine/version.rb +1 -1
- data/tests/engine_base_tests.rb +0 -4
- data/tests/format_engine_tests.rb +0 -4
- data/tests/format_spec_tests.rb +0 -4
- data/tests/formatter_engine_tests.rb +0 -4
- data/tests/literal_spec_tests.rb +0 -4
- data/tests/parser_engine_tests.rb +0 -4
- data/tests/rgx_spec_tests.rb +0 -4
- data/tests/scan_tests.rb +0 -5
- data/tests/set_spec_tests.rb +0 -4
- data/tests/variable_spec_tests.rb +0 -4
- metadata +5 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f8fcff56146259707ee590da970b5c301364c14
|
|
4
|
+
data.tar.gz: b1f316e223a4db46d18cf3829d14c03b5cdad98f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ca366e6c16d81c1ec66a4993fce4242badfd8fbc05a76bd5cb5b5b84a006e649797013e83bf5f851900503018794a950fa8cac4da6901a61a3ed1ca3e45bd05
|
|
7
|
+
data.tar.gz: 6dcfe3d7ac48222cdd7a28dff02a89c73bcc04d6d0c7c2b3dbbffa1b00512195477f95acf40e44c171a2b68ec168f16fc72c3e1bd9e370d5cdbdf1600b472cf4
|
data/format_engine.gemspec
CHANGED
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = FormatEngine::VERSION
|
|
9
9
|
spec.authors = ["Peter Camilleri"]
|
|
10
10
|
spec.email = ["peter.c.camilleri@gmail.com"]
|
|
11
|
-
spec.summary = %q{
|
|
12
|
-
spec.description = %q{
|
|
11
|
+
spec.summary = %q{A meta-engine for creating string formatters and parsers.}
|
|
12
|
+
spec.description = %q{A meta-engine for creating string formatters and parsers like the strftime and strptime methods.}
|
|
13
13
|
spec.homepage = "https://github.com/PeterCamilleri/format_engine"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
@@ -24,7 +24,6 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.add_development_dependency "rake", ">= 12.3.3"
|
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
|
26
26
|
spec.add_development_dependency 'minitest', "~> 5.7"
|
|
27
|
-
spec.add_development_dependency 'minitest_visible', "~> 0.1"
|
|
28
27
|
spec.add_development_dependency 'rdoc', "~> 5.0"
|
|
29
28
|
|
|
30
29
|
end
|
data/tests/engine_base_tests.rb
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
class EngineBaseTester < Minitest::Test
|
|
7
6
|
|
|
8
|
-
#Track mini-test progress.
|
|
9
|
-
include MinitestVisible
|
|
10
|
-
|
|
11
7
|
def test_that_it_has_a_library
|
|
12
8
|
test = FormatEngine::Engine.new({"%A" => 42})
|
|
13
9
|
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
require_relative '../mocks/demo'
|
|
7
6
|
|
|
8
7
|
# A full test of the formatter/parser engine.
|
|
9
8
|
class FormatEngineTester < Minitest::Test
|
|
10
9
|
|
|
11
|
-
#Track mini-test progress.
|
|
12
|
-
include MinitestVisible
|
|
13
|
-
|
|
14
10
|
def test_that_engines_are_returned
|
|
15
11
|
assert_equal(FormatEngine::Engine, Customer.formatter_engine.class)
|
|
16
12
|
assert_equal(FormatEngine::Engine, Customer.parser_engine.class)
|
data/tests/format_spec_tests.rb
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
class FormatSpecTester < Minitest::Test
|
|
7
6
|
|
|
8
|
-
#Track mini-test progress.
|
|
9
|
-
include MinitestVisible
|
|
10
|
-
|
|
11
7
|
def test_that_it_scans_literal_formats
|
|
12
8
|
test = FormatEngine::FormatSpec.new "ABCDEFG!"
|
|
13
9
|
assert_equal(Array, test.specs.class)
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
require_relative '../mocks/test_person_mock'
|
|
7
6
|
|
|
8
7
|
# Test the internals of the formatter engine. This is not the normal interface.
|
|
9
8
|
class FormatterTester < Minitest::Test
|
|
10
9
|
|
|
11
|
-
#Track mini-test progress.
|
|
12
|
-
include MinitestVisible
|
|
13
|
-
|
|
14
10
|
def make_formatter
|
|
15
11
|
FormatEngine::Engine.new(
|
|
16
12
|
"%a" => lambda {cat "%#{fmt.width_str}d" % src.age},
|
data/tests/literal_spec_tests.rb
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
class LiteralSpecTester < Minitest::Test
|
|
7
6
|
|
|
8
|
-
#Track mini-test progress.
|
|
9
|
-
include MinitestVisible
|
|
10
|
-
|
|
11
7
|
def test_that_it_formats
|
|
12
8
|
spec_info = FormatEngine::SpecInfo.new(nil, "", nil)
|
|
13
9
|
test = FormatEngine::FormatLiteral.new("Test 1 2 3")
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
require_relative '../mocks/test_person_mock'
|
|
7
6
|
|
|
8
7
|
# Test the internals of the parser engine. This is not the normal interface.
|
|
9
8
|
class ParserTester < Minitest::Test
|
|
10
9
|
|
|
11
|
-
#Track mini-test progress.
|
|
12
|
-
include MinitestVisible
|
|
13
|
-
|
|
14
10
|
def make_parser
|
|
15
11
|
FormatEngine::Engine.new(
|
|
16
12
|
"%a" => lambda { tmp[:age] = found.to_i if parse(/\d+/) },
|
data/tests/rgx_spec_tests.rb
CHANGED
|
@@ -3,13 +3,9 @@
|
|
|
3
3
|
require_relative '../lib/format_engine'
|
|
4
4
|
gem 'minitest'
|
|
5
5
|
require 'minitest/autorun'
|
|
6
|
-
require 'minitest_visible'
|
|
7
6
|
|
|
8
7
|
class RgxSpecTester < Minitest::Test
|
|
9
8
|
|
|
10
|
-
#Track mini-test progress.
|
|
11
|
-
include MinitestVisible
|
|
12
|
-
|
|
13
9
|
def test_the_parms
|
|
14
10
|
test = FormatEngine::FormatRgx.new("%/ABC/")
|
|
15
11
|
assert_equal(0, test.width)
|
data/tests/scan_tests.rb
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
|
-
|
|
6
4
|
|
|
7
5
|
# Test the internals of the parser engine. This is not the normal interface.
|
|
8
6
|
class ScanTester < Minitest::Test
|
|
9
7
|
|
|
10
|
-
#Track mini-test progress.
|
|
11
|
-
include MinitestVisible
|
|
12
|
-
|
|
13
8
|
DECIMAL = /[+-]?\d+/
|
|
14
9
|
HEX = /[+-]?(0[xX])?\h+/
|
|
15
10
|
OCTAL = /[+-]?(0[oO])?[0-7]+/
|
data/tests/set_spec_tests.rb
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
class SetSpecTester < Minitest::Test
|
|
7
6
|
|
|
8
|
-
#Track mini-test progress.
|
|
9
|
-
include MinitestVisible
|
|
10
|
-
|
|
11
7
|
def test_the_parms
|
|
12
8
|
test = FormatEngine::FormatSet.new("%[ABC]")
|
|
13
9
|
assert_equal(0, test.width)
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
require_relative '../lib/format_engine'
|
|
2
2
|
gem 'minitest'
|
|
3
3
|
require 'minitest/autorun'
|
|
4
|
-
require 'minitest_visible'
|
|
5
4
|
|
|
6
5
|
class VariableSpecTester < Minitest::Test
|
|
7
6
|
|
|
8
|
-
#Track mini-test progress.
|
|
9
|
-
include MinitestVisible
|
|
10
|
-
|
|
11
7
|
def test_the_parms
|
|
12
8
|
test = FormatEngine::FormatVariable.new("%B")
|
|
13
9
|
refute(test.has_width?)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: format_engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Peter Camilleri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-03-
|
|
11
|
+
date: 2020-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -52,20 +52,6 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '5.7'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: minitest_visible
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.1'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - "~>"
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0.1'
|
|
69
55
|
- !ruby/object:Gem::Dependency
|
|
70
56
|
name: rdoc
|
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,8 +66,8 @@ dependencies:
|
|
|
80
66
|
- - "~>"
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
68
|
version: '5.0'
|
|
83
|
-
description:
|
|
84
|
-
methods.
|
|
69
|
+
description: A meta-engine for creating string formatters and parsers like the strftime
|
|
70
|
+
and strptime methods.
|
|
85
71
|
email:
|
|
86
72
|
- peter.c.camilleri@gmail.com
|
|
87
73
|
executables: []
|
|
@@ -149,5 +135,5 @@ rubyforge_project:
|
|
|
149
135
|
rubygems_version: 2.5.2
|
|
150
136
|
signing_key:
|
|
151
137
|
specification_version: 4
|
|
152
|
-
summary:
|
|
138
|
+
summary: A meta-engine for creating string formatters and parsers.
|
|
153
139
|
test_files: []
|