renc 2.0.0 → 2.2.2

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: 6d9665ebabc71fd95740388777621dce95bb7b7c
4
- data.tar.gz: ca951228ca44d73c03df61a4054cc90a3147e55f
2
+ SHA256:
3
+ metadata.gz: 750acdb58a73c029d510df8600bf2a86180e0a92d0740270d6c99dfe96348188
4
+ data.tar.gz: ae4999e736bfadce482148ac54e43115452e39f1ea17f93971fe14d81517fae5
5
5
  SHA512:
6
- metadata.gz: 95ec060b743f14a0585dacc96222fe8a77a68bce26d7931868ece0c8140192972f820ad3ff326d87a41136d4949eb093ffaa126c9a021dad2d995b6f2b042eaa
7
- data.tar.gz: 58cfba8cbf227d6230bc32e0dd5b62a65103ea2ce97a9ef377a3782006ad7256affe5733bc13ed2f32c86e6e232e5e3b23ac0449f7c72f5596e6a2e7c2c6a427
6
+ metadata.gz: 3c30d4bb81f8f243a2082eb3c32d21da3eb967a24c37dc4d175757a6b02f3308a300cc7c2d415f1b67cf980c5fcc54fbef28fbb15cdf449ce8893e587b0624e1
7
+ data.tar.gz: 4eb48aa439836190cc3e73631348fcb590898fe29a32d339fc94fb3548275368621c21353856bf8151f524198d603c3e6fabc8fcc87c19774172b7a9c28aacce
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /tmp/
10
10
 
11
11
  /vendor
12
+ /bin
data/.rubocop.yml CHANGED
@@ -9,6 +9,7 @@ AllCops:
9
9
  Exclude:
10
10
  - renc.gemspec
11
11
  - vendor/**/*
12
+ - bin/**/*
12
13
 
13
14
  Style/AsciiComments:
14
15
  Enabled: false
data/.travis.yml CHANGED
@@ -1,13 +1,18 @@
1
1
  language: ruby
2
+
2
3
  cache: bundler
4
+
3
5
  rvm:
4
- - 2.4.0
5
- - 2.3.3
6
- - 2.2.6
7
- - 2.1.10
8
- - 2.0.0-p648
6
+ - 3.0
7
+ - 2.7
8
+ - 2.6
9
+
9
10
  before_install:
10
- - gem update --system --no-doc
11
- - gem install bundler
12
- after_success:
13
- - bundle exec codeclimate-test-reporter
11
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12
+ - chmod +x ./cc-test-reporter
13
+
14
+ before_script:
15
+ - ./cc-test-reporter before-build
16
+
17
+ after_script:
18
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/CHANGELOG.md CHANGED
@@ -1,4 +1,35 @@
1
- # v2.0.0
1
+ # CHANGELOG.md
2
+
3
+ ## v2.2.2
4
+
5
+ 2021-09-04 JST
6
+
7
+ - required_ruby_version change to `>= 2.6.0` because Ruby 2.5 reaches EOL.
8
+
9
+ ## v2.2.1
10
+
11
+ 2020-12-31 JST
12
+
13
+ - Add support for Ruby 3.0
14
+
15
+ ## v2.2.0
16
+
17
+ 2017-08-11 JST
18
+
19
+ - [issue #25](https://github.com/k-ta-yamada/renc/issues/25)
20
+ [add] Add target Class Struct #25
21
+ - [issue #26](https://github.com/k-ta-yamada/renc/issues/26)
22
+ [mod] Add error message details #26
23
+ - [issue #23](https://github.com/k-ta-yamada/renc/issues/23)
24
+ [clean] Renc::Configuration.default_xxx='s comment is wrong #23
25
+
26
+ ## v2.1.0
27
+
28
+ - [issue #21](https://github.com/k-ta-yamada/renc/issues/21)
29
+ change class structure; Separate Configuration #21
30
+
31
+ ## v2.0.0
32
+
2
33
  - [issue #10](https://github.com/k-ta-yamada/renc/issues/10)
3
34
  Changing default_encoding by os #10
4
35
  - change default encoding is `Encoding.default_external`
@@ -7,27 +38,33 @@
7
38
  - change `#renc`'s arguments is change.
8
39
  #renc(encoding, `obj`) => #renc(encoding, `options`)
9
40
 
10
- # v1.3.1
41
+ ## v1.3.1
42
+
11
43
  - [issue #14](https://github.com/k-ta-yamada/renc/issues/14)
12
44
  String.include is NoMethodError on Ruby 2.0.0
13
45
 
14
- # v1.3.0
46
+ ## v1.3.0
47
+
15
48
  - [issue #7](https://github.com/k-ta-yamada/renc/issues/7)
16
49
  configuration default encoding
17
50
 
18
- # v1.2.0
51
+ ## v1.2.0
52
+
19
53
  - remove `Renc#enc` method
20
54
 
21
- # v1.1.0
55
+ ## v1.1.0
56
+
22
57
  - [issue #4](https://github.com/k-ta-yamada/renc/issues/4)
23
58
  #renc for Hash and Array
24
59
 
25
- # v1.0.1
60
+ ## v1.0.1
61
+
26
62
  - required Ruby version is change to over 2.0.0.
27
63
  - gemspec: `spec.required_ruby_version = '>= 2.0.0'`
28
64
  - maybe, be able to run on `version >= 2.0.0`.
29
65
 
30
- # v1.0.0
66
+ ## v1.0.0
67
+
31
68
  - change to instance_method from singleton_method.
32
69
  - renc method is implemented.
33
70
  - enc method is deprecated.
@@ -36,8 +73,10 @@
36
73
  - maybe, be able to run on `version >= 2.0.0`.
37
74
  - Travis CI: 2.2.4, 2.3.0
38
75
 
39
- # v0.2.0
76
+ ## v0.2.0
77
+
40
78
  - implement base features.
41
79
 
42
- # v0.1.0
80
+ ## v0.1.0
81
+
43
82
  - 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,15 +1,32 @@
1
+ # Renc
2
+
1
3
  [![Gem Version][gem_version-svg]][gem_version]
2
4
  [![Build Status][travis-svg]][travis]
5
+ [![Downloads][downloads-svg]][gem_version]
6
+ [![Inline docs][inch-ci-svg]][inch-ci]
3
7
  [![Code Climate][codeclimate-svg]][codeclimate]
4
8
  [![Test Coverage][codeclimate_cov-svg]][codeclimate_cov]
5
- [![Inline docs][inch-ci-svg]][inch-ci]
6
9
 
7
- # Renc
10
+ recursive encode for Hash and Array.
11
+
12
+ <!-- TOC -->
8
13
 
9
- recurse encoding for Hash and Array.
14
+ - [1. Installation](#1-installation)
15
+ - [2. Usage](#2-usage)
16
+ - [2.1. Basic](#21-basic)
17
+ - [2.2. Nested Hash and Array](#22-nested-hash-and-array)
18
+ - [2.3. Configuration](#23-configuration)
19
+ - [2.3.1. Renc.default_encoding](#231-rencdefault_encoding)
20
+ - [2.3.2. Renc.default_options](#232-rencdefault_options)
21
+ - [3. Development](#3-development)
22
+ - [4. Contributing](#4-contributing)
23
+ - [5. License](#5-license)
10
24
 
25
+ <!-- /TOC -->
11
26
 
12
- ## Installation
27
+ ---
28
+
29
+ ## 1. Installation
13
30
 
14
31
  Add this line to your application's Gemfile:
15
32
 
@@ -19,16 +36,21 @@ gem 'renc'
19
36
 
20
37
  And then execute:
21
38
 
22
- $ bundle
39
+ ```sh
40
+ bundle
41
+ ```
23
42
 
24
43
  Or install it yourself as:
25
44
 
26
- $ gem install renc
45
+ ```sh
46
+ gem install renc
47
+ ```
27
48
 
49
+ ---
28
50
 
29
- ## Usage
51
+ ## 2. Usage
30
52
 
31
- ### Basic
53
+ ### 2.1. Basic
32
54
 
33
55
  ```ruby
34
56
  require 'renc'
@@ -52,7 +74,8 @@ hash_val.renc[:a].encoding # => #<Encoding::UTF-8>
52
74
  hash_val.renc == hash_val # => true
53
75
  ```
54
76
 
55
- ### Nested Hash, Array, and others
77
+ ### 2.2. Nested Hash and Array
78
+
56
79
  > @ref [./spec/spec_helper.rb](https://github.com/k-ta-yamada/renc/blob/master/spec/spec_helper.rb#L18)
57
80
 
58
81
  ```ruby
@@ -82,9 +105,9 @@ encoded_string_values.select! { |v| v.is_a?(String) } # => ["a", "bb0"]
82
105
  encoded_string_values.all? { |v| v.encoding == Encoding::UTF_8 } # => true
83
106
  ```
84
107
 
85
- ### Configuration
108
+ ### 2.3. Configuration
86
109
 
87
- #### Renc.default_encoding
110
+ #### 2.3.1. Renc.default_encoding
88
111
 
89
112
  ```ruby
90
113
  # default configure encoding is Encoding.default_external
@@ -100,14 +123,14 @@ Renc.default_encoding = Encoding::ASCII
100
123
  'test'.renc(Encoding::ASCII).encoding # => #<Encoding:US-ASCII>
101
124
  ```
102
125
 
103
- #### Renc.default_options
126
+ #### 2.3.2. Renc.default_options
104
127
 
105
128
  ```ruby
106
129
  # default configure options is { undef: :replace }
107
130
  Renc.default_options # => { undef: :replace }
108
131
  '🐘'.renc # => '?'
109
132
 
110
- # if you want to change to ascii
133
+ # if you want to change to { undef: nil }
111
134
  Renc.default_options = { undef: nil }
112
135
  '🐘'.renc # => Encoding::UndefinedConversionError: U+1F418 from UTF-8 to US-ASCII
113
136
 
@@ -115,8 +138,9 @@ Renc.default_options = { undef: nil }
115
138
  '🐘'.renc(Encoding::ASCII, undef: nil).encoding # => Encoding::UndefinedConversionError: U+1F418 from UTF-8 to US-ASCII
116
139
  ```
117
140
 
141
+ ---
118
142
 
119
- ## Development
143
+ ## 3. Development
120
144
 
121
145
  After checking out the repo, run `bin/setup` to install dependencies.
122
146
  Then, run `rake spec` to run the tests.
@@ -130,31 +154,36 @@ which will create a git tag for the version,
130
154
  push git commits and tags,
131
155
  and push the `.gem` file to [rubygems.org](https://rubygems.org).
132
156
 
157
+ ---
133
158
 
134
- ## Contributing
159
+ ## 4. Contributing
135
160
 
136
161
  Bug reports and pull requests are welcome on
137
162
  GitHub at https://github.com/k-ta-yamada/renc.
138
163
  This project is intended to be a safe,
139
164
  welcoming space for collaboration,
140
165
  and contributors are expected to adhere to the
141
- [Contributor Covenant](http://contributor-covenant.org) code of conduct.
166
+ [Contributor Covenant](https://contributor-covenant.org) code of conduct.
142
167
 
168
+ ---
143
169
 
144
- ## License
170
+ ## 5. License
145
171
 
146
172
  The gem is available as open source
147
- under the terms of the [MIT License](http://opensource.org/licenses/MIT).
173
+ under the terms of the [MIT License](https://opensource.org/licenses/MIT).
148
174
 
175
+ ---
149
176
 
177
+ eof
150
178
 
151
- [gem_version]: http://badge.fury.io/rb/renc
179
+ [gem_version]: https://badge.fury.io/rb/renc
152
180
  [gem_version-svg]: https://badge.fury.io/rb/renc.svg
153
- [travis]: https://travis-ci.org/k-ta-yamada/renc
154
- [travis-svg]: https://travis-ci.org/k-ta-yamada/renc.svg
181
+ [travis]: https://app.travis-ci.com/k-ta-yamada/renc
182
+ [travis-svg]: https://app.travis-ci.com/k-ta-yamada/renc.svg?branch=master
155
183
  [codeclimate]: https://codeclimate.com/github/k-ta-yamada/renc
156
184
  [codeclimate-svg]: https://codeclimate.com/github/k-ta-yamada/renc/badges/gpa.svg
157
185
  [codeclimate_cov]: https://codeclimate.com/github/k-ta-yamada/renc/coverage
158
186
  [codeclimate_cov-svg]: https://codeclimate.com/github/k-ta-yamada/renc/badges/coverage.svg
159
- [inch-ci]: http://inch-ci.org/github/k-ta-yamada/renc
160
- [inch-ci-svg]: http://inch-ci.org/github/k-ta-yamada/renc.svg?branch=master
187
+ [inch-ci]: https://inch-ci.org/github/k-ta-yamada/renc
188
+ [inch-ci-svg]: https://inch-ci.org/github/k-ta-yamada/renc.svg?branch=master
189
+ [downloads-svg]: https://ruby-gem-downloads-badge.herokuapp.com/renc?type=total&total_label=&color=brightgreen
@@ -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
data/lib/renc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Renc
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.2.2'.freeze
3
3
  end
data/lib/renc.rb CHANGED
@@ -1,6 +1,7 @@
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.
4
5
  # @example
5
6
  # require 'renc'
6
7
  #
@@ -8,55 +9,13 @@ require 'renc/version'
8
9
  # extend Renc
9
10
  # @see #renc
10
11
  module Renc
12
+ extend Configuration
13
+
11
14
  # for include #renc method
12
- TARGET_CLASS = [String, Array, Hash].freeze
15
+ TARGET_CLASS = [String, Array, Hash, Struct].freeze
13
16
  TARGET_CLASS.each { |klass| klass.send(:include, self) }
14
17
 
15
- # this gem's default configured encoding
16
- # @see Encoding.default_external
17
- DEFAULT_ENCODING = Encoding.default_external
18
-
19
- # this gem's default options for String#encode
20
- # @see String#encode
21
- DEFAULT_OPTIONS = { undef: :replace }.freeze
22
-
23
- class << self
24
- # return @default_encoding
25
- # @return [Encoding] @default_encoding
26
- # @see DEFAULT_ENCODING
27
- def default_encoding
28
- @default_encoding ||= DEFAULT_ENCODING
29
- end
30
-
31
- # configure default encoding
32
- # @example
33
- # Renc.default_encoding = 1 # => Renc::ConfigureError
34
- # Renc.default_encoding = Encoding::ASCII
35
- # @param encoding [Encoding]
36
- def default_encoding=(encoding)
37
- raise TypeError unless encoding.is_a?(Encoding)
38
- @default_encoding = encoding
39
- end
40
-
41
- # return @default_options
42
- # @return [Encoding] @default_options
43
- # @see DEFAULT_OPTIONS
44
- def default_options
45
- @default_options ||= DEFAULT_OPTIONS
46
- end
47
-
48
- # configure default options
49
- # @example
50
- # Renc.default_options = 1 # => Renc::ConfigureError
51
- # Renc.default_options = { undef: nil }
52
- # @param options [Hash]
53
- def default_options=(options)
54
- raise TypeError unless options.is_a?(Hash)
55
- @default_options = options
56
- end
57
- end
58
-
59
- # recurse encoding for Hash and Array.
18
+ # recursive encode for Hash and Array.
60
19
  # @example
61
20
  # # for example
62
21
  # default_src_encoding # => #<Encoding:UTF-8>
@@ -82,32 +41,39 @@ module Renc
82
41
  # @see .default_encoding
83
42
  # @see .default_options
84
43
  def renc(encoding = Renc.default_encoding, options = Renc.default_options)
85
- raise TypeError unless encoding.is_a?(Encoding)
86
- raise TypeError unless options.is_a?(Hash)
44
+ raise TypeError, ERR_MESSAGE_ENCODING unless encoding.is_a?(Encoding)
45
+ raise TypeError, ERR_MESSAGE_OPTIONS unless options.is_a?(Hash)
87
46
 
88
- renc_internal(self, encoding, options)
47
+ @encoding = encoding
48
+ @options = options
49
+
50
+ _renc(self)
89
51
  end
90
52
 
91
53
  private
92
54
 
93
- def renc_internal(obj, encoding, options)
55
+ def _renc(obj)
94
56
  case obj
95
- when Hash then renc_hash(obj, encoding, options)
96
- when Array then renc_array(obj, encoding, options)
97
- when String then obj.encode(encoding, options)
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)
98
61
  else obj
99
62
  end
100
63
  end
101
64
 
102
- # recurse encoding for Hash values of String.
103
- def renc_hash(obj, encoding, options)
104
- obj.each_with_object({}) do |(key, val), h|
105
- h[key] = renc_internal(val, encoding, options)
106
- end
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) }
107
73
  end
108
74
 
109
- # recurse encoding for Array values of String.
110
- def renc_array(obj, encoding, options)
111
- obj.map { |val| renc_internal(val, encoding, options) }
75
+ # recursive encode for Hash values of Struct.
76
+ def _struct(obj)
77
+ obj.class.new(*_renc(obj.to_h).values)
112
78
  end
113
79
  end
data/renc.gemspec CHANGED
@@ -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.6.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,15 @@ 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
+ # Workaround for cc-test-reporter with SimpleCov 0.18.
28
+ # Stop upgrading SimpleCov until the following issue will be resolved.
29
+ # https://github.com/codeclimate/test-reporter/issues/418
30
+ # https://github.com/codeclimate/test-reporter/issues/413
31
+ spec.add_development_dependency 'simplecov', '= 0.17'
32
+ spec.add_development_dependency 'simplecov-console'
27
33
 
28
34
  spec.add_development_dependency 'pry'
29
35
  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: 2.0.0
4
+ version: 2.2.2
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: 2017-02-15 00:00:00.000000000 Z
11
+ date: 2021-09-04 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.17'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - '='
67
+ - !ruby/object:Gem::Version
68
+ version: '0.17'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-console
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
53
74
  - !ruby/object:Gem::Version
54
- version: '3.0'
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,16 +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.6.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.6.8
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: []
data/bin/console DELETED
@@ -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