string_tools 0.14.0 → 0.15.0

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
  SHA1:
3
- metadata.gz: 57e1acbe7d6ac7dc94cd9aa2fd1112b0042baa99
4
- data.tar.gz: 59da0ec6fef5008a41f46905a820838973bcd3d3
3
+ metadata.gz: 337a46e1015523315103711f4b61d556fc5cd71b
4
+ data.tar.gz: 0e9327ad9c3387224ce1d63282691d3952b140b1
5
5
  SHA512:
6
- metadata.gz: 7dfffb81afe9dbe38d25555210a901208fafeda2db42218267b7a03a2be7f543ecb35a2e8d06db2ea25ab25e06a5f8902545da90994205b3943082f8fc7eda8a
7
- data.tar.gz: ca70542c948527a82529703d4a872bfc9bfd8cfd45f6088fba469213676ddc920dd33f09706e27e60689e781ebfb7325f1a623a0c48ef7c432f4e0318cd90272
6
+ metadata.gz: 5650229f42d09b51761304d2e61f1706ff174d4b78da527af8376eb0a470b37ed4b578bcc678e500803496a43bcd3507adad640b63a596b8d46b3ccf7380936f
7
+ data.tar.gz: '09742bdb78ef01ed2dc7b24969b18820268896b30d15c620be2c041768a11ceb69eeb3b7cdd2f37a5a7b339fa37c39c3458a15ebc81fd6d5538ede2ff465d8e9'
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- # v0.14.0
1
+ # v0.15.0
2
+
3
+ * 2020-05-13 [19cb127](../../commit/19cb127) - __(TamarinEA)__ Release 0.15.0
4
+ * 2020-04-03 [e63c121](../../commit/e63c121) - __(Mikhail Nelaev)__ feature: optionally turn off uri normalization
5
+ https://jira.railsc.ru/browse/GOODS-2219
2
6
 
3
7
  * 2019-10-10 [770ed2b](../../commit/770ed2b) - __(TamarinEA)__ Release 0.14.0
4
8
  * 2019-10-08 [b182709](../../commit/b182709) - __(Ilya Zhidkov)__ Release 0.13.0
@@ -83,6 +87,11 @@ https://jira.railsc.ru/browse/PC4-16353
83
87
  # v3.0.1
84
88
 
85
89
 
90
+ # v0.14.0
91
+
92
+ * 2019-09-23 [f495195](../../commit/f495195) - __(TamarinEA)__ feature: use nokogiri for strip tags
93
+ * 2019-09-23 [2054e2a](../../commit/2054e2a) - __(TamarinEA)__ chore: test rails 4.0 - 4.2
94
+
86
95
  # v0.13.0
87
96
 
88
97
  * 2019-09-24 [87d134d](../../commit/87d134d) - __(evseevleo)__ chore(transliteration): add examples to README
data/lib/string_tools.rb CHANGED
@@ -237,11 +237,14 @@ module StringTools
237
237
  extend SumInWords
238
238
 
239
239
  module Uri
240
- def add_params_to_url(url, params = nil)
240
+ def add_params_to_url(url, params = nil, options = {normalize: true})
241
241
  uri = Addressable::URI.parse(url)
242
242
  uri = Addressable::URI.parse("http://#{url}") unless uri.scheme
243
243
  uri.query_values = (uri.query_values || {}).merge!(params.stringify_keys) if params.present?
244
- uri.normalize.to_s
244
+
245
+ uri.normalize! if options[:normalize]
246
+
247
+ uri.to_s
245
248
  rescue Addressable::URI::InvalidURIError
246
249
  nil
247
250
  end
@@ -1,3 +1,3 @@
1
1
  module StringTools
2
- VERSION = '0.14.0'.freeze
2
+ VERSION = '0.15.0'.freeze
3
3
  end
data/string_tools.gemspec CHANGED
@@ -33,4 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'rspec', '>= 3.4'
34
34
  spec.add_development_dependency 'appraisal', '>= 1.0.2'
35
35
  spec.add_development_dependency 'simplecov', '>= 0.9'
36
+ spec.add_development_dependency 'pry-byebug'
36
37
  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.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey D.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-10 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -192,6 +192,20 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0.9'
195
+ - !ruby/object:Gem::Dependency
196
+ name: pry-byebug
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - ">="
200
+ - !ruby/object:Gem::Version
201
+ version: '0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
195
209
  description: String Tools
196
210
  email:
197
211
  - sclinede@gmail.com