dohutil 0.2.26 → 0.2.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5cc48dc755e063824e8319710da5d1f8dbc1ed4d
4
- data.tar.gz: 24d678ec7356b5d9f734d9914ec5e04c26c0c2eb
3
+ metadata.gz: 645dd497fd453cb9f939e433cb3b2aee2fc624f3
4
+ data.tar.gz: 5645d5139c09635ee166b6b150bc821bdd9d9f53
5
5
  SHA512:
6
- metadata.gz: 2832dd535bd832f54f37590b6a865c7cd781d05e200eb5c83781e3758f2a52243549d1a41e210dcb16ff9dc3e5239776c4437aebd02b53e7f58c1f67d3b78a7f
7
- data.tar.gz: f80512c242c33100856bd921351b0cf832cfc28ca8c7eb12a469d26ea4f1304f499e2b14f95c5026a65bd69d94a7ae7c9c887843e43d1db4f03fe6cb71b26541
6
+ metadata.gz: 73cc243f81eefb2dc468f553010fd9f62f327a2ac24b042039123555a20e34e08f6bfa32f9fd103e969c67095de89ae870f867cdc6148df6a4aae8aafffbd81d
7
+ data.tar.gz: 777b2c1ddd1bb96beec3be5453939c8b7489cba9991d18da9c3d943417f755dee88cbabea87373c571ae01ce0544d262d2a086a818f99a2fe346517e7d88137b
@@ -0,0 +1,11 @@
1
+ if !Object.method_defined?(:blank?)
2
+ class Object
3
+ def blank?
4
+ if respond_to?(:empty?)
5
+ empty?
6
+ else
7
+ !self
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ require 'dohutil/core_ext/blank'
2
+
3
+ module Doh
4
+
5
+ class Test_core_ext_blank < DohTest::TestGroup
6
+ def test_blank
7
+ assert_equal(true, ''.blank?)
8
+ assert_equal(false, ' '.blank?)
9
+ assert_equal(true, nil.blank?)
10
+ assert_equal(true, {}.blank?)
11
+ assert_equal(true, [].blank?)
12
+ end
13
+ end
14
+
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.26
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani Mason
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-07 00:00:00.000000000 Z
12
+ date: 2016-12-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dohroot
@@ -91,6 +91,7 @@ files:
91
91
  - lib/dohutil/config.rb
92
92
  - lib/dohutil/core_ext/array.rb
93
93
  - lib/dohutil/core_ext/bigdecimal.rb
94
+ - lib/dohutil/core_ext/blank.rb
94
95
  - lib/dohutil/core_ext/boolean.rb
95
96
  - lib/dohutil/core_ext/date.rb
96
97
  - lib/dohutil/core_ext/datewithtime.rb
@@ -99,7 +100,6 @@ files:
99
100
  - lib/dohutil/core_ext/force_deep_copy.rb
100
101
  - lib/dohutil/core_ext/hash.rb
101
102
  - lib/dohutil/core_ext/inspect.rb
102
- - lib/dohutil/core_ext/random.rb
103
103
  - lib/dohutil/core_ext/string.rb
104
104
  - lib/dohutil/current_date.rb
105
105
  - lib/dohutil/disable_verbose.rb
@@ -110,6 +110,7 @@ files:
110
110
  - lib/dohutil/to_display.rb
111
111
  - test/core_ext/array.dt.rb
112
112
  - test/core_ext/bigdecimal.dt.rb
113
+ - test/core_ext/blank.dt.rb
113
114
  - test/core_ext/date.dt.rb
114
115
  - test/core_ext/datewithtime.dt.rb
115
116
  - test/core_ext/force_deep_copy.dt.rb
@@ -137,13 +138,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
138
  version: '0'
138
139
  requirements: []
139
140
  rubyforge_project:
140
- rubygems_version: 2.4.8
141
+ rubygems_version: 2.6.8
141
142
  signing_key:
142
143
  specification_version: 4
143
144
  summary: assorted tiny utilities
144
145
  test_files:
145
146
  - test/core_ext/array.dt.rb
146
147
  - test/core_ext/bigdecimal.dt.rb
148
+ - test/core_ext/blank.dt.rb
147
149
  - test/core_ext/date.dt.rb
148
150
  - test/core_ext/datewithtime.dt.rb
149
151
  - test/core_ext/force_deep_copy.dt.rb
@@ -1,8 +0,0 @@
1
- class Random
2
- def self.current_seed
3
- curseed = Random.srand(0)
4
- Random.srand(curseed)
5
- curseed
6
- end
7
- end
8
-