billomat 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17a9ee09e73616ee7ad1742d020dfeb57d3c526873cd164e7d79a2ed2d0952c5
4
- data.tar.gz: dc647e0eda845c5d32737c718ea2fb15e44f1b036a2acef8bfc67518c7efdd44
3
+ metadata.gz: 1d00f8873b7ea8c178761b0ebca4200541d9eaa25ac2cb67500f0b22caf29482
4
+ data.tar.gz: e7e0f542aa48d665ef1957676b785dc801e27b0f9e754b7ea31318e869142a92
5
5
  SHA512:
6
- metadata.gz: 99b36daa45bf11cb37e524032d44120f7aa2fbcec5c49ca2bc305803a90ea43b022173b464b6849c72b4125ee4dffcddf96dc23bac62727b0724b5f084249eb8
7
- data.tar.gz: 34fd75ef5f5a83b47bd495d0bed039f5c4e78b040f0f95a5f12bd4f1fda9d9e6a64c90ac750d1313bfbfd3ab42f926000fa8df3c78618fc0c1aada646dada152
6
+ metadata.gz: fff72d6a694ed3b199999291aac06da32f5517de090426b8190467a1a404076095deeae152a007dd96ff4c7722433ab6916523905fd68f5fccfee00456d634cb
7
+ data.tar.gz: 1e5d35d889fbba13ee6fbca7193a21ea4bf8d10e6baab532b9ad989bcc55c70990801d7558969d79531ad3c8d58f1b10f0b61bf947957a39e58782d096d347c0
@@ -0,0 +1,38 @@
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-20.04
13
+ timeout-minutes: 5
14
+ steps:
15
+ - uses: actions/checkout@v2
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
+
23
+ - name: Prepare the virtual environment
24
+ uses: hausgold/actions/ci@master
25
+ with:
26
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
27
+ settings: '${{ github.repository }}'
28
+ target: ci/gem-test
29
+
30
+ - name: Build gem documentation
31
+ run: make docs
32
+
33
+ - name: Upload the code coverage report
34
+ run: coverage
35
+
36
+ - name: Add this job to the commit status
37
+ run: commit-status '${{ job.status }}'
38
+ if: always()
@@ -0,0 +1,59 @@
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 }})'
16
+ runs-on: ubuntu-20.04
17
+ timeout-minutes: 5
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: [2.3, 2.4, 2.5, 2.6]
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+
25
+ - name: Install the correct Ruby version
26
+ uses: ruby/setup-ruby@v1
27
+ with:
28
+ ruby-version: ${{ matrix.ruby }}
29
+ bundler-cache: true
30
+
31
+ - name: Prepare the virtual environment
32
+ uses: hausgold/actions/ci@master
33
+ with:
34
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
35
+ settings: '${{ github.repository }}'
36
+ target: ci/gem-test
37
+
38
+ - name: Run the gem tests
39
+ run: make test
40
+
41
+ - name: Upload the code coverage report
42
+ run: coverage
43
+
44
+ trigger-docs:
45
+ name: Trigger the documentation upload
46
+ runs-on: ubuntu-20.04
47
+ timeout-minutes: 2
48
+ needs: test
49
+ if: github.ref == 'refs/heads/master'
50
+ steps:
51
+ - name: Prepare the virtual environment
52
+ uses: hausgold/actions/ci@master
53
+ with:
54
+ clone_token: '${{ secrets.CLONE_TOKEN }}'
55
+ settings: '${{ github.repository }}'
56
+ target: ci/noop
57
+
58
+ - name: Trigger the documentation upload
59
+ run: workflow documentation
data/.gitignore CHANGED
@@ -3,9 +3,14 @@
3
3
  /Gemfile.lock
4
4
  /_yardoc/
5
5
  /coverage/
6
+ /doc/api/
6
7
  /pkg/
7
8
  /spec/reports/
8
9
  /tmp/
10
+ /vendor/
11
+ /gemfiles/vendor/
12
+ /Gemfile.lock
13
+ *.gemfile.lock
9
14
 
10
15
  billomat*.gem
11
16
 
data/.rubocop.yml ADDED
@@ -0,0 +1,53 @@
1
+ require: rubocop-rspec
2
+
3
+ Rails:
4
+ Enabled: true
5
+
6
+ Documentation:
7
+ Enabled: true
8
+
9
+ AllCops:
10
+ DisplayCopNames: true
11
+ TargetRubyVersion: 2.5
12
+ Exclude:
13
+ - bin/**/*
14
+ - vendor/**/*
15
+ - build/**/*
16
+ - gemfiles/**/*
17
+
18
+ Metrics/BlockLength:
19
+ Exclude:
20
+ - Rakefile
21
+ - '*.gemspec'
22
+ - spec/**/*.rb
23
+ - '**/*.rake'
24
+ - doc/**/*.rb
25
+
26
+ # Document all the things.
27
+ Style/DocumentationMethod:
28
+ Enabled: true
29
+ RequireForNonPublicMethods: true
30
+
31
+ # It's a deliberate idiom in RSpec.
32
+ # See: https://github.com/bbatsov/rubocop/issues/4222
33
+ Lint/AmbiguousBlockAssociation:
34
+ Exclude:
35
+ - "spec/**/*"
36
+
37
+ # Because +expect_any_instance_of().to have_received()+ is not
38
+ # supported with the +with(hash_including)+ matchers
39
+ RSpec/MessageSpies:
40
+ EnforcedStyle: receive
41
+
42
+ # Because nesting makes sense here to group the feature tests
43
+ # more effective. This increases maintainability.
44
+ RSpec/NestedGroups:
45
+ Max: 4
46
+
47
+ # Disable regular Rails spec paths.
48
+ RSpec/FilePath:
49
+ Enabled: false
50
+
51
+ # Because we just implemented the ActiveRecord API.
52
+ Rails/SkipsModelValidations:
53
+ Enabled: false
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/CHANGELOG.md ADDED
@@ -0,0 +1,48 @@
1
+ ### 0.3.0
2
+
3
+ * Improve error handling (breaking change, as we are now raising
4
+ `Billomat::GatewayError`s rather than just the client's
5
+ `RestClient::Exception`) (#15)
6
+ * Added bang variants to API methods
7
+ (`Billomat::Models::Base#{save!,create!,update!,delete!}`) (#16)
8
+ * Added `CreditNote` and `CreditNoteItem` models (#14)
9
+ * Moved to GitHub Actions
10
+ * Migrated to our own coverage reporting
11
+
12
+ ### 0.2.0
13
+
14
+ * Add codeclimate test runner
15
+ * Update codeclimate reporter id
16
+ * Switched to SVG project teasers
17
+ * Updated Travis CI and Code Climate configs (#11)
18
+ * Changed travis-ci.org to travis-ci.com links
19
+ * Adds templates and tags to models (#13)
20
+
21
+ ### 0.1.6
22
+
23
+ * Support registered apps
24
+ * Added `app_id` and `app_secret` to configuration (#9)
25
+
26
+ ### 0.1.5
27
+
28
+ * Added contact support
29
+
30
+ ### 0.1.4
31
+
32
+ * Made timeout configurable
33
+
34
+ ### 0.1.3
35
+
36
+ * Added `#as_json` to base model
37
+
38
+ ### 0.1.2
39
+
40
+ * Small fixes and code coverage
41
+
42
+ ### 0.1.1
43
+
44
+ * Improved documentation and README
45
+
46
+ ### 0.1.0
47
+
48
+ * Initial release
data/Dockerfile ADDED
@@ -0,0 +1,29 @@
1
+ FROM hausgold/ruby:2.5
2
+ MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
3
+
4
+ # Update system gem
5
+ RUN gem update --system
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.0' --no-document --no-prerelease && \
15
+ gem install bundler -v '~> 1.0' --no-document --no-prerelease
16
+
17
+ # Add new web user
18
+ RUN mkdir /app && \
19
+ adduser web --home /home/web --shell /bin/bash \
20
+ --disabled-password --gecos ""
21
+ COPY config/docker/* /home/web/
22
+ RUN chown web:web -R /app /home/web /usr/local/bundle && \
23
+ mkdir -p /home/web/.ssh
24
+
25
+ # Set the root password and grant root access to web
26
+ RUN echo 'root:root' | chpasswd
27
+ RUN echo 'web ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
28
+
29
+ WORKDIR /app
data/Envfile ADDED
@@ -0,0 +1,6 @@
1
+ LANG=en_US.UTF-8
2
+ LANGUAGE=en_US.UTF-8
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/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in billomat.gemspec
4
6
  gemspec
data/Makefile ADDED
@@ -0,0 +1,135 @@
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
+
13
+ # Directories
14
+ VENDOR_DIR ?= vendor/bundle
15
+
16
+ # Host binaries
17
+ AWK ?= awk
18
+ BASH ?= bash
19
+ COMPOSE ?= docker-compose
20
+ DOCKER ?= docker
21
+ GREP ?= grep
22
+ ID ?= id
23
+ MKDIR ?= mkdir
24
+ RM ?= rm
25
+ XARGS ?= xargs
26
+
27
+ # Container binaries
28
+ BUNDLE ?= bundle
29
+ GEM ?= gem
30
+ RAKE ?= rake
31
+ RUBOCOP ?= rubocop
32
+ YARD ?= yard
33
+
34
+ # Define a generic shell run wrapper
35
+ # $1 - The command to run
36
+ ifeq ($(MAKE_ENV),docker)
37
+ define run-shell
38
+ $(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
39
+ -e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
40
+ -e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
41
+ -u `$(ID) -u` test bash -c 'sleep 0.1; echo; $(1)'
42
+ endef
43
+ else ifeq ($(MAKE_ENV),baremetal)
44
+ define run-shell
45
+ $(1)
46
+ endef
47
+ endif
48
+
49
+ all:
50
+ # Billomat
51
+ #
52
+ # install Install the dependencies
53
+ # update Update the local Gemset dependencies
54
+ # clean Clean the dependencies
55
+ #
56
+ # test Run the whole test suite
57
+ # test-style Test the code styles
58
+ #
59
+ # docs Generate the Ruby documentation of the library
60
+ # stats Print the code statistics (library and test suite)
61
+ # notes Print all the notes from the code
62
+ # release Release a new Gem version (maintainers only)
63
+ #
64
+ # shell Run an interactive shell on the container
65
+ # shell-irb Run an interactive IRB shell on the container
66
+
67
+ install:
68
+ # Install the dependencies
69
+ @$(MKDIR) -p $(VENDOR_DIR)
70
+ @$(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")
73
+
74
+ test: \
75
+ test-specs \
76
+ test-style
77
+
78
+ test-specs:
79
+ # Run the whole test suite
80
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
81
+
82
+ test-style: \
83
+ test-style-ruby
84
+
85
+ test-style-ruby:
86
+ # Run the static code analyzer (rubocop)
87
+ @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
88
+
89
+ clean:
90
+ # Clean the dependencies
91
+ @$(RM) -rf $(VENDOR_DIR)
92
+ @$(RM) -rf $(VENDOR_DIR)/Gemfile.lock
93
+ @$(RM) -rf pkg
94
+ @$(RM) -rf coverage
95
+
96
+ clean-containers:
97
+ # Clean running containers
98
+ ifeq ($(MAKE_ENV),docker)
99
+ @$(COMPOSE) down
100
+ endif
101
+
102
+ clean-images:
103
+ # Clean build images
104
+ ifeq ($(MAKE_ENV),docker)
105
+ @-$(DOCKER) images | $(GREP) rimless \
106
+ | $(AWK) '{ print $$3 }' \
107
+ | $(XARGS) -rn1 $(DOCKER) rmi -f
108
+ endif
109
+
110
+ distclean: clean clean-containers clean-images
111
+
112
+ shell:
113
+ # Run an interactive shell on the container
114
+ @$(call run-shell,$(BASH) -i)
115
+
116
+ shell-irb:
117
+ # Run an interactive IRB shell on the container
118
+ @$(call run-shell,bin/console)
119
+
120
+ docs:
121
+ # Build the API documentation
122
+ @$(call run-shell,$(BUNDLE) exec $(YARD) -q && \
123
+ $(BUNDLE) exec $(YARD) stats --list-undoc --compact)
124
+
125
+ notes:
126
+ # Print the code statistics (library and test suite)
127
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) notes)
128
+
129
+ stats:
130
+ # Print all the notes from the code
131
+ @$(call run-shell,$(BUNDLE) exec $(RAKE) stats)
132
+
133
+ release:
134
+ # Release a new gem version
135
+ @$(BUNDLE) exec $(RAKE) release
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ![Billomat](doc/assets/project.svg)
2
2
 
3
- [![Build Status](https://travis-ci.com/hausgold/billomat.svg?branch=master)](https://travis-ci.com/hausgold/billomat)
3
+ [![Continuous Integration](https://github.com/hausgold/billomat/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/hausgold/billomat/actions/workflows/test.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/billomat.svg)](https://badge.fury.io/rb/billomat)
5
- [![Maintainability](https://api.codeclimate.com/v1/badges/21ac719680afa0a102c0/maintainability)](https://codeclimate.com/repos/5cac8ab2feb8e979a4008130/maintainability)
6
- [![Test Coverage](https://api.codeclimate.com/v1/badges/21ac719680afa0a102c0/test_coverage)](https://codeclimate.com/repos/5cac8ab2feb8e979a4008130/test_coverage)
7
- [![API docs](https://img.shields.io/badge/docs-API-blue.svg)](https://www.rubydoc.info/gems/billomat)
5
+ [![Test Coverage](https://automate-api.hausgold.de/v1/coverage_reports/billomat/coverage.svg)](https://knowledge.hausgold.de/coverage)
6
+ [![Test Ratio](https://automate-api.hausgold.de/v1/coverage_reports/billomat/ratio.svg)](https://knowledge.hausgold.de/coverage)
7
+ [![API docs](https://automate-api.hausgold.de/v1/coverage_reports/billomat/documentation.svg)](https://www.rubydoc.info/gems/billomat)
8
8
 
9
9
  This gem provides a Ruby API for [billomat.com](https://billomat.com) - an
10
10
  online accounting service.
data/Rakefile CHANGED
@@ -1,6 +1,77 @@
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 'rails/code_statistics'
6
+ require 'pp'
3
7
 
4
8
  RSpec::Core::RakeTask.new(:spec)
5
9
 
6
- task :default => :spec
10
+ task default: :spec
11
+
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
+ # Configure all code statistics directories
56
+ vendors = [
57
+ [:unshift, 'Top-levels', 'lib', %r{lib(/billomat)?/[^/]+\.rb$}],
58
+ [:unshift, 'Top-levels specs', 'spec', %r{spec/[^/]+_spec\.rb$}],
59
+
60
+ [:unshift, 'Actions', 'lib/billomat/actions'],
61
+
62
+ [:unshift, 'Models matchers', 'lib/billomat/models'],
63
+ [:unshift, 'Models matchers specs', 'spec/models']
64
+ ].reverse
65
+
66
+ vendors.each do |method, type, dir, pattern|
67
+ ::STATS_DIRECTORIES.send(method, [type, dir, pattern].compact)
68
+ ::CodeStatistics::TEST_TYPES << type if type.include? 'specs'
69
+ end
70
+
71
+ # Setup annotations
72
+ ENV['SOURCE_ANNOTATION_DIRECTORIES'] = 'spec,doc'
73
+
74
+ desc 'Enumerate all annotations'
75
+ task :notes do
76
+ SourceAnnotationExtractor.enumerate '@?OPTIMIZE|@?FIXME|@?TODO', tag: true
77
+ end
data/billomat.gemspec CHANGED
@@ -31,13 +31,16 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- spec.required_ruby_version = '>= 2.0'
35
-
36
34
  spec.add_dependency 'rest-client', '~> 2.0', '>= 2.0.2'
37
35
 
38
36
  spec.add_development_dependency 'bundler', '>= 1.15', '< 3'
39
37
  spec.add_development_dependency 'pry', '~> 0.11'
38
+ spec.add_development_dependency 'railties', '>= 4.2.0', '< 6.1'
40
39
  spec.add_development_dependency 'rake', '~> 10.0'
41
40
  spec.add_development_dependency 'rspec', '~> 3.0'
42
- spec.add_development_dependency 'simplecov', '~> 0.15'
41
+ spec.add_development_dependency 'rubocop', '~> 0.63.1'
42
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.31'
43
+ spec.add_development_dependency 'simplecov', '< 0.18'
44
+ spec.add_development_dependency 'yard', '~> 0.9.18'
45
+ spec.add_development_dependency 'yard-activesupport-concern', '~> 0.0.1'
43
46
  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
@@ -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
@@ -2,17 +2,15 @@
2
2
 
3
3
  module Billomat
4
4
  module Actions
5
- ##
6
5
  # This actions cancels an invoice
7
6
  class Cancel
8
- # @param [String] invoice_id The invoice ID
7
+ # @param invoice_id [String] the invoice ID
9
8
  # @return [Billomat::Actions::Cancel]
10
9
  def initialize(invoice_id)
11
10
  @invoice_id = invoice_id
12
11
  end
13
12
 
14
- ##
15
- # Calls the gateway
13
+ # Calls the gateway.
16
14
  #
17
15
  # @return [TrueClass]
18
16
  def call
@@ -21,7 +19,7 @@ module Billomat
21
19
  true
22
20
  end
23
21
 
24
- # @return [String] The cancel path with the invoice_id
22
+ # @return [String] the cancel path with the invoice_id
25
23
  def path
26
24
  "/invoices/#{@invoice_id}/cancel"
27
25
  end