reactive_support 0.1.3.beta4 → 0.1.3

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: 991c3b772cd39007b6c20e62aa1f36c09dd1aaa6
4
- data.tar.gz: d4215aeae27ab97e9affea441894d10149110cd9
3
+ metadata.gz: 98b652c949f27c7bddcd372807affcdd75d17493
4
+ data.tar.gz: ea175e6c84e532cb9e7a0efd837b6160ea5b8f15
5
5
  SHA512:
6
- metadata.gz: baee1ff86bcd13000c1dd7e3479fea01d567bf7dedf4d91f1eeab7065b1b8c8990ae5eff0162a4bc9f8655f1baca6901e372c8ce6f9418aa9aa98aefe7f1e65d
7
- data.tar.gz: fdf0688e33bd9d4009ebd0976fb09dd86ae7aec503597fcc541c2d6983560a182c56c94ed3602e450831a2fecbedbcbc0993b07eebed4a975d939b2efb1f5a13
6
+ metadata.gz: 7bc1f3cc4511bf351b9bbe414cc29b82789fde75770f786e7f046960d384be222629d0fa9caaf5e24afb23f735fbd71fd14def11274af80de6ee7671fca9f93f
7
+ data.tar.gz: 60019de6cab75f7c638938e2b030a49bc3136fe193f34369f4fbf60a6fbf2c5329c5307659cbcd9892d02b30393f0e1d76a4054b37b35d5ac1f316765e15b221
data/README.md CHANGED
@@ -16,10 +16,6 @@ Then, in your main project file, include:
16
16
  You can also point your Gemfile to this repo:
17
17
  <pre><code>gem 'reactive_support', '~> 0.1.3', git: 'https://github.com/danascheider/reactive_support.git</code></pre>
18
18
 
19
- If you would like to install an earlier version, you can specify that version's branch
20
- using the standard branch naming scheme:
21
- <pre><code>gem 'reactive_support', '~> 0.1.2', git: 'https://github.com/danascheider/reactive_support.git, branch: 'version-0.1.2'</code></pre>
22
-
23
19
  Please note that version 0.1.2 is the earliest available version of ReactiveSupport, and is currently the only release labeled production ready.
24
20
 
25
21
  ### Usage
@@ -7,6 +7,29 @@
7
7
  # 2.0.0[http://ruby-doc.org/core-2.1.3/String.html], or
8
8
  # 1.9.3[http://ruby-doc.org/core-2.0.0/String.html].
9
9
 
10
+ class Object
11
+
12
+ # When called on a generic object, the +#blank?+ method returns +true+ if
13
+ # the object is false, empty, or nil. Other objects return +false+.
14
+ # For specific examples of different classes, see the class-specific
15
+ # definitions of +#blank?+.
16
+ # Time.now.blank? # => false
17
+
18
+ def blank?
19
+ respond_to?(:empty) ? !!empty : !self
20
+ end
21
+
22
+ # When called on a generic object, the +#present?+ method returns +true+ if
23
+ # the object is present and not empty. If the object is false, empty, or nil,
24
+ # +#present?+ returns +false+. For specific examples of different classes, see
25
+ # the class-specific definitions of +#present?+.
26
+ # Time.now.present? # => true
27
+
28
+ def present?
29
+ !blank?
30
+ end
31
+ end
32
+
10
33
  class String
11
34
 
12
35
  # When called on a string, the +#blank?+ method returns +true+ if the string
@@ -24,7 +24,8 @@ describe ReactiveSupport do
24
24
  'non-blank object' => 'foo',
25
25
  'TrueClass' => true,
26
26
  'enumerable with blank members' => [nil, false],
27
- 'numeric' => 10
27
+ 'numeric' => 10,
28
+ 'something else' => Time.now
28
29
  }
29
30
 
30
31
  hash.each do |k,v|
@@ -244,7 +245,8 @@ describe ReactiveSupport do
244
245
  'non-empty object' => ['foo'],
245
246
  'TrueClass' => true,
246
247
  'enumerable with blank members' => [nil, false],
247
- 'numeric' => 8.2
248
+ 'numeric' => 8.2,
249
+ 'something else' => Time.now
248
250
  }
249
251
 
250
252
  hash.each do |k,v|
data/version.rb CHANGED
@@ -7,7 +7,7 @@ module ReactiveSupport
7
7
  MAJOR = '0'
8
8
  MINOR = '1'
9
9
  PATCH = '3'
10
- PRE = 'beta4'
10
+ PRE = ''
11
11
 
12
12
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.').chomp('.')
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactive_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.beta4
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dana Scheider
@@ -117,9 +117,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
117
  version: 1.9.3
118
118
  required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ">"
120
+ - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 1.3.1
122
+ version: '0'
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 2.2.2