conversejs 3.3.6 → 3.5.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: d37a5a5092048941baa17dec12a6a6bd22dbcc4df080bddfb1c8123760019c60
4
- data.tar.gz: fc79978a62d858b50570f30fed58e06d51c7089a31b6d341718dffbf0d938487
3
+ metadata.gz: d3f66f123dd141b971701ec78ebd72e4175212f0bf426fc53662ea4d03668622
4
+ data.tar.gz: 1b5a8e6130635f5555fc3dfcfe9524baa6408c87d8bda70cbf1ff4c71bc79b75
5
5
  SHA512:
6
- metadata.gz: 1e1a31f333ae52b78cadb8482a1c961a0d9c3963051083f14802a24d389c96d3861297661bdcc97e2e0e875e4bb160524fc2bf2f20e6678375c58346db665467
7
- data.tar.gz: 48514a2b48e51c21e78297b1527fcb0374db316a57678526e549682dbf34e4cb13363939512b34a8290af33b16a0a7c26139f5047541511b38c9bdf6a606d162
6
+ metadata.gz: 5cddc8fe1016473258596994f7f1d47d68b9bea0c7fb01cf9ae4d88e466430284c285cdcdf88957fae04fa209c9a68d72ea110db3736b47ef9c481f8c34325dc
7
+ data.tar.gz: eadb7f0bc585a8a39d5e3ef570066221cc1d629943b8a7099e3d559b264dd7c67878fb87f194d6f5359ef54d367d10c96eba7ab2cd80d4e6039fe8b7995a6963
@@ -9,16 +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: '3.3.26'
22
23
 
23
24
  - name: Prepare the virtual environment
24
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
@@ -12,21 +12,25 @@ concurrency:
12
12
 
13
13
  jobs:
14
14
  test:
15
- name: 'Test the gem (Ruby ${{ matrix.ruby }})'
16
- runs-on: ubuntu-20.04
15
+ name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
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]
21
+ ruby: ['2.5', '2.7']
22
+ rails: ['5.2']
23
+ env:
24
+ BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
22
25
  steps:
23
- - uses: actions/checkout@v2
26
+ - uses: actions/checkout@v3
24
27
 
25
28
  - name: Install the correct Ruby version
26
29
  uses: ruby/setup-ruby@v1
27
30
  with:
28
31
  ruby-version: ${{ matrix.ruby }}
29
32
  bundler-cache: true
33
+ rubygems: '3.3.26'
30
34
 
31
35
  - name: Prepare the virtual environment
32
36
  uses: hausgold/actions/ci@master
@@ -43,7 +47,7 @@ jobs:
43
47
 
44
48
  trigger-docs:
45
49
  name: Trigger the documentation upload
46
- runs-on: ubuntu-20.04
50
+ runs-on: ubuntu-22.04
47
51
  timeout-minutes: 2
48
52
  needs: test
49
53
  if: github.ref == 'refs/heads/master'
data/.rspec CHANGED
@@ -1,3 +1,3 @@
1
+ --backtrace
2
+ --force-color
1
3
  --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,14 +1,19 @@
1
- require: rubocop-rspec
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
2
4
 
3
5
  Rails:
4
6
  Enabled: true
5
7
 
6
- Documentation:
8
+ Style/Documentation:
7
9
  Enabled: true
8
10
 
9
11
  AllCops:
12
+ NewCops: enable
13
+ SuggestExtensions: false
10
14
  DisplayCopNames: true
11
15
  TargetRubyVersion: 2.5
16
+ TargetRailsVersion: 5.2
12
17
  Exclude:
13
18
  - bin/**/*
14
19
  - vendor/**/*
@@ -24,6 +29,14 @@ Metrics/BlockLength:
24
29
  - '**/*.rake'
25
30
  - doc/**/*.rb
26
31
 
32
+ # MFA is not yet enabled for our gems yet.
33
+ Gemspec/RequireMFA:
34
+ Enabled: false
35
+
36
+ # We stay with the original Ruby Style Guide recommendation.
37
+ Layout/LineLength:
38
+ Max: 80
39
+
27
40
  # Document all the things.
28
41
  Style/DocumentationMethod:
29
42
  Enabled: true
data/.simplecov CHANGED
@@ -1,3 +1,15 @@
1
+ # frozen_string_literal: true
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
+
1
13
  SimpleCov.start 'test_frameworks' do
2
14
  add_filter '/vendor/bundle/'
3
15
  end
data/Appraisals ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ appraise 'rails-5.2' do
4
+ gem 'railties', '~> 5.2.0'
5
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### next
2
+
3
+ * TODO: Replace this bullet point with an actual description of a change.
4
+
5
+ ### 3.5.0
6
+
7
+ * Added support for Gem release automation
8
+
9
+ ### 3.4.0
10
+
11
+ * Bundler >= 2.3 is from now on required as minimal version (#3)
12
+ * Dropped support for Ruby < 2.5 (#3)
13
+ * Dropped support for Rails < 5.2 (#3)
14
+ * Updated all development/runtime gems to their latest
15
+ Ruby 2.5 compatible version (#3)
16
+
1
17
  ### 3.3.6
2
18
 
3
19
  * Migrated to Github Actions
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at development@hausgold.de. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM hausgold/ruby:2.5
2
2
  MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
3
3
 
4
4
  # Update system gem
5
- RUN gem update --system
5
+ RUN gem update --system '3.3.26'
6
6
 
7
7
  # Install system packages and the latest bundler
8
8
  RUN apt-get update -yqqq && \
@@ -11,8 +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.0' --no-document --no-prerelease && \
15
- gem install bundler -v '~> 1.0' --no-document --no-prerelease
14
+ gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
16
15
 
17
16
  # Add new web user
18
17
  RUN mkdir /app && \
data/Envfile CHANGED
@@ -1,6 +1,3 @@
1
1
  LANG=en_US.UTF-8
2
2
  LANGUAGE=en_US.UTF-8
3
3
  LC_ALL=en_US.UTF-8
4
-
5
- # Just fix this, so Appraisals with Rails 4 are working fine
6
- BUNDLER_VERSION=1.17.3
data/Guardfile ADDED
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ (directories %w[lib spec]).select do |d|
8
+ if Dir.exist?(d)
9
+ d
10
+ else
11
+ UI.warning("Directory #{d} does not exist")
12
+ end
13
+ end
14
+
15
+ ## Note: if you are using the `directories` clause above and you are not
16
+ ## watching the project directory ('.'), then you will want to move
17
+ ## the Guardfile to a watched dir and symlink it back, e.g.
18
+ #
19
+ # $ mkdir config
20
+ # $ mv Guardfile config/
21
+ # $ ln -s config/Guardfile .
22
+ #
23
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
24
+
25
+ # NOTE: The cmd option is now required due to the increasing number of ways
26
+ # rspec may be run, below are examples of the most common uses.
27
+ # * bundler: 'bundle exec rspec'
28
+ # * bundler binstubs: 'bin/rspec'
29
+ # * spring: 'bin/rspec' (This will use spring if running and you have
30
+ # installed the spring binstubs per the docs)
31
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
32
+ # * 'just' rspec: 'rspec'
33
+
34
+ guard :rspec, cmd: 'bundle exec rspec' do
35
+ watch('spec/spec_helper.rb') { 'spec' }
36
+ watch(%r{^lib/conversejs.rb}) { 'spec' }
37
+ watch(%r{^spec/.+_spec\.rb$})
38
+ watch(%r{^lib/conversejs/([^\\]+)\.rb$}) do |m|
39
+ "spec/#{m[1]}_spec.rb"
40
+ end
41
+ watch(%r{^lib/conversejs/([^\\]+)/(.*)\.rb$}) do |m|
42
+ "spec/#{m[1]}/#{m[2]}_spec.rb"
43
+ end
44
+ end
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2018 Henning Vogt
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
@@ -9,9 +9,11 @@ SHELL := bash
9
9
  # Environment switches
10
10
  MAKE_ENV ?= docker
11
11
  COMPOSE_RUN_SHELL_FLAGS ?= --rm
12
+ BASH_RUN_SHELL_FLAGS ?=
12
13
 
13
14
  # Directories
14
15
  VENDOR_DIR ?= vendor/bundle
16
+ GEMFILES_DIR ?= gemfiles
15
17
 
16
18
  # Host binaries
17
19
  AWK ?= awk
@@ -25,12 +27,20 @@ RM ?= rm
25
27
  XARGS ?= xargs
26
28
 
27
29
  # Container binaries
30
+ APPRAISAL ?= appraisal
28
31
  BUNDLE ?= bundle
29
32
  GEM ?= gem
33
+ GUARD ?= guard
30
34
  RAKE ?= rake
35
+ RSPEC ?= rspec
31
36
  RUBOCOP ?= rubocop
32
37
  YARD ?= yard
33
38
 
39
+ # Files
40
+ GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
41
+ $(wildcard $(GEMFILES_DIR)/*.gemfile)))
42
+ TEST_GEMFILES := $(GEMFILES:%=test-%)
43
+
34
44
  # Define a generic shell run wrapper
35
45
  # $1 - The command to run
36
46
  ifeq ($(MAKE_ENV),docker)
@@ -38,7 +48,8 @@ define run-shell
38
48
  $(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
39
49
  -e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
40
50
  -e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
41
- -u `$(ID) -u` test bash -c 'sleep 0.1; echo; $(1)'
51
+ -u `$(ID) -u` test \
52
+ bash $(BASH_RUN_SHELL_FLAGS) -c 'sleep 0.1; echo; $(1)'
42
53
  endef
43
54
  else ifeq ($(MAKE_ENV),baremetal)
44
55
  define run-shell
@@ -55,6 +66,7 @@ all:
55
66
  #
56
67
  # test Run the whole test suite
57
68
  # test-style Test the code styles
69
+ # watch Watch for code changes and rerun the test suite
58
70
  #
59
71
  # docs Generate the Ruby documentation of the library
60
72
  # stats Print the code statistics (library and test suite)
@@ -64,12 +76,24 @@ all:
64
76
  # shell Run an interactive shell on the container
65
77
  # shell-irb Run an interactive IRB shell on the container
66
78
 
79
+ .interactive:
80
+ @$(eval BASH_RUN_SHELL_FLAGS = --login)
81
+
67
82
  install:
68
83
  # Install the dependencies
69
84
  @$(MKDIR) -p $(VENDOR_DIR)
70
85
  @$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
71
- @$(call run-shell,GEM_HOME=vendor/bundle/ruby/$${RUBY_MAJOR}.0 \
72
- $(GEM) install bundler -v "~> 1.0")
86
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
87
+
88
+ update:
89
+ # Install the dependencies
90
+ @$(MKDIR) -p $(VENDOR_DIR)
91
+ @$(call run-shell,$(BUNDLE) update)
92
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
93
+
94
+ watch: install .interactive
95
+ # Watch for code changes and rerun the test suite
96
+ @$(call run-shell,$(BUNDLE) exec $(GUARD))
73
97
 
74
98
  test: \
75
99
  test-specs \
@@ -79,6 +103,11 @@ test-specs:
79
103
  # Run the whole test suite
80
104
  @$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
81
105
 
106
+ $(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
107
+ $(TEST_GEMFILES):
108
+ # Run the whole test suite ($(GEMFILE))
109
+ @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RSPEC))
110
+
82
111
  test-style: \
83
112
  test-style-ruby
84
113
 
@@ -89,9 +118,10 @@ test-style-ruby:
89
118
  clean:
90
119
  # Clean the dependencies
91
120
  @$(RM) -rf $(VENDOR_DIR)
92
- @$(RM) -rf $(VENDOR_DIR)/Gemfile.lock
93
- @$(RM) -rf pkg
94
- @$(RM) -rf coverage
121
+ @$(RM) -rf $(GEMFILES_DIR)/vendor
122
+ @$(RM) -rf $(GEMFILES_DIR)/*.lock
123
+ @$(RM) -rf .bundle .yardoc coverage pkg Gemfile.lock doc/api \
124
+ .rspec_status
95
125
 
96
126
  clean-containers:
97
127
  # Clean running containers
@@ -102,7 +132,7 @@ endif
102
132
  clean-images:
103
133
  # Clean build images
104
134
  ifeq ($(MAKE_ENV),docker)
105
- @-$(DOCKER) images | $(GREP) rimless \
135
+ @-$(DOCKER) images | $(GREP) $(shell basename "`pwd`") \
106
136
  | $(AWK) '{ print $$3 }' \
107
137
  | $(XARGS) -rn1 $(DOCKER) rmi -f
108
138
  endif
data/README.md CHANGED
@@ -12,8 +12,9 @@ for your Rails 4+ application.
12
12
  - [Installation](#installation)
13
13
  - [Usage](#usage)
14
14
  - [Development](#development)
15
+ - [Code of Conduct](#code-of-conduct)
15
16
  - [Contributing](#contributing)
16
- - [License](#license)
17
+ - [Releasing](#releasing)
17
18
 
18
19
  ## Installation
19
20
 
@@ -54,22 +55,28 @@ your `app/assets/stylesheets/application.scss`. Just add this line:
54
55
 
55
56
  ## Development
56
57
 
57
- After checking out the repo, run `bin/setup` to install dependencies. Then, run
58
- `rake spec` to run the tests. You can also run `bin/console` for an interactive
59
- prompt that will allow you to experiment.
58
+ After checking out the repo, run `make install` to install dependencies. Then,
59
+ run `make test` to run the tests. You can also run `make shell-irb` for an
60
+ interactive prompt that will allow you to experiment.
60
61
 
61
- To install this gem onto your local machine, run `bundle exec rake install`. To
62
- release a new version, update the version number in `version.rb`, and then run
63
- `bundle exec rake release`, which will create a git tag for the version, push
64
- git commits and tags, and push the `.gem` file to
65
- [rubygems.org](https://rubygems.org).
62
+ ## Code of Conduct
63
+
64
+ Everyone interacting in the project codebase, issue tracker, chat
65
+ rooms and mailing lists is expected to follow the [code of
66
+ conduct](./CODE_OF_CONDUCT.md).
66
67
 
67
68
  ## Contributing
68
69
 
69
70
  Bug reports and pull requests are welcome on GitHub at
70
- https://github.com/hausgold/conversejs.
71
-
72
- ## License
73
-
74
- The gem is available as open source under the terms of the [MIT
75
- License](https://opensource.org/licenses/MIT).
71
+ https://github.com/hausgold/conversejs. Make sure that every pull request adds
72
+ a bullet point to the [changelog](./CHANGELOG.md) file with a reference to the
73
+ actual pull request.
74
+
75
+ ## Releasing
76
+
77
+ The release process of this Gem is fully automated. You just need to open the
78
+ Github Actions [Release
79
+ Workflow](https://github.com/hausgold/conversejs/actions/workflows/release.yml)
80
+ and trigger a new run via the **Run workflow** button. Insert the new version
81
+ number (check the [changelog](./CHANGELOG.md) first for the latest release) and
82
+ you're done.
data/Rakefile CHANGED
@@ -2,71 +2,18 @@
2
2
 
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rspec/core/rake_task'
5
- require 'rails/code_statistics'
6
- require 'pp'
5
+ require 'countless/rake_tasks'
7
6
 
8
7
  RSpec::Core::RakeTask.new(:spec)
9
8
 
10
9
  task default: :spec
11
10
 
12
- # Load some railties tasks
13
- load 'rails/tasks/statistics.rake'
14
- load 'rails/tasks/annotations.rake'
15
-
16
- # Clear the default statistics directory constant
17
- #
18
- # rubocop:disable Style/MutableConstant because we define it
19
- Object.send(:remove_const, :STATS_DIRECTORIES)
20
- ::STATS_DIRECTORIES = []
21
- # rubocop:enable Style/MutableConstant
22
-
23
- # Monkey patch the Rails +CodeStatistics+ class to support configurable
24
- # patterns per path. This is reuqired to support top-level only file matches.
25
- class CodeStatistics
26
- DEFAULT_PATTERN = /^(?!\.).*?\.(rb|js|coffee|rake)$/.freeze
27
-
28
- # Pass the possible +pattern+ argument down to the
29
- # +calculate_directory_statistics+ method call.
30
- def calculate_statistics
31
- Hash[@pairs.map do |pair|
32
- [pair.first, calculate_directory_statistics(*pair[1..-1])]
33
- end]
34
- end
35
-
36
- # Match the pattern against the individual file name and the relative file
37
- # path. This allows top-level only matches.
38
- def calculate_directory_statistics(directory, pattern = DEFAULT_PATTERN)
39
- stats = CodeStatisticsCalculator.new
40
-
41
- Dir.foreach(directory) do |file_name|
42
- path = "#{directory}/#{file_name}"
43
-
44
- if File.directory?(path) && (/^\./ !~ file_name)
45
- stats.add(calculate_directory_statistics(path, pattern))
46
- elsif file_name =~ pattern || path =~ pattern
47
- stats.add_by_file_path(path)
48
- end
49
- end
50
-
51
- stats
52
- end
53
- end
54
-
55
11
  # Configure all code statistics directories
56
- vendors = [
57
- [:unshift, 'Top-levels', 'lib'],
58
- [:unshift, 'Top-levels specs', 'spec', %r{spec/.*_spec\.rb$}]
59
- ].reverse
60
-
61
- vendors.each do |method, type, dir, pattern|
62
- ::STATS_DIRECTORIES.send(method, [type, dir, pattern].compact)
63
- ::CodeStatistics::TEST_TYPES << type if type.include? 'specs'
64
- end
65
-
66
- # Setup annotations
67
- ENV['SOURCE_ANNOTATION_DIRECTORIES'] = 'spec,doc'
68
-
69
- desc 'Enumerate all annotations'
70
- task :notes do
71
- SourceAnnotationExtractor.enumerate '@?OPTIMIZE|@?FIXME|@?TODO', tag: true
12
+ Countless.configure do |config|
13
+ config.stats_base_directories = [
14
+ { name: 'Top-levels',
15
+ pattern: 'lib/**/*.rb' },
16
+ { name: 'Top-levels specs', test: true,
17
+ pattern: 'spec/**/*_spec.rb' }
18
+ ]
72
19
  end
data/conversejs.gemspec CHANGED
@@ -5,38 +5,48 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'conversejs/rails/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'conversejs'
9
- spec.version = Conversejs::Rails::VERSION
10
- spec.authors = ['Henning Vogt']
11
- spec.email = ['henning.vogt@hausgold.de']
12
-
13
- spec.summary = 'Converse.js for your Rails application'
14
- spec.homepage = 'https://github.com/hausgold/conversejs'
15
- spec.license = 'MIT'
16
-
17
- if spec.respond_to?(:metadata)
18
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
19
- else
20
- raise 'RubyGems 2.0 or newer is required to protect against ' \
21
- 'public gem pushes.'
22
- end
8
+ spec.name = 'conversejs'
9
+ spec.version = Conversejs::Rails::VERSION
10
+ spec.authors = ['Hermann Mayer', 'Henning Vogt']
11
+ spec.email = ['hermann.mayer92@gmail.com', 'henning.vogt@hausgold.de']
12
+
13
+ spec.license = 'MIT'
14
+ spec.summary = 'Converse.js for your Rails application'
15
+ spec.homepage = 'https://github.com/hausgold/conversejs'
16
+
17
+ base_uri = "https://github.com/hausgold/#{spec.name}"
18
+ spec.metadata = {
19
+ 'homepage_uri' => base_uri,
20
+ 'source_code_uri' => base_uri,
21
+ 'changelog_uri' => "#{base_uri}/blob/master/CHANGELOG.md",
22
+ 'bug_tracker_uri' => "#{base_uri}/issues",
23
+ 'documentation_uri' => "https://www.rubydoc.info/gems/#{spec.name}"
24
+ }
23
25
 
24
26
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
27
  f.match(%r{^(test|spec|features)/})
26
28
  end
27
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
32
  spec.require_paths = ['lib']
29
33
 
30
- spec.add_dependency 'railties', '>= 4.2.0'
31
-
32
- spec.add_development_dependency 'bundler', '>= 1.16', '< 3'
33
- spec.add_development_dependency 'rails', '>= 4.2.0', '< 6'
34
- spec.add_development_dependency 'rake', '~> 10.0'
35
- spec.add_development_dependency 'rspec', '~> 3.0'
36
- spec.add_development_dependency 'rspec-rails', '~> 3.7'
37
- spec.add_development_dependency 'rubocop', '~> 0.63.1'
38
- spec.add_development_dependency 'rubocop-rspec', '~> 1.31'
39
- spec.add_development_dependency 'simplecov', '< 0.18'
40
- spec.add_development_dependency 'yard', '~> 0.9.18'
41
- spec.add_development_dependency 'yard-activesupport-concern', '~> 0.0.1'
34
+ spec.required_ruby_version = '>= 2.5'
35
+
36
+ spec.add_dependency 'railties', '>= 5.2'
37
+
38
+ spec.add_development_dependency 'appraisal', '~> 2.4'
39
+ spec.add_development_dependency 'bundler', '~> 2.3'
40
+ spec.add_development_dependency 'countless', '~> 1.1'
41
+ spec.add_development_dependency 'guard-rspec', '~> 4.7'
42
+ spec.add_development_dependency 'rails', '>= 5.2'
43
+ spec.add_development_dependency 'rake', '~> 13.0'
44
+ spec.add_development_dependency 'rspec', '~> 3.12'
45
+ spec.add_development_dependency 'rspec-rails', '~> 5.1'
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'
42
52
  end
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "railties", "~> 5.2.0"
6
+
7
+ gemspec path: "../"
@@ -1,8 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Conversejs
4
+ # The gem version details.
4
5
  module Rails
5
6
  # The version of the +conversejs+ gem
6
- VERSION = '3.3.6'
7
+ VERSION = '3.5.0'
8
+
9
+ class << self
10
+ # Returns the version of gem as a string.
11
+ #
12
+ # @return [String] the gem version as string
13
+ def version
14
+ VERSION
15
+ end
16
+
17
+ # Returns the version of the gem as a +Gem::Version+.
18
+ #
19
+ # @return [Gem::Version] the gem version as object
20
+ def gem_version
21
+ Gem::Version.new VERSION
22
+ end
23
+ end
7
24
  end
8
25
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conversejs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.6
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Hermann Mayer
7
8
  - Henning Vogt
8
- autorequire:
9
- bindir: bin
9
+ autorequire:
10
+ bindir: exe
10
11
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
12
+ date: 2023-02-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: railties
@@ -16,168 +17,213 @@ dependencies:
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 4.2.0
20
+ version: '5.2'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 4.2.0
27
+ version: '5.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: appraisal
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: '2.4'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '2.4'
27
42
  - !ruby/object:Gem::Dependency
28
43
  name: bundler
29
44
  requirement: !ruby/object:Gem::Requirement
30
45
  requirements:
31
- - - ">="
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.3'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
32
54
  - !ruby/object:Gem::Version
33
- version: '1.16'
34
- - - "<"
55
+ version: '2.3'
56
+ - !ruby/object:Gem::Dependency
57
+ name: countless
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
35
61
  - !ruby/object:Gem::Version
36
- version: '3'
62
+ version: '1.1'
37
63
  type: :development
38
64
  prerelease: false
39
65
  version_requirements: !ruby/object:Gem::Requirement
40
66
  requirements:
41
- - - ">="
67
+ - - "~>"
42
68
  - !ruby/object:Gem::Version
43
- version: '1.16'
44
- - - "<"
69
+ version: '1.1'
70
+ - !ruby/object:Gem::Dependency
71
+ name: guard-rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
45
75
  - !ruby/object:Gem::Version
46
- version: '3'
76
+ version: '4.7'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '4.7'
47
84
  - !ruby/object:Gem::Dependency
48
85
  name: rails
49
86
  requirement: !ruby/object:Gem::Requirement
50
87
  requirements:
51
88
  - - ">="
52
89
  - !ruby/object:Gem::Version
53
- version: 4.2.0
54
- - - "<"
55
- - !ruby/object:Gem::Version
56
- version: '6'
90
+ version: '5.2'
57
91
  type: :development
58
92
  prerelease: false
59
93
  version_requirements: !ruby/object:Gem::Requirement
60
94
  requirements:
61
95
  - - ">="
62
96
  - !ruby/object:Gem::Version
63
- version: 4.2.0
64
- - - "<"
65
- - !ruby/object:Gem::Version
66
- version: '6'
97
+ version: '5.2'
67
98
  - !ruby/object:Gem::Dependency
68
99
  name: rake
69
100
  requirement: !ruby/object:Gem::Requirement
70
101
  requirements:
71
102
  - - "~>"
72
103
  - !ruby/object:Gem::Version
73
- version: '10.0'
104
+ version: '13.0'
74
105
  type: :development
75
106
  prerelease: false
76
107
  version_requirements: !ruby/object:Gem::Requirement
77
108
  requirements:
78
109
  - - "~>"
79
110
  - !ruby/object:Gem::Version
80
- version: '10.0'
111
+ version: '13.0'
81
112
  - !ruby/object:Gem::Dependency
82
113
  name: rspec
83
114
  requirement: !ruby/object:Gem::Requirement
84
115
  requirements:
85
116
  - - "~>"
86
117
  - !ruby/object:Gem::Version
87
- version: '3.0'
118
+ version: '3.12'
88
119
  type: :development
89
120
  prerelease: false
90
121
  version_requirements: !ruby/object:Gem::Requirement
91
122
  requirements:
92
123
  - - "~>"
93
124
  - !ruby/object:Gem::Version
94
- version: '3.0'
125
+ version: '3.12'
95
126
  - !ruby/object:Gem::Dependency
96
127
  name: rspec-rails
97
128
  requirement: !ruby/object:Gem::Requirement
98
129
  requirements:
99
130
  - - "~>"
100
131
  - !ruby/object:Gem::Version
101
- version: '3.7'
132
+ version: '5.1'
102
133
  type: :development
103
134
  prerelease: false
104
135
  version_requirements: !ruby/object:Gem::Requirement
105
136
  requirements:
106
137
  - - "~>"
107
138
  - !ruby/object:Gem::Version
108
- version: '3.7'
139
+ version: '5.1'
109
140
  - !ruby/object:Gem::Dependency
110
141
  name: rubocop
111
142
  requirement: !ruby/object:Gem::Requirement
112
143
  requirements:
113
144
  - - "~>"
114
145
  - !ruby/object:Gem::Version
115
- version: 0.63.1
146
+ version: '1.28'
116
147
  type: :development
117
148
  prerelease: false
118
149
  version_requirements: !ruby/object:Gem::Requirement
119
150
  requirements:
120
151
  - - "~>"
121
152
  - !ruby/object:Gem::Version
122
- version: 0.63.1
153
+ version: '1.28'
154
+ - !ruby/object:Gem::Dependency
155
+ name: rubocop-rails
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - "~>"
159
+ - !ruby/object:Gem::Version
160
+ version: '2.14'
161
+ type: :development
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - "~>"
166
+ - !ruby/object:Gem::Version
167
+ version: '2.14'
123
168
  - !ruby/object:Gem::Dependency
124
169
  name: rubocop-rspec
125
170
  requirement: !ruby/object:Gem::Requirement
126
171
  requirements:
127
172
  - - "~>"
128
173
  - !ruby/object:Gem::Version
129
- version: '1.31'
174
+ version: '2.10'
130
175
  type: :development
131
176
  prerelease: false
132
177
  version_requirements: !ruby/object:Gem::Requirement
133
178
  requirements:
134
179
  - - "~>"
135
180
  - !ruby/object:Gem::Version
136
- version: '1.31'
181
+ version: '2.10'
137
182
  - !ruby/object:Gem::Dependency
138
183
  name: simplecov
139
184
  requirement: !ruby/object:Gem::Requirement
140
185
  requirements:
141
- - - "<"
186
+ - - ">="
142
187
  - !ruby/object:Gem::Version
143
- version: '0.18'
188
+ version: '0.22'
144
189
  type: :development
145
190
  prerelease: false
146
191
  version_requirements: !ruby/object:Gem::Requirement
147
192
  requirements:
148
- - - "<"
193
+ - - ">="
149
194
  - !ruby/object:Gem::Version
150
- version: '0.18'
195
+ version: '0.22'
151
196
  - !ruby/object:Gem::Dependency
152
197
  name: yard
153
198
  requirement: !ruby/object:Gem::Requirement
154
199
  requirements:
155
- - - "~>"
200
+ - - ">="
156
201
  - !ruby/object:Gem::Version
157
- version: 0.9.18
202
+ version: 0.9.28
158
203
  type: :development
159
204
  prerelease: false
160
205
  version_requirements: !ruby/object:Gem::Requirement
161
206
  requirements:
162
- - - "~>"
207
+ - - ">="
163
208
  - !ruby/object:Gem::Version
164
- version: 0.9.18
209
+ version: 0.9.28
165
210
  - !ruby/object:Gem::Dependency
166
211
  name: yard-activesupport-concern
167
212
  requirement: !ruby/object:Gem::Requirement
168
213
  requirements:
169
- - - "~>"
214
+ - - ">="
170
215
  - !ruby/object:Gem::Version
171
216
  version: 0.0.1
172
217
  type: :development
173
218
  prerelease: false
174
219
  version_requirements: !ruby/object:Gem::Requirement
175
220
  requirements:
176
- - - "~>"
221
+ - - ">="
177
222
  - !ruby/object:Gem::Version
178
223
  version: 0.0.1
179
- description:
224
+ description:
180
225
  email:
226
+ - hermann.mayer92@gmail.com
181
227
  - henning.vogt@hausgold.de
182
228
  executables: []
183
229
  extensions: []
@@ -185,16 +231,20 @@ extra_rdoc_files: []
185
231
  files:
186
232
  - ".editorconfig"
187
233
  - ".github/workflows/documentation.yml"
234
+ - ".github/workflows/release.yml"
188
235
  - ".github/workflows/test.yml"
189
236
  - ".gitignore"
190
237
  - ".rspec"
191
238
  - ".rubocop.yml"
192
239
  - ".simplecov"
193
240
  - ".yardopts"
241
+ - Appraisals
194
242
  - CHANGELOG.md
243
+ - CODE_OF_CONDUCT.md
195
244
  - Dockerfile
196
245
  - Envfile
197
246
  - Gemfile
247
+ - Guardfile
198
248
  - LICENSE
199
249
  - Makefile
200
250
  - README.md
@@ -207,6 +257,7 @@ files:
207
257
  - conversejs.gemspec
208
258
  - doc/assets/project.svg
209
259
  - docker-compose.yml
260
+ - gemfiles/rails_5.2.gemfile
210
261
  - lib/conversejs.rb
211
262
  - lib/conversejs/rails.rb
212
263
  - lib/conversejs/rails/engine.rb
@@ -217,8 +268,12 @@ homepage: https://github.com/hausgold/conversejs
217
268
  licenses:
218
269
  - MIT
219
270
  metadata:
220
- allowed_push_host: https://rubygems.org
221
- post_install_message:
271
+ homepage_uri: https://github.com/hausgold/conversejs
272
+ source_code_uri: https://github.com/hausgold/conversejs
273
+ changelog_uri: https://github.com/hausgold/conversejs/blob/master/CHANGELOG.md
274
+ bug_tracker_uri: https://github.com/hausgold/conversejs/issues
275
+ documentation_uri: https://www.rubydoc.info/gems/conversejs
276
+ post_install_message:
222
277
  rdoc_options: []
223
278
  require_paths:
224
279
  - lib
@@ -226,15 +281,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
226
281
  requirements:
227
282
  - - ">="
228
283
  - !ruby/object:Gem::Version
229
- version: '0'
284
+ version: '2.5'
230
285
  required_rubygems_version: !ruby/object:Gem::Requirement
231
286
  requirements:
232
287
  - - ">="
233
288
  - !ruby/object:Gem::Version
234
289
  version: '0'
235
290
  requirements: []
236
- rubygems_version: 3.2.16
237
- signing_key:
291
+ rubygems_version: 3.3.26
292
+ signing_key:
238
293
  specification_version: 4
239
294
  summary: Converse.js for your Rails application
240
295
  test_files: []