w-stdlib 0.0.15 → 0.1.0

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
2
  SHA256:
3
- metadata.gz: de329ce379af0a89b8b8c7879ae89907b7e23922973ce14e83f94393b2725012
4
- data.tar.gz: d7860bd01015f1344cb96a05769954ebbdcc36e14243b90bc3ba80fa4044a036
3
+ metadata.gz: 99306665498093b2a9e70d81c1e1a6320a146b8861706a4194a9b15c7c4bc4b8
4
+ data.tar.gz: 875e7062c1762943c45893bf147b5d43a534df15b359f22830415d6cc80f0ef5
5
5
  SHA512:
6
- metadata.gz: fc7f4dc141c22b3a7e1ba26b31c11000756a83cbfee52da34df43c04dbf1c3aa7fb3058efb9102495f286ecb142833b1289e2e6aabe97969cac6cc177fe45d00
7
- data.tar.gz: 50058d76f55b2290a6cc25c65f1e7de23c2df24fdebb3c68fdc599d19c8119e81154ac4a9f83cb616fbce7688d432098a9ad6bf52c93cfa64677fafea83f29b4
6
+ metadata.gz: d02a46a406cff16e17834b22d460a3b19532c51acc5d079cac669751e409da1bcbb95406f71656e91fc0da3838943e58839ea80f0402b55a6c3c2d176985fe8a
7
+ data.tar.gz: 6973d4ffbb55fac0bed17fde82c23486b3f240cd20514d67acfb266e3c8353327cc671f1f898070260896d7fa8a10979dfa1bb0bb6bddd2e4356c03d672c0046
@@ -27,5 +27,9 @@ module HashExt
27
27
  def puts_all
28
28
  each { puts "#{_1}: #{_2}"}
29
29
  end
30
+
31
+ def pluck(*keys)
32
+ select { keys.include? _1 }
33
+ end
30
34
  end
31
35
  end
@@ -19,7 +19,6 @@ module StringExt
19
19
  alias_method :is_lowercase?, :is_downcase?
20
20
  alias_method :is_lower?, :is_downcase?
21
21
 
22
-
23
22
  def matches_glob?(pattern)
24
23
  File.fnmatch pattern, self
25
24
  end
@@ -1,8 +1,14 @@
1
1
  require 'http'
2
2
  require 'json'
3
3
  require_relative 'core_ext/string'
4
+ require_relative 'core_ext/array'
5
+ require_relative 'core_ext/hash'
6
+ require_relative 'core_ext/object'
4
7
 
5
8
  using StringExt
9
+ using ArrayExt
10
+ using HashExt
11
+ using ObjectExt
6
12
 
7
13
  def fatal(msg, code=1, pref='[!] ')
8
14
  STDERR.puts pref + msg
data/w-stdlib.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |g|
2
2
  g.name = 'w-stdlib'
3
- g.version = '0.0.15'
3
+ g.version = '0.1.0'
4
4
  g.summary = 'Pre-alpha package that contains abstractions that I find useful when scripting. Not suitable for production use. Breaking changes highly likely even with minor version bumps. Use at your own risk'
5
5
  g.description = g.summary
6
6
  g.authors = ['will@btlr.dev']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w-stdlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - will@btlr.dev