codecode-common-utils 0.1.2 → 0.1.3
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 +4 -4
- data/.gitignore +1 -1
- data/README.md +1 -1
- data/lib/codecode/common/utils.rb +13 -0
- data/lib/codecode/common/utils/version.rb +1 -1
- metadata +3 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae59b5b90d9f9beb0c257f5a03f75f44b1edb527
|
4
|
+
data.tar.gz: 506112e55e8b1a85f7b91f5bcd6e88566b287f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 980351651f4624843b787b5b0cbb973ad4cea7c6698a7b76d0598d7ba3936b4546ae0c60dd5c5a34bb7aa6098634a82fa7eb2ed250cdab4eca6eb517ffd74ac9
|
7
|
+
data.tar.gz: 38da0e9a38c7d926d404223a7ab847e188be4c757fcc58a1b584243429f59193611cb61aa67903731ca080a144f23bf14887a6bdb414bd231816ac64e71ac51e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -57,7 +57,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
57
57
|
|
58
58
|
## Contributing
|
59
59
|
|
60
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
60
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/frmichetti/codecode-common-utils. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
61
61
|
|
62
62
|
## License
|
63
63
|
|
@@ -17,6 +17,19 @@ module CodeCode
|
|
17
17
|
}
|
18
18
|
end
|
19
19
|
|
20
|
+
# BANG! Convert Hash string keys to symbol keys
|
21
|
+
#
|
22
|
+
# @param [Hash] hash
|
23
|
+
# @return [Hash] The resulting hash with symbolized keys
|
24
|
+
def self.symbolize_keys!(hash)
|
25
|
+
new_hash = hash.inject({}){ |memo, (k, v)|
|
26
|
+
memo[k.to_sym] = v
|
27
|
+
memo[k.to_sym] = symbolize_keys v if v.class.to_s.eql? 'Hash'
|
28
|
+
memo
|
29
|
+
}
|
30
|
+
hash.replace new_hash
|
31
|
+
end
|
32
|
+
|
20
33
|
# Removes a key from the hash and return the modified hash
|
21
34
|
#
|
22
35
|
# @param [Hash] hash
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codecode-common-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Rodrigues Michetti
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,12 +60,6 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
-
- ".idea/.rakeTasks"
|
64
|
-
- ".idea/common-utils.iml"
|
65
|
-
- ".idea/misc.xml"
|
66
|
-
- ".idea/modules.xml"
|
67
|
-
- ".idea/vcs.xml"
|
68
|
-
- ".idea/workspace.xml"
|
69
63
|
- ".rspec"
|
70
64
|
- ".travis.yml"
|
71
65
|
- CODE_OF_CONDUCT.md
|
@@ -99,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
93
|
version: '0'
|
100
94
|
requirements: []
|
101
95
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
96
|
+
rubygems_version: 2.5.2
|
103
97
|
signing_key:
|
104
98
|
specification_version: 4
|
105
99
|
summary: A library with most common utilities used in day by day
|