abstracts 1.0.11 → 1.0.12

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
- SHA1:
3
- metadata.gz: d86196c1f9849f2ec686aa48a73574b8e13c428d
4
- data.tar.gz: edda1bf88a9900e1f31ef3fff70164d291ff549f
2
+ SHA256:
3
+ metadata.gz: b3c825b19e052eecb474bbb750a6936f66de90c0b7528a95f11fcbfaefeba2e3
4
+ data.tar.gz: 8ea6885dda91f9074c704b74f883948e3f37ab44400db3330fec7f169a4ca908
5
5
  SHA512:
6
- metadata.gz: e870d9b07da643e7653c7c06f207b490a1f195304908dbab71a006a9473f0dbc2fbf66072d4c07f6b6f97ed171b9566ca2fb51354eea5e56e24c7bf20a155074
7
- data.tar.gz: fe7790a6e23ec29e261d06d9cfbb3c6a5de223f78d9ed881cb5500669882eb7b5aff21fb39a6bc8b86276e5d930e3d60dbc69fd0d1a2b9834b11d5e9ee254302
6
+ metadata.gz: 5c47dbd40e0575ed3be423dc201cd089f07c39766a5664e6509732effbc11c250c8bb65efa7c9651a65e7fdfb0695fc79e786983065f306f61a873b7019d77e9
7
+ data.tar.gz: ab2e0b7021679be8e2dc0dd71e5a400b194cd5256559adffb1110693d503f73b6887334be779ab5e3d94f14c8adaf37a59fb1d5037b9ed919c92f3640d360354
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --format documentation
3
+ --require spec_helper
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 vsuzdaltsev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ task :default do
4
+ puts "* Type 'rake --tasks' to list existent tasks"
5
+ end
6
+
7
+ namespace :test do
8
+ desc 'run rspec tests'
9
+ task :rspec do
10
+ system('rspec .')
11
+ end
12
+ end
@@ -14,6 +14,14 @@ module Abstract
14
14
  end
15
15
  false
16
16
  end
17
+
18
+ # Add default proc to Hash
19
+ # @return [Hash] - Hash with default proc
20
+ def default_hash
21
+ Hash.new do |hash, key|
22
+ hash[key] = Hash.new(&hash.default_proc)
23
+ end
24
+ end
17
25
  end
18
26
  end
19
27
 
@@ -35,7 +43,7 @@ module Abstract
35
43
  attr_reader :object
36
44
 
37
45
  # Create an instance of Abstract::Object class and yield block to it
38
- # @return @object [AbstractObject] - Abstract::Object class instance
46
+ # @return [AbstractObject] - Abstract::Object class instance
39
47
  def self.build
40
48
  builder = new(@build_class)
41
49
  yield builder if block_given?
@@ -51,12 +51,11 @@ describe 'Abstract::Extensions::Object module' do
51
51
  expect(String.blank?).to eq false
52
52
  end
53
53
  end
54
-
54
+
55
55
  context 'when self = nil' do
56
56
  it 'nil.blank? expected to be true' do
57
57
  expect(nil.blank?).to eq true
58
58
  end
59
59
  end
60
-
61
60
  end
62
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abstracts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vsevolod Suzdaltsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-11 00:00:00.000000000 Z
11
+ date: 2018-11-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Abstract classes gem
14
14
  email: suzdaltsev_v@mail.ru
@@ -16,6 +16,9 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
+ - ".rspec"
20
+ - LICENSE
21
+ - Rakefile
19
22
  - lib/abstracts.rb
20
23
  - spec/abstract_builder_spec.rb
21
24
  - spec/abstract_extensions_object_spec.rb
@@ -42,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
45
  version: '0'
43
46
  requirements: []
44
47
  rubyforge_project:
45
- rubygems_version: 2.6.6
48
+ rubygems_version: 2.7.6
46
49
  signing_key:
47
50
  specification_version: 4
48
51
  summary: Abstract classes & modules