ruby_core_extensions 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.travis.yml +14 -0
- data/Gemfile +2 -0
- data/LICENSE +21 -0
- data/README.md +37 -0
- data/Rakefile +12 -0
- data/gemfiles/rails3.gemfile +11 -0
- data/gemfiles/rails4.gemfile +11 -0
- data/lib/ruby_core_extensions.rb +20 -0
- data/lib/ruby_core_extensions/array.rb +50 -0
- data/lib/ruby_core_extensions/class.rb +8 -0
- data/lib/ruby_core_extensions/compact.rb +2 -0
- data/lib/ruby_core_extensions/compact/array.rb +20 -0
- data/lib/ruby_core_extensions/compact/hash.rb +34 -0
- data/lib/ruby_core_extensions/enumerable.rb +39 -0
- data/lib/ruby_core_extensions/file.rb +12 -0
- data/lib/ruby_core_extensions/hash.rb +34 -0
- data/lib/ruby_core_extensions/kernel.rb +11 -0
- data/lib/ruby_core_extensions/numeric.rb +7 -0
- data/lib/ruby_core_extensions/object.rb +72 -0
- data/lib/ruby_core_extensions/recursive.rb +8 -0
- data/lib/ruby_core_extensions/recursive/array.rb +45 -0
- data/lib/ruby_core_extensions/recursive/big_decimal.rb +5 -0
- data/lib/ruby_core_extensions/recursive/date.rb +8 -0
- data/lib/ruby_core_extensions/recursive/date_time.rb +8 -0
- data/lib/ruby_core_extensions/recursive/fixnum.rb +7 -0
- data/lib/ruby_core_extensions/recursive/hash.rb +86 -0
- data/lib/ruby_core_extensions/recursive/object.rb +17 -0
- data/lib/ruby_core_extensions/recursive/time.rb +8 -0
- data/lib/ruby_core_extensions/string.rb +78 -0
- data/lib/ruby_core_extensions/version.rb +3 -0
- data/ruby_core_extensions.gemspec +32 -0
- data/spec/array_spec.rb +67 -0
- data/spec/class_spec.rb +12 -0
- data/spec/compact_spec.rb +49 -0
- data/spec/enumerable_spec.rb +24 -0
- data/spec/filename_spec.rb +17 -0
- data/spec/hash_spec.rb +107 -0
- data/spec/numeric_spec.rb +12 -0
- data/spec/object_spec.rb +58 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/string_spec.rb +62 -0
- data/spec/support/coverage.rb +29 -0
- metadata +225 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Enumerable do
|
4
|
+
|
5
|
+
it 'should allow mapping elements of the collection to hashes associating method names to the returned values for each method' do
|
6
|
+
expect([1,2,3].map_methods(:to_s,:to_f)).to eq [{:to_s => '1', :to_f => 1.0}, {:to_s => '2', :to_f => 2.0}, {:to_s => '3', :to_f => 3.0}]
|
7
|
+
end
|
8
|
+
|
9
|
+
|
10
|
+
context 'when detecting and returning the block value' do
|
11
|
+
it { expect([1,2,3].detect_and_return { |number| number.even? && number * number }).to eq 4 }
|
12
|
+
it { expect([1,3,5].detect_and_return { |number| number.even? && number * number }).to be nil }
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
it 'should allow selecting by attribute' do
|
17
|
+
one = double(:name => 'one', :type => 'odd')
|
18
|
+
two = double(:name => 'two', :type => 'even')
|
19
|
+
thr = double(:name => 'thr', :type => 'odd')
|
20
|
+
expect([one, two, thr].select_by_attr(:type, 'odd')).to eq [one, thr]
|
21
|
+
expect([one, two, thr].select_by_attr(:type, 'even')).to eq [two]
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
describe File do
|
2
|
+
it "remove bad characters" do
|
3
|
+
expect(safe("john*test.jpg")).to eq "john-test.jpg"
|
4
|
+
expect(safe(" Betty Boop-*StarHyphen")).to eq "-Betty-Boop-StarHyphen"
|
5
|
+
expect(safe("What The Hotel?")).to eq "What-The-Hotel-"
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should prittify & to and" do
|
9
|
+
expect(safe("Guns & Roses")).to eq "Guns-and-Roses"
|
10
|
+
expect(safe("& They Lived")).to eq "and-They-Lived"
|
11
|
+
end
|
12
|
+
|
13
|
+
def safe(from)
|
14
|
+
File.safe_name(from)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
data/spec/hash_spec.rb
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Hash do
|
4
|
+
|
5
|
+
before do
|
6
|
+
@sub_array1 = [3, BigDecimal('4'), Date.new(2000, 1, 1), DateTime.new(2000, 1, 1, 0, 0, 0), {:f => 5}]
|
7
|
+
@sub_array2 = [3, BigDecimal('4'), Date.new(2000, 1, 1), DateTime.new(2000, 1, 1, 0, 0, 0), {'f' => 5}]
|
8
|
+
@hash1 = {:a => 1, :b => {:c => 2}, :d => 'test', :e => @sub_array1}
|
9
|
+
@hash2 = {'a' => 1, 'b' => {'c' => 2}, :d => 'test', 'e' => @sub_array2}
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should allow converting all values to strings recursively" do
|
13
|
+
expect(@hash1.stringify_values_recursively).to eq({:a => "1", :b => {:c => "2"}, :d => "test", :e => ["3", '4.0', "2000-01-01", '2000-01-01T00:00:00+00:00', {:f => "5"}]})
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should allow converting all keys to symbols recursively" do
|
17
|
+
expect(@hash2.symbolize_keys_recursively).to eq @hash1
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should allow converting keys" do
|
21
|
+
expect(@hash1.convert_keys(&:to_s)).to eq({"a" => 1, "b" => {:c => 2}, "d" => "test", "e" => @sub_array1})
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should allow converting values" do
|
25
|
+
expect(@hash1.convert_values(&:to_s)).to eq({:a => "1", :b => {:c => 2}, :d => "test", :e => @sub_array1})
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should allow converting values only for specific keys" do
|
29
|
+
expect(@hash1.convert_values(:d, :e, &:to_s)).to eq({:a => 1, :b => {:c => 2}, :d => "test", :e => @sub_array1})
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should allow making indifferent access recursively" do
|
33
|
+
expect(@hash1.make_indifferent_access_recursively['b']['c']).to eq 2
|
34
|
+
expect(@hash1.make_indifferent_access_recursively['e'][4]['f']).to eq 5
|
35
|
+
end
|
36
|
+
|
37
|
+
it "should allow executing blocks recursively" do
|
38
|
+
hash = {:a => 1, :b => {:a => 2}, :c => {:a => 3, :b => 4, :c => {:a => 5}}}
|
39
|
+
result = []
|
40
|
+
hash.recursively do |k,v|
|
41
|
+
result << v unless v.is_a?(Hash)
|
42
|
+
end
|
43
|
+
expect(result.sort).to eq [1,2,3,4,5] # Ruby 1.8.7 doesn't order hash keys
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
describe Hash do
|
50
|
+
|
51
|
+
it 'should allow removing all nil values and return a new hash' do
|
52
|
+
expect({:a => 1, :b => nil}.compact).to eq({:a => 1})
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'should allow removing all nil values' do
|
56
|
+
a = {:a => 1, :b => nil}
|
57
|
+
a.compact!
|
58
|
+
expect(a).to eq({:a => 1})
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should allow removing all nil values and return a new hash' do
|
62
|
+
expect({:a => 1, :b => ''}.compact_blank).to eq({:a => 1})
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'should allow removing all blank values' do
|
66
|
+
a = {:a => 1, :b => ''}
|
67
|
+
a.compact_blank!
|
68
|
+
expect(a).to eq({:a => 1})
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should allow removing all blank values recursively' do
|
72
|
+
a = {:a => 1, :b => {:c => 1, :d => '', :e => []}}
|
73
|
+
a.recursive_compact_blank!
|
74
|
+
expect(a).to eq({:a => 1, :b => {:c => 1}})
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'should allow extracting subsets' do
|
78
|
+
a = {:a => 1, :b => 2, :c => 3}
|
79
|
+
b = a.extract!(:a, :c)
|
80
|
+
expect(b).to eq({:a => 1, :c => 3})
|
81
|
+
expect(a).to eq({:b => 2})
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
describe Hash, '#map_key_value' do
|
88
|
+
|
89
|
+
subject { {'1' => '2', 3 => 4} }
|
90
|
+
|
91
|
+
it 'should map key' do
|
92
|
+
expect(subject.map_key(:to_i)).to eq({1 => '2', 3 => 4})
|
93
|
+
end
|
94
|
+
|
95
|
+
it 'should map value' do
|
96
|
+
expect(subject.map_value(:to_i)).to eq({'1' => 2, 3 => 4})
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'should map key and value' do
|
100
|
+
expect(subject.map_key_value(:to_i, :to_i)).to eq({1 => 2, 3 => 4})
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'should map key and value if value not specified' do
|
104
|
+
expect(subject.map_key_value(:to_i)).to eq({1 => 2, 3 => 4})
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
data/spec/object_spec.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Object do
|
4
|
+
|
5
|
+
class TestClass; end
|
6
|
+
|
7
|
+
class TestModel
|
8
|
+
def id; 1; end
|
9
|
+
end
|
10
|
+
|
11
|
+
before do
|
12
|
+
@object = TestClass.new
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should allow definig virtual belongs_to associations" do
|
16
|
+
expect { @object.virtual_belongs_to(:test_model) }.to_not raise_error
|
17
|
+
expect { @object.test_model = TestModel.new }.to_not raise_error
|
18
|
+
expect(@object.test_model_id).to eq 1
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
describe Object do
|
25
|
+
|
26
|
+
class ReadyError < StandardError; end
|
27
|
+
|
28
|
+
class BooleanizeTest
|
29
|
+
|
30
|
+
attr_accessor :ready
|
31
|
+
|
32
|
+
def verify!
|
33
|
+
fail ArgumentError, "Ready should be a boolean" unless ready.is_a?(TrueClass) || ready.is_a?(FalseClass)
|
34
|
+
fail ReadyError, "Not ready" unless ready
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
before do
|
41
|
+
@object = BooleanizeTest.new
|
42
|
+
end
|
43
|
+
|
44
|
+
|
45
|
+
it "should allow defining methods that will return boolean depending on the execution of another method" do
|
46
|
+
expect { @object.booleanize(:verify!, :rescue => ReadyError) }.to_not raise_error
|
47
|
+
expect { @object.verify? }.to raise_error(ArgumentError, 'Ready should be a boolean')
|
48
|
+
@object.ready = false
|
49
|
+
expect { @object.verify? }.to_not raise_error
|
50
|
+
expect(@object.verify?).to be false
|
51
|
+
expect(@object.reason_not_verify).to eq "Not ready"
|
52
|
+
@object.ready = true
|
53
|
+
expect { @object.verify? }.to_not raise_error
|
54
|
+
expect(@object.verify?).to be true
|
55
|
+
expect(@object.reason_not_verify).to be nil
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'bundler/setup'
|
10
|
+
require 'support/coverage'
|
11
|
+
require 'ruby_core_extensions'
|
12
|
+
|
13
|
+
RSpec.configure do |config|
|
14
|
+
config.raise_errors_for_deprecations!
|
15
|
+
config.run_all_when_everything_filtered = true
|
16
|
+
config.filter_run :focus
|
17
|
+
end
|
data/spec/string_spec.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
describe String do
|
2
|
+
|
3
|
+
it "should convert to underscore replacing spaces with underscores" do
|
4
|
+
expect("CamelCase UPPERCASE to be_Converted".proper_underscore).to eq "camel_case_uppercase_to_be_converted"
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'should separate numbers and letters' do
|
8
|
+
expect('abc123'.separate_numbers_and_letters).to eq 'abc 123'
|
9
|
+
expect('123Abc'.separate_numbers_and_letters).to eq '123 Abc'
|
10
|
+
|
11
|
+
# The following should also work but doesn't
|
12
|
+
# '1A2b3c'.separate_numbers_and_letters.should == '1 A 2 b 3 c'
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should convert new lines to <br /> tags" do
|
16
|
+
expect("Line 1\nLine2\nLine3".nl2br).to eq "Line 1<br />Line2<br />Line3"
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should squash' do
|
20
|
+
text = 'Adelaide University'
|
21
|
+
expect(text.squash(30)).to eq 'Adelaide University'
|
22
|
+
expect(text.squash(10)).to eq 'Adela Univ'
|
23
|
+
expect(text.squash(7)).to eq 'Ade Uni'
|
24
|
+
expect(text.squash(6)).to eq 'Ade Un'
|
25
|
+
expect(text.squash(5)).to eq 'Ad Un'
|
26
|
+
expect(text.squash(4)).to eq 'Ad U'
|
27
|
+
expect(text.squash(3)).to eq 'AU'
|
28
|
+
expect(text.squash(2)).to eq 'AU'
|
29
|
+
expect(text.squash(1)).to eq 'A'
|
30
|
+
|
31
|
+
text = 'University South Australia'
|
32
|
+
expect(text.squash(30)).to eq 'University South Australia'
|
33
|
+
expect(text.squash(10)).to eq 'Uni Sou Au'
|
34
|
+
expect(text.squash(9)).to eq 'Uni So Au'
|
35
|
+
expect(text.squash(8)).to eq 'Un So Au'
|
36
|
+
expect(text.squash(7)).to eq 'Un So A'
|
37
|
+
expect(text.squash(6)).to eq 'Un S A'
|
38
|
+
expect(text.squash(5)).to eq 'USA'
|
39
|
+
expect(text.squash(4)).to eq 'USA'
|
40
|
+
expect(text.squash(3)).to eq 'USA'
|
41
|
+
expect(text.squash(2)).to eq 'US'
|
42
|
+
expect(text.squash(1)).to eq 'U'
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'should convert to bool' do
|
46
|
+
expect('t'.to_bool).to eq true
|
47
|
+
expect('true'.to_bool).to eq true
|
48
|
+
expect('y'.to_bool).to eq true
|
49
|
+
expect('yes'.to_bool).to eq true
|
50
|
+
expect('1'.to_bool).to eq true
|
51
|
+
|
52
|
+
expect('f'.to_bool).to eq false
|
53
|
+
expect('false'.to_bool).to eq false
|
54
|
+
expect('n'.to_bool).to eq false
|
55
|
+
expect('no'.to_bool).to eq false
|
56
|
+
expect('0'.to_bool).to eq false
|
57
|
+
expect(''.to_bool).to eq false
|
58
|
+
|
59
|
+
expect { 'a'.to_bool }.to raise_error(ArgumentError)
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
MINIMUM_COVERAGE = 87
|
2
|
+
|
3
|
+
unless ENV['COVERAGE'] == 'off'
|
4
|
+
require 'simplecov'
|
5
|
+
require 'simplecov-rcov'
|
6
|
+
require 'coveralls'
|
7
|
+
Coveralls.wear!
|
8
|
+
|
9
|
+
SimpleCov.formatters = [
|
10
|
+
SimpleCov::Formatter::RcovFormatter,
|
11
|
+
Coveralls::SimpleCov::Formatter
|
12
|
+
]
|
13
|
+
SimpleCov.start do
|
14
|
+
add_filter '/vendor/'
|
15
|
+
add_filter '/spec/'
|
16
|
+
add_filter '/lib/error_handling/'
|
17
|
+
add_group 'lib', 'lib'
|
18
|
+
end
|
19
|
+
SimpleCov.at_exit do
|
20
|
+
SimpleCov.result.format!
|
21
|
+
percent = SimpleCov.result.covered_percent
|
22
|
+
unless percent >= MINIMUM_COVERAGE
|
23
|
+
puts '*' * 80
|
24
|
+
puts "Coverage must be above #{MINIMUM_COVERAGE}%. It is #{format('%.2f', percent)}%"
|
25
|
+
puts '*' * 80
|
26
|
+
Kernel.exit(1)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_core_extensions
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Noack
|
8
|
+
- Alessandro Berardi
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2016-06-17 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '2.0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '2.0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: tzinfo
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: bundler
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '1.3'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rake
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rspec
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: simplecov
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
type: :development
|
92
|
+
prerelease: false
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
name: simplecov-rcov
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
type: :development
|
106
|
+
prerelease: false
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: coveralls
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: travis
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
description: These are extensions from core ruby classes.
|
141
|
+
email: development@travellink.com.au
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".travis.yml"
|
149
|
+
- Gemfile
|
150
|
+
- LICENSE
|
151
|
+
- README.md
|
152
|
+
- Rakefile
|
153
|
+
- gemfiles/rails3.gemfile
|
154
|
+
- gemfiles/rails4.gemfile
|
155
|
+
- lib/ruby_core_extensions.rb
|
156
|
+
- lib/ruby_core_extensions/array.rb
|
157
|
+
- lib/ruby_core_extensions/class.rb
|
158
|
+
- lib/ruby_core_extensions/compact.rb
|
159
|
+
- lib/ruby_core_extensions/compact/array.rb
|
160
|
+
- lib/ruby_core_extensions/compact/hash.rb
|
161
|
+
- lib/ruby_core_extensions/enumerable.rb
|
162
|
+
- lib/ruby_core_extensions/file.rb
|
163
|
+
- lib/ruby_core_extensions/hash.rb
|
164
|
+
- lib/ruby_core_extensions/kernel.rb
|
165
|
+
- lib/ruby_core_extensions/numeric.rb
|
166
|
+
- lib/ruby_core_extensions/object.rb
|
167
|
+
- lib/ruby_core_extensions/recursive.rb
|
168
|
+
- lib/ruby_core_extensions/recursive/array.rb
|
169
|
+
- lib/ruby_core_extensions/recursive/big_decimal.rb
|
170
|
+
- lib/ruby_core_extensions/recursive/date.rb
|
171
|
+
- lib/ruby_core_extensions/recursive/date_time.rb
|
172
|
+
- lib/ruby_core_extensions/recursive/fixnum.rb
|
173
|
+
- lib/ruby_core_extensions/recursive/hash.rb
|
174
|
+
- lib/ruby_core_extensions/recursive/object.rb
|
175
|
+
- lib/ruby_core_extensions/recursive/time.rb
|
176
|
+
- lib/ruby_core_extensions/string.rb
|
177
|
+
- lib/ruby_core_extensions/version.rb
|
178
|
+
- ruby_core_extensions.gemspec
|
179
|
+
- spec/array_spec.rb
|
180
|
+
- spec/class_spec.rb
|
181
|
+
- spec/compact_spec.rb
|
182
|
+
- spec/enumerable_spec.rb
|
183
|
+
- spec/filename_spec.rb
|
184
|
+
- spec/hash_spec.rb
|
185
|
+
- spec/numeric_spec.rb
|
186
|
+
- spec/object_spec.rb
|
187
|
+
- spec/spec_helper.rb
|
188
|
+
- spec/string_spec.rb
|
189
|
+
- spec/support/coverage.rb
|
190
|
+
homepage: http://github.com/sealink/ruby_core_extensions
|
191
|
+
licenses:
|
192
|
+
- MIT
|
193
|
+
metadata: {}
|
194
|
+
post_install_message:
|
195
|
+
rdoc_options: []
|
196
|
+
require_paths:
|
197
|
+
- lib
|
198
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
requirements:
|
205
|
+
- - ">="
|
206
|
+
- !ruby/object:Gem::Version
|
207
|
+
version: '0'
|
208
|
+
requirements: []
|
209
|
+
rubyforge_project:
|
210
|
+
rubygems_version: 2.4.8
|
211
|
+
signing_key:
|
212
|
+
specification_version: 4
|
213
|
+
summary: Set of extensions to core ruby libraries used by TravelLink Technology.
|
214
|
+
test_files:
|
215
|
+
- spec/array_spec.rb
|
216
|
+
- spec/class_spec.rb
|
217
|
+
- spec/compact_spec.rb
|
218
|
+
- spec/enumerable_spec.rb
|
219
|
+
- spec/filename_spec.rb
|
220
|
+
- spec/hash_spec.rb
|
221
|
+
- spec/numeric_spec.rb
|
222
|
+
- spec/object_spec.rb
|
223
|
+
- spec/spec_helper.rb
|
224
|
+
- spec/string_spec.rb
|
225
|
+
- spec/support/coverage.rb
|