dm_ruby_extensions 1.0.7 → 1.0.8
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef89479e99db1c9f1aec46b1e5cd35b0a32b66bc
|
4
|
+
data.tar.gz: 796817a8a3db9ab1778400f2d8f91455f034f2e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97d7c140af39371f7cd050f8cbe70690916eb9d6f6c0694e23fd5855590fa3031cda396d3afb6fbb995dbe503b2ef48f8791b6a1703d733f26e919b198a35d64
|
7
|
+
data.tar.gz: '025885950263f3cb3601b194190a3c2556acafe262d67e914d1e5300bdb6ad2276288793d2aaa2aa12356c0fbf5afebdbd83f6d5101be4e1183c8a31a15af509'
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# DmRubyExtensions
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/dm_ruby_extensions.svg)](http://badge.fury.io/rb/dm_ruby_extensions)
|
4
|
+
[![Build Status](https://travis-ci.com/digitalmoksha/dm_ruby_extensions.svg?branch=master)](https://travis-ci.com/digitalmoksha/dm_ruby_extensions)
|
5
|
+
|
3
6
|
Adds some simple convienence methods to some Ruby classes, for use in the digitalMoksha gems. Although some of these can be found in other libraries, this includes a small handful and removes the dependency on another large library.
|
4
7
|
|
5
8
|
## Installation
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class
|
2
|
-
|
1
|
+
class Integer
|
2
|
+
|
3
3
|
# Factorial of number
|
4
4
|
# 5.factorial == 5 x 4 x 3 x 2 x 1 == 120
|
5
5
|
#------------------------------------------------------------------------------
|
@@ -7,7 +7,7 @@ class Fixnum
|
|
7
7
|
return 1 if self.zero?
|
8
8
|
(1..self).inject(:*)
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
#------------------------------------------------------------------------------
|
12
12
|
def as_boolean
|
13
13
|
(self > 0) ? true : false
|
data/lib/dm_ruby_extensions.rb
CHANGED
@@ -9,7 +9,7 @@ require "dm_ruby_extensions/extend_hash"
|
|
9
9
|
require "dm_ruby_extensions/extend_nil"
|
10
10
|
require "dm_ruby_extensions/extend_string"
|
11
11
|
require "dm_ruby_extensions/extend_time"
|
12
|
-
require "dm_ruby_extensions/
|
12
|
+
require "dm_ruby_extensions/extend_integer"
|
13
13
|
require "dm_ruby_extensions/extend_numeric"
|
14
14
|
require "dm_ruby_extensions/extend_true"
|
15
15
|
require "dm_ruby_extensions/extend_false"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm_ruby_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -33,6 +33,7 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- ".gitignore"
|
35
35
|
- ".rspec"
|
36
|
+
- ".travis.yml"
|
36
37
|
- Gemfile
|
37
38
|
- LICENSE
|
38
39
|
- README.md
|
@@ -43,8 +44,8 @@ files:
|
|
43
44
|
- lib/dm_ruby_extensions/extend_date.rb
|
44
45
|
- lib/dm_ruby_extensions/extend_datetime.rb
|
45
46
|
- lib/dm_ruby_extensions/extend_false.rb
|
46
|
-
- lib/dm_ruby_extensions/extend_fixnum.rb
|
47
47
|
- lib/dm_ruby_extensions/extend_hash.rb
|
48
|
+
- lib/dm_ruby_extensions/extend_integer.rb
|
48
49
|
- lib/dm_ruby_extensions/extend_nil.rb
|
49
50
|
- lib/dm_ruby_extensions/extend_numeric.rb
|
50
51
|
- lib/dm_ruby_extensions/extend_string.rb
|
@@ -55,8 +56,8 @@ files:
|
|
55
56
|
- spec/extensions/date_spec.rb
|
56
57
|
- spec/extensions/datetime_spec.rb
|
57
58
|
- spec/extensions/false_spec.rb
|
58
|
-
- spec/extensions/fixnum_spec.rb
|
59
59
|
- spec/extensions/hash_spec.rb
|
60
|
+
- spec/extensions/integer_spec.rb
|
60
61
|
- spec/extensions/nil_spec.rb
|
61
62
|
- spec/extensions/numeric_spec.rb
|
62
63
|
- spec/extensions/string_spec.rb
|
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
84
|
version: '0'
|
84
85
|
requirements: []
|
85
86
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.6.
|
87
|
+
rubygems_version: 2.6.14.1
|
87
88
|
signing_key:
|
88
89
|
specification_version: 4
|
89
90
|
summary: Simple Ruby base class extensions
|
@@ -92,8 +93,8 @@ test_files:
|
|
92
93
|
- spec/extensions/date_spec.rb
|
93
94
|
- spec/extensions/datetime_spec.rb
|
94
95
|
- spec/extensions/false_spec.rb
|
95
|
-
- spec/extensions/fixnum_spec.rb
|
96
96
|
- spec/extensions/hash_spec.rb
|
97
|
+
- spec/extensions/integer_spec.rb
|
97
98
|
- spec/extensions/nil_spec.rb
|
98
99
|
- spec/extensions/numeric_spec.rb
|
99
100
|
- spec/extensions/string_spec.rb
|