thefox-ext 1.2.1 → 1.3.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: eba4482de20d3cc52537b0f15af826c3f888499d
4
- data.tar.gz: ef15d55ddf3636c1632372667448e27d1f3658c4
3
+ metadata.gz: 0e9e0bd405074aad6711bbdf8733bcfce7aae887
4
+ data.tar.gz: e23bf60e2df9ac302b7cfcfa77a9ef22679e8eb7
5
5
  SHA512:
6
- metadata.gz: 32dd83cb5620230d3873829d5d8e761ce17b0418d62b49cacb4a664f3ff459d65cc8e7f0ec1b4bc09dc2baafd929c6780cc14d7b2e41c5d9361e7accb780499d
7
- data.tar.gz: 797e0875ad27c9630c9451a9af6ab7587a72b671d744f1226ab53a2c3f3a7c6dec57fa40fa39229457254e9745b882c3af65b9d7413b3ec3db917c255695c699
6
+ metadata.gz: 0360d156805d54c6409b667de7eae6abfe4b0ba400b7d2b1d8f91457d2857a4cc007b1338986b1e381ff0f30b1fd595df7befe9b61c196ae6dbddd0b4aecbff8
7
+ data.tar.gz: 1514cbc8fd41b1de01e0959dc868c5dfbdc9a8ee308a25de58bf75a367766eca4f5aa90f02cbab951f889d0ca0faa00684de67c160caf498ac2bda7fa9fb1744
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ rvm:
3
3
  - 2.1
4
4
  - 2.2
5
5
  sudo: required
6
- before_install:
6
+ before_install:
7
7
  - gem update --system
8
8
  - gem install bundler -v '~>1.11'
9
9
  - bundler --version
data/README.md CHANGED
@@ -24,6 +24,7 @@ Use it in your sources:
24
24
  - UTF-8 Encoding
25
25
  - Intenger 32-bit Array
26
26
  - Console Support
27
+ - Date is `today?`
27
28
 
28
29
  ## Project Links
29
30
 
@@ -0,0 +1,8 @@
1
+
2
+ require 'date'
3
+
4
+ class Date
5
+ def today?
6
+ self == Date.today
7
+ end
8
+ end
@@ -1,7 +1,7 @@
1
1
 
2
2
  module TheFox
3
3
  module Ext
4
- VERSION = '1.2.1'
5
- DATE = '2015-12-21'
4
+ VERSION = '1.3.0'
5
+ DATE = '2016-02-07'
6
6
  end
7
7
  end
data/lib/thefox-ext.rb CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
  require 'thefox-ext/version'
3
3
 
4
+ require 'thefox-ext/ext/date'
4
5
  require 'thefox-ext/ext/false'
5
6
  require 'thefox-ext/ext/integer'
6
7
  require 'thefox-ext/ext/nil'
data/tests/tc_date.rb ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'minitest/autorun'
4
+ require 'thefox-ext'
5
+
6
+
7
+ class TestDate < MiniTest::Test
8
+ def test_today
9
+ assert_equal(true, Date.today.today?)
10
+
11
+ assert_equal(false, Date.new(2001, 2, 3).today?)
12
+ assert_equal(false, Date.new(2001, 2, 4).today?)
13
+
14
+ # This test may fail on 01.01.2018 ;)
15
+ assert_equal(false, Date.new(2018, 1, 1).today?)
16
+
17
+ assert_equal(true, Time.now.to_date.today?)
18
+ end
19
+ end
data/tests/ts_all.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require_relative 'tc_date'
3
4
  require_relative 'tc_false'
4
5
  require_relative 'tc_integer'
5
6
  require_relative 'tc_nil'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thefox-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Mayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-21 00:00:00.000000000 Z
11
+ date: 2016-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -38,12 +38,14 @@ files:
38
38
  - README.md
39
39
  - lib/thefox-ext.rb
40
40
  - lib/thefox-ext/console.rb
41
+ - lib/thefox-ext/ext/date.rb
41
42
  - lib/thefox-ext/ext/false.rb
42
43
  - lib/thefox-ext/ext/integer.rb
43
44
  - lib/thefox-ext/ext/nil.rb
44
45
  - lib/thefox-ext/ext/string.rb
45
46
  - lib/thefox-ext/ext/true.rb
46
47
  - lib/thefox-ext/version.rb
48
+ - tests/tc_date.rb
47
49
  - tests/tc_false.rb
48
50
  - tests/tc_integer.rb
49
51
  - tests/tc_nil.rb