string_tools 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/Appraisals +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/Makefile +19 -0
- data/README.md +36 -0
- data/Rakefile +1 -0
- data/bin/console +7 -0
- data/lib/string_tools/core_ext/string.rb +87 -0
- data/lib/string_tools/version.rb +3 -0
- data/lib/string_tools.rb +159 -0
- data/string_tools.gemspec +40 -0
- metadata +295 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MWYyYzVhMjg2M2JlZDQ1NWJjNzRhOTBkZTE3MmExOWM5YjRkYjkyYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OGY1M2Y1YjZiY2UyZjMwMTcyMzFmMDFiN2YyOGEzMjBhM2QyMTZlMw==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OTEyNGI4N2M2NmY4OTE1OGQxZGI4YWMwY2Y5MTY1YzFkNmY3YzNhMTVjM2Uw
|
10
|
+
MzZlYTI5OWJjZWI1MGUyOThlZTFjNzZkYzIyMTQxNzNiMzEzMzEyN2Q1YTBm
|
11
|
+
MDI2OWVhNWQwZDc1NjA5YWE2MmM5MjE4ZDQzMDk4MTQ5NjcxMjM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NGJjYWU1ZDI3MjMxYmNhNjVmNzBkMThmYTc2NDIxODFhOTIzYjJiNmFjNTY4
|
14
|
+
ZTEzMzI4NGRhNjE3ZWQ1MjEzZWQ2MjVkYTY2YmZhYjMxOTVkNzJiNDg4MGQ2
|
15
|
+
MGM1OTRhNTc3Nzc4M2U4NWIxZjc3OWFlOTAyNDJiMjI1NTYxNTk=
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/Appraisals
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
appraise 'rails3.1' do
|
2
|
+
gem 'activerecord', '~> 3.1.12'
|
3
|
+
gem 'actionpack', '~> 3.1.12'
|
4
|
+
gem 'activesupport', '~> 3.1.12'
|
5
|
+
end
|
6
|
+
|
7
|
+
appraise 'rails3.2' do
|
8
|
+
gem 'activerecord', '~> 3.2.0'
|
9
|
+
gem 'actionpack', '~> 3.2.0'
|
10
|
+
gem 'activesupport', '~> 3.2.0'
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise 'rails4.0' do
|
14
|
+
gem 'activerecord', '~> 4.0.0'
|
15
|
+
gem 'actionpack', '~> 4.0.0'
|
16
|
+
gem 'activesupport', '~> 4.0.0'
|
17
|
+
end
|
18
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Sergey D.
|
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/Makefile
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
RAILS_ENV = test
|
2
|
+
BUNDLE = RAILS_ENV=${RAILS_ENV} bundle
|
3
|
+
BUNDLE_OPTIONS = -j 2
|
4
|
+
RSPEC = rspec
|
5
|
+
APPRAISAL = appraisal
|
6
|
+
|
7
|
+
all: test
|
8
|
+
|
9
|
+
test: bundler/install appraisal/install
|
10
|
+
${BUNDLE} exec ${APPRAISAL} ${RSPEC} spec 2>&1
|
11
|
+
|
12
|
+
bundler/install:
|
13
|
+
if ! gem list bundler -i > /dev/null; then \
|
14
|
+
gem install bundler; \
|
15
|
+
fi
|
16
|
+
${BUNDLE} install ${BUNDLE_OPTIONS}
|
17
|
+
|
18
|
+
appraisal/install:
|
19
|
+
${BUNDLE} exec ${APPRAISAL} install
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# StringTools
|
2
|
+
|
3
|
+
Here comes some string tools we often use in Abak-Press. We divided them in two groups. Some of them are class methods of StringTools class and others are extend base String class
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'string_tools'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install string_tools
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
TODO: Write usage instructions here
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
|
+
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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
1. Fork it ( https://github.com/abak-press/string_tools/fork )
|
33
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
34
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
35
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
36
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/console
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
require 'rchardet19'
|
2
|
+
require 'addressable/uri'
|
3
|
+
require 'active_support/core_ext/module'
|
4
|
+
require 'active_record'
|
5
|
+
require 'action_pack'
|
6
|
+
|
7
|
+
class String
|
8
|
+
%w[auto_link excerpt highlight sanitize simple_format word_wrap].each do |method|
|
9
|
+
eval <<-EVAL
|
10
|
+
def #{method}(*args)
|
11
|
+
ActionController::Base.helpers.#{method}(self, *args)
|
12
|
+
end
|
13
|
+
EVAL
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
# возвращает строку из которой удалены HTML-теги
|
18
|
+
# символы <>&" остаются без изменения
|
19
|
+
def strip_tags
|
20
|
+
ActionController::Base.helpers.strip_tags(self).to_str
|
21
|
+
end
|
22
|
+
|
23
|
+
# '11,3'.to_f
|
24
|
+
# => 11.3
|
25
|
+
def to_f_with_strip_comma
|
26
|
+
self.gsub(/,/,'.').to_f_without_strip_comma
|
27
|
+
end
|
28
|
+
alias_method_chain :to_f, :strip_comma
|
29
|
+
|
30
|
+
def to_b
|
31
|
+
ActiveRecord::ConnectionAdapters::Column.value_to_boolean(self) || false
|
32
|
+
end
|
33
|
+
|
34
|
+
def to_script_safe_json
|
35
|
+
self.to_json.gsub('</script>', '</" + "script>" + "')
|
36
|
+
end
|
37
|
+
|
38
|
+
def naturalized
|
39
|
+
scan(/[^\d\.]+|[\d\.]+/).map{|f| f.match(/^\d+(\.\d+)?$/) ? f.to_f : f }
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
# Выполняет преобразование строки в punycode.
|
44
|
+
def to_punycode
|
45
|
+
Addressable::URI.parse(self).normalize.to_s
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
# shorthand
|
50
|
+
def detect_encoding
|
51
|
+
e = ::CharDet.detect(self)["encoding"]
|
52
|
+
e = 'windows-1251' if StringTools.cp1251_compatible_encodings.include?(e)
|
53
|
+
e
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_utf8!
|
57
|
+
self.replace(self.to_utf8)
|
58
|
+
end
|
59
|
+
|
60
|
+
def to_utf8
|
61
|
+
# и так utf
|
62
|
+
return self if is_utf8?
|
63
|
+
|
64
|
+
enc = detect_encoding
|
65
|
+
|
66
|
+
# если utf или английские буквы, то тоже ок
|
67
|
+
return self if ['utf-8', 'ascii'].include?(enc)
|
68
|
+
|
69
|
+
# если неизвестная каша, то возвращаем пустую строку
|
70
|
+
return '' if enc.nil?
|
71
|
+
|
72
|
+
# иначе пытаемся перекодировать
|
73
|
+
encode 'utf-8', enc, :undef => :replace, :invalid => :replace
|
74
|
+
rescue
|
75
|
+
''
|
76
|
+
end
|
77
|
+
|
78
|
+
def to_cp1251
|
79
|
+
encode 'cp1251', :undef => :replace, :invalid => :replace
|
80
|
+
rescue
|
81
|
+
''
|
82
|
+
end
|
83
|
+
|
84
|
+
def to_cp1251!
|
85
|
+
self.replace(self.to_cp1251)
|
86
|
+
end
|
87
|
+
end
|
data/lib/string_tools.rb
ADDED
@@ -0,0 +1,159 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'string_tools/version'
|
3
|
+
require 'ru_propisju'
|
4
|
+
require 'sanitize'
|
5
|
+
require 'active_support/core_ext/string'
|
6
|
+
require 'string_tools/core_ext/string'
|
7
|
+
|
8
|
+
module StringTools
|
9
|
+
module CharDet
|
10
|
+
# Возвращает true если строка содержит допустимую
|
11
|
+
# последовательность байтов для кодировки utf8 и false в обратном случае
|
12
|
+
# см. http://en.wikipedia.org/wiki/UTF-8
|
13
|
+
def valid_utf8? string
|
14
|
+
case string
|
15
|
+
when String then string.is_utf8?
|
16
|
+
else false
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# shorthand
|
21
|
+
def detect_encoding(str)
|
22
|
+
str.detect_encoding
|
23
|
+
end
|
24
|
+
|
25
|
+
# привести строку к utf8
|
26
|
+
def to_utf8(str)
|
27
|
+
str.to_utf8
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_cp1251(str)
|
31
|
+
str.to_cp1251
|
32
|
+
end
|
33
|
+
|
34
|
+
def cp1251_compatible_encodings
|
35
|
+
[
|
36
|
+
'windows-1253',
|
37
|
+
'windows-1254',
|
38
|
+
'windows-1255',
|
39
|
+
'windows-1256',
|
40
|
+
'windows-1258',
|
41
|
+
'EUC-TW',
|
42
|
+
'ISO-8859-8'
|
43
|
+
]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
extend CharDet
|
47
|
+
|
48
|
+
module WordProcessing
|
49
|
+
def truncate_words(text, length = 75)
|
50
|
+
return if text.nil?
|
51
|
+
|
52
|
+
if text.mb_chars.size > length
|
53
|
+
new_length = text.mb_chars[0...length].rindex(/[^[:word:]]/)
|
54
|
+
text.mb_chars[0...new_length.to_i]
|
55
|
+
else
|
56
|
+
text
|
57
|
+
end
|
58
|
+
rescue
|
59
|
+
text[0...length]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
extend WordProcessing
|
63
|
+
|
64
|
+
module ActionControllerExtension
|
65
|
+
def accepts_non_utf8_params(*args)
|
66
|
+
args.each do |arg|
|
67
|
+
next unless arg.is_a?(Symbol) || arg.is_a?(String)
|
68
|
+
arg = arg.to_sym
|
69
|
+
|
70
|
+
class_eval do
|
71
|
+
before_filter { |controller|
|
72
|
+
decode = lambda { |s|
|
73
|
+
if s.is_a?(Hash)
|
74
|
+
s.to_a.map { |k, v| [k, StringTools.to_utf8(v)]}.to_hash
|
75
|
+
elsif s.is_a?(Array)
|
76
|
+
s.map { |v| StringTools.to_utf8(v) }
|
77
|
+
else
|
78
|
+
StringTools.to_utf8(s)
|
79
|
+
end
|
80
|
+
}
|
81
|
+
|
82
|
+
controller.params[arg] = decode.call(controller.params[arg]) unless controller.params[arg].nil?
|
83
|
+
}
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
alias_method :accepts_non_utf8_param, :accepts_non_utf8_params
|
89
|
+
end
|
90
|
+
|
91
|
+
module Sanitizing
|
92
|
+
def sanitize(text, options = {})
|
93
|
+
sanitizer = options.delete(:sanitizer)
|
94
|
+
sanitizer = StringTools::Sanitizer::Base.new unless sanitizer.respond_to?(:sanitize)
|
95
|
+
sanitizer.sanitize(text, options)
|
96
|
+
end
|
97
|
+
|
98
|
+
# Public: вычищает ASCII Control Characters из строки
|
99
|
+
#
|
100
|
+
# string - String строка, из которой удаляем символы
|
101
|
+
#
|
102
|
+
# Returns String
|
103
|
+
def clear_control_characters(string)
|
104
|
+
string.tr("\u0000-\u001f", '')
|
105
|
+
end
|
106
|
+
end
|
107
|
+
extend Sanitizing
|
108
|
+
|
109
|
+
module Sanitizer
|
110
|
+
class Base
|
111
|
+
|
112
|
+
TAGS_WITH_ATTRIBUTES = {
|
113
|
+
'p' => %w(align style),
|
114
|
+
'div' => %w(align style),
|
115
|
+
'span' => %w(align style),
|
116
|
+
'td' => %w(align width valign colspan rowspan style),
|
117
|
+
'th' => %w(align width valign colspan rowspan style),
|
118
|
+
'a' => %w(href target name style),
|
119
|
+
'table' => %w(cellpadding cellspacing width border align style),
|
120
|
+
'img' => %w(src width height style)
|
121
|
+
}
|
122
|
+
|
123
|
+
TAGS_WITHOUT_ATTRIBUTES = %w(b strong i em sup sub ul ol li blockquote br tr u caption thead)
|
124
|
+
|
125
|
+
def sanitize(str, attr = {})
|
126
|
+
# для корректного обрезания utf строчек режем через mb_chars
|
127
|
+
# для защиты от перегрузки парсера пропускаем максимум 1 мегабайт текста
|
128
|
+
# длина русского символа в utf-8 - 2 байта, 1Мб/2б = 524288 = 2**19 символов
|
129
|
+
# длина по символам с перестраховкой, т.к. латинские символы(теги, например) занимают 1 байт
|
130
|
+
str = str.mb_chars.slice(0..(2**19)).to_s
|
131
|
+
|
132
|
+
attributes = TAGS_WITH_ATTRIBUTES
|
133
|
+
|
134
|
+
# Мерджим добавочные теги и атрибуты
|
135
|
+
attributes.merge!(attr)
|
136
|
+
elements = attributes.keys | TAGS_WITHOUT_ATTRIBUTES
|
137
|
+
|
138
|
+
Sanitize.fragment(str,
|
139
|
+
:attributes => attributes,
|
140
|
+
:elements => elements,
|
141
|
+
:css => {:properties => Sanitize::Config::RELAXED[:css][:properties]},
|
142
|
+
:remove_contents => %w(style javascript),
|
143
|
+
:allow_comments => false
|
144
|
+
)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
module SumInWords
|
150
|
+
# Сумма в рублях прописью. Кол-во копеек выводится всегда. Первая буква заглавная
|
151
|
+
def rublej_propisju(amount)
|
152
|
+
kop = (amount.divmod(1)[1]*100).round
|
153
|
+
result = RuPropisju.rublej(amount.to_i).capitalize
|
154
|
+
result << " %.2d " % kop
|
155
|
+
result << RuPropisju.choose_plural(kop, 'копейка', 'копейки', 'копеек')
|
156
|
+
end
|
157
|
+
end
|
158
|
+
extend SumInWords
|
159
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'string_tools/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'string_tools'
|
8
|
+
spec.version = StringTools::VERSION
|
9
|
+
spec.authors = ['Sergey D.']
|
10
|
+
spec.email = ['sclinede@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = %q{String Tools}
|
13
|
+
spec.description = %q{String Tools}
|
14
|
+
spec.homepage = 'https://github.com/abak-press/string_tools'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'activerecord', '>= 3.1.12'
|
23
|
+
spec.add_runtime_dependency 'actionpack', '>= 3.1.12'
|
24
|
+
spec.add_runtime_dependency 'activesupport', '>= 3.1.12'
|
25
|
+
spec.add_runtime_dependency 'rchardet19', '~> 1.3.5'
|
26
|
+
spec.add_runtime_dependency 'addressable', '~> 2.3.2'
|
27
|
+
spec.add_runtime_dependency 'ru_propisju', '~> 2.1.4'
|
28
|
+
spec.add_runtime_dependency 'sanitize', '>= 3.1.2'
|
29
|
+
|
30
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
31
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
32
|
+
spec.add_development_dependency 'rspec', '>= 2.14.0'
|
33
|
+
spec.add_development_dependency 'rspec-rails', '>= 2.14.0'
|
34
|
+
spec.add_development_dependency 'rspec-given', '~> 3.5'
|
35
|
+
spec.add_development_dependency 'shoulda-matchers'
|
36
|
+
spec.add_development_dependency 'appraisal', '>= 1.0.2'
|
37
|
+
spec.add_development_dependency 'combustion', '>= 0.5.3'
|
38
|
+
spec.add_development_dependency 'simplecov', '>= 0.9'
|
39
|
+
spec.add_development_dependency 'pry-debugger'
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,295 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: string_tools
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sergey D.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.1.12
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.1.12
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.1.12
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.1.12
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activesupport
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.1.12
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.1.12
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rchardet19
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.3.5
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.3.5
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: addressable
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.3.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.3.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: ru_propisju
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.1.4
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.1.4
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: sanitize
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.1.2
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.1.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: bundler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.7'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.7'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '10.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '10.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.14.0
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.14.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-rails
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ! '>='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 2.14.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 2.14.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec-given
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '3.5'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ~>
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '3.5'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: shoulda-matchers
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ! '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: appraisal
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ! '>='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 1.0.2
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ! '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.0.2
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: combustion
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ! '>='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 0.5.3
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ! '>='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.5.3
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: simplecov
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ! '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0.9'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ! '>='
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0.9'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: pry-debugger
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ! '>='
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ! '>='
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
description: String Tools
|
252
|
+
email:
|
253
|
+
- sclinede@gmail.com
|
254
|
+
executables: []
|
255
|
+
extensions: []
|
256
|
+
extra_rdoc_files: []
|
257
|
+
files:
|
258
|
+
- .gitignore
|
259
|
+
- .rspec
|
260
|
+
- Appraisals
|
261
|
+
- Gemfile
|
262
|
+
- LICENSE.txt
|
263
|
+
- Makefile
|
264
|
+
- README.md
|
265
|
+
- Rakefile
|
266
|
+
- bin/console
|
267
|
+
- lib/string_tools.rb
|
268
|
+
- lib/string_tools/core_ext/string.rb
|
269
|
+
- lib/string_tools/version.rb
|
270
|
+
- string_tools.gemspec
|
271
|
+
homepage: https://github.com/abak-press/string_tools
|
272
|
+
licenses:
|
273
|
+
- MIT
|
274
|
+
metadata: {}
|
275
|
+
post_install_message:
|
276
|
+
rdoc_options: []
|
277
|
+
require_paths:
|
278
|
+
- lib
|
279
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
280
|
+
requirements:
|
281
|
+
- - ! '>='
|
282
|
+
- !ruby/object:Gem::Version
|
283
|
+
version: '0'
|
284
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
|
+
requirements:
|
286
|
+
- - ! '>='
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: '0'
|
289
|
+
requirements: []
|
290
|
+
rubyforge_project:
|
291
|
+
rubygems_version: 2.4.7
|
292
|
+
signing_key:
|
293
|
+
specification_version: 4
|
294
|
+
summary: String Tools
|
295
|
+
test_files: []
|