key_tree 0.7.0 → 0.8.0

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
  SHA256:
3
- metadata.gz: b3dad4f9d7ee51efbc9cdf1b4c8e2f90dea321927ef73fb6081e8f437de43603
4
- data.tar.gz: 7b52ebdbbdf1b4b5c172583aadb4d1f8006a56d1c970f530b28426d34af38ee9
3
+ metadata.gz: efcddf672d03cea0d0be86a2bf3dd9fdd64b072410a941622172dda485e41455
4
+ data.tar.gz: 361648de4ff9c43340b149716bc8beb1ff46960ee48e5dc0b00717c60b017c53
5
5
  SHA512:
6
- metadata.gz: fa010f0942b8afddd4915cad9929b0aa166734c11cd5cd63e71e95b3f066266ac990ba1cfb8ad97f9133e14a94cba5bef7c39c84b30b3b1baebad0667b3aa5d7
7
- data.tar.gz: f91c486c8f0c39dfadf767b3c44795974f521f324079de2a48478c9d3fb9611a4221f6481fe0a69e3354ac94d0f2114c84895966232674094d4e6498068cedba
6
+ metadata.gz: 28cda54bf66db156d0c723613f94b94a6535947821dbfc896f00a5f2c8861f8680bc5a23fb6198b97c804ddf8ee0d25654b73e45b174c7319059187fc1394b0e
7
+ data.tar.gz: d0cb7b5c81e267909a7d861d8f1961e0e94e13a839e16aad13f736626d8be6953db87804d2d99ca7af5395a048d164ef0fd8e981cbf891d05af2c2b964186acb
@@ -0,0 +1,37 @@
1
+ %YAML 1.1
2
+ ---
3
+ # This workflow uses actions that are not certified by GitHub.
4
+ # They are provided by a third-party and are governed by
5
+ # separate terms of service, privacy policy, and support
6
+ # documentation.
7
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
8
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
9
+
10
+ name: Ruby
11
+
12
+ on:
13
+ push:
14
+ pull_request:
15
+ branches: [ main ]
16
+
17
+ jobs:
18
+ test:
19
+
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ matrix:
23
+ ruby-version: ['2.6', '2.7', '3.0']
24
+
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - name: Set up Ruby
28
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
29
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
30
+ # uses: ruby/setup-ruby@v1
31
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
32
+ with:
33
+ ruby-version: ${{ matrix.ruby-version }}
34
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
35
+ - name: Run tests
36
+ run: bundle exec rake
37
+ ...
data/.rubocop.yml CHANGED
@@ -1,5 +1,8 @@
1
+ %YAML 1.1
2
+ ---
1
3
  AllCops:
2
- TargetRubyVersion: 2.3
4
+ TargetRubyVersion: 2.6
5
+ NewCops: enable
3
6
 
4
7
  Metrics/BlockLength:
5
8
  Exclude:
@@ -8,3 +11,13 @@ Metrics/BlockLength:
8
11
  Style/BlockDelimiters:
9
12
  Exclude:
10
13
  - 'spec/*_spec.rb'
14
+
15
+ Style/HashEachMethods:
16
+ Enabled: true
17
+
18
+ Style/HashTransformKeys:
19
+ Enabled: true
20
+
21
+ Style/HashTransformValues:
22
+ Enabled: true
23
+ ...
data/CHANGELOG.md CHANGED
@@ -10,6 +10,19 @@ Older releases uses an ad-hoc release notes format, and follow at the end.
10
10
  ## [Unreleased]
11
11
 
12
12
 
13
+ ## [0.8.0]
14
+
15
+ This release bumps minimum Ruby version to 2.6, and adds support for Ruby version 3.
16
+
17
+ ### Added
18
+
19
+ - Supports Ruby version 3.
20
+
21
+ ### Changed
22
+
23
+ - Updated dependencies.
24
+
25
+
13
26
  ## [0.7.0] - 2019-07-16
14
27
 
15
28
  ### Changed
@@ -19,7 +32,8 @@ Older releases uses an ad-hoc release notes format, and follow at the end.
19
32
  - Removed `KeyTree::Tree#fetch_default` method and simplified `#[]`
20
33
 
21
34
 
22
- [Unreleased]: https://github.com/notCalle/PROJECT/compare/v0.7.0..HEAD
35
+ [Unreleased]: https://github.com/notCalle/PROJECT/compare/v0.8.0..HEAD
36
+ [0.8.0]: https://github.com/notCalle/PROJECT/compare/v0.7.0..v0.8.0
23
37
  [0.7.0]: https://github.com/notCalle/PROJECT/compare/v0.6.1..v0.7.0
24
38
  [0.6.1]: https://github.com/notCalle/PROJECT/releases/tag/v0.6.1
25
39
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/key_tree.svg)](https://badge.fury.io/rb/key_tree)
2
2
  [![Maintainability](https://api.codeclimate.com/v1/badges/ac48756e80007e0cd6f9/maintainability)](https://codeclimate.com/github/notCalle/ruby-keytree/maintainability)
3
3
  [![codecov](https://codecov.io/gh/notCalle/ruby-keytree/branch/master/graph/badge.svg)](https://codecov.io/gh/notCalle/ruby-keytree)
4
- [![Build Status](https://dev.azure.com/notCalle/GitHub%20CI/_apis/build/status/notCalle.ruby-keytree?branchName=master)](https://dev.azure.com/notCalle/GitHub%20CI/_build/latest?definitionId=3&branchName=master)
4
+ [![Ruby](https://github.com/notCalle/ruby-keytree/actions/workflows/ruby.yml/badge.svg)](https://github.com/notCalle/ruby-keytree/actions/workflows/ruby.yml)
5
5
 
6
6
  # KeyTree
7
7
 
data/Rakefile CHANGED
@@ -13,4 +13,4 @@ desc 'Run RSpec'
13
13
  require 'rspec/core/rake_task'
14
14
  RSpec::Core::RakeTask.new(:spec)
15
15
 
16
- task default: %i[spec rubocop]
16
+ task default: %i[rubocop spec]
data/key_tree.gemspec CHANGED
@@ -6,15 +6,16 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'key_tree/version'
7
7
 
8
8
  dev_deps = {
9
- 'bundler' => '~> 2.0',
10
- 'codecov' => '~> 0.1',
11
- 'git-version-bump' => '~> 0.15',
12
- 'pry' => '~> 0.11',
13
- 'rake' => '~> 10.0',
14
- 'rspec' => '~> 3.0',
15
- 'rubocop' => '~> 0.57',
16
- 'ruby-prof' => '~> 0.17',
17
- 'simplecov' => '~> 0.16'
9
+ 'bundler' => '~> 2.2',
10
+ 'codecov' => '~> 0.5.0',
11
+ 'pry' => '~> 0.14.0',
12
+ 'rake' => '~> 13.0',
13
+ 'rspec' => '~> 3.10',
14
+ 'rubocop' => '~> 1.15',
15
+ 'rubocop-rake' => '~> 0.5.1',
16
+ 'rubocop-rspec' => '~> 2.3',
17
+ 'ruby-prof' => '>= 1.4',
18
+ 'simplecov' => '~> 0.21.0'
18
19
  }
19
20
 
20
21
  Gem::Specification.new do |spec|
@@ -35,7 +36,9 @@ Gem::Specification.new do |spec|
35
36
  spec.require_paths = ['lib']
36
37
 
37
38
  spec.platform = Gem::Platform::RUBY
38
- spec.required_ruby_version = '~> 2.3'
39
+ spec.required_ruby_version = '>= 2.6', '< 4.0'
40
+
41
+ spec.add_dependency 'git-version-bump', '~> 0.17.0'
39
42
 
40
43
  dev_deps.each { |d| spec.add_development_dependency(*d) }
41
44
  end
data/lib/key_tree/path.rb CHANGED
@@ -28,17 +28,12 @@ module KeyTree # rubocop:disable Style/Documentation
28
28
  #
29
29
  # Example:
30
30
  # KeyTree::Path.new("a.b.c")
31
- # => ["a", "b", "c"]
31
+ # => [:a, :b, :c]
32
32
  #
33
- def initialize(key_path = nil)
34
- case key_path
35
- when NilClass
36
- nil
37
- when Array
38
- concat(key_path.map(&:to_sym))
39
- else
40
- initialize(key_path.to_key_path)
41
- end
33
+ def initialize(key_path = [])
34
+ key_path = key_path.to_key_path unless key_path.is_a? Array
35
+
36
+ super(key_path.map(&:to_sym))
42
37
  end
43
38
 
44
39
  alias to_key_path itself
metadata CHANGED
@@ -1,159 +1,186 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: key_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Calle Englund
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-16 00:00:00.000000000 Z
11
+ date: 2021-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: git-version-bump
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
19
+ version: 0.17.0
20
+ type: :runtime
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: '2.0'
26
+ version: 0.17.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: codecov
28
+ name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
33
+ version: '2.2'
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: '0.1'
40
+ version: '2.2'
41
41
  - !ruby/object:Gem::Dependency
42
- name: git-version-bump
42
+ name: codecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.15'
47
+ version: 0.5.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.15'
54
+ version: 0.5.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.11'
61
+ version: 0.14.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.11'
68
+ version: 0.14.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '3.10'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '3.10'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.57'
103
+ version: '1.15'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.57'
110
+ version: '1.15'
111
111
  - !ruby/object:Gem::Dependency
112
- name: ruby-prof
112
+ name: rubocop-rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.17'
117
+ version: 0.5.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.17'
124
+ version: 0.5.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '2.3'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '2.3'
139
+ - !ruby/object:Gem::Dependency
140
+ name: ruby-prof
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '1.4'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '1.4'
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: simplecov
127
155
  requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
157
  - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '0.16'
159
+ version: 0.21.0
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
164
  - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '0.16'
139
- description:
166
+ version: 0.21.0
167
+ description:
140
168
  email:
141
169
  - calle@discord.bofh.se
142
170
  executables: []
143
171
  extensions: []
144
172
  extra_rdoc_files: []
145
173
  files:
174
+ - ".github/workflows/ruby.yml"
146
175
  - ".gitignore"
147
176
  - ".rspec"
148
177
  - ".rubocop.yml"
149
- - ".travis.yml"
150
178
  - CHANGELOG.md
151
179
  - CODE_OF_CONDUCT.md
152
180
  - Gemfile
153
181
  - LICENSE.txt
154
182
  - README.md
155
183
  - Rakefile
156
- - azure-pipelines.yml
157
184
  - bin/console
158
185
  - bin/setup
159
186
  - key_tree.gemspec
@@ -172,23 +199,26 @@ homepage: https://github.com/notcalle/ruby-keytree
172
199
  licenses:
173
200
  - MIT
174
201
  metadata: {}
175
- post_install_message:
202
+ post_install_message:
176
203
  rdoc_options: []
177
204
  require_paths:
178
205
  - lib
179
206
  required_ruby_version: !ruby/object:Gem::Requirement
180
207
  requirements:
181
- - - "~>"
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '2.6'
211
+ - - "<"
182
212
  - !ruby/object:Gem::Version
183
- version: '2.3'
213
+ version: '4.0'
184
214
  required_rubygems_version: !ruby/object:Gem::Requirement
185
215
  requirements:
186
216
  - - ">="
187
217
  - !ruby/object:Gem::Version
188
218
  version: '0'
189
219
  requirements: []
190
- rubygems_version: 3.0.3
191
- signing_key:
220
+ rubygems_version: 3.2.15
221
+ signing_key:
192
222
  specification_version: 4
193
223
  summary: Manage trees of keys
194
224
  test_files: []
data/.travis.yml DELETED
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.5.0
5
- before_install: gem install bundler -v 1.16.0
data/azure-pipelines.yml DELETED
@@ -1,22 +0,0 @@
1
- # Ruby
2
- # Package your Ruby project.
3
- # Add steps that install rails, analyze code, save build artifacts, deploy, and more:
4
- # https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
5
-
6
- pool:
7
- vmImage: 'Ubuntu 16.04'
8
-
9
- steps:
10
- - task: UseRubyVersion@0
11
- inputs:
12
- versionSpec: '>= 2.5'
13
-
14
- - script: |
15
- gem install bundler
16
- bin/setup
17
- displayName: 'bundle install'
18
-
19
- - script: bundle exec rake
20
- displayName: 'bundle exec rake'
21
- env:
22
- CODECOV_TOKEN: $(codecov.token)