lab42_core 0.1.0 → 0.1.1

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: 78544f6924efe2fc7b4f8e3db0503886225e4352
4
- data.tar.gz: cb657a1d204799beca463d4ef393ad45ed4c7973
3
+ metadata.gz: 5abf33645e91cd25afc2561b6d8b16a2aa7f5cd8
4
+ data.tar.gz: 09f7c35a4b526bbd577b549ff7a8b260168137e0
5
5
  SHA512:
6
- metadata.gz: 1b53638447c31d3a6fbc64cb096a88b4b1d704d7967c0eabc908fdc693ee10dba232a6a96e4b1f21a9d7fdcc28bd10503badf7e68a61a0b107b296595d5e0a72
7
- data.tar.gz: f93db262bbf0f249f27eaec041d47f7d806271166b569b24a111ec1fa4b85e4994ae8fabf7f878c1ea1833969c2b5987bdce5c7b40f77ec1d71cf7896887f60f
6
+ metadata.gz: a755bb762ce16516d920c1b48e8c7c2843dafa2acc08cc63400b89f8eaf960114190c996b4a60620dd22a44c99f6883620a831827667fb9d06e5bd113159c36c
7
+ data.tar.gz: dc4ae82fb3c196b5fc7b8ff581db88d586af9bdfea529c57b2dce1a7eea844208a2174ee907d9d95c436248ddf96128143ad29ec0b370ba3b84b5cc0170df9c0
data/README.md CHANGED
@@ -1,5 +1,14 @@
1
+
2
+
3
+
1
4
  # lab42\_core
2
5
 
6
+
7
+ [![Build Status](https://travis-ci.org/RobertDober/lab42_core.svg?branch=master)](https://travis-ci.org/RobertDober/lab42_core)
8
+ [![Code Climate](https://codeclimate.com/github/RobertDober/lab42_core/badges/gpa.svg)](https://codeclimate.com/github/RobertDober/lab42_core)
9
+ [![Test Coverage](https://codeclimate.com/github/RobertDober/lab42_core/badges/coverage.svg)](https://codeclimate.com/github/RobertDober/lab42_core)
10
+
11
+
3
12
  Simple Ruby Core Module Extensions (for more see lab42\_more)
4
13
 
5
14
  ## Array
@@ -56,7 +65,7 @@ For details see the corresponding [QED demo](https://github.com/RobertDober/lab4
56
65
 
57
66
  ## File
58
67
 
59
- `expand\_local\_path` to get rid of the `__FILE__` inside `expand\_path`.
68
+ `expand_local_path` to get rid of the `__FILE__` inside `expand_path`.
60
69
 
61
70
  For details see the corresponding [QED demo](https://github.com/RobertDober/lab42_core/blob/master/demo/file.md).
62
71
 
@@ -23,16 +23,16 @@ class Enumerator::Lazy
23
23
  [ select{ |x| expr === x }, reject{ |x| expr === x } ]
24
24
  end
25
25
 
26
- def to_proc
27
- this = self
28
- yielder = to_enum.lazy
29
- -> do
30
- yielder.next
31
- end
32
- .extend( Module.new do
33
- define_method :reset! do
34
- yielder = this.to_enum.lazy
35
- end
36
- end)
37
- end
26
+ # def to_proc
27
+ # this = self
28
+ # yielder = to_enum.lazy
29
+ # -> do
30
+ # yielder.next
31
+ # end
32
+ # .extend( Module.new do
33
+ # define_method :reset! do
34
+ # yielder = this.to_enum.lazy
35
+ # end
36
+ # end)
37
+ # end
38
38
  end
@@ -8,4 +8,12 @@ class Hash
8
8
  end
9
9
  end
10
10
  end
11
+
12
+ def with_present key, default: nil
13
+ if has_key? key
14
+ yield fetch(key), self
15
+ else
16
+ default
17
+ end
18
+ end
11
19
  end # class Hash
@@ -1,5 +1,5 @@
1
1
  module Lab42
2
2
  module Core
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end # module Core
5
5
  end # module Lab42
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lab42_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-29 00:00:00.000000000 Z
11
+ date: 2014-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: forwarder2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.2'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: pry
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,19 +95,19 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '1.8'
83
97
  - !ruby/object:Gem::Dependency
84
- name: lab42_tmux2
98
+ name: travis-lint
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: '0.0'
103
+ version: '2.0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: '0.0'
110
+ version: '2.0'
97
111
  description: Extending Array, Hash, File, Enumerable with convenience methods, conceptual
98
112
  changes have been moved into lab42_more
99
113
  email: robert.dober@gmail.com