improve_typography 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f5b3b3bf0752a4501e4412ef570b94d69b527c27
4
+ data.tar.gz: e3bd253d727c4cfc48edc76e97d497a718e095a1
5
+ SHA512:
6
+ metadata.gz: 43cf82d01e7aa50d8eb8abd4c19d3caa3a31739f4762598ae3353d2e10d2bc513b5e39a48f56dc4024b90d76f75e54caeeb937f18f5f7fea9b64a4c0f93d64b3
7
+ data.tar.gz: 52fa0221abc1a9a085c7327de4e6082fa6cc93cbeb1024e8084b9b6293e9410fad6172844e21608927630db862f66e30326665f4eda1daf9d627a88df0ee86bb
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ sudo: false
2
+ language: ruby
3
+ script: 'bundle exec rake'
4
+ rvm:
5
+ - 2.2.5
6
+ before_install:
7
+ - gem install bundler -v 1.12.5
8
+ notifications:
9
+ email:
10
+ recipients:
11
+ - tomas.celizna@gmail.com
12
+ on_failure: change
13
+ on_success: never
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in improve_typography.gemspec
4
+ gemspec
5
+
6
+ gem 'rb-readline'
data/Guardfile ADDED
@@ -0,0 +1,5 @@
1
+ guard :minitest do
2
+ watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
3
+ watch(%r{^test/.+_test\.rb$})
4
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
5
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Tomas Celizna
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # Improve Typography
2
+
3
+ [![Build Status](https://travis-ci.org/tomasc/improve_typography.svg)](https://travis-ci.org/tomasc/improve_typography) [![Gem Version](https://badge.fury.io/rb/improve_typography.svg)](http://badge.fury.io/rb/improve_typography) [![Coverage Status](https://img.shields.io/coveralls/tomasc/improve_typography.svg)](https://coveralls.io/r/tomasc/improve_typography)
4
+
5
+ Improves typography (quotes, hyphens, etc.) of a given string. Works well with I18n.
6
+
7
+ Easy to extend by the way of locale files and processors. **Pull requests are welcome!**
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'improve_typography'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install improve_typography
24
+
25
+ ## Usage
26
+
27
+ ```ruby
28
+ ImproveTypography::Base.call("'so it isn't authorless'") # => "‘so it isn’t authorless’"
29
+ ```
30
+
31
+ Only text inside XHTML tags is corrected (quotes around attributes etc. are preserved).
32
+
33
+ ### Locale
34
+
35
+ The replacements are locale-specific (corresponding to `I18n.locale`), with a fallback to default `:en`.
36
+
37
+ Locale can be also provided locally as:
38
+
39
+ ```ruby
40
+ ImproveTypography::Base.call("'so it isn't authorless'", locale: :cs)
41
+ ```
42
+
43
+ ### Extending locales
44
+
45
+ There are two options how to provide locale-specific replacements:
46
+
47
+ #### Via locale files (preferred)
48
+
49
+ Create or override locale files in your application. See the locale files in the `locales` folder.
50
+
51
+ #### Via custom class
52
+
53
+ For more complex replacements, where the above method is not sufficient, it is possible to create locale-specific classes and override default behavior. For example:
54
+
55
+ ```ruby
56
+ module ImproveTypography
57
+ module Processors
58
+ module CS # locale name in upcase
59
+ class SingleQuotes < Processor
60
+ def call
61
+ # custom behavior
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ ```
68
+
69
+ ### Configuation
70
+
71
+ You can configure applied processors (and their order).
72
+
73
+ #### Globally
74
+
75
+ ```ruby
76
+ ImproveTypography.configure do |config|
77
+ processors = [ImproveTypography::Processors::Ellipsis]
78
+ end
79
+ ```
80
+
81
+ #### Locally
82
+
83
+ ```ruby
84
+ ImproveTypography::Base.call("'so it isn't authorless'", processors: [ImproveTypography::Processors::Ellipsis])
85
+ ```
86
+
87
+ ## Available processors
88
+
89
+ * `Apostrophe`
90
+ * `DoubleQuotes`
91
+ * `Ellipsis`
92
+ * `EmDash`
93
+ * `EnDash`
94
+ * `MultiplySign`
95
+ * `Numbers`
96
+ * `SingleQuotes`
97
+ * `Units`
98
+ * `WordLineSeparator`
99
+
100
+ ## Supported locales
101
+
102
+ * `:en` (Int. English)
103
+ * `:cs` (Czech)
104
+
105
+ ## Resources and inspiration
106
+
107
+ * [SmartyPants](https://michelf.ca/projects/php-smartypants)
108
+ * [Truty](https://github.com/mkj-is/Truty)
109
+ * [Typogruby](https://avdgaag.github.io/typogruby)
110
+
111
+ ## Development
112
+
113
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
114
+
115
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
116
+
117
+ ## Contributing
118
+
119
+ Bug reports and pull requests are welcome on GitHub at https://github.com/tomasc/improve_typography.
120
+
121
+
122
+ ## License
123
+
124
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task default: :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "improve_typography"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'improve_typography/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'improve_typography'
8
+ spec.version = ImproveTypography::VERSION
9
+ spec.authors = ['Tomas Celizna']
10
+ spec.email = ['tomas.celizna@gmail.com']
11
+
12
+ spec.summary = 'Improves typography (quotes, hyphens, etc.) of a given string. Works well with I18n.'
13
+ spec.homepage = 'https://github.com/tomasc/improve_typography'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+
20
+ spec.bindir = 'exe'
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_dependency 'i18n'
25
+ spec.add_dependency 'nokogiri'
26
+
27
+ spec.add_development_dependency 'bundler', '~> 1.12'
28
+ spec.add_development_dependency 'guard'
29
+ spec.add_development_dependency 'guard-minitest'
30
+ spec.add_development_dependency 'minitest', '~> 5.0'
31
+ spec.add_development_dependency 'rake', '~> 10.0'
32
+ end
@@ -0,0 +1,4 @@
1
+ cs:
2
+ improve_typography:
3
+ single_quotes: '‚‘'
4
+ double_quotes: '„“'
@@ -0,0 +1,9 @@
1
+ en:
2
+ improve_typography:
3
+ apostrophe_sign: 'ʼ'
4
+ ellipsis_sign: '…'
5
+ multiply_sign: ' × '
6
+ em_dash_sign: '—'
7
+ en_dash_sign: ' – '
8
+ single_quotes: '‘’'
9
+ double_quotes: '“”'
@@ -0,0 +1,61 @@
1
+ require 'nokogiri'
2
+
3
+ module ImproveTypography
4
+ class Base < Struct.new(:str, :options)
5
+ def self.call(*args)
6
+ new(*args).call
7
+ end
8
+
9
+ def initialize(str, options = {})
10
+ super(str, options)
11
+ end
12
+
13
+ def call
14
+ text_nodes.each do |node|
15
+ processor_classes.each do |processor|
16
+ node.content = processor.call(node.content, options)
17
+ end
18
+ end
19
+
20
+ CGI.unescapeHTML doc.to_html.gsub(/\A<div>/, '').gsub(/<\/\s*div>\z/, '').chomp
21
+ end
22
+
23
+ private # =============================================================
24
+
25
+ def doc
26
+ @doc ||= Nokogiri::HTML::DocumentFragment.parse("<div>#{str}</div>")
27
+ end
28
+
29
+ def text_nodes
30
+ doc.xpath('.//text()')
31
+ end
32
+
33
+ def configuration
34
+ @configuration ||= Configuration.new
35
+ end
36
+
37
+ def processors
38
+ options.fetch(:processors, configuration.processors)
39
+ end
40
+
41
+ def processor_classes
42
+ @processor_classes ||= processors.map do |klass|
43
+ processor_for_locale(klass)
44
+ end
45
+ end
46
+
47
+ def all_processor_classes
48
+ @all_processor_classes ||= ObjectSpace.each_object(Class).select { |klass| klass < Processor }
49
+ end
50
+
51
+ def processor_for_locale(klass)
52
+ name = klass.to_s.split('::').last
53
+ locale_specific_klass = "ImproveTypography::Processors::#{locale.to_s.upcase}::#{name}"
54
+ all_processor_classes.detect { |cls| cls.to_s == locale_specific_klass } || klass
55
+ end
56
+
57
+ def locale
58
+ options.fetch(:locale, I18n.locale)
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,22 @@
1
+ require 'i18n'
2
+
3
+ module ImproveTypography
4
+ class Configuration
5
+ attr_accessor :processors
6
+
7
+ def initialize
8
+ @processors = [
9
+ Processors::WordLineSeparator,
10
+ Processors::Ellipsis,
11
+ Processors::EnDash,
12
+ Processors::EmDash,
13
+ Processors::MultiplySign,
14
+ Processors::Numbers,
15
+ Processors::SingleQuotes,
16
+ Processors::DoubleQuotes,
17
+ Processors::Apostrophe,
18
+ Processors::Units
19
+ ]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ module ImproveTypography
2
+ class Processor < Struct.new(:str, :options)
3
+ def self.call(*args)
4
+ new(*args).call
5
+ end
6
+
7
+ def initialize(str, options = {})
8
+ super(str, options)
9
+ end
10
+
11
+ def call
12
+ str
13
+ end
14
+
15
+ private
16
+
17
+ def configuration
18
+ @configuration ||= Configuration.new
19
+ end
20
+
21
+ def locale
22
+ options.fetch :locale, I18n.locale
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class Apostrophe < Processor
4
+ REGEXP = /(\w+)'(\w*)/i
5
+
6
+ def call
7
+ replace_apostrophe
8
+ end
9
+
10
+ private
11
+
12
+ def replace_apostrophe
13
+ str.gsub(REGEXP, "\\1#{apostrophe_sign}\\2")
14
+ end
15
+
16
+ def apostrophe_sign
17
+ options.fetch(:apostrophe_sign, I18n.t(:apostrophe_sign, scope: %i(improve_typography), locale: locale))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class DoubleQuotes < Processor
4
+ REGEXP = /["](.*)["]/i
5
+
6
+ def call
7
+ replace_double_quotes
8
+ end
9
+
10
+ private
11
+
12
+ def replace_double_quotes
13
+ str.gsub(REGEXP, "#{double_quotes[0]}\\1#{double_quotes[1]}" )
14
+ end
15
+
16
+ def double_quotes
17
+ options.fetch(:double_quotes, I18n.t(:double_quotes, scope: %i(improve_typography), locale: locale))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,19 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class Ellipsis < Processor
4
+ REGEXP = /\.{3,}/i
5
+
6
+ def call
7
+ return str unless ellipsis_sign
8
+
9
+ str.gsub(REGEXP, ellipsis_sign)
10
+ end
11
+
12
+ private
13
+
14
+ def ellipsis_sign
15
+ options.fetch(:ellipsis_sign, I18n.t(:ellipsis_sign, scope: %i(improve_typography), locale: locale))
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class EmDash < Processor
4
+ REGEXP = /(\w+?)\s+-{1,3}\s+(\w+?)/i
5
+
6
+ def call
7
+ str.gsub(REGEXP, '\1'+em_dash_sign+'\2')
8
+ end
9
+
10
+ private
11
+
12
+ def em_dash_sign
13
+ options.fetch(:em_dash_sign, I18n.t(:em_dash_sign, scope: %i(improve_typography), locale: locale))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class EnDash < Processor
4
+ REGEXP = /(\w+?)\s+-{1,2}\s+(\w+?)/i
5
+
6
+ def call
7
+ str.gsub(REGEXP, '\1'+en_dash_sign+'\2')
8
+ end
9
+
10
+ private
11
+
12
+ def en_dash_sign
13
+ options.fetch(:en_dash_sign, I18n.t(:en_dash_sign, scope: %i(improve_typography), locale: locale))
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class MultiplySign < Processor
4
+ REGEXP = /(\d+)(\s*)x(\s*)(\d+)/i
5
+
6
+ def call
7
+ return str unless multiply_sign
8
+
9
+ str.gsub(REGEXP, '\1'+multiply_sign+'\4')
10
+ end
11
+
12
+ private
13
+
14
+ def multiply_sign
15
+ options.fetch(:multiply_sign, I18n.t(:multiply_sign, scope: %i(improve_typography), locale: locale))
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,6 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class Numbers < Processor
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,21 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class SingleQuotes < Processor
4
+ REGEXP = /['](.*)[']/i
5
+
6
+ def call
7
+ replace_single_quotes
8
+ end
9
+
10
+ private
11
+
12
+ def replace_single_quotes
13
+ str.gsub(REGEXP, "#{single_quotes[0]}\\1#{single_quotes[1]}")
14
+ end
15
+
16
+ def single_quotes
17
+ options.fetch(:single_quotes, I18n.t(:single_quotes, scope: %i(improve_typography), locale: locale))
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class Units < Processor
4
+ REGEXP = /(\d\s*)(m|mm|cm|km)(2|3)/
5
+
6
+ def call
7
+ str.gsub(REGEXP, '\1\2<sup>\3</sup>')
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module ImproveTypography
2
+ module Processors
3
+ class WordLineSeparator < Processor
4
+ REGEXP = /\u2028/
5
+
6
+ def call
7
+ str.gsub(REGEXP, "\n")
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module ImproveTypography
2
+ VERSION = '0.1.0'.freeze
3
+ end
@@ -0,0 +1,13 @@
1
+ require 'i18n'
2
+ require 'i18n/backend/fallbacks'
3
+
4
+ require 'improve_typography/base'
5
+ require 'improve_typography/configuration'
6
+ require 'improve_typography/processor'
7
+
8
+ Dir["#{File.dirname(__FILE__)}/improve_typography/processors/**/*.rb"].each { |f| require f }
9
+
10
+ I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
11
+ I18n.load_path += Dir.glob(File.join( File.dirname(__FILE__), 'config', 'locales', '*.yml' ))
12
+
13
+ require 'improve_typography/version'
metadata ADDED
@@ -0,0 +1,170 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: improve_typography
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Tomas Celizna
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: i18n
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '5.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '10.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '10.0'
111
+ description:
112
+ email:
113
+ - tomas.celizna@gmail.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".travis.yml"
120
+ - Gemfile
121
+ - Guardfile
122
+ - LICENSE.txt
123
+ - README.md
124
+ - Rakefile
125
+ - bin/console
126
+ - bin/setup
127
+ - improve_typography.gemspec
128
+ - lib/config/locales/cs.yml
129
+ - lib/config/locales/en.yml
130
+ - lib/improve_typography.rb
131
+ - lib/improve_typography/base.rb
132
+ - lib/improve_typography/configuration.rb
133
+ - lib/improve_typography/processor.rb
134
+ - lib/improve_typography/processors/apostrophe.rb
135
+ - lib/improve_typography/processors/double_quotes.rb
136
+ - lib/improve_typography/processors/ellipsis.rb
137
+ - lib/improve_typography/processors/em_dash.rb
138
+ - lib/improve_typography/processors/en_dash.rb
139
+ - lib/improve_typography/processors/multiply_sign.rb
140
+ - lib/improve_typography/processors/numbers.rb
141
+ - lib/improve_typography/processors/single_quotes.rb
142
+ - lib/improve_typography/processors/units.rb
143
+ - lib/improve_typography/processors/word_line_separator.rb
144
+ - lib/improve_typography/version.rb
145
+ homepage: https://github.com/tomasc/improve_typography
146
+ licenses:
147
+ - MIT
148
+ metadata: {}
149
+ post_install_message:
150
+ rdoc_options: []
151
+ require_paths:
152
+ - lib
153
+ required_ruby_version: !ruby/object:Gem::Requirement
154
+ requirements:
155
+ - - ">="
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ requirements: []
164
+ rubyforge_project:
165
+ rubygems_version: 2.4.5.1
166
+ signing_key:
167
+ specification_version: 4
168
+ summary: Improves typography (quotes, hyphens, etc.) of a given string. Works well
169
+ with I18n.
170
+ test_files: []