mn_utils_gem 1.15.1 → 1.15.2

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
  SHA256:
3
- metadata.gz: ce04246925c9e620cad30e8f2899be5f9f833a3d897ddd8f8bb41574c9412ced
4
- data.tar.gz: f423d16543105226239e6824cb258b03f9f32fecac6764051fb02914d22e9da0
3
+ metadata.gz: 6009d895e4dd3eaee450aad9d590c03180e0215ae9294bd21797158a358de6c9
4
+ data.tar.gz: 30a6fa8d2695416cc2e416eae491c9b77ef37ccf6411355439d451762e093fb5
5
5
  SHA512:
6
- metadata.gz: f99670585184657c736a94abcfe2d67d42f03e2c36c71af7acef0ab390b7dd073e45efa6e3199dcdfae2f743ca17797576e93aebbcd690f62492f0a4196e3aa0
7
- data.tar.gz: e68a6200d6d7568571966a4e0cb7bab9caca041ba1eb0245eb85951a864761412d618795d35da9c5f3fa4838dac1e7c45168764839bef74f862659571d150448
6
+ metadata.gz: d44637892b4faae0fa01877509691d4513e5565c68dcefb4161d8b603b325539ff2cbdff1c299a684c56652c4a0f2a78ffd9319d8f602ac69d46d06d8d0dcfc1
7
+ data.tar.gz: 29b0ee90113be5dee0a83b839997b2a963b603959b73d2dcb11de5ea9a2ef388c9b5ac7da0c26e7d4a18642b0f09e18e2865abe2a463fa879c59109cb698f5aa
@@ -0,0 +1,8 @@
1
+ class String
2
+ def to_bool
3
+ return true if self =~ (/^(true|t|yes|y|1)$/i)
4
+ return false if self.empty? || self =~ (/^(false|f|no|n|0)$/i)
5
+
6
+ raise ArgumentError.new "invalid value: #{self}"
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module MnUtilsGem
2
- VERSION = "1.15.1"
2
+ VERSION = "1.15.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mn_utils_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.1
4
+ version: 1.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shamim Mirzai
@@ -174,6 +174,7 @@ files:
174
174
  - lib/mn_utils_gem/gui.rb
175
175
  - lib/mn_utils_gem/site_action.rb
176
176
  - lib/mn_utils_gem/sso.rb
177
+ - lib/mn_utils_gem/string_to_bool.rb
177
178
  - lib/mn_utils_gem/transactional_email.rb
178
179
  - lib/mn_utils_gem/version.rb
179
180
  homepage: https://github.com/mumsnet/mn_utils_gem