string_tools 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/string_tools/version.rb +1 -1
- data/lib/string_tools.rb +3 -6
- data/string_tools.gemspec +2 -6
- metadata +9 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85c8475d50ca2a83d90b6ddaf4ce930e3a7fbe88
|
4
|
+
data.tar.gz: 4a83dfeb0d91cee4abc0d55e939153b1f5b0e211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21fe4dfdad75d7ef65b7037c477c09bdbf509eac672c8d336a0ea615fbd7dd633a6c8cab50336e772371ba1c73457c04cb5f2aa5b2fe1134c58c41348ecaef20
|
7
|
+
data.tar.gz: dc0f6e2b331f33ea22c2d7b9edf529371cc68b39d954e26a8d9940f0eeeecfd11af4483fdf0354eaf4b617cd60d5ea23c19992f494cce366fd6dd5eae9437ac3
|
data/lib/string_tools/version.rb
CHANGED
data/lib/string_tools.rb
CHANGED
@@ -12,11 +12,8 @@ module StringTools
|
|
12
12
|
# Возвращает true если строка содержит допустимую
|
13
13
|
# последовательность байтов для кодировки utf8 и false в обратном случае
|
14
14
|
# см. http://en.wikipedia.org/wiki/UTF-8
|
15
|
-
def valid_utf8?
|
16
|
-
|
17
|
-
when String then string.is_utf8?
|
18
|
-
else false
|
19
|
-
end
|
15
|
+
def valid_utf8?(string)
|
16
|
+
string.respond_to?(:is_utf8?) && string.is_utf8?
|
20
17
|
end
|
21
18
|
|
22
19
|
# shorthand
|
@@ -66,7 +63,7 @@ module StringTools
|
|
66
63
|
module ActionControllerExtension
|
67
64
|
def accepts_non_utf8_params(*args)
|
68
65
|
args.each do |arg|
|
69
|
-
next unless arg.is_a?(Symbol) || arg.is_a?(String)
|
66
|
+
next unless arg.is_a?(Symbol) || arg.is_a?(::String)
|
70
67
|
arg = arg.to_sym
|
71
68
|
|
72
69
|
class_eval do
|
data/string_tools.gemspec
CHANGED
@@ -28,13 +28,9 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_runtime_dependency 'nokogiri'
|
29
29
|
spec.add_runtime_dependency 'simpleidn', '>= 0.0.5'
|
30
30
|
|
31
|
-
spec.add_development_dependency 'bundler'
|
32
|
-
spec.add_development_dependency 'rake'
|
31
|
+
spec.add_development_dependency 'bundler'
|
32
|
+
spec.add_development_dependency 'rake'
|
33
33
|
spec.add_development_dependency 'rspec', '>= 3.4'
|
34
|
-
spec.add_development_dependency 'rspec-rails', '>= 3.4'
|
35
|
-
spec.add_development_dependency 'rspec-given', '~> 3.5'
|
36
|
-
spec.add_development_dependency 'shoulda-matchers', '~> 2.0'
|
37
34
|
spec.add_development_dependency 'appraisal', '>= 1.0.2'
|
38
|
-
spec.add_development_dependency 'combustion', '>= 0.5.3'
|
39
35
|
spec.add_development_dependency 'simplecov', '>= 0.9'
|
40
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: string_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey D.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -126,46 +126,32 @@ dependencies:
|
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '10.0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '10.0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rspec
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
143
|
- - ">="
|
158
144
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
145
|
+
version: '0'
|
160
146
|
type: :development
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
150
|
- - ">="
|
165
151
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
152
|
+
version: '0'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
|
-
name: rspec
|
154
|
+
name: rspec
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
170
156
|
requirements:
|
171
157
|
- - ">="
|
@@ -178,34 +164,6 @@ dependencies:
|
|
178
164
|
- - ">="
|
179
165
|
- !ruby/object:Gem::Version
|
180
166
|
version: '3.4'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: rspec-given
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - "~>"
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '3.5'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - "~>"
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '3.5'
|
195
|
-
- !ruby/object:Gem::Dependency
|
196
|
-
name: shoulda-matchers
|
197
|
-
requirement: !ruby/object:Gem::Requirement
|
198
|
-
requirements:
|
199
|
-
- - "~>"
|
200
|
-
- !ruby/object:Gem::Version
|
201
|
-
version: '2.0'
|
202
|
-
type: :development
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '2.0'
|
209
167
|
- !ruby/object:Gem::Dependency
|
210
168
|
name: appraisal
|
211
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,20 +178,6 @@ dependencies:
|
|
220
178
|
- - ">="
|
221
179
|
- !ruby/object:Gem::Version
|
222
180
|
version: 1.0.2
|
223
|
-
- !ruby/object:Gem::Dependency
|
224
|
-
name: combustion
|
225
|
-
requirement: !ruby/object:Gem::Requirement
|
226
|
-
requirements:
|
227
|
-
- - ">="
|
228
|
-
- !ruby/object:Gem::Version
|
229
|
-
version: 0.5.3
|
230
|
-
type: :development
|
231
|
-
prerelease: false
|
232
|
-
version_requirements: !ruby/object:Gem::Requirement
|
233
|
-
requirements:
|
234
|
-
- - ">="
|
235
|
-
- !ruby/object:Gem::Version
|
236
|
-
version: 0.5.3
|
237
181
|
- !ruby/object:Gem::Dependency
|
238
182
|
name: simplecov
|
239
183
|
requirement: !ruby/object:Gem::Requirement
|