countless 1.0.0 → 1.2.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: cb317432e20e425c9d4a173f46e886a839ce85aaf8b445b890e4a9b6a4dbfca4
4
- data.tar.gz: 87c853ba24c79208a4e6fb84f2994af994618f5cdaf0c43a19942585e87885cd
3
+ metadata.gz: 2b401e2400c775b24387c348f9c0e5c638aac353988799c58f08214e2998e1a6
4
+ data.tar.gz: 59c69ebd3edbe0e0516b2535834b68d25caf6e8b5f0065527946e0c1575e5ede
5
5
  SHA512:
6
- metadata.gz: ebddecc5729fe2d1c9afdb04f135fbc30a907131999f7c2037288f3e86771fb360ef99920017cf01ad6891d286112f56335eaca0e3997c167a605e97f1e402c1
7
- data.tar.gz: c1acaa20da4b0e735b3557a5b88166397e09ddaa1ad89cdf65b1088b6165fd5691d392c7574ffb466330aaeb8005230aed2a9e2ddc003e2b0a481acc2c482b5b
6
+ metadata.gz: 5aad5e7ac3df94d92a818a710dcd80a9517e3a977049e7f25a3c58d48cf89a57162728c0419f5b73c38c604a0879613eb328cd1124a4a492e62ffc432988ee5e
7
+ data.tar.gz: 6bdb0e2ddd9896f3af197c82bb11ac1c58c5cc94aafe097e553341d88a1e8445f98f23f8f84123ba63023ce38cbe31aff54a328eef7a27f299142c0a21d7f0c1
@@ -9,17 +9,17 @@ concurrency:
9
9
  jobs:
10
10
  docs:
11
11
  name: Build gem documentation
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
13
  timeout-minutes: 5
14
14
  steps:
15
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v3
16
16
 
17
17
  - name: Install the correct Ruby version
18
18
  uses: ruby/setup-ruby@v1
19
19
  with:
20
20
  ruby-version: 2.5
21
21
  bundler-cache: true
22
- rubygems: latest
22
+ rubygems: '3.3.26'
23
23
 
24
24
  - name: Prepare the virtual environment
25
25
  uses: hausgold/actions/ci@master
@@ -0,0 +1,47 @@
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@v3
22
+
23
+ - name: Install Ruby 2.5
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: 2.5
27
+ bundler-cache: true
28
+ rubygems: '3.3.26'
29
+
30
+ - name: Prepare the virtual environment
31
+ uses: hausgold/actions/ci@master
32
+ with:
33
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
34
+ settings: '${{ github.repository }}'
35
+ target: ci/gem-test
36
+
37
+ - name: Switch to SSH remotes for the Git repository
38
+ run: git-ssh-remotes
39
+
40
+ - name: Enforce version '${{ github.event.inputs.VERSION }}'
41
+ run: set-gem-version '${{ github.event.inputs.VERSION }}'
42
+
43
+ - name: Prepare the Git release commit
44
+ run: git-release-commit '${{ github.event.inputs.VERSION }}'
45
+
46
+ - name: Push the release Git commit/tag and package to the registry
47
+ run: make release
@@ -13,30 +13,30 @@ concurrency:
13
13
  jobs:
14
14
  test:
15
15
  name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
16
- runs-on: ubuntu-20.04
16
+ runs-on: ubuntu-22.04
17
17
  timeout-minutes: 5
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']
21
+ ruby: ['2.5', '2.6', '2.7', '3.0', '3.1']
22
+ rails: ['5.2', '6.0', '6.1', '7.0']
23
23
  exclude:
24
24
  # Rails 7.0 requires Ruby >=2.7
25
- - ruby: 2.5
25
+ - ruby: '2.5'
26
26
  rails: '7.0'
27
- - ruby: 2.6
27
+ - ruby: '2.6'
28
28
  rails: '7.0'
29
29
  env:
30
30
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
31
31
  steps:
32
- - uses: actions/checkout@v2
32
+ - uses: actions/checkout@v3
33
33
 
34
34
  - name: Install the correct Ruby version
35
35
  uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
38
  bundler-cache: true
39
- rubygems: latest
39
+ rubygems: '3.3.26'
40
40
 
41
41
  - name: Prepare the virtual environment
42
42
  uses: hausgold/actions/ci@master
@@ -53,7 +53,7 @@ jobs:
53
53
 
54
54
  trigger-docs:
55
55
  name: Trigger the documentation upload
56
- runs-on: ubuntu-20.04
56
+ runs-on: ubuntu-22.04
57
57
  timeout-minutes: 2
58
58
  needs: test
59
59
  if: github.ref == 'refs/heads/master'
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
+ --backtrace
2
+ --force-color
1
3
  --format documentation
2
- --color
data/.rubocop.yml CHANGED
@@ -1,13 +1,15 @@
1
1
  require:
2
2
  - rubocop-rspec
3
3
 
4
- Documentation:
4
+ Style/Documentation:
5
5
  Enabled: true
6
6
 
7
7
  AllCops:
8
+ NewCops: enable
9
+ SuggestExtensions: false
8
10
  DisplayCopNames: true
9
11
  TargetRubyVersion: 2.5
10
- SuggestExtensions: false
12
+ TargetRailsVersion: 5.2
11
13
  Exclude:
12
14
  - bin/**/*
13
15
  - vendor/**/*
@@ -23,6 +25,10 @@ Metrics/BlockLength:
23
25
  - '**/*.rake'
24
26
  - doc/**/*.rb
25
27
 
28
+ # MFA is not yet enabled for our gems yet.
29
+ Gemspec/RequireMFA:
30
+ Enabled: false
31
+
26
32
  # We stay with the original Ruby Style Guide recommendation.
27
33
  Layout/LineLength:
28
34
  Max: 80
data/.simplecov CHANGED
@@ -1,5 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'simplecov-html'
4
+ require 'simplecov_json_formatter'
5
+
6
+ SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
7
+ [
8
+ SimpleCov::Formatter::HTMLFormatter,
9
+ SimpleCov::Formatter::JSONFormatter
10
+ ]
11
+ )
12
+
3
13
  SimpleCov.start 'test_frameworks' do
4
14
  add_filter '/vendor/bundle/'
5
15
  end
data/Appraisals CHANGED
@@ -1,25 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  appraise 'rails-5.2' do
4
- gem 'activejob', '5.2.0'
5
- gem 'activerecord', '5.2.0'
6
- gem 'activesupport', '5.2.0'
4
+ gem 'activejob', '~> 5.2.0'
5
+ gem 'activerecord', '~> 5.2.0'
6
+ gem 'activesupport', '~> 5.2.0'
7
7
  end
8
8
 
9
9
  appraise 'rails-6.0' do
10
- gem 'activejob', '6.0.0'
11
- gem 'activerecord', '6.0.0'
12
- gem 'activesupport', '6.0.0'
10
+ gem 'activejob', '~> 6.0.0'
11
+ gem 'activerecord', '~> 6.0.0'
12
+ gem 'activesupport', '~> 6.0.0'
13
13
  end
14
14
 
15
15
  appraise 'rails-6.1' do
16
- gem 'activejob', '6.1.0'
17
- gem 'activerecord', '6.1.0'
18
- gem 'activesupport', '6.1.0'
16
+ gem 'activejob', '~> 6.1.0'
17
+ gem 'activerecord', '~> 6.1.0'
18
+ gem 'activesupport', '~> 6.1.0'
19
19
  end
20
20
 
21
21
  appraise 'rails-7.0' do
22
- gem 'activejob', '7.0.0'
23
- gem 'activerecord', '7.0.0'
24
- gem 'activesupport', '7.0.0'
22
+ gem 'activejob', '~> 7.0.0'
23
+ gem 'activerecord', '~> 7.0.0'
24
+ gem 'activesupport', '~> 7.0.0'
25
25
  end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
1
  ### next
2
2
 
3
- * Initial commit
3
+ * TODO: Replace this bullet point with an actual description of a change.
4
+
5
+ ### 1.2.0
6
+
7
+ * Added support for Gem release automation
8
+
9
+ ### 1.1.0
10
+
11
+ * Bundler >= 2.3 is from now on required as minimal version (#1)
12
+ * Dropped support for Ruby < 2.5 (#1)
13
+ * Dropped support for Rails < 5.2 (#1)
14
+ * Updated all development/runtime gems to their latest
15
+ Ruby 2.5 compatible version (#1)
16
+
17
+ ### 1.0.0
18
+
19
+ * Initial gem implementation
20
+ * Documented the whole gem and all its features
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 ADDED
@@ -0,0 +1,28 @@
1
+ FROM hausgold/ruby:2.5
2
+ MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
3
+
4
+ # Update system gem
5
+ RUN gem update --system '3.3.26'
6
+
7
+ # Install system packages and the latest bundler
8
+ RUN apt-get update -yqqq && \
9
+ apt-get install -y \
10
+ build-essential locales sudo vim \
11
+ ca-certificates \
12
+ bash-completion inotify-tools && \
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
15
+
16
+ # Add new web user
17
+ RUN mkdir /app && \
18
+ adduser web --home /home/web --shell /bin/bash \
19
+ --disabled-password --gecos ""
20
+ COPY config/docker/* /home/web/
21
+ RUN chown web:web -R /app /home/web /usr/local/bundle && \
22
+ mkdir -p /home/web/.ssh
23
+
24
+ # Set the root password and grant root access to web
25
+ RUN echo 'root:root' | chpasswd
26
+ RUN echo 'web ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
27
+
28
+ WORKDIR /app
data/Envfile ADDED
@@ -0,0 +1,3 @@
1
+ LANG=en_US.UTF-8
2
+ LANGUAGE=en_US.UTF-8
3
+ LC_ALL=en_US.UTF-8
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2022 Hausgold
3
+ Copyright (c) 2023 HAUSGOLD | talocasa GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -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
@@ -21,19 +21,20 @@ BIN_DIR ?= bin
21
21
 
22
22
  # Host binaries
23
23
  BASH ?= bash
24
+ CHMOD ?= chmod
24
25
  COMPOSE ?= docker-compose
26
+ CURL ?= curl
25
27
  ID ?= id
26
28
  MKDIR ?= mkdir
27
29
  RM ?= rm
28
- CURL ?= curl
29
- CHMOD ?= chmod
30
30
 
31
31
  # Container binaries
32
- BUNDLE ?= bundle
33
32
  APPRAISAL ?= appraisal
33
+ BUNDLE ?= bundle
34
+ GUARD ?= guard
34
35
  RAKE ?= rake
36
+ RSPEC ?= rspec
35
37
  RUBOCOP ?= rubocop
36
- GUARD ?= guard
37
38
  YARD ?= yard
38
39
 
39
40
  # Files
@@ -61,9 +62,13 @@ all:
61
62
  # Countless
62
63
  #
63
64
  # install Install the dependencies
64
- # test Run the whole test suite
65
+ # update Update the local Gemset dependencies
65
66
  # clean Clean the dependencies
66
67
  #
68
+ # test Run the whole test suite
69
+ # test-style Test the code styles
70
+ # watch Watch for code changes and rerun the test suite
71
+ #
67
72
  # docs Generate the Ruby documentation of the library
68
73
  # stats Print the code statistics (library and test suite)
69
74
  # notes Print all the notes from the code
@@ -82,6 +87,12 @@ install:
82
87
  @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
83
88
  @$(MAKE) --no-print-directory .fetch-cloc
84
89
 
90
+ update:
91
+ # Install the dependencies
92
+ @$(MKDIR) -p $(VENDOR_DIR)
93
+ @$(call run-shell,$(BUNDLE) update)
94
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
95
+
85
96
  .fetch-cloc:
86
97
  # Fetch the CLOC ($(CLOC_VERSION)) binary
87
98
  ifeq ("$(wildcard $(BIN_DIR)/cloc)","")
@@ -89,6 +100,10 @@ ifeq ("$(wildcard $(BIN_DIR)/cloc)","")
89
100
  @$(CHMOD) +x '$(BIN_DIR)/cloc'
90
101
  endif
91
102
 
103
+ watch: install .interactive
104
+ # Watch for code changes and rerun the test suite
105
+ @$(call run-shell,$(BUNDLE) exec $(GUARD))
106
+
92
107
  test: \
93
108
  test-specs \
94
109
  test-style
@@ -100,7 +115,7 @@ test-specs: .fetch-cloc
100
115
  $(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
101
116
  $(TEST_GEMFILES):
102
117
  # Run the whole test suite ($(GEMFILE))
103
- @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RAKE))
118
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RSPEC))
104
119
 
105
120
  test-style: \
106
121
  test-style-ruby
@@ -109,13 +124,13 @@ test-style-ruby:
109
124
  # Run the static code analyzer (rubocop)
110
125
  @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
111
126
 
112
- watch: install .interactive
113
- # Watch for code changes and rerun the test suite
114
- @$(call run-shell,$(BUNDLE) exec $(GUARD))
115
-
116
127
  clean:
117
128
  # Clean the dependencies
118
129
  @$(RM) -rf $(VENDOR_DIR)
130
+ @$(RM) -rf $(GEMFILES_DIR)/vendor
131
+ @$(RM) -rf $(GEMFILES_DIR)/*.lock
132
+ @$(RM) -rf .bundle .yardoc coverage pkg Gemfile.lock doc/api \
133
+ .rspec_status
119
134
 
120
135
  clean-containers:
121
136
  # Clean running containers
@@ -123,7 +138,15 @@ ifeq ($(MAKE_ENV),docker)
123
138
  @$(COMPOSE) down
124
139
  endif
125
140
 
126
- distclean: clean clean-containers
141
+ clean-images:
142
+ # Clean build images
143
+ ifeq ($(MAKE_ENV),docker)
144
+ @-$(DOCKER) images | $(GREP) $(shell basename "`pwd`") \
145
+ | $(AWK) '{ print $$3 }' \
146
+ | $(XARGS) -rn1 $(DOCKER) rmi -f
147
+ endif
148
+
149
+ distclean: clean clean-containers clean-images
127
150
 
128
151
  shell:
129
152
  # Run an interactive shell on the container
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
 
@@ -94,7 +96,7 @@ Afterwards the following Rake tasks are available to you:
94
96
 
95
97
  ```ruby
96
98
  # All the configured values here represent the Gem defaults.
97
- Countless.configure do |conf|
99
+ Countless.configure do |config|
98
100
  # The base/root path of the project to work on. This path is used as a #
99
101
  # prefix to all relative path/file configurations. By default we check for a
100
102
  # Rake invokation (Rakefile location), a Rails invokation (project root) or
@@ -261,22 +263,30 @@ Countless.configure do |conf|
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.
@@ -0,0 +1,3 @@
1
+ if [ -f ~/.bashrc ]; then
2
+ . ~/.bashrc
3
+ fi
@@ -0,0 +1,48 @@
1
+ # ~/.bashrc: executed by bash(1) for non-login shells.
2
+ # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3
+ # for examples
4
+
5
+ _GEM_PATHS=$(ls -d1 ${HOME}/.gem/ruby/*/bin 2>/dev/null | paste -sd ':')
6
+ _APP_PATHS=$(ls -d1 /app/vendor/bundle/ruby/*/bin 2>/dev/null | paste -sd ':')
7
+
8
+ export PATH="${_GEM_PATHS}:${_APP_PATHS}:${PATH}"
9
+ export PATH="/app/node_modules/.bin:${HOME}/.bin:/app/bin:${PATH}"
10
+ export MAKE_ENV=baremetal
11
+
12
+ # Disable the autostart of all supervisord units
13
+ sudo sed -i 's/autostart=.*/autostart=false/g' /etc/supervisor/conf.d/*
14
+
15
+ # Start the supervisord (empty, no units)
16
+ sudo supervisord >/dev/null 2>&1 &
17
+
18
+ # Wait for supervisord
19
+ while ! supervisorctl status >/dev/null 2>&1; do sleep 1; done
20
+
21
+ # Boot the mDNS stack
22
+ echo '# Start the mDNS stack'
23
+ sudo supervisorctl start dbus avahi
24
+ echo
25
+
26
+ function watch-make-test()
27
+ {
28
+ while [ 1 ]; do
29
+ inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
30
+ make test
31
+ done
32
+ }
33
+
34
+ function watch-make()
35
+ {
36
+ while [ 1 ]; do
37
+ inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
38
+ make $@
39
+ done
40
+ }
41
+
42
+ function watch-run()
43
+ {
44
+ while [ 1 ]; do
45
+ inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
46
+ bash -c "$@"
47
+ done
48
+ }
@@ -0,0 +1,17 @@
1
+ # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
2
+ "\e[1;5C": forward-word
3
+ "\e[1;5D": backward-word
4
+ "\e[5C": forward-word
5
+ "\e[5D": backward-word
6
+ "\e\e[C": forward-word
7
+ "\e\e[D": backward-word
8
+
9
+ # handle common Home/End escape codes
10
+ "\e[1~": beginning-of-line
11
+ "\e[4~": end-of-line
12
+ "\e[7~": beginning-of-line
13
+ "\e[8~": end-of-line
14
+ "\eOH": beginning-of-line
15
+ "\eOF": end-of-line
16
+ "\e[H": beginning-of-line
17
+ "\e[F": end-of-line
data/countless.gemspec CHANGED
@@ -5,40 +5,48 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'countless/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'countless'
9
- spec.version = Countless::VERSION
10
- spec.authors = ['Hermann Mayer']
11
- spec.email = ['hermann.mayer@hausgold.de']
12
-
13
- spec.summary = 'Code statistics/annotations helpers'
14
- spec.description = 'This gem includes reusable code statistics / ' \
15
- 'annotations helpers / Rake tasks.'
16
-
17
- spec.homepage = 'https://github.com/hausgold/countless'
18
- spec.license = 'MIT'
19
-
20
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
8
+ spec.name = 'countless'
9
+ spec.version = Countless::VERSION
10
+ spec.authors = ['Hermann Mayer']
11
+ spec.email = ['hermann.mayer92@gmail.com']
12
+
13
+ spec.license = 'MIT'
14
+ spec.summary = 'Code statistics/annotations helpers'
15
+ spec.description = 'This gem includes reusable code statistics / ' \
16
+ 'annotations helpers / Rake tasks.'
17
+
18
+ base_uri = "https://github.com/hausgold/#{spec.name}"
19
+ spec.metadata = {
20
+ 'homepage_uri' => base_uri,
21
+ 'source_code_uri' => base_uri,
22
+ 'changelog_uri' => "#{base_uri}/blob/master/CHANGELOG.md",
23
+ 'bug_tracker_uri' => "#{base_uri}/issues",
24
+ 'documentation_uri' => "https://www.rubydoc.info/gems/#{spec.name}"
25
+ }
26
+
27
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
28
  f.match(%r{^(test|spec|features)/})
22
29
  end + ['bin/cloc']
23
- spec.bindir = 'exe'
24
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+
31
+ spec.bindir = 'exe'
32
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
33
  spec.require_paths = ['lib']
26
34
 
27
35
  spec.required_ruby_version = '>= 2.5'
28
36
 
29
- spec.add_runtime_dependency 'activesupport', '>= 5.2.0'
30
- spec.add_runtime_dependency 'zeitwerk', '~> 2.4'
37
+ spec.add_runtime_dependency 'activesupport', '>= 5.2'
38
+ spec.add_runtime_dependency 'zeitwerk', '~> 2.6'
31
39
 
32
- spec.add_development_dependency 'appraisal'
40
+ spec.add_development_dependency 'appraisal', '~> 2.4'
33
41
  spec.add_development_dependency 'benchmark-ips', '~> 2.10'
34
- spec.add_development_dependency 'bundler', '>= 1.16', '< 3'
42
+ spec.add_development_dependency 'bundler', '~> 2.3'
35
43
  spec.add_development_dependency 'guard-rspec', '~> 4.7'
36
44
  spec.add_development_dependency 'irb', '~> 1.2'
37
- spec.add_development_dependency 'rspec', '~> 3.9'
38
- spec.add_development_dependency 'rubocop', '~> 1.25'
45
+ spec.add_development_dependency 'rspec', '~> 3.12'
46
+ spec.add_development_dependency 'rubocop', '~> 1.28'
39
47
  spec.add_development_dependency 'rubocop-rails', '~> 2.14'
40
48
  spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
41
- spec.add_development_dependency 'simplecov', '< 0.18'
42
- spec.add_development_dependency 'yard', '~> 0.9.18'
43
- spec.add_development_dependency 'yard-activesupport-concern', '~> 0.0.1'
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'
44
52
  end
data/docker-compose.yml CHANGED
@@ -1,7 +1,8 @@
1
1
  version: "3"
2
2
  services:
3
3
  test:
4
- image: ruby:2.7
4
+ build: .
5
+ env_file: Envfile
5
6
  network_mode: bridge
6
7
  working_dir: /app
7
8
  volumes:
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activejob", "5.2.0"
6
- gem "activerecord", "5.2.0"
7
- gem "activesupport", "5.2.0"
5
+ gem "activejob", "~> 5.2.0"
6
+ gem "activerecord", "~> 5.2.0"
7
+ gem "activesupport", "~> 5.2.0"
8
8
 
9
9
  gemspec path: "../"
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activejob", "6.0.0"
6
- gem "activerecord", "6.0.0"
7
- gem "activesupport", "6.0.0"
5
+ gem "activejob", "~> 6.0.0"
6
+ gem "activerecord", "~> 6.0.0"
7
+ gem "activesupport", "~> 6.0.0"
8
8
 
9
9
  gemspec path: "../"
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activejob", "6.1.0"
6
- gem "activerecord", "6.1.0"
7
- gem "activesupport", "6.1.0"
5
+ gem "activejob", "~> 6.1.0"
6
+ gem "activerecord", "~> 6.1.0"
7
+ gem "activesupport", "~> 6.1.0"
8
8
 
9
9
  gemspec path: "../"
@@ -2,8 +2,8 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activejob", "7.0.0"
6
- gem "activerecord", "7.0.0"
7
- gem "activesupport", "7.0.0"
5
+ gem "activejob", "~> 7.0.0"
6
+ gem "activerecord", "~> 7.0.0"
7
+ gem "activesupport", "~> 7.0.0"
8
8
 
9
9
  gemspec path: "../"
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'rspec/core/rake_task'
4
- require 'pp'
5
4
 
6
5
  desc 'Report code statistics (KLOCs, etc)'
7
6
  task :stats do
@@ -135,7 +135,7 @@ module Countless
135
135
 
136
136
  # Calculate the correct column sizes
137
137
  col_sizes = col_sizes.values.each_with_object([]) do |widths, memo|
138
- memo << widths.max + 2
138
+ memo << (widths.max + 2)
139
139
  end
140
140
 
141
141
  # Enforce the correct column sizes per row
@@ -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.0.0'
6
+ VERSION = '1.2.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.0.0
4
+ version: 1.2.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: 2022-08-19 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.0
19
+ version: '5.2'
20
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: 5.2.0
26
+ version: '5.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.4'
33
+ version: '2.6'
34
34
  type: :runtime
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: '2.4'
40
+ version: '2.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2.4'
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'
54
+ version: '2.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: benchmark-ips
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,22 +70,16 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '1.16'
76
- - - "<"
73
+ - - "~>"
77
74
  - !ruby/object:Gem::Version
78
- version: '3'
75
+ version: '2.3'
79
76
  type: :development
80
77
  prerelease: false
81
78
  version_requirements: !ruby/object:Gem::Requirement
82
79
  requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: '1.16'
86
- - - "<"
80
+ - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: '3'
82
+ version: '2.3'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: guard-rspec
91
85
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +114,28 @@ dependencies:
120
114
  requirements:
121
115
  - - "~>"
122
116
  - !ruby/object:Gem::Version
123
- version: '3.9'
117
+ version: '3.12'
124
118
  type: :development
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - "~>"
129
123
  - !ruby/object:Gem::Version
130
- version: '3.9'
124
+ version: '3.12'
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: rubocop
133
127
  requirement: !ruby/object:Gem::Requirement
134
128
  requirements:
135
129
  - - "~>"
136
130
  - !ruby/object:Gem::Version
137
- version: '1.25'
131
+ version: '1.28'
138
132
  type: :development
139
133
  prerelease: false
140
134
  version_requirements: !ruby/object:Gem::Requirement
141
135
  requirements:
142
136
  - - "~>"
143
137
  - !ruby/object:Gem::Version
144
- version: '1.25'
138
+ version: '1.28'
145
139
  - !ruby/object:Gem::Dependency
146
140
  name: rubocop-rails
147
141
  requirement: !ruby/object:Gem::Requirement
@@ -174,54 +168,55 @@ dependencies:
174
168
  name: simplecov
175
169
  requirement: !ruby/object:Gem::Requirement
176
170
  requirements:
177
- - - "<"
171
+ - - ">="
178
172
  - !ruby/object:Gem::Version
179
- version: '0.18'
173
+ version: '0.22'
180
174
  type: :development
181
175
  prerelease: false
182
176
  version_requirements: !ruby/object:Gem::Requirement
183
177
  requirements:
184
- - - "<"
178
+ - - ">="
185
179
  - !ruby/object:Gem::Version
186
- version: '0.18'
180
+ version: '0.22'
187
181
  - !ruby/object:Gem::Dependency
188
182
  name: yard
189
183
  requirement: !ruby/object:Gem::Requirement
190
184
  requirements:
191
- - - "~>"
185
+ - - ">="
192
186
  - !ruby/object:Gem::Version
193
- version: 0.9.18
187
+ version: 0.9.28
194
188
  type: :development
195
189
  prerelease: false
196
190
  version_requirements: !ruby/object:Gem::Requirement
197
191
  requirements:
198
- - - "~>"
192
+ - - ">="
199
193
  - !ruby/object:Gem::Version
200
- version: 0.9.18
194
+ version: 0.9.28
201
195
  - !ruby/object:Gem::Dependency
202
196
  name: yard-activesupport-concern
203
197
  requirement: !ruby/object:Gem::Requirement
204
198
  requirements:
205
- - - "~>"
199
+ - - ">="
206
200
  - !ruby/object:Gem::Version
207
201
  version: 0.0.1
208
202
  type: :development
209
203
  prerelease: false
210
204
  version_requirements: !ruby/object:Gem::Requirement
211
205
  requirements:
212
- - - "~>"
206
+ - - ">="
213
207
  - !ruby/object:Gem::Version
214
208
  version: 0.0.1
215
209
  description: This gem includes reusable code statistics / annotations helpers / Rake
216
210
  tasks.
217
211
  email:
218
- - hermann.mayer@hausgold.de
212
+ - hermann.mayer92@gmail.com
219
213
  executables: []
220
214
  extensions: []
221
215
  extra_rdoc_files: []
222
216
  files:
223
217
  - ".editorconfig"
224
218
  - ".github/workflows/documentation.yml"
219
+ - ".github/workflows/release.yml"
225
220
  - ".github/workflows/test.yml"
226
221
  - ".gitignore"
227
222
  - ".rspec"
@@ -231,6 +226,8 @@ files:
231
226
  - Appraisals
232
227
  - CHANGELOG.md
233
228
  - CODE_OF_CONDUCT.md
229
+ - Dockerfile
230
+ - Envfile
234
231
  - Gemfile
235
232
  - Guardfile
236
233
  - LICENSE
@@ -240,6 +237,9 @@ files:
240
237
  - bin/cloc
241
238
  - bin/console
242
239
  - bin/setup
240
+ - config/docker/.bash_profile
241
+ - config/docker/.bashrc
242
+ - config/docker/.inputrc
243
243
  - countless.gemspec
244
244
  - doc/assets/project.svg
245
245
  - docker-compose.yml
@@ -256,11 +256,16 @@ files:
256
256
  - lib/countless/rake_tasks.rb
257
257
  - lib/countless/statistics.rb
258
258
  - lib/countless/version.rb
259
- homepage: https://github.com/hausgold/countless
259
+ homepage:
260
260
  licenses:
261
261
  - MIT
262
- metadata: {}
263
- post_install_message:
262
+ metadata:
263
+ homepage_uri: https://github.com/hausgold/countless
264
+ source_code_uri: https://github.com/hausgold/countless
265
+ changelog_uri: https://github.com/hausgold/countless/blob/master/CHANGELOG.md
266
+ bug_tracker_uri: https://github.com/hausgold/countless/issues
267
+ documentation_uri: https://www.rubydoc.info/gems/countless
268
+ post_install_message:
264
269
  rdoc_options: []
265
270
  require_paths:
266
271
  - lib
@@ -275,8 +280,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
280
  - !ruby/object:Gem::Version
276
281
  version: '0'
277
282
  requirements: []
278
- rubygems_version: 3.3.8
279
- signing_key:
283
+ rubygems_version: 3.3.26
284
+ signing_key:
280
285
  specification_version: 4
281
286
  summary: Code statistics/annotations helpers
282
287
  test_files: []