renc 1.3.0 → 2.2.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
- SHA1:
3
- metadata.gz: d3125b37f8be1fbbb5c13ed9b8cfc46a9b194842
4
- data.tar.gz: e4728c765ba5fa9e0ee91bcf529eea90291582e3
2
+ SHA256:
3
+ metadata.gz: 12a07a3819b5e0c3ac476b111f346a56a3a7936ca2843c00006367ff96ffa98a
4
+ data.tar.gz: 49c6afd4b3e1f84020be224fdd66a65e89688b8154fbf58596afecc0049e79bc
5
5
  SHA512:
6
- metadata.gz: 0fa3a777853a2e7e32df811616bcf2379150dc8537696c0575d24d3ed1208724a858c2891558e8232617073b781387f4046b5a829cb825172ed42bbba70e3f56
7
- data.tar.gz: 28f87fdcf7561059f7b48580ef1cfa3d38af1ca586a2cfc230a05c6bb8feb85c3d5134893e3728cd2c84e6ceda03277b38925784e63a8afa9da032e71329df63
6
+ metadata.gz: 0b37003f38acf041ca5b8e7710f0dfc2a4b6b4d7acf1e464a6135e4f41c799c16b12c1ac631f98e6823f88754516d2a408faa9c57eafe0db34f8f88a2874d1a6
7
+ data.tar.gz: 253d69c822c8865bacf37402fa1c52c593f4231dbf999e8821e12f29e5b76d59b33abac206eb09194b0ad0e3b08571a2574a5d18991d27eb84783db8d2c65c4f
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
 
11
11
  /vendor
12
+ /bin
@@ -9,6 +9,15 @@ AllCops:
9
9
  Exclude:
10
10
  - renc.gemspec
11
11
  - vendor/**/*
12
+ - bin/**/*
12
13
 
13
14
  Style/AsciiComments:
14
15
  Enabled: false
16
+
17
+ Metrics/BlockLength:
18
+ Exclude:
19
+ - spec/**/*
20
+
21
+ Metrics/LineLength:
22
+ Exclude:
23
+ - spec/**/*
@@ -1,6 +1,19 @@
1
1
  language: ruby
2
+
2
3
  cache: bundler
4
+
3
5
  rvm:
4
- - 2.3.0
5
- - 2.2.4
6
- before_install: gem install bundler -v 1.11.2
6
+ - 3.0
7
+ - 2.7
8
+ - 2.6
9
+ - 2.5
10
+
11
+ before_install:
12
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13
+ - chmod +x ./cc-test-reporter
14
+
15
+ before_script:
16
+ - ./cc-test-reporter before-build
17
+
18
+ after_script:
19
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
@@ -1,20 +1,64 @@
1
- # v1.3.0
2
- - [issue #7](https://github.com/k-ta-yamada/tee_logger/issues/7)
1
+ # CHANGELOG.md
2
+
3
+ ## v2.2.1
4
+
5
+ 2020-12-31 JST
6
+
7
+ - Add support for Ruby 3.0
8
+
9
+ ## v2.2.0
10
+
11
+ 2017-08-11 JST
12
+
13
+ - [issue #25](https://github.com/k-ta-yamada/renc/issues/25)
14
+ [add] Add target Class Struct #25
15
+ - [issue #26](https://github.com/k-ta-yamada/renc/issues/26)
16
+ [mod] Add error message details #26
17
+ - [issue #23](https://github.com/k-ta-yamada/renc/issues/23)
18
+ [clean] Renc::Configuration.default_xxx='s comment is wrong #23
19
+
20
+ ## v2.1.0
21
+
22
+ - [issue #21](https://github.com/k-ta-yamada/renc/issues/21)
23
+ change class structure; Separate Configuration #21
24
+
25
+ ## v2.0.0
26
+
27
+ - [issue #10](https://github.com/k-ta-yamada/renc/issues/10)
28
+ Changing default_encoding by os #10
29
+ - change default encoding is `Encoding.default_external`
30
+ - [issue #18](https://github.com/k-ta-yamada/renc/issues/18)
31
+ Encoding::UndefinedConversionError #18
32
+ - change `#renc`'s arguments is change.
33
+ #renc(encoding, `obj`) => #renc(encoding, `options`)
34
+
35
+ ## v1.3.1
36
+
37
+ - [issue #14](https://github.com/k-ta-yamada/renc/issues/14)
38
+ String.include is NoMethodError on Ruby 2.0.0
39
+
40
+ ## v1.3.0
41
+
42
+ - [issue #7](https://github.com/k-ta-yamada/renc/issues/7)
3
43
  configuration default encoding
4
44
 
5
- # v1.2.0
45
+ ## v1.2.0
46
+
6
47
  - remove `Renc#enc` method
7
48
 
8
- # v1.1.0
9
- - [issue #4](https://github.com/k-ta-yamada/tee_logger/issues/4)
49
+ ## v1.1.0
50
+
51
+ - [issue #4](https://github.com/k-ta-yamada/renc/issues/4)
10
52
  #renc for Hash and Array
11
53
 
12
- # v1.0.1
54
+ ## v1.0.1
55
+
13
56
  - required Ruby version is change to over 2.0.0.
14
57
  - gemspec: `spec.required_ruby_version = '>= 2.0.0'`
15
58
  - maybe, be able to run on `version >= 2.0.0`.
16
59
 
17
- # v1.0.0
60
+ ## v1.0.0
61
+
18
62
  - change to instance_method from singleton_method.
19
63
  - renc method is implemented.
20
64
  - enc method is deprecated.
@@ -23,8 +67,10 @@
23
67
  - maybe, be able to run on `version >= 2.0.0`.
24
68
  - Travis CI: 2.2.4, 2.3.0
25
69
 
26
- # v0.2.0
70
+ ## v0.2.0
71
+
27
72
  - implement base features.
28
73
 
29
- # v0.1.0
74
+ ## v0.1.0
75
+
30
76
  - sorry, this version is dummy.
data/Gemfile CHANGED
@@ -2,5 +2,3 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in renc.gemspec
4
4
  gemspec
5
- gem 'codeclimate-test-reporter', group: :test, require: nil
6
- gem 'simplecov-console', group: :test, require: nil
data/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  [![Gem Version][gem_version-svg]][gem_version]
2
2
  [![Build Status][travis-svg]][travis]
3
+ [![Downloads][downloads-svg]][gem_version]
4
+ [![Inline docs][inch-ci-svg]][inch-ci]
3
5
  [![Code Climate][codeclimate-svg]][codeclimate]
4
6
  [![Test Coverage][codeclimate_cov-svg]][codeclimate_cov]
5
- [![Inline docs][inch-ci-svg]][inch-ci]
6
7
 
7
8
  # Renc
8
9
 
9
- recurse encoding for Hash and Array.
10
+ recursive encode for Hash and Array.
11
+
10
12
 
11
13
  ## Installation
12
14
 
@@ -24,6 +26,7 @@ Or install it yourself as:
24
26
 
25
27
  $ gem install renc
26
28
 
29
+
27
30
  ## Usage
28
31
 
29
32
  ### Basic
@@ -48,13 +51,25 @@ hash_val = { a: str_ascii }
48
51
  hash_val[:a].encoding # => #<Encoding::US-ASCII>
49
52
  hash_val.renc[:a].encoding # => #<Encoding::UTF-8>
50
53
  hash_val.renc == hash_val # => true
51
-
52
54
  ```
53
55
 
54
- ### Nested Hash, Array, and others
55
- > @ref [./spec/spec_helper.rb](https://github.com/k-ta-yamada/renc/blob/feature/issue7/spec/spec_helper.rb#L18)
56
+ ### Nested Hash and Array.
57
+ > @ref [./spec/spec_helper.rb](https://github.com/k-ta-yamada/renc/blob/master/spec/spec_helper.rb#L18)
56
58
 
57
59
  ```ruby
60
+ nested = {
61
+ a: 'a', # encoding target1
62
+ b: {
63
+ ba: 1,
64
+ bb: [
65
+ 'bb0', # encoding target2
66
+ :bb2,
67
+ 3
68
+ ]
69
+ }
70
+ }
71
+ nested.renc == nested # => true
72
+
58
73
  # @ref ./spec/spec_helper.rb#L18
59
74
  class Hash
60
75
  def values_in_nested_hash
@@ -62,38 +77,46 @@ class Hash
62
77
  end
63
78
  end
64
79
 
65
- nested = { a: 'a', # encoding target1
66
- b: { ba: 1,
67
- bb: [
68
- 'bb0', # encoding target2
69
- :bb2,
70
- 3
71
- ]
72
- }
73
- }
74
- nested.renc == nested # => true
75
-
76
- encoded_string_values = nested.values_in_nested_hash
77
- encoded_string_values.flatten!
80
+ encoded_string_values = nested.values_in_nested_hash # => ["a", [1, ["bb0", :bb2, 3]]]
81
+ encoded_string_values.flatten! # => ["a", 1, "bb0", :bb2, 3]
78
82
  encoded_string_values.select! { |v| v.is_a?(String) } # => ["a", "bb0"]
79
83
  encoded_string_values.all? { |v| v.encoding == Encoding::UTF_8 } # => true
80
84
  ```
81
85
 
82
86
  ### Configuration
83
87
 
88
+ #### Renc.default_encoding
89
+
84
90
  ```ruby
85
- # default configure encoding is utf-8
91
+ # default configure encoding is Encoding.default_external
92
+ Encoding.default_external # => #<Encoding::UTF-8>
86
93
  Renc.default_encoding # => #<Encoding::UTF-8>
87
94
  'test'.renc.encoding # => #<Encoding::UTF-8>
88
95
 
89
- # if you want to change to sjis
90
- Renc.default_encoding = Encoding::Windows_31J
91
- 'test'.renc.encoding # => #<Encoding::Windows-31J>
96
+ # if you want to change to ascii
97
+ Renc.default_encoding = Encoding::ASCII
98
+ 'test'.renc.encoding # => #<Encoding::ASCII>
92
99
 
93
100
  # change temporaly
94
101
  'test'.renc(Encoding::ASCII).encoding # => #<Encoding:US-ASCII>
95
102
  ```
96
103
 
104
+ #### Renc.default_options
105
+
106
+ ```ruby
107
+ # default configure options is { undef: :replace }
108
+ Renc.default_options # => { undef: :replace }
109
+ '🐘'.renc # => '?'
110
+
111
+ # if you want to change to { undef: nil }
112
+ Renc.default_options = { undef: nil }
113
+ '🐘'.renc # => Encoding::UndefinedConversionError: U+1F418 from UTF-8 to US-ASCII
114
+
115
+ # change temporaly
116
+ '🐘'.renc(Encoding::ASCII, undef: nil).encoding # => Encoding::UndefinedConversionError: U+1F418 from UTF-8 to US-ASCII
117
+ ```
118
+
119
+
97
120
  ## Development
98
121
 
99
122
  After checking out the repo, run `bin/setup` to install dependencies.
@@ -108,6 +131,7 @@ which will create a git tag for the version,
108
131
  push git commits and tags,
109
132
  and push the `.gem` file to [rubygems.org](https://rubygems.org).
110
133
 
134
+
111
135
  ## Contributing
112
136
 
113
137
  Bug reports and pull requests are welcome on
@@ -115,17 +139,17 @@ GitHub at https://github.com/k-ta-yamada/renc.
115
139
  This project is intended to be a safe,
116
140
  welcoming space for collaboration,
117
141
  and contributors are expected to adhere to the
118
- [Contributor Covenant](http://contributor-covenant.org) code of conduct.
142
+ [Contributor Covenant](https://contributor-covenant.org) code of conduct.
119
143
 
120
144
 
121
145
  ## License
122
146
 
123
147
  The gem is available as open source
124
- under the terms of the [MIT License](http://opensource.org/licenses/MIT).
148
+ under the terms of the [MIT License](https://opensource.org/licenses/MIT).
125
149
 
126
150
 
127
151
 
128
- [gem_version]: http://badge.fury.io/rb/renc
152
+ [gem_version]: https://badge.fury.io/rb/renc
129
153
  [gem_version-svg]: https://badge.fury.io/rb/renc.svg
130
154
  [travis]: https://travis-ci.org/k-ta-yamada/renc
131
155
  [travis-svg]: https://travis-ci.org/k-ta-yamada/renc.svg
@@ -133,5 +157,6 @@ under the terms of the [MIT License](http://opensource.org/licenses/MIT).
133
157
  [codeclimate-svg]: https://codeclimate.com/github/k-ta-yamada/renc/badges/gpa.svg
134
158
  [codeclimate_cov]: https://codeclimate.com/github/k-ta-yamada/renc/coverage
135
159
  [codeclimate_cov-svg]: https://codeclimate.com/github/k-ta-yamada/renc/badges/coverage.svg
136
- [inch-ci]: http://inch-ci.org/github/k-ta-yamada/renc
137
- [inch-ci-svg]: http://inch-ci.org/github/k-ta-yamada/renc.svg?branch=master
160
+ [inch-ci]: https://inch-ci.org/github/k-ta-yamada/renc
161
+ [inch-ci-svg]: https://inch-ci.org/github/k-ta-yamada/renc.svg?branch=master
162
+ [downloads-svg]: https://ruby-gem-downloads-badge.herokuapp.com/renc?type=total&total_label=&color=brightgreen
@@ -1,80 +1,79 @@
1
1
  require 'renc/version'
2
+ require 'renc/configuration'
2
3
 
3
- # recurse encoding for Hash and Array.
4
+ # recursive encode for Hash and Array.
5
+ # @example
6
+ # require 'renc'
7
+ #
8
+ # # or context `main`
9
+ # extend Renc
10
+ # @see #renc
4
11
  module Renc
5
- # raise unless encoding.is_a?(Encoding)
6
- class ConfigureError < StandardError; end
7
-
8
- # this gem's default configured encoding
9
- DEFAULT_ENCODING = Encoding::UTF_8
12
+ extend Configuration
10
13
 
11
14
  # for include #renc method
12
- TARGET_CLASS = [String, Array, Hash].freeze
13
- TARGET_CLASS.each { |klass| klass.include self }
14
-
15
- class << self
16
- # return @default_encoding
17
- # @return [Encoding] @default_encoding
18
- # @see DEFAULT_ENCODING
19
- def default_encoding
20
- @default_encoding ||= DEFAULT_ENCODING
21
- end
22
-
23
- # configure default encoding
24
- # @param encoding [Encoding]
25
- # @example
26
- # Renc.default_encoding = 1 # => Renc::ConfigureError
27
- # Renc.default_encoding = Encoding::ASCII
28
- def default_encoding=(encoding)
29
- raise ConfigureError,
30
- 'Encoding class only allow' unless encoding.is_a?(Encoding)
31
- @default_encoding = encoding
32
- end
33
- end
15
+ TARGET_CLASS = [String, Array, Hash, Struct].freeze
16
+ TARGET_CLASS.each { |klass| klass.send(:include, self) }
34
17
 
35
- # recurse encoding for Hash and Array.
36
- # @param encoding [Encoding]
37
- # @param obj [Object]
38
- # @return [Object]
18
+ # recursive encode for Hash and Array.
39
19
  # @example
20
+ # # for example
40
21
  # default_src_encoding # => #<Encoding:UTF-8>
41
22
  #
42
23
  # # Hash values
43
- # result = { a: 'a', b: 'b', c: 'c' }.renc(Encoding::Windows_31J)
24
+ # result = { a: 'a', b: 'b', c: 'c' }.renc(Encoding::ASCII)
44
25
  # result # => { a: 'a', b: 'b', c: 'c' }
45
- # result.values.map(&:encoding).all? { Encoding::Windows_31J } # => true
26
+ # result.values.map(&:encoding).all? { Encoding::ASCII } # => true
46
27
  #
47
28
  # # Array values
48
- # result = %w(a b c).renc(Encoding::Windows_31J)
29
+ # result = %w(a b c).renc(Encoding::ASCII)
49
30
  # result # => ['a', 'b', 'c']
50
- # result.map(&:encoding).all? { Encoding::Windows_31J } # => true
31
+ # result.map(&:encoding).all? { Encoding::ASCII } # => true
51
32
  #
52
- # # if u define Kernel.renc method.
53
- # Kernel.include Renc
54
- # Object.include Kernel
55
- # # or context `main`
56
- # extend Renc
57
- def renc(encoding = Renc.default_encoding, obj = self)
58
- case obj
59
- when String then obj.encode(encoding)
60
- when Array then renc_array(obj, encoding)
61
- when Hash then renc_hash(obj, encoding)
62
- else obj
63
- end
33
+ # # with configure default_encoding
34
+ # Renc.default_encoding = Encoding::ASCII
35
+ # result = 'hello'.renc
36
+ # result # => 'hello'
37
+ # result.encoding # => Encoding::ASCII
38
+ # @param encoding [Encoding]
39
+ # @param options [Hash]
40
+ # @return [Object]
41
+ # @see .default_encoding
42
+ # @see .default_options
43
+ def renc(encoding = Renc.default_encoding, options = Renc.default_options)
44
+ raise TypeError, ERR_MESSAGE_ENCODING unless encoding.is_a?(Encoding)
45
+ raise TypeError, ERR_MESSAGE_OPTIONS unless options.is_a?(Hash)
46
+
47
+ @encoding = encoding
48
+ @options = options
49
+
50
+ _renc(self)
64
51
  end
65
52
 
66
53
  private
67
54
 
68
- # recurse encoding for Hash values of String.
69
- def renc_hash(obj, encoding)
70
- obj.each_with_object({}) do |args, h|
71
- key, val = args
72
- h[key] = renc(encoding, val)
55
+ def _renc(obj)
56
+ case obj
57
+ when String then obj.encode(@encoding, **@options)
58
+ when Hash then _hash(obj)
59
+ when Array then _array(obj)
60
+ when Struct then _struct(obj)
61
+ else obj
73
62
  end
74
63
  end
75
64
 
76
- # recurse encoding for Array values of String.
77
- def renc_array(obj, encoding)
78
- obj.map { |val| renc(encoding, val) }
65
+ # recursive encode for Hash values of String.
66
+ def _hash(obj)
67
+ obj.transform_values { |v| _renc(v) }
68
+ end
69
+
70
+ # recursive encode for Array values of String.
71
+ def _array(obj)
72
+ obj.map { |v| _renc(v) }
73
+ end
74
+
75
+ # recursive encode for Hash values of Struct.
76
+ def _struct(obj)
77
+ obj.class.new(*_renc(obj.to_h).values)
79
78
  end
80
79
  end
@@ -0,0 +1,51 @@
1
+ module Renc
2
+ ERR_MESSAGE_ENCODING = 'argument `encoding` is not a Encoding Class'.freeze
3
+ ERR_MESSAGE_OPTIONS = 'argument `options` is not a Hash Class'.freeze
4
+
5
+ # namespace
6
+ module Configuration
7
+ # this gem's default configured encoding
8
+ # @see Encoding.default_external
9
+ DEFAULT_ENCODING = Encoding.default_external
10
+
11
+ # this gem's default options for String#encode
12
+ # @see String#encode
13
+ DEFAULT_OPTIONS = { undef: :replace }.freeze
14
+
15
+ # return @default_encoding
16
+ # @return [Encoding] @default_encoding
17
+ # @see DEFAULT_ENCODING
18
+ def default_encoding
19
+ @default_encoding ||= DEFAULT_ENCODING
20
+ end
21
+
22
+ # configure default encoding
23
+ # @example
24
+ # Renc.default_encoding = 1 # => TypeError
25
+ # Renc.default_encoding = Encoding::ASCII
26
+ # @param encoding [Encoding]
27
+ def default_encoding=(encoding)
28
+ raise TypeError, ERR_MESSAGE_ENCODING unless encoding.is_a?(Encoding)
29
+
30
+ @default_encoding = encoding
31
+ end
32
+
33
+ # return @default_options
34
+ # @return [Encoding] @default_options
35
+ # @see DEFAULT_OPTIONS
36
+ def default_options
37
+ @default_options ||= DEFAULT_OPTIONS
38
+ end
39
+
40
+ # configure default options
41
+ # @example
42
+ # Renc.default_options = 1 # => TypeError
43
+ # Renc.default_options = { undef: nil }
44
+ # @param options [Hash]
45
+ def default_options=(options)
46
+ raise TypeError, ERR_MESSAGE_OPTIONS unless options.is_a?(Hash)
47
+
48
+ @default_options = options
49
+ end
50
+ end
51
+ end
@@ -1,3 +1,3 @@
1
1
  module Renc
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '2.2.1'.freeze
3
3
  end
@@ -9,10 +9,10 @@ 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.0.0'
12
+ spec.required_ruby_version = '>= 2.5.0'
13
13
 
14
- spec.summary = 'recurse encoding for Hash and Array.'
15
- spec.description = 'recurse encoding for Hash and Array.'
14
+ spec.summary = 'recursive encode for Hash and Array.'
15
+ spec.description = 'recursive encode for Hash and Array.'
16
16
  spec.homepage = 'https://github.com/k-ta-yamada/renc'
17
17
  spec.license = 'MIT'
18
18
 
@@ -21,9 +21,11 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.11'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rspec', '~> 3.0'
24
+ spec.add_development_dependency 'bundler'
25
+ spec.add_development_dependency 'rake'
26
+ spec.add_development_dependency 'rspec'
27
+ spec.add_development_dependency 'simplecov'
28
+ spec.add_development_dependency 'simplecov-console'
27
29
 
28
30
  spec.add_development_dependency 'pry'
29
31
  spec.add_development_dependency 'pry-doc'
metadata CHANGED
@@ -1,57 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k-ta-yamada
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-04 00:00:00.000000000 Z
11
+ date: 2020-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.11'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.11'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: '3.0'
61
+ version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: '3.0'
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-console
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: pry
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +164,7 @@ dependencies:
136
164
  - - ">="
137
165
  - !ruby/object:Gem::Version
138
166
  version: '0'
139
- description: recurse encoding for Hash and Array.
167
+ description: recursive encode for Hash and Array.
140
168
  email:
141
169
  - key.luvless@gmail.com
142
170
  executables: []
@@ -154,16 +182,15 @@ files:
154
182
  - LICENSE.txt
155
183
  - README.md
156
184
  - Rakefile
157
- - bin/console
158
- - bin/setup
159
185
  - lib/renc.rb
186
+ - lib/renc/configuration.rb
160
187
  - lib/renc/version.rb
161
188
  - renc.gemspec
162
189
  homepage: https://github.com/k-ta-yamada/renc
163
190
  licenses:
164
191
  - MIT
165
192
  metadata: {}
166
- post_install_message:
193
+ post_install_message:
167
194
  rdoc_options: []
168
195
  require_paths:
169
196
  - lib
@@ -171,17 +198,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
198
  requirements:
172
199
  - - ">="
173
200
  - !ruby/object:Gem::Version
174
- version: 2.0.0
201
+ version: 2.5.0
175
202
  required_rubygems_version: !ruby/object:Gem::Requirement
176
203
  requirements:
177
204
  - - ">="
178
205
  - !ruby/object:Gem::Version
179
206
  version: '0'
180
207
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.5.1
183
- signing_key:
208
+ rubygems_version: 3.2.3
209
+ signing_key:
184
210
  specification_version: 4
185
- summary: recurse encoding for Hash and Array.
211
+ summary: recursive encode for Hash and Array.
186
212
  test_files: []
187
- has_rdoc:
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'renc'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- require 'pry'
11
- Pry.start
12
-
13
- # require 'irb'
14
- # IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here