sterile 1.0.23 → 1.0.24

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: 82975c959e59df1cb9411de684259be5470d4653b811a9bc0569c63bc5c7a3eb
4
- data.tar.gz: cac8194311cb05acad5e0209adefb414befa6236c5545d61fc7eca9eb1899763
3
+ metadata.gz: 6609d623434f38f1a8c5fc7955679b834150bfc370855be55bcc74767bed32a6
4
+ data.tar.gz: eb41eeb0a06250a0113eb92f8b49568db1a52c57e9f125a0105b279d3c50ccb6
5
5
  SHA512:
6
- metadata.gz: ed54878488af252a7e6d8db8bea711c2b18877e24830c49c487de9eb89cd9d8527eaf4550f3037f771ad997e68ab1a24713c071d8607bd59c8180b74a9248800
7
- data.tar.gz: 79df903d40aef3a6b2207a7ed988fa128de361077fa345659d4b867a80a981a4553c19e6c26bd57a1be0a844357e9ef295022f773eade617c1a23d842dbab277
6
+ metadata.gz: 8002656ad9b4b7006ee57fe64e69c0cd71995dfe764f7ac6a12ae2f1d5d0a8f3244245b6ec80d46307d5f007e1aa8cf5269102433490fb326271b11d566da4a2
7
+ data.tar.gz: 4b0748aaa375dc18f7150818feb90d81b591ed93cc13b93df05cc3bcdf4074683df240d4ef35de3963bf3a1b7908c5242517519b920ee5311e681c45ac6abd03
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.5.9" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/sterile.iml" filepath="$PROJECT_DIR$/.idea/sterile.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/sterile.iml ADDED
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="inheritedJdk" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ </component>
15
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
data/Gemfile CHANGED
@@ -2,6 +2,6 @@ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  group :development, :test do
5
- gem 'minitest'
6
- gem 'rake'
5
+ gem "minitest"
6
+ gem "rake"
7
7
  end
data/Gemfile.lock CHANGED
@@ -1,22 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sterile (1.0.22)
4
+ sterile (1.0.24)
5
5
  nokogiri (>= 1.11.7)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- mini_portile2 (2.5.3)
11
- minitest (5.14.4)
12
- nokogiri (1.11.7)
13
- mini_portile2 (~> 2.5.0)
10
+ minitest (5.18.0)
11
+ nokogiri (1.14.3-arm64-darwin)
14
12
  racc (~> 1.4)
15
- racc (1.5.2)
16
- rake (13.0.3)
13
+ racc (1.6.2)
14
+ rake (13.0.6)
17
15
 
18
16
  PLATFORMS
19
- ruby
17
+ arm64-darwin-22
20
18
 
21
19
  DEPENDENCIES
22
20
  minitest
@@ -24,4 +22,4 @@ DEPENDENCIES
24
22
  sterile!
25
23
 
26
24
  BUNDLED WITH
27
- 2.2.19
25
+ 2.4.6
@@ -39,7 +39,7 @@ module Sterile
39
39
  [/(\s|\A|\(|\[)"(?!\s)/, "\\1“\\2"],
40
40
  [/"(\s|\S|\Z)/, "”\\1"],
41
41
  [/\'([\s.]|\Z)/, "’\\1"],
42
- [/(\d+)x(\d+)/, "\\1×\\2"],
42
+ [/(\b[1-9]\d*|0)x([1-9]\d*|0\b)/, "\\1×\\2"],
43
43
  [/([a-z])'(t|d|s|ll|re|ve)(\b)/i, "\\1’\\2\\3"],
44
44
  ]
45
45
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Sterile
4
- VERSION = "1.0.23"
4
+ VERSION = "1.0.24"
5
5
  end
6
6
 
data/test/test_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
- require 'minitest/autorun'
2
- require 'sterile'
1
+ require "minitest/autorun"
2
+ require "sterile"
data/test/test_sterile.rb CHANGED
@@ -45,6 +45,15 @@ class TestSterile < Minitest::Test
45
45
  assert_equal "“He said, ‘Away, Drake!’”", Sterile.smart_format(s)
46
46
  end
47
47
 
48
+ def test_smart_format_times
49
+ assert_equal "1×1", Sterile.smart_format("1x1")
50
+ assert_equal "0×1", Sterile.smart_format("0x1")
51
+ assert_equal "1×0", Sterile.smart_format("1x0")
52
+ assert_equal "12×21", Sterile.smart_format("12x21")
53
+ assert_equal "01x1", Sterile.smart_format("01x1")
54
+ assert_equal "1x01", Sterile.smart_format("1x01")
55
+ end
56
+
48
57
  def test_smart_format_tags
49
58
  # ?
50
59
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sterile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.23
4
+ version: 1.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Hogan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-10 00:00:00.000000000 Z
11
+ date: 2023-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -34,8 +34,11 @@ extra_rdoc_files: []
34
34
  files:
35
35
  - ".github/workflows/test.yml"
36
36
  - ".gitignore"
37
- - ".ruby-gemset"
38
- - ".ruby-version"
37
+ - ".idea/.gitignore"
38
+ - ".idea/misc.xml"
39
+ - ".idea/modules.xml"
40
+ - ".idea/sterile.iml"
41
+ - ".idea/vcs.xml"
39
42
  - ".yardopts"
40
43
  - Gemfile
41
44
  - Gemfile.lock
@@ -78,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
81
  - !ruby/object:Gem::Version
79
82
  version: '0'
80
83
  requirements: []
81
- rubygems_version: 3.2.6
84
+ rubygems_version: 3.4.6
82
85
  signing_key:
83
86
  specification_version: 4
84
87
  summary: Sterilize your strings! Transliterate, generate slugs, smart format, strip
data/.ruby-gemset DELETED
@@ -1,2 +0,0 @@
1
- sterile
2
-
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.7.2