conversejs 3.3.5 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bd7e5245b49671b4608e1cc585495593bc952d0642f6f9210f2784d489d49e2
4
- data.tar.gz: 26e396d9beb23fcaf7a581a9d9d5c4cc323e1225a234e3c580a24425a57e6da0
3
+ metadata.gz: 89d49375501f694fb37726e716e2f4669940815a9977adee8ab324be293cde7d
4
+ data.tar.gz: 115cc6d1899bbfd3e4eaf83ee29a4fa1ecae04950e9fbc99500ad37c2a47ce10
5
5
  SHA512:
6
- metadata.gz: dc52eaa50b2248cba50e2d3a3fddf48f026a3fcd6433ecdaba5df66669f0ae49db51c09f11cca422daf91831fc9faefc1b801fc5bbec020be9c78ecb28c1b618
7
- data.tar.gz: cf8375246223cedb26a0ffc24b6119e2a41ff2b293d2541dccf0979c91a24596065bf1c0b91c3c05a701173906eb8961baa9609b8eb2bd96ce536bd7d8b27a31
6
+ metadata.gz: 77c72bc478d9b19bec3e0ac07d92e913082bc89edb9126f18dbc37674f7fe9df7cc519b713bd20389a4070e013134d9083552bbbe3f702a343e065a4e62a91c3
7
+ data.tar.gz: e214a6c6e1107644ed7cee501d4f35c4d119728312d5fb77a0bb66dff8ce217c7e16ba6861dac07e2faa7426662c06dc7af83c7a8c950ae3414360e4e16f06d9
@@ -0,0 +1,39 @@
1
+ name: Build Documentation
2
+ on:
3
+ repository_dispatch:
4
+ types: [documentation]
5
+
6
+ concurrency:
7
+ group: 'docs'
8
+
9
+ jobs:
10
+ docs:
11
+ name: Build gem documentation
12
+ runs-on: ubuntu-22.04
13
+ timeout-minutes: 5
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+
17
+ - name: Install the correct Ruby version
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: 2.5
21
+ bundler-cache: true
22
+ rubygems: '3.3.26'
23
+
24
+ - name: Prepare the virtual environment
25
+ uses: hausgold/actions/ci@master
26
+ with:
27
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
28
+ settings: '${{ github.repository }}'
29
+ target: ci/gem-test
30
+
31
+ - name: Build gem documentation
32
+ run: make docs
33
+
34
+ - name: Upload the code coverage report
35
+ run: coverage
36
+
37
+ - name: Add this job to the commit status
38
+ run: commit-status '${{ job.status }}'
39
+ if: always()
@@ -0,0 +1,63 @@
1
+ name: Test
2
+ on:
3
+ push:
4
+ branches:
5
+ - '**'
6
+ schedule:
7
+ - cron: '0 0 * * MON'
8
+
9
+ concurrency:
10
+ group: '${{ github.ref }}'
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ test:
15
+ name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
16
+ runs-on: ubuntu-22.04
17
+ timeout-minutes: 5
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: ['2.5', '2.7']
22
+ rails: ['5.2']
23
+ env:
24
+ BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+
28
+ - name: Install the correct Ruby version
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby }}
32
+ bundler-cache: true
33
+ rubygems: '3.3.26'
34
+
35
+ - name: Prepare the virtual environment
36
+ uses: hausgold/actions/ci@master
37
+ with:
38
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
39
+ settings: '${{ github.repository }}'
40
+ target: ci/gem-test
41
+
42
+ - name: Run the gem tests
43
+ run: make test
44
+
45
+ - name: Upload the code coverage report
46
+ run: coverage
47
+
48
+ trigger-docs:
49
+ name: Trigger the documentation upload
50
+ runs-on: ubuntu-22.04
51
+ timeout-minutes: 2
52
+ needs: test
53
+ if: github.ref == 'refs/heads/master'
54
+ steps:
55
+ - name: Prepare the virtual environment
56
+ uses: hausgold/actions/ci@master
57
+ with:
58
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
59
+ settings: '${{ github.repository }}'
60
+ target: ci/noop
61
+
62
+ - name: Trigger the documentation upload
63
+ run: workflow documentation
data/.gitignore CHANGED
@@ -2,11 +2,13 @@
2
2
  /.yardoc
3
3
  /_yardoc/
4
4
  /coverage/
5
+ /doc/api/
5
6
  /pkg/
6
7
  /spec/reports/
7
8
  /tmp/
8
9
  /spec/dummy/tmp
9
10
  /spec/dummy/log
11
+ /vendor/
10
12
  /gemfiles/vendor/
11
13
  /Gemfile.lock
12
14
  *.gemfile.lock
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 ADDED
@@ -0,0 +1,67 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rails
4
+
5
+ Rails:
6
+ Enabled: true
7
+
8
+ Style/Documentation:
9
+ Enabled: true
10
+
11
+ AllCops:
12
+ NewCops: enable
13
+ SuggestExtensions: false
14
+ DisplayCopNames: true
15
+ TargetRubyVersion: 2.5
16
+ TargetRailsVersion: 5.2
17
+ Exclude:
18
+ - bin/**/*
19
+ - vendor/**/*
20
+ - build/**/*
21
+ - gemfiles/**/*
22
+ - spec/dummy/**/*
23
+
24
+ Metrics/BlockLength:
25
+ Exclude:
26
+ - Rakefile
27
+ - '*.gemspec'
28
+ - spec/**/*.rb
29
+ - '**/*.rake'
30
+ - doc/**/*.rb
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
+
40
+ # Document all the things.
41
+ Style/DocumentationMethod:
42
+ Enabled: true
43
+ RequireForNonPublicMethods: true
44
+
45
+ # It's a deliberate idiom in RSpec.
46
+ # See: https://github.com/bbatsov/rubocop/issues/4222
47
+ Lint/AmbiguousBlockAssociation:
48
+ Exclude:
49
+ - "spec/**/*"
50
+
51
+ # Because +expect_any_instance_of().to have_received()+ is not
52
+ # supported with the +with(hash_including)+ matchers
53
+ RSpec/MessageSpies:
54
+ EnforcedStyle: receive
55
+
56
+ # Because nesting makes sense here to group the feature tests
57
+ # more effective. This increases maintainability.
58
+ RSpec/NestedGroups:
59
+ Max: 4
60
+
61
+ # Disable regular Rails spec paths.
62
+ RSpec/FilePath:
63
+ Enabled: false
64
+
65
+ # Because we just implemented the ActiveRecord API.
66
+ Rails/SkipsModelValidations:
67
+ Enabled: false
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/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ --output-dir=doc/api
2
+ --plugin activesupport-concern
3
+ --markup=rdoc
4
+ -
5
+ README.md
6
+ lib/**/*.rb
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 ADDED
@@ -0,0 +1,25 @@
1
+ ### 3.4.0
2
+
3
+ * Bundler >= 2.3 is from now on required as minimal version (#3)
4
+ * Dropped support for Ruby < 2.5 (#3)
5
+ * Dropped support for Rails < 5.2 (#3)
6
+ * Updated all development/runtime gems to their latest
7
+ Ruby 2.5 compatible version (#3)
8
+
9
+ ### 3.3.6
10
+
11
+ * Migrated to Github Actions
12
+ * Migrated to our own coverage reporting
13
+
14
+ ### 3.3.5
15
+
16
+ * Corrected the badge links
17
+ * Switched to SVG project teasers
18
+ * Updated Travis CI and Code Climate configs (#1)
19
+ * Changed travis-ci.org to travis-ci.com links
20
+ * Fix the broken tests for Sprockets 4+ (#2)
21
+
22
+ ### 3.3.4
23
+
24
+ * Initial conversejs gem release
25
+ * converse.js version is 3.3.4
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/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
6
 
5
7
  # Specify your gem's dependencies in conversejs.gemspec
6
8
  gemspec
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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
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
data/Makefile ADDED
@@ -0,0 +1,165 @@
1
+ MAKEFLAGS += --warn-undefined-variables -j1
2
+ SHELL := bash
3
+ .SHELLFLAGS := -eu -o pipefail -c
4
+ .DEFAULT_GOAL := all
5
+ .DELETE_ON_ERROR:
6
+ .SUFFIXES:
7
+ .PHONY:
8
+
9
+ # Environment switches
10
+ MAKE_ENV ?= docker
11
+ COMPOSE_RUN_SHELL_FLAGS ?= --rm
12
+ BASH_RUN_SHELL_FLAGS ?=
13
+
14
+ # Directories
15
+ VENDOR_DIR ?= vendor/bundle
16
+ GEMFILES_DIR ?= gemfiles
17
+
18
+ # Host binaries
19
+ AWK ?= awk
20
+ BASH ?= bash
21
+ COMPOSE ?= docker-compose
22
+ DOCKER ?= docker
23
+ GREP ?= grep
24
+ ID ?= id
25
+ MKDIR ?= mkdir
26
+ RM ?= rm
27
+ XARGS ?= xargs
28
+
29
+ # Container binaries
30
+ APPRAISAL ?= appraisal
31
+ BUNDLE ?= bundle
32
+ GEM ?= gem
33
+ GUARD ?= guard
34
+ RAKE ?= rake
35
+ RSPEC ?= rspec
36
+ RUBOCOP ?= rubocop
37
+ YARD ?= yard
38
+
39
+ # Files
40
+ GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
41
+ $(wildcard $(GEMFILES_DIR)/*.gemfile)))
42
+ TEST_GEMFILES := $(GEMFILES:%=test-%)
43
+
44
+ # Define a generic shell run wrapper
45
+ # $1 - The command to run
46
+ ifeq ($(MAKE_ENV),docker)
47
+ define run-shell
48
+ $(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
49
+ -e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
50
+ -e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
51
+ -u `$(ID) -u` test \
52
+ bash $(BASH_RUN_SHELL_FLAGS) -c 'sleep 0.1; echo; $(1)'
53
+ endef
54
+ else ifeq ($(MAKE_ENV),baremetal)
55
+ define run-shell
56
+ $(1)
57
+ endef
58
+ endif
59
+
60
+ all:
61
+ # Converse.js
62
+ #
63
+ # install Install the dependencies
64
+ # update Update the local Gemset dependencies
65
+ # clean Clean the dependencies
66
+ #
67
+ # test Run the whole test suite
68
+ # test-style Test the code styles
69
+ # watch Watch for code changes and rerun the test suite
70
+ #
71
+ # docs Generate the Ruby documentation of the library
72
+ # stats Print the code statistics (library and test suite)
73
+ # notes Print all the notes from the code
74
+ # release Release a new Gem version (maintainers only)
75
+ #
76
+ # shell Run an interactive shell on the container
77
+ # shell-irb Run an interactive IRB shell on the container
78
+
79
+ .interactive:
80
+ @$(eval BASH_RUN_SHELL_FLAGS = --login)
81
+
82
+ install:
83
+ # Install the dependencies
84
+ @$(MKDIR) -p $(VENDOR_DIR)
85
+ @$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
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))
97
+
98
+ test: \
99
+ test-specs \
100
+ test-style
101
+
102
+ test-specs:
103
+ # Run the whole test suite
104
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
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
+
111
+ test-style: \
112
+ test-style-ruby
113
+
114
+ test-style-ruby:
115
+ # Run the static code analyzer (rubocop)
116
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
117
+
118
+ clean:
119
+ # Clean the dependencies
120
+ @$(RM) -rf $(VENDOR_DIR)
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
125
+
126
+ clean-containers:
127
+ # Clean running containers
128
+ ifeq ($(MAKE_ENV),docker)
129
+ @$(COMPOSE) down
130
+ endif
131
+
132
+ clean-images:
133
+ # Clean build images
134
+ ifeq ($(MAKE_ENV),docker)
135
+ @-$(DOCKER) images | $(GREP) $(shell basename "`pwd`") \
136
+ | $(AWK) '{ print $$3 }' \
137
+ | $(XARGS) -rn1 $(DOCKER) rmi -f
138
+ endif
139
+
140
+ distclean: clean clean-containers clean-images
141
+
142
+ shell:
143
+ # Run an interactive shell on the container
144
+ @$(call run-shell,$(BASH) -i)
145
+
146
+ shell-irb:
147
+ # Run an interactive IRB shell on the container
148
+ @$(call run-shell,bin/console)
149
+
150
+ docs:
151
+ # Build the API documentation
152
+ @$(call run-shell,$(BUNDLE) exec $(YARD) -q && \
153
+ $(BUNDLE) exec $(YARD) stats --list-undoc --compact)
154
+
155
+ notes:
156
+ # Print the code statistics (library and test suite)
157
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) notes)
158
+
159
+ stats:
160
+ # Print all the notes from the code
161
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) stats)
162
+
163
+ release:
164
+ # Release a new gem version
165
+ @$(BUNDLE) exec $(RAKE) release
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ![Conversejs](doc/assets/project.svg)
2
2
 
3
- [![Build Status](https://travis-ci.com/hausgold/conversejs.svg?branch=master)](https://travis-ci.com/hausgold/conversejs)
3
+ [![Continuous Integration](https://github.com/hausgold/conversejs/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/hausgold/conversejs/actions/workflows/test.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/conversejs.svg)](https://badge.fury.io/rb/conversejs)
5
- [![Maintainability](https://api.codeclimate.com/v1/badges/654422ab07b3337a518f/maintainability)](https://codeclimate.com/repos/5cac8bbcd39dc77824007463/maintainability)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/654422ab07b3337a518f/test_coverage)](https://codeclimate.com/repos/5cac8bbcd39dc77824007463/test_coverage)
7
- [![API docs](https://img.shields.io/badge/docs-API-blue.svg)](https://www.rubydoc.info/gems/conversejs)
5
+ [![Test Coverage](https://automate-api.hausgold.de/v1/coverage_reports/conversejs/coverage.svg)](https://knowledge.hausgold.de/coverage)
6
+ [![Test Ratio](https://automate-api.hausgold.de/v1/coverage_reports/conversejs/ratio.svg)](https://knowledge.hausgold.de/coverage)
7
+ [![API docs](https://automate-api.hausgold.de/v1/coverage_reports/conversejs/documentation.svg)](https://www.rubydoc.info/gems/conversejs)
8
8
 
9
9
  This gem provides the [converse.js](https://conversejs.org/) JavaScript library
10
10
  for your Rails 4+ application.
data/Rakefile CHANGED
@@ -1,6 +1,19 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'countless/rake_tasks'
3
6
 
4
7
  RSpec::Core::RakeTask.new(:spec)
5
8
 
6
- task :default => :spec
9
+ task default: :spec
10
+
11
+ # Configure all code statistics directories
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
+ ]
19
+ end
@@ -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/conversejs.gemspec CHANGED
@@ -1,38 +1,52 @@
1
+ # frozen_string_literal: true
1
2
 
2
3
  lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'conversejs/rails/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = 'conversejs'
8
- spec.version = Conversejs::Rails::VERSION
9
- spec.authors = ['Henning Vogt']
10
- spec.email = ['henning.vogt@hausgold.de']
11
-
12
- spec.summary = 'Converse.js for your Rails application'
13
- spec.homepage = 'https://github.com/hausgold/conversejs'
14
- spec.license = 'MIT'
15
-
16
- if spec.respond_to?(:metadata)
17
- spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
- else
19
- raise 'RubyGems 2.0 or newer is required to protect against ' \
20
- 'public gem pushes.'
21
- 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
+ }
22
25
 
23
26
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
24
27
  f.match(%r{^(test|spec|features)/})
25
28
  end
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ['lib']
28
29
 
29
- spec.add_dependency 'railties', '>= 4.2.0'
30
-
31
- spec.add_development_dependency 'bundler', '>= 1.16', '< 3'
32
- spec.add_development_dependency 'rake', '~> 10.0'
33
- spec.add_development_dependency 'rspec', '~> 3.0'
34
- spec.add_development_dependency 'simplecov', '~> 0.15'
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
35
33
 
36
- spec.add_development_dependency 'rails', '>= 4.2.0', '< 6'
37
- spec.add_development_dependency 'rspec-rails', '~> 3.7'
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'
38
52
  end
@@ -0,0 +1,9 @@
1
+ version: "3"
2
+ services:
3
+ test:
4
+ build: .
5
+ env_file: Envfile
6
+ network_mode: bridge
7
+ working_dir: /app
8
+ volumes:
9
+ - .:/app
@@ -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: "../"
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Conversejs
4
4
  module Rails
5
+ # The boilerplate Rails engine namespace.
5
6
  class Engine < ::Rails::Engine; end
6
7
  end
7
8
  end
@@ -1,7 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Conversejs
4
+ # The gem version details.
4
5
  module Rails
5
- VERSION = '3.3.5'.freeze
6
+ # The version of the +conversejs+ gem
7
+ VERSION = '3.4.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
6
24
  end
7
25
  end
@@ -3,6 +3,8 @@
3
3
  require 'conversejs/rails/engine'
4
4
  require 'conversejs/rails/version'
5
5
 
6
+ # The root namespace of the conversjs gem.
6
7
  module Conversejs
8
+ # The Rails engine namespace.
7
9
  module Rails; end
8
10
  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.5
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Hermann Mayer
7
8
  - Henning Vogt
8
9
  autorequire:
9
- bindir: bin
10
+ bindir: exe
10
11
  cert_chain: []
11
- date: 2021-05-12 00:00:00.000000000 Z
12
+ date: 2023-01-18 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: railties
@@ -16,130 +17,245 @@ 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
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '2.3'
56
+ - !ruby/object:Gem::Dependency
57
+ name: countless
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '1.1'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
32
68
  - !ruby/object:Gem::Version
33
- version: '1.16'
34
- - - "<"
69
+ version: '1.1'
70
+ - !ruby/object:Gem::Dependency
71
+ name: guard-rspec
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
35
75
  - !ruby/object:Gem::Version
36
- version: '3'
76
+ version: '4.7'
37
77
  type: :development
38
78
  prerelease: false
39
79
  version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '4.7'
84
+ - !ruby/object:Gem::Dependency
85
+ name: rails
86
+ requirement: !ruby/object:Gem::Requirement
40
87
  requirements:
41
88
  - - ">="
42
89
  - !ruby/object:Gem::Version
43
- version: '1.16'
44
- - - "<"
90
+ version: '5.2'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
45
96
  - !ruby/object:Gem::Version
46
- version: '3'
97
+ version: '5.2'
47
98
  - !ruby/object:Gem::Dependency
48
99
  name: rake
49
100
  requirement: !ruby/object:Gem::Requirement
50
101
  requirements:
51
102
  - - "~>"
52
103
  - !ruby/object:Gem::Version
53
- version: '10.0'
104
+ version: '13.0'
54
105
  type: :development
55
106
  prerelease: false
56
107
  version_requirements: !ruby/object:Gem::Requirement
57
108
  requirements:
58
109
  - - "~>"
59
110
  - !ruby/object:Gem::Version
60
- version: '10.0'
111
+ version: '13.0'
61
112
  - !ruby/object:Gem::Dependency
62
113
  name: rspec
63
114
  requirement: !ruby/object:Gem::Requirement
64
115
  requirements:
65
116
  - - "~>"
66
117
  - !ruby/object:Gem::Version
67
- version: '3.0'
118
+ version: '3.12'
68
119
  type: :development
69
120
  prerelease: false
70
121
  version_requirements: !ruby/object:Gem::Requirement
71
122
  requirements:
72
123
  - - "~>"
73
124
  - !ruby/object:Gem::Version
74
- version: '3.0'
125
+ version: '3.12'
75
126
  - !ruby/object:Gem::Dependency
76
- name: simplecov
127
+ name: rspec-rails
77
128
  requirement: !ruby/object:Gem::Requirement
78
129
  requirements:
79
130
  - - "~>"
80
131
  - !ruby/object:Gem::Version
81
- version: '0.15'
132
+ version: '5.1'
82
133
  type: :development
83
134
  prerelease: false
84
135
  version_requirements: !ruby/object:Gem::Requirement
85
136
  requirements:
86
137
  - - "~>"
87
138
  - !ruby/object:Gem::Version
88
- version: '0.15'
139
+ version: '5.1'
89
140
  - !ruby/object:Gem::Dependency
90
- name: rails
141
+ name: rubocop
91
142
  requirement: !ruby/object:Gem::Requirement
92
143
  requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: 4.2.0
96
- - - "<"
144
+ - - "~>"
97
145
  - !ruby/object:Gem::Version
98
- version: '6'
146
+ version: '1.28'
99
147
  type: :development
100
148
  prerelease: false
101
149
  version_requirements: !ruby/object:Gem::Requirement
102
150
  requirements:
103
- - - ">="
151
+ - - "~>"
104
152
  - !ruby/object:Gem::Version
105
- version: 4.2.0
106
- - - "<"
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
+ - - "~>"
107
166
  - !ruby/object:Gem::Version
108
- version: '6'
167
+ version: '2.14'
109
168
  - !ruby/object:Gem::Dependency
110
- name: rspec-rails
169
+ name: rubocop-rspec
111
170
  requirement: !ruby/object:Gem::Requirement
112
171
  requirements:
113
172
  - - "~>"
114
173
  - !ruby/object:Gem::Version
115
- version: '3.7'
174
+ version: '2.10'
116
175
  type: :development
117
176
  prerelease: false
118
177
  version_requirements: !ruby/object:Gem::Requirement
119
178
  requirements:
120
179
  - - "~>"
121
180
  - !ruby/object:Gem::Version
122
- version: '3.7'
181
+ version: '2.10'
182
+ - !ruby/object:Gem::Dependency
183
+ name: simplecov
184
+ requirement: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0.22'
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: !ruby/object:Gem::Requirement
192
+ requirements:
193
+ - - ">="
194
+ - !ruby/object:Gem::Version
195
+ version: '0.22'
196
+ - !ruby/object:Gem::Dependency
197
+ name: yard
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: 0.9.28
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ version: 0.9.28
210
+ - !ruby/object:Gem::Dependency
211
+ name: yard-activesupport-concern
212
+ requirement: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: 0.0.1
217
+ type: :development
218
+ prerelease: false
219
+ version_requirements: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: 0.0.1
123
224
  description:
124
225
  email:
226
+ - hermann.mayer92@gmail.com
125
227
  - henning.vogt@hausgold.de
126
228
  executables: []
127
229
  extensions: []
128
230
  extra_rdoc_files: []
129
231
  files:
130
232
  - ".editorconfig"
233
+ - ".github/workflows/documentation.yml"
234
+ - ".github/workflows/test.yml"
131
235
  - ".gitignore"
132
236
  - ".rspec"
237
+ - ".rubocop.yml"
133
238
  - ".simplecov"
134
- - ".travis.yml"
239
+ - ".yardopts"
240
+ - Appraisals
241
+ - CHANGELOG.md
242
+ - Dockerfile
243
+ - Envfile
135
244
  - Gemfile
136
- - LICENSE.txt
245
+ - Guardfile
246
+ - LICENSE
247
+ - Makefile
137
248
  - README.md
138
249
  - Rakefile
139
250
  - bin/console
140
251
  - bin/setup
252
+ - config/docker/.bash_profile
253
+ - config/docker/.bashrc
254
+ - config/docker/.inputrc
141
255
  - conversejs.gemspec
142
256
  - doc/assets/project.svg
257
+ - docker-compose.yml
258
+ - gemfiles/rails_5.2.gemfile
143
259
  - lib/conversejs.rb
144
260
  - lib/conversejs/rails.rb
145
261
  - lib/conversejs/rails/engine.rb
@@ -150,7 +266,11 @@ homepage: https://github.com/hausgold/conversejs
150
266
  licenses:
151
267
  - MIT
152
268
  metadata:
153
- allowed_push_host: https://rubygems.org
269
+ homepage_uri: https://github.com/hausgold/conversejs
270
+ source_code_uri: https://github.com/hausgold/conversejs
271
+ changelog_uri: https://github.com/hausgold/conversejs/blob/master/CHANGELOG.md
272
+ bug_tracker_uri: https://github.com/hausgold/conversejs/issues
273
+ documentation_uri: https://www.rubydoc.info/gems/conversejs
154
274
  post_install_message:
155
275
  rdoc_options: []
156
276
  require_paths:
@@ -159,14 +279,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
279
  requirements:
160
280
  - - ">="
161
281
  - !ruby/object:Gem::Version
162
- version: '0'
282
+ version: '2.5'
163
283
  required_rubygems_version: !ruby/object:Gem::Requirement
164
284
  requirements:
165
285
  - - ">="
166
286
  - !ruby/object:Gem::Version
167
287
  version: '0'
168
288
  requirements: []
169
- rubygems_version: 3.2.16
289
+ rubygems_version: 3.3.8
170
290
  signing_key:
171
291
  specification_version: 4
172
292
  summary: Converse.js for your Rails application
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- sudo: false
2
-
3
- env:
4
- global:
5
- - CC_TEST_REPORTER_ID=129457facefbaf40be0ab9fc85dfb6676b4294e1031cfb18b4de490ddb4bd6bc
6
-
7
- language: ruby
8
- rvm:
9
- - 2.6
10
- - 2.5
11
- - 2.4
12
- - 2.3
13
-
14
- before_install: gem install bundler
15
- before_script:
16
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
17
- - chmod +x ./cc-test-reporter
18
- - ./cc-test-reporter before-build
19
- after_script:
20
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT