renc 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b37aa5ea23c2d62516fb961f243cf75f611d8a7
4
- data.tar.gz: c2eece2df16dcbf6b81bcfc176d99661c25d14e1
3
+ metadata.gz: c42bc4c16709bca6d4f1a198045fa91e538482dc
4
+ data.tar.gz: e4b69739039e38f7f549d3fcdab970f05a4b6029
5
5
  SHA512:
6
- metadata.gz: 1761bfd89920e0d4f5f1f39efa483d1d591669bfe853b45adad8c9c802148a15de1d1f87daf1753246d8237a7586373e7f1f13d7da3eec49c132c12b7c7c3e67
7
- data.tar.gz: 85f8565ede7fe37f109fe69a68040084703332983b6e0b30f0880d784b01554d3a5126cf11088db4a052cc5a504fd143461018febd12a8dc75c9ac56b6d36012
6
+ metadata.gz: ce09c021db1adb9f7a25b0920351f27e03dc82edda91551de606cd8f6e5f36f4d1506173a415e4ed04b6f7599896ad612e3d666d4ca848175f27fab6ed00e72b
7
+ data.tar.gz: 0ded2abe46c1c8370be06868aa7da87ad88d588561c69c514560f79275a527977e8be7cf4fbc7db85baaf4f0f2826598b7046e56810b427f4704b7ed9f992ca3
data/CAHNGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
+ # v1.0.1
2
+ - required Ruby version is change to over 2.0.0.
3
+ - gemspec: `spec.required_ruby_version = '>= 2.0.0'`
4
+ - maybe, be able to run on `version >= 2.0.0`.
5
+
1
6
  # v1.0.0
2
- - base method change from singleton_method to instance_method.
7
+ - change to instance_method from singleton_method.
3
8
  - renc method is implemented.
4
9
  - enc method is deprecated.
5
10
  - required Ruby version is change to over 2.2.4.
data/README.md CHANGED
@@ -6,11 +6,6 @@
6
6
 
7
7
  # Renc
8
8
 
9
- Welcome to your new gem!
10
- In this directory, you'll find the files you need to be able to package up your Ruby library into a gem.
11
- Put your Ruby code in the file `lib/renc`.
12
- To experiment with that code, run `bin/console` for an interactive prompt.
13
-
14
9
  recurse encoding for Hash and Array.
15
10
 
16
11
  ## Installation
@@ -64,7 +59,7 @@ and push the `.gem` file to [rubygems.org](https://rubygems.org).
64
59
  ## Contributing
65
60
 
66
61
  Bug reports and pull requests are welcome on
67
- GitHub at https://github.com/[USERNAME]/renc.
62
+ GitHub at https://github.com/k-ta-yamada/renc.
68
63
  This project is intended to be a safe,
69
64
  welcoming space for collaboration,
70
65
  and contributors are expected to adhere to the
data/bin/console CHANGED
File without changes
data/lib/renc.rb CHANGED
@@ -2,6 +2,10 @@ require 'renc/version'
2
2
 
3
3
  # namespace
4
4
  module Renc
5
+ # recurse encoding for Hash and Array.
6
+ # @param obj [Object]
7
+ # @param encoding [Encoding]
8
+ # @return [Object]
5
9
  def renc(obj, encoding = Encoding::UTF_8)
6
10
  case obj
7
11
  when String then obj.encode(encoding)
@@ -11,12 +15,14 @@ module Renc
11
15
  end
12
16
  end
13
17
 
14
- extend Gem::Deprecate
18
+ # @see #renc
15
19
  alias enc renc
20
+ extend Gem::Deprecate
16
21
  deprecate :enc, :renc, 2016, 3
17
22
 
18
23
  private
19
24
 
25
+ # recurse encoding for Hash values of String.
20
26
  def enc_hash(obj, encoding)
21
27
  obj.each_with_object({}) do |args, h|
22
28
  key, val = args
@@ -24,6 +30,7 @@ module Renc
24
30
  end
25
31
  end
26
32
 
33
+ # recurse encoding for Array values of String.
27
34
  def enc_array(obj, encoding)
28
35
  obj.map { |val| renc(val, encoding) }
29
36
  end
data/lib/renc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Renc
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.freeze
3
3
  end
data/renc.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ['k-ta-yamada']
10
10
  spec.email = ['key.luvless@gmail.com']
11
11
 
12
- spec.required_ruby_version = '>= 2.2.4'
12
+ spec.required_ruby_version = '>= 2.0.0'
13
13
 
14
14
  spec.summary = 'recurse encoding for Hash and Array.'
15
15
  spec.description = 'recurse encoding for Hash and Array.'
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'pry-theme'
31
31
  spec.add_development_dependency 'pry-byebug'
32
32
  spec.add_development_dependency 'rubocop'
33
+ spec.add_development_dependency 'awesome_print'
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k-ta-yamada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-27 00:00:00.000000000 Z
11
+ date: 2016-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: awesome_print
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: recurse encoding for Hash and Array.
126
140
  email:
127
141
  - key.luvless@gmail.com
@@ -157,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
171
  requirements:
158
172
  - - ">="
159
173
  - !ruby/object:Gem::Version
160
- version: 2.2.4
174
+ version: 2.0.0
161
175
  required_rubygems_version: !ruby/object:Gem::Requirement
162
176
  requirements:
163
177
  - - ">="
@@ -165,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
179
  version: '0'
166
180
  requirements: []
167
181
  rubyforge_project:
168
- rubygems_version: 2.5.1
182
+ rubygems_version: 2.2.2
169
183
  signing_key:
170
184
  specification_version: 4
171
185
  summary: recurse encoding for Hash and Array.