sparsify 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjU2OWYwNjg0ZGU2NDhmMTQ1NDY5MGExYWFhNmM4ZjQzMjU5OWMyOQ==
5
+ data.tar.gz: !binary |-
6
+ YzFiMmYzYzU2ODdjYTFiZmE4ODkzYmM1MWVhMTVmZmZhNDhjOGY2OQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ N2JiMDE4MTE1ZDliN2JiMTVkMDJhMzg0Yzg5MDJjZDk4ZmI3ODEyNGRlZjQ1
10
+ MDM5MjU5NGE5YjZjNDI3OGRhOGFiNjVhMWUyYTFiNjM3MWU2ODIxOThmM2Jj
11
+ M2ZlMDViYjE4OThmNjBkZmI3M2NkN2U3ZjY0NWQzMTAyMzQwNDY=
12
+ data.tar.gz: !binary |-
13
+ YTgyOGIyY2ZjNTdhZjU0YWQ1NzA5OGQwMzJiZDFiZmYwN2QyMjI4Njc4MGMx
14
+ MGIxYWIxMzhiYzhmNzc3NzZhZjdmYTk3N2I4N2RhMWMxYjE1ODM2MjNhOWE5
15
+ ODk4ZmYzNDE5NTU3MDViOTNlMTFkYTNkOWFiMmVhOTRmMzUxY2Y=
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ ## v1.0.1 (2013-12-22)
4
+
5
+ - Made Sparsify() and Unsparsify() helpers private methods on Kernel instead
6
+ of including a module into Object & cluttering the Object ancestry (@yaauie)
7
+
8
+ ## v1.0.0 (2013-12-10)
9
+
10
+ - Initial release
data/lib/sparsify.rb CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'sparsify/version'
4
4
  require 'sparsify/utility_methods'
5
- require 'sparsify/helper_methods'
6
5
  require 'sparsify/guard_methods'
6
+ require 'sparsify/core_ext/kernel'
7
7
 
8
8
  # Provides sparse-key access to a Hash.
9
9
  #
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ module Kernel
4
+
5
+ # @see Sparsify#sparse
6
+ # @api public
7
+ def Sparsify(hsh, options = {})
8
+ Sparsify.sparse(hsh, options)
9
+ end
10
+ private :Sparsify
11
+
12
+ # @see Sparsify#unsparse
13
+ # @api public
14
+ def Unsparsify(hsh, options = {})
15
+ Sparsify.unsparse(hsh, options)
16
+ end
17
+ private :Unsparsify
18
+ end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Sparsify
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparsify
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
5
- prerelease:
4
+ version: 1.0.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ryan Biesemeyer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-10 00:00:00.000000000 Z
11
+ date: 2014-07-08 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: ruby-appraiser-rubocop
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,7 +62,6 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
@@ -83,6 +74,7 @@ extensions: []
83
74
  extra_rdoc_files: []
84
75
  files:
85
76
  - .gitignore
77
+ - CHANGELOG.md
86
78
  - CONTRIBUTING.md
87
79
  - Gemfile
88
80
  - LICENSE.txt
@@ -90,8 +82,8 @@ files:
90
82
  - Rakefile
91
83
  - git_hooks/pre-commit/ruby-appraiser
92
84
  - lib/sparsify.rb
85
+ - lib/sparsify/core_ext/kernel.rb
93
86
  - lib/sparsify/guard_methods.rb
94
- - lib/sparsify/helper_methods.rb
95
87
  - lib/sparsify/utility_methods.rb
96
88
  - lib/sparsify/version.rb
97
89
  - sparsify.gemspec
@@ -99,27 +91,26 @@ files:
99
91
  homepage: https://www.github.com/simplymeasured/sparsify
100
92
  licenses:
101
93
  - Apache 2
94
+ metadata: {}
102
95
  post_install_message:
103
96
  rdoc_options: []
104
97
  require_paths:
105
98
  - lib
106
99
  required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
100
  requirements:
109
101
  - - ! '>='
110
102
  - !ruby/object:Gem::Version
111
103
  version: '0'
112
104
  required_rubygems_version: !ruby/object:Gem::Requirement
113
- none: false
114
105
  requirements:
115
106
  - - ! '>='
116
107
  - !ruby/object:Gem::Version
117
108
  version: '0'
118
109
  requirements: []
119
110
  rubyforge_project:
120
- rubygems_version: 1.8.24
111
+ rubygems_version: 2.2.2
121
112
  signing_key:
122
- specification_version: 3
113
+ specification_version: 4
123
114
  summary: Flattens deeply-nested hashes into sparse hashes
124
115
  test_files:
125
116
  - spec/sparsify_spec.rb
@@ -1,17 +0,0 @@
1
- # encoding: utf-8
2
-
3
- module Sparsify
4
- module HelperMethods
5
- def Sparsify(hsh, options = {})
6
- Sparsify.sparse(hsh, options)
7
- end
8
-
9
- def Unsparsify(hsh, options = {})
10
- Sparsify.unsparse(hsh, options)
11
- end
12
- end
13
-
14
- extend HelperMethods
15
- end
16
-
17
- include Sparsify::HelperMethods