improve_typography 0.1.14 → 0.1.15
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/.travis.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/improve_typography.rb +19 -1
- data/lib/improve_typography/base.rb +1 -5
- data/lib/improve_typography/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ea1165943f10faab693c89d09e513b907a36bacef3b4f09fc795fb98954c96f
|
4
|
+
data.tar.gz: ac6232b3c551a3c73fbe4be6ebece5ca61c20b7fb89caaf1686811765a800714
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43073fd8e859bbc068aa315bbd2c238cc1f8392d89c5ca67ae8ed0950012df279ff0ae45b36705fd938b39be390666f5c6c4a49fe5c5b90e9cd210917e6b4a09
|
7
|
+
data.tar.gz: 42baab02ad80e4d974f6e6bb06adad67a81d238553ef66e7f35c4baae96ba03246e31e3da1499cbfe211d95eea80a887145be9892f3b904191e55ae1e7250a37
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/improve_typography.rb
CHANGED
@@ -8,6 +8,24 @@ require 'improve_typography/processor'
|
|
8
8
|
Dir["#{File.dirname(__FILE__)}/improve_typography/processors/**/*.rb"].each { |f| require f }
|
9
9
|
|
10
10
|
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
11
|
-
I18n.load_path += Dir.glob(File.join(
|
11
|
+
I18n.load_path += Dir.glob(File.join(File.dirname(__FILE__), 'config', 'locales', '*.yml'))
|
12
12
|
|
13
13
|
require 'improve_typography/version'
|
14
|
+
|
15
|
+
module ImproveTypography
|
16
|
+
class << self
|
17
|
+
attr_accessor :configuration
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.configuration
|
21
|
+
@configuration ||= Configuration.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.configuration=(config)
|
25
|
+
@configuration = config
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.configure
|
29
|
+
yield configuration
|
30
|
+
end
|
31
|
+
end
|
@@ -30,12 +30,8 @@ module ImproveTypography
|
|
30
30
|
@doc ||= Nokogiri::HTML::DocumentFragment.parse("<div>#{str}</div>")
|
31
31
|
end
|
32
32
|
|
33
|
-
def configuration
|
34
|
-
@configuration ||= Configuration.new
|
35
|
-
end
|
36
|
-
|
37
33
|
def processors
|
38
|
-
options.fetch(:processors, configuration.processors)
|
34
|
+
options.fetch(:processors, ImproveTypography.configuration.processors)
|
39
35
|
end
|
40
36
|
|
41
37
|
def processor_classes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: improve_typography
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -163,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
|
167
|
-
rubygems_version: 2.7.6
|
166
|
+
rubygems_version: 3.0.1
|
168
167
|
signing_key:
|
169
168
|
specification_version: 4
|
170
169
|
summary: Improves typography (quotes, hyphens, etc.) of a given string. Works well
|