countless 1.1.0 → 1.3.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: 13ece1f5c33f4b31324bf8822ccf175196c0156339fcd3720540a191619b53f6
4
- data.tar.gz: 297e11ccc0579f601bc06308fcb718281fee117e428a1a365fadb6f2fb61a47b
3
+ metadata.gz: 3ec9b44250a36871cda4c1a892337d8bf180ce5d118ec3f67ffb6a9c04a75df4
4
+ data.tar.gz: 2fdfc4435fb19191eb8be7c946e643f5d5fba339fd839239c8612ec2684fbe6e
5
5
  SHA512:
6
- metadata.gz: 07f02f3a1a67a1c6f69cb6cc2eb30b5556effee6d157433f153ae3ffa37fde7f56d5082e5d6575c1f8adfab97e63cf123a22f02cba8556dd9db6cc3c68edd092
7
- data.tar.gz: 4f1de9ca4374448cbd2d36c413e5f3d5b543b2fa10572213fca986fdde88bb6efa5f211d1cfec84f9336f927986c99ad2643d6da1350bf560db839c219a64a60
6
+ metadata.gz: 22ea2aa822957ec15b0733e5d8c34a65104dbc7ab10a4657c8f98cedc7e866354803bbeff6de00da1d78b82449e9f25bc53e8f137815cf58e00d3932c8ab4d3d
7
+ data.tar.gz: 79db285c48418b58686300740f20d4343af9ed4a95a2f929b97c36a96771286595d86f250756f7c147b5c22b54177ba16b071b222c3cfdac33db1e30e1b3bb91
@@ -12,19 +12,20 @@ jobs:
12
12
  runs-on: ubuntu-22.04
13
13
  timeout-minutes: 5
14
14
  steps:
15
- - uses: actions/checkout@v3
15
+ - uses: actions/checkout@v4
16
16
 
17
17
  - name: Install the correct Ruby version
18
18
  uses: ruby/setup-ruby@v1
19
19
  with:
20
- ruby-version: 2.5
20
+ ruby-version: 2.7
21
21
  bundler-cache: true
22
- rubygems: '3.3.26'
22
+ rubygems: '3.4.22'
23
23
 
24
24
  - name: Prepare the virtual environment
25
25
  uses: hausgold/actions/ci@master
26
26
  with:
27
27
  clone_token: '${{ secrets.CLONE_TOKEN }}'
28
+ settings_secret_key: '${{ secrets.SETTINGS_SECRET_KEY }}'
28
29
  settings: '${{ github.repository }}'
29
30
  target: ci/gem-test
30
31
 
@@ -0,0 +1,48 @@
1
+ name: Release
2
+ run-name: Release ${{ github.event.inputs.VERSION }}
3
+
4
+ on:
5
+ workflow_dispatch:
6
+ inputs:
7
+ VERSION:
8
+ description: The new version to release. (eg. `1.0.0`) Check the
9
+ changelog for the latest version.
10
+
11
+ concurrency:
12
+ group: '${{ github.event.inputs.VERSION }}'
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ docs:
17
+ name: Release the gem
18
+ runs-on: ubuntu-22.04
19
+ timeout-minutes: 5
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Install Ruby 2.7
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: 2.7
27
+ bundler-cache: true
28
+ rubygems: '3.4.22'
29
+
30
+ - name: Prepare the virtual environment
31
+ uses: hausgold/actions/ci@master
32
+ with:
33
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
34
+ settings_secret_key: '${{ secrets.SETTINGS_SECRET_KEY }}'
35
+ settings: '${{ github.repository }}'
36
+ target: ci/gem-test
37
+
38
+ - name: Switch to SSH remotes for the Git repository
39
+ run: git-ssh-remotes
40
+
41
+ - name: Enforce version '${{ github.event.inputs.VERSION }}'
42
+ run: set-gem-version '${{ github.event.inputs.VERSION }}'
43
+
44
+ - name: Prepare the Git release commit
45
+ run: git-release-commit '${{ github.event.inputs.VERSION }}'
46
+
47
+ - name: Push the release Git commit/tag and package to the registry
48
+ run: make release
@@ -18,30 +18,25 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['2.5', '2.6', '2.7', '3.0', '3.1']
22
- rails: ['5.2', '6.0', '6.1', '7.0']
23
- exclude:
24
- # Rails 7.0 requires Ruby >=2.7
25
- - ruby: '2.5'
26
- rails: '7.0'
27
- - ruby: '2.6'
28
- rails: '7.0'
21
+ ruby: ['2.7', '3.0', '3.1']
22
+ rails: ['5.2', '6.1', '7.1']
29
23
  env:
30
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
31
25
  steps:
32
- - uses: actions/checkout@v3
26
+ - uses: actions/checkout@v4
33
27
 
34
28
  - name: Install the correct Ruby version
35
29
  uses: ruby/setup-ruby@v1
36
30
  with:
37
31
  ruby-version: ${{ matrix.ruby }}
38
32
  bundler-cache: true
39
- rubygems: '3.3.26'
33
+ rubygems: '3.4.22'
40
34
 
41
35
  - name: Prepare the virtual environment
42
36
  uses: hausgold/actions/ci@master
43
37
  with:
44
38
  clone_token: '${{ secrets.CLONE_TOKEN }}'
39
+ settings_secret_key: '${{ secrets.SETTINGS_SECRET_KEY }}'
45
40
  settings: '${{ github.repository }}'
46
41
  target: ci/gem-test
47
42
 
@@ -62,6 +57,7 @@ jobs:
62
57
  uses: hausgold/actions/ci@master
63
58
  with:
64
59
  clone_token: '${{ secrets.CLONE_TOKEN }}'
60
+ settings_secret_key: '${{ secrets.SETTINGS_SECRET_KEY }}'
65
61
  settings: '${{ github.repository }}'
66
62
  target: ci/noop
67
63
 
data/.gitignore CHANGED
@@ -7,6 +7,7 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /log/
10
11
  /vendor/
11
12
  /gemfiles/vendor/
12
13
  *.gemfile.lock
data/.rubocop.yml CHANGED
@@ -8,7 +8,7 @@ AllCops:
8
8
  NewCops: enable
9
9
  SuggestExtensions: false
10
10
  DisplayCopNames: true
11
- TargetRubyVersion: 2.5
11
+ TargetRubyVersion: 2.7
12
12
  TargetRailsVersion: 5.2
13
13
  Exclude:
14
14
  - bin/**/*
data/Appraisals CHANGED
@@ -6,20 +6,14 @@ appraise 'rails-5.2' do
6
6
  gem 'activesupport', '~> 5.2.0'
7
7
  end
8
8
 
9
- appraise 'rails-6.0' do
10
- gem 'activejob', '~> 6.0.0'
11
- gem 'activerecord', '~> 6.0.0'
12
- gem 'activesupport', '~> 6.0.0'
13
- end
14
-
15
9
  appraise 'rails-6.1' do
16
10
  gem 'activejob', '~> 6.1.0'
17
11
  gem 'activerecord', '~> 6.1.0'
18
12
  gem 'activesupport', '~> 6.1.0'
19
13
  end
20
14
 
21
- appraise 'rails-7.0' do
22
- gem 'activejob', '~> 7.0.0'
23
- gem 'activerecord', '~> 7.0.0'
24
- gem 'activesupport', '~> 7.0.0'
15
+ appraise 'rails-7.1' do
16
+ gem 'activejob', '~> 7.1.0'
17
+ gem 'activerecord', '~> 7.1.0'
18
+ gem 'activesupport', '~> 7.1.0'
25
19
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### next
2
+
3
+ * TODO: Replace this bullet point with an actual description of a change.
4
+
5
+ ### 1.3.0
6
+
7
+ * Moved the development dependencies from the gemspec to the Gemfile (#2)
8
+ * Dropped support for Ruby <2.7 (#3)
9
+
10
+ ### 1.2.0
11
+
12
+ * Added support for Gem release automation
13
+
1
14
  ### 1.1.0
2
15
 
3
16
  * Bundler >= 2.3 is from now on required as minimal version (#1)
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at hermann.mayer92@gmail.com. All
58
+ reported by contacting the project team at development@hausgold.de. All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM hausgold/ruby:2.5
1
+ FROM hausgold/ruby:2.7
2
2
  MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
3
3
 
4
4
  # Update system gem
5
- RUN gem update --system '3.3.26'
5
+ RUN gem update --system '3.4.22'
6
6
 
7
7
  # Install system packages and the latest bundler
8
8
  RUN apt-get update -yqqq && \
@@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
11
11
  ca-certificates \
12
12
  bash-completion inotify-tools && \
13
13
  echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
14
- gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
14
+ gem install bundler -v '~> 2.4.22' --no-document --no-prerelease
15
15
 
16
16
  # Add new web user
17
17
  RUN mkdir /app && \
data/Gemfile CHANGED
@@ -6,3 +6,17 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in countless.gemspec
8
8
  gemspec
9
+
10
+ # Development dependencies
11
+ gem 'appraisal', '~> 2.4'
12
+ gem 'benchmark-ips', '~> 2.10'
13
+ gem 'bundler', '~> 2.3'
14
+ gem 'guard-rspec', '~> 4.7'
15
+ gem 'irb', '~> 1.2'
16
+ gem 'rspec', '~> 3.12'
17
+ gem 'rubocop', '~> 1.28'
18
+ gem 'rubocop-rails', '~> 2.14'
19
+ gem 'rubocop-rspec', '~> 2.10'
20
+ gem 'simplecov', '>= 0.22'
21
+ gem 'yard', '>= 0.9.28'
22
+ gem 'yard-activesupport-concern', '>= 0.0.1'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
3
  Copyright (c) 2023 HAUSGOLD | talocasa GmbH
4
4
 
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/Makefile CHANGED
@@ -20,13 +20,23 @@ GEMFILES_DIR ?= gemfiles
20
20
  BIN_DIR ?= bin
21
21
 
22
22
  # Host binaries
23
+ AWK ?= awk
23
24
  BASH ?= bash
24
25
  CHMOD ?= chmod
25
26
  COMPOSE ?= docker-compose
27
+ CP ?= cp
26
28
  CURL ?= curl
29
+ DOCKER ?= docker
30
+ EXPORT ?= export
31
+ FIND ?= find
32
+ GREP ?= grep
33
+ HEAD ?= head
27
34
  ID ?= id
28
35
  MKDIR ?= mkdir
29
36
  RM ?= rm
37
+ SORT ?= sort
38
+ TEST ?= test
39
+ XARGS ?= xargs
30
40
 
31
41
  # Container binaries
32
42
  APPRAISAL ?= appraisal
@@ -36,6 +46,7 @@ RAKE ?= rake
36
46
  RSPEC ?= rspec
37
47
  RUBOCOP ?= rubocop
38
48
  YARD ?= yard
49
+ RUBY_VERSION := ruby-version
39
50
 
40
51
  # Files
41
52
  GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
@@ -122,7 +133,8 @@ test-style: \
122
133
 
123
134
  test-style-ruby:
124
135
  # Run the static code analyzer (rubocop)
125
- @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
136
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
137
+ || ($(TEST) $$($(RUBY_VERSION)) != '2.7' && true))
126
138
 
127
139
  clean:
128
140
  # Clean the dependencies
data/README.md CHANGED
@@ -19,7 +19,9 @@ with the gem package.
19
19
  - [Usage](#usage)
20
20
  - [Addtional Configuration](#addtional-configuration)
21
21
  - [Development](#development)
22
+ - [Code of Conduct](#code-of-conduct)
22
23
  - [Contributing](#contributing)
24
+ - [Releasing](#releasing)
23
25
 
24
26
  ## Installation
25
27
 
@@ -41,7 +43,7 @@ $ bundle
41
43
 
42
44
  ## Requirements
43
45
 
44
- * [Ruby](https://www.ruby-lang.org/) (>=2.5, tested on CRuby/MRI only, may work
46
+ * [Ruby](https://www.ruby-lang.org/) (>=2.7, tested on CRuby/MRI only, may work
45
47
  with other implementations as well)
46
48
  * [Perl](https://www.perl.org/) (>= 5.10, for the
47
49
  [cloc](https://github.com/AlDanial/cloc) utility)
@@ -261,22 +263,30 @@ Countless.configure do |config|
261
263
  end
262
264
  ```
263
265
 
264
-
265
-
266
-
267
-
268
266
  ## Development
269
267
 
270
268
  After checking out the repo, run `make install` to install dependencies. Then,
271
269
  run `make test` to run the tests. You can also run `make shell-irb` for an
272
270
  interactive prompt that will allow you to experiment.
273
271
 
274
- To release a new version, update the version number in `version.rb`, and then
275
- run `make release`, which will create a git tag for the version, push git
276
- commits and tags, and push the `.gem` file to
277
- [rubygems.org](https://rubygems.org).
272
+ ## Code of Conduct
273
+
274
+ Everyone interacting in the project codebase, issue tracker, chat
275
+ rooms and mailing lists is expected to follow the [code of
276
+ conduct](./CODE_OF_CONDUCT.md).
278
277
 
279
278
  ## Contributing
280
279
 
281
280
  Bug reports and pull requests are welcome on GitHub at
282
- https://github.com/hausgold/countless.
281
+ https://github.com/hausgold/countless. Make sure that every pull request adds
282
+ a bullet point to the [changelog](./CHANGELOG.md) file with a reference to the
283
+ actual pull request.
284
+
285
+ ## Releasing
286
+
287
+ The release process of this Gem is fully automated. You just need to open the
288
+ Github Actions [Release
289
+ Workflow](https://github.com/hausgold/countless/actions/workflows/release.yml)
290
+ and trigger a new run via the **Run workflow** button. Insert the new version
291
+ number (check the [changelog](./CHANGELOG.md) first for the latest release) and
292
+ you're done.
@@ -16,7 +16,9 @@ sudo sed -i 's/autostart=.*/autostart=false/g' /etc/supervisor/conf.d/*
16
16
  sudo supervisord >/dev/null 2>&1 &
17
17
 
18
18
  # Wait for supervisord
19
- while ! supervisorctl status >/dev/null 2>&1; do sleep 1; done
19
+ while ! (sudo supervisorctl status | grep avahi) >/dev/null 2>&1; do
20
+ sleep 1
21
+ done
20
22
 
21
23
  # Boot the mDNS stack
22
24
  echo '# Start the mDNS stack'
data/countless.gemspec CHANGED
@@ -32,21 +32,8 @@ Gem::Specification.new do |spec|
32
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
33
  spec.require_paths = ['lib']
34
34
 
35
- spec.required_ruby_version = '>= 2.5'
35
+ spec.required_ruby_version = '>= 2.7'
36
36
 
37
37
  spec.add_runtime_dependency 'activesupport', '>= 5.2'
38
38
  spec.add_runtime_dependency 'zeitwerk', '~> 2.6'
39
-
40
- spec.add_development_dependency 'appraisal', '~> 2.4'
41
- spec.add_development_dependency 'benchmark-ips', '~> 2.10'
42
- spec.add_development_dependency 'bundler', '~> 2.3'
43
- spec.add_development_dependency 'guard-rspec', '~> 4.7'
44
- spec.add_development_dependency 'irb', '~> 1.2'
45
- spec.add_development_dependency 'rspec', '~> 3.12'
46
- spec.add_development_dependency 'rubocop', '~> 1.28'
47
- spec.add_development_dependency 'rubocop-rails', '~> 2.14'
48
- spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
49
- spec.add_development_dependency 'simplecov', '>= 0.22'
50
- spec.add_development_dependency 'yard', '>= 0.9.28'
51
- spec.add_development_dependency 'yard-activesupport-concern', '>= 0.0.1'
52
39
  end
@@ -2,6 +2,18 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "appraisal", "~> 2.4"
6
+ gem "benchmark-ips", "~> 2.10"
7
+ gem "bundler", "~> 2.3"
8
+ gem "guard-rspec", "~> 4.7"
9
+ gem "irb", "~> 1.2"
10
+ gem "rspec", "~> 3.12"
11
+ gem "rubocop", "~> 1.28"
12
+ gem "rubocop-rails", "~> 2.14"
13
+ gem "rubocop-rspec", "~> 2.10"
14
+ gem "simplecov", ">= 0.22"
15
+ gem "yard", ">= 0.9.28"
16
+ gem "yard-activesupport-concern", ">= 0.0.1"
5
17
  gem "activejob", "~> 5.2.0"
6
18
  gem "activerecord", "~> 5.2.0"
7
19
  gem "activesupport", "~> 5.2.0"
@@ -2,6 +2,18 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
+ gem "appraisal", "~> 2.4"
6
+ gem "benchmark-ips", "~> 2.10"
7
+ gem "bundler", "~> 2.3"
8
+ gem "guard-rspec", "~> 4.7"
9
+ gem "irb", "~> 1.2"
10
+ gem "rspec", "~> 3.12"
11
+ gem "rubocop", "~> 1.28"
12
+ gem "rubocop-rails", "~> 2.14"
13
+ gem "rubocop-rspec", "~> 2.10"
14
+ gem "simplecov", ">= 0.22"
15
+ gem "yard", ">= 0.9.28"
16
+ gem "yard-activesupport-concern", ">= 0.0.1"
5
17
  gem "activejob", "~> 6.1.0"
6
18
  gem "activerecord", "~> 6.1.0"
7
19
  gem "activesupport", "~> 6.1.0"
@@ -0,0 +1,21 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.4"
6
+ gem "benchmark-ips", "~> 2.10"
7
+ gem "bundler", "~> 2.3"
8
+ gem "guard-rspec", "~> 4.7"
9
+ gem "irb", "~> 1.2"
10
+ gem "rspec", "~> 3.12"
11
+ gem "rubocop", "~> 1.28"
12
+ gem "rubocop-rails", "~> 2.14"
13
+ gem "rubocop-rspec", "~> 2.10"
14
+ gem "simplecov", ">= 0.22"
15
+ gem "yard", ">= 0.9.28"
16
+ gem "yard-activesupport-concern", ">= 0.0.1"
17
+ gem "activejob", "~> 7.1.0"
18
+ gem "activerecord", "~> 7.1.0"
19
+ gem "activesupport", "~> 7.1.0"
20
+
21
+ gemspec path: "../"
@@ -87,7 +87,7 @@ module Countless
87
87
  results = {}
88
88
 
89
89
  Dir.glob(file) do |item|
90
- extension = \
90
+ extension =
91
91
  Annotation.extensions.detect { |regexp, _block| regexp.match(item) }
92
92
 
93
93
  if extension
@@ -145,7 +145,7 @@ module Countless
145
145
  #
146
146
  # @return [Array<String>] the configured files
147
147
  def self.files
148
- @files ||= \
148
+ @files ||=
149
149
  Countless.configuration.annotations_files.deep_dup
150
150
  end
151
151
 
@@ -160,7 +160,7 @@ module Countless
160
160
  #
161
161
  # @return [Array<String>] the configured directories
162
162
  def self.directories
163
- @directories ||= \
163
+ @directories ||=
164
164
  Countless.configuration.annotations_directories.deep_dup
165
165
  end
166
166
 
@@ -193,12 +193,12 @@ module Countless
193
193
  def self.extensions
194
194
  @extensions ||= begin
195
195
  patterns = Countless.configuration.annotation_patterns.values
196
- patterns.map do |conf|
196
+ patterns.to_h do |conf|
197
197
  [
198
198
  extensions_regexp(conf[:extensions], conf[:files] || []),
199
199
  conf[:regex]
200
200
  ]
201
- end.to_h
201
+ end
202
202
  end
203
203
  end
204
204
 
@@ -4,24 +4,24 @@ require 'rspec/core/rake_task'
4
4
 
5
5
  desc 'Report code statistics (KLOCs, etc)'
6
6
  task :stats do
7
- puts Countless::Statistics.new.to_s
7
+ puts Countless::Statistics.new
8
8
  end
9
9
 
10
10
  desc 'Enumerate all annotations'
11
11
  task :notes do
12
- puts Countless::Annotations.new.to_s
12
+ puts Countless::Annotations.new
13
13
  end
14
14
 
15
15
  namespace :notes do
16
16
  Countless.configuration.annotation_tags.each do |annotation|
17
17
  task annotation.downcase.to_sym do
18
- puts Countless::Annotations.new("@?#{annotation}").to_s
18
+ puts Countless::Annotations.new("@?#{annotation}")
19
19
  end
20
20
  end
21
21
 
22
22
  task :custom do
23
23
  annotation = ENV.fetch('ANNOTATION')
24
- puts Countless::Annotations.new("@?#{annotation}").to_s
24
+ puts Countless::Annotations.new("@?#{annotation}")
25
25
  rescue KeyError
26
26
  puts 'No annotation was specified.'
27
27
  puts "Usage: ANNOTATION='FIXME' rake notes:custom"
@@ -27,7 +27,7 @@ module Countless
27
27
  base_path = Countless.configuration.base_path
28
28
 
29
29
  # Resolve the given directory configurations to actual files
30
- dirs = (dirs.presence || Countless.statistic_directories)
30
+ dirs = dirs.presence || Countless.statistic_directories
31
31
  @dirs = dirs.each_with_object([]) do |cur, memo|
32
32
  copy = cur.deep_dup
33
33
  copy[:files] = Array(copy[:files])
@@ -69,13 +69,13 @@ module Countless
69
69
  # @return [Hash{String => Hash{Symbol => Mixed}}] the statistics
70
70
  # per configuration
71
71
  def calculate_statistics
72
- @dirs.map do |conf|
72
+ @dirs.to_h do |conf|
73
73
  [
74
74
  conf[:name],
75
75
  conf.merge(stats: calculate_file_statistics(conf[:name],
76
76
  conf[:files]))
77
77
  ]
78
- end.to_h
78
+ end
79
79
  end
80
80
 
81
81
  # Setup a new +Calculator+ for the given directory/pattern in order to
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Countless
5
5
  # The version of the +countless+ gem
6
- VERSION = '1.1.0'
6
+ VERSION = '1.3.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: countless
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -38,174 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.6'
41
- - !ruby/object:Gem::Dependency
42
- name: appraisal
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '2.4'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.4'
55
- - !ruby/object:Gem::Dependency
56
- name: benchmark-ips
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.10'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.10'
69
- - !ruby/object:Gem::Dependency
70
- name: bundler
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2.3'
83
- - !ruby/object:Gem::Dependency
84
- name: guard-rspec
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '4.7'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '4.7'
97
- - !ruby/object:Gem::Dependency
98
- name: irb
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.2'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.2'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.12'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3.12'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.28'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '1.28'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop-rails
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '2.14'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '2.14'
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop-rspec
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '2.10'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '2.10'
167
- - !ruby/object:Gem::Dependency
168
- name: simplecov
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0.22'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0.22'
181
- - !ruby/object:Gem::Dependency
182
- name: yard
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: 0.9.28
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: 0.9.28
195
- - !ruby/object:Gem::Dependency
196
- name: yard-activesupport-concern
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: 0.0.1
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: 0.0.1
209
41
  description: This gem includes reusable code statistics / annotations helpers / Rake
210
42
  tasks.
211
43
  email:
@@ -216,6 +48,7 @@ extra_rdoc_files: []
216
48
  files:
217
49
  - ".editorconfig"
218
50
  - ".github/workflows/documentation.yml"
51
+ - ".github/workflows/release.yml"
219
52
  - ".github/workflows/test.yml"
220
53
  - ".gitignore"
221
54
  - ".rspec"
@@ -243,9 +76,8 @@ files:
243
76
  - doc/assets/project.svg
244
77
  - docker-compose.yml
245
78
  - gemfiles/rails_5.2.gemfile
246
- - gemfiles/rails_6.0.gemfile
247
79
  - gemfiles/rails_6.1.gemfile
248
- - gemfiles/rails_7.0.gemfile
80
+ - gemfiles/rails_7.1.gemfile
249
81
  - lib/countless.rb
250
82
  - lib/countless/annotations.rb
251
83
  - lib/countless/cloc.rb
@@ -255,7 +87,7 @@ files:
255
87
  - lib/countless/rake_tasks.rb
256
88
  - lib/countless/statistics.rb
257
89
  - lib/countless/version.rb
258
- homepage:
90
+ homepage:
259
91
  licenses:
260
92
  - MIT
261
93
  metadata:
@@ -264,7 +96,7 @@ metadata:
264
96
  changelog_uri: https://github.com/hausgold/countless/blob/master/CHANGELOG.md
265
97
  bug_tracker_uri: https://github.com/hausgold/countless/issues
266
98
  documentation_uri: https://www.rubydoc.info/gems/countless
267
- post_install_message:
99
+ post_install_message:
268
100
  rdoc_options: []
269
101
  require_paths:
270
102
  - lib
@@ -272,15 +104,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
104
  requirements:
273
105
  - - ">="
274
106
  - !ruby/object:Gem::Version
275
- version: '2.5'
107
+ version: '2.7'
276
108
  required_rubygems_version: !ruby/object:Gem::Requirement
277
109
  requirements:
278
110
  - - ">="
279
111
  - !ruby/object:Gem::Version
280
112
  version: '0'
281
113
  requirements: []
282
- rubygems_version: 3.3.8
283
- signing_key:
114
+ rubygems_version: 3.3.26
115
+ signing_key:
284
116
  specification_version: 4
285
117
  summary: Code statistics/annotations helpers
286
118
  test_files: []
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activejob", "~> 6.0.0"
6
- gem "activerecord", "~> 6.0.0"
7
- gem "activesupport", "~> 6.0.0"
8
-
9
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activejob", "~> 7.0.0"
6
- gem "activerecord", "~> 7.0.0"
7
- gem "activesupport", "~> 7.0.0"
8
-
9
- gemspec path: "../"