billomat 1.3.0 → 1.4.1
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 +4 -4
- data/.github/workflows/test.yml +4 -1
- data/Appraisals +9 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -0
- data/Makefile +30 -3
- data/billomat.gemspec +2 -0
- data/gemfiles/rails_6.1.gemfile +20 -0
- data/gemfiles/rails_7.1.gemfile +20 -0
- data/lib/billomat/gateway.rb +0 -3
- data/lib/billomat/models/base.rb +0 -2
- data/lib/billomat/search.rb +0 -2
- data/lib/billomat/version.rb +1 -1
- data/lib/billomat.rb +16 -6
- metadata +33 -4
- data/lib/billomat/actions.rb +0 -13
- data/lib/billomat/models.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9285a437b3f48f934a29ba53fa604cb2e75c92f741f2d6a3efa5e6d66436faeb
|
4
|
+
data.tar.gz: fc53cadd50256ef7544af986467e95e53a4cc2fdf9921bf9f5902621068229c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af2786d47172cc693d56979bb0edd737c13e2f314166b0a44c4f02d5115aff7f68a83d17607f010c8b5292987e67f1c101d576aaeb0951e865ca362e755c995
|
7
|
+
data.tar.gz: 7e9dfe58d19fc2eb391aa43683cd7ec4455931fd6b3392225d3d776eb25bef8fdb4845d8082d76ad9945e2a7f570069af13994106305e2498a239feecef3e03f
|
data/.github/workflows/test.yml
CHANGED
@@ -12,13 +12,16 @@ concurrency:
|
|
12
12
|
|
13
13
|
jobs:
|
14
14
|
test:
|
15
|
-
name: 'Test the gem (Ruby ${{ matrix.ruby }})'
|
15
|
+
name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
|
16
16
|
runs-on: ubuntu-22.04
|
17
17
|
timeout-minutes: 5
|
18
18
|
strategy:
|
19
19
|
fail-fast: false
|
20
20
|
matrix:
|
21
21
|
ruby: ['2.7', '3.0']
|
22
|
+
rails: ['6.1', '7.1']
|
23
|
+
env:
|
24
|
+
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
|
22
25
|
steps:
|
23
26
|
- uses: actions/checkout@v4
|
24
27
|
|
data/Appraisals
ADDED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
+
### 1.4.1 (17 January 2025)
|
6
|
+
|
7
|
+
* Added the logger dependency (#28)
|
8
|
+
|
9
|
+
### 1.4.0 (11 January 2025)
|
10
|
+
|
11
|
+
* Switched to Zeitwerk as autoloader (#27)
|
12
|
+
|
5
13
|
### 1.3.0 (3 January 2025)
|
6
14
|
|
7
15
|
* Raised minimum supported Ruby/Rails version to 2.7/6.1 (#26)
|
data/Gemfile
CHANGED
data/Makefile
CHANGED
@@ -13,6 +13,7 @@ BASH_RUN_SHELL_FLAGS ?=
|
|
13
13
|
|
14
14
|
# Directories
|
15
15
|
VENDOR_DIR ?= vendor/bundle
|
16
|
+
GEMFILES_DIR ?= gemfiles
|
16
17
|
|
17
18
|
# Host binaries
|
18
19
|
AWK ?= awk
|
@@ -20,14 +21,19 @@ BASH ?= bash
|
|
20
21
|
COMPOSE ?= docker-compose
|
21
22
|
CP ?= cp
|
22
23
|
DOCKER ?= docker
|
24
|
+
EXPORT ?= export
|
25
|
+
FIND ?= find
|
23
26
|
GREP ?= grep
|
27
|
+
HEAD ?= head
|
24
28
|
ID ?= id
|
25
29
|
MKDIR ?= mkdir
|
26
30
|
RM ?= rm
|
31
|
+
SORT ?= sort
|
27
32
|
TEST ?= test
|
28
33
|
XARGS ?= xargs
|
29
34
|
|
30
35
|
# Container binaries
|
36
|
+
APPRAISAL ?= appraisal
|
31
37
|
BUNDLE ?= bundle
|
32
38
|
GEM ?= gem
|
33
39
|
GUARD ?= guard
|
@@ -37,6 +43,12 @@ RUBOCOP ?= rubocop
|
|
37
43
|
YARD ?= yard
|
38
44
|
RUBY_VERSION := ruby-version
|
39
45
|
|
46
|
+
# Files
|
47
|
+
GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
|
48
|
+
$(wildcard $(GEMFILES_DIR)/*.gemfile)))
|
49
|
+
TEST_GEMFILES := $(GEMFILES:%=test-%)
|
50
|
+
WATCH_GEMFILES := $(GEMFILES:%=watch-%)
|
51
|
+
|
40
52
|
# Define a generic shell run wrapper
|
41
53
|
# $1 - The command to run
|
42
54
|
ifeq ($(MAKE_ENV),docker)
|
@@ -57,6 +69,7 @@ all:
|
|
57
69
|
# Billomat
|
58
70
|
#
|
59
71
|
# install Install the dependencies
|
72
|
+
# update Update the local Gemset dependencies
|
60
73
|
# clean Clean the dependencies
|
61
74
|
#
|
62
75
|
# test Run the whole test suite
|
@@ -78,16 +91,23 @@ install:
|
|
78
91
|
# Install the dependencies
|
79
92
|
@$(MKDIR) -p $(VENDOR_DIR)
|
80
93
|
@$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
|
94
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
|
81
95
|
|
82
96
|
update:
|
83
97
|
# Install the dependencies
|
84
98
|
@$(MKDIR) -p $(VENDOR_DIR)
|
85
99
|
@$(call run-shell,$(BUNDLE) update)
|
100
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
|
86
101
|
|
87
102
|
watch: install .interactive
|
88
103
|
# Watch for code changes and rerun the test suite
|
89
104
|
@$(call run-shell,$(BUNDLE) exec $(GUARD))
|
90
105
|
|
106
|
+
$(WATCH_GEMFILES): GEMFILE=$(@:watch-%=%)
|
107
|
+
$(WATCH_GEMFILES):
|
108
|
+
# Watch for code changes and rerun the test suite ($(GEMFILE))
|
109
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(GUARD))
|
110
|
+
|
91
111
|
test: \
|
92
112
|
test-specs \
|
93
113
|
test-style
|
@@ -96,6 +116,11 @@ test-specs:
|
|
96
116
|
# Run the whole test suite
|
97
117
|
@$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
|
98
118
|
|
119
|
+
$(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
|
120
|
+
$(TEST_GEMFILES):
|
121
|
+
# Run the whole test suite ($(GEMFILE))
|
122
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RSPEC))
|
123
|
+
|
99
124
|
test-style: \
|
100
125
|
test-style-ruby
|
101
126
|
|
@@ -107,7 +132,9 @@ test-style-ruby:
|
|
107
132
|
clean:
|
108
133
|
# Clean the dependencies
|
109
134
|
@$(RM) -rf $(VENDOR_DIR)
|
110
|
-
@$(RM) -rf
|
135
|
+
@$(RM) -rf Gemfile.lock
|
136
|
+
@$(RM) -rf $(GEMFILES_DIR)/vendor
|
137
|
+
@$(RM) -rf $(GEMFILES_DIR)/*.lock
|
111
138
|
@$(RM) -rf .bundle .yardoc coverage pkg Gemfile.lock doc/api \
|
112
139
|
.rspec_status
|
113
140
|
|
@@ -127,11 +154,11 @@ endif
|
|
127
154
|
|
128
155
|
distclean: clean clean-containers clean-images
|
129
156
|
|
130
|
-
shell:
|
157
|
+
shell: install
|
131
158
|
# Run an interactive shell on the container
|
132
159
|
@$(call run-shell,$(BASH) -i)
|
133
160
|
|
134
|
-
shell-irb:
|
161
|
+
shell-irb: install
|
135
162
|
# Run an interactive IRB shell on the container
|
136
163
|
@$(call run-shell,bin/console)
|
137
164
|
|
data/billomat.gemspec
CHANGED
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal", "~> 2.4"
|
6
|
+
gem "bundler", "~> 2.3"
|
7
|
+
gem "countless", "~> 1.1"
|
8
|
+
gem "guard-rspec", "~> 4.7"
|
9
|
+
gem "irb", "~> 1.2"
|
10
|
+
gem "rake", "~> 13.0"
|
11
|
+
gem "rspec", "~> 3.12"
|
12
|
+
gem "rubocop", "~> 1.28"
|
13
|
+
gem "rubocop-rails", "~> 2.14"
|
14
|
+
gem "rubocop-rspec", "~> 2.10"
|
15
|
+
gem "simplecov", ">= 0.22"
|
16
|
+
gem "yard", ">= 0.9.28"
|
17
|
+
gem "yard-activesupport-concern", ">= 0.0.1"
|
18
|
+
gem "activesupport", "~> 6.1.0"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "appraisal", "~> 2.4"
|
6
|
+
gem "bundler", "~> 2.3"
|
7
|
+
gem "countless", "~> 1.1"
|
8
|
+
gem "guard-rspec", "~> 4.7"
|
9
|
+
gem "irb", "~> 1.2"
|
10
|
+
gem "rake", "~> 13.0"
|
11
|
+
gem "rspec", "~> 3.12"
|
12
|
+
gem "rubocop", "~> 1.28"
|
13
|
+
gem "rubocop-rails", "~> 2.14"
|
14
|
+
gem "rubocop-rspec", "~> 2.10"
|
15
|
+
gem "simplecov", ">= 0.22"
|
16
|
+
gem "yard", ">= 0.9.28"
|
17
|
+
gem "yard-activesupport-concern", ">= 0.0.1"
|
18
|
+
gem "activesupport", "~> 7.1.0"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
data/lib/billomat/gateway.rb
CHANGED
data/lib/billomat/models/base.rb
CHANGED
data/lib/billomat/search.rb
CHANGED
data/lib/billomat/version.rb
CHANGED
data/lib/billomat.rb
CHANGED
@@ -1,14 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require '
|
8
|
-
require '
|
3
|
+
require 'zeitwerk'
|
4
|
+
require 'logger'
|
5
|
+
require 'active_support'
|
6
|
+
require 'rest-client'
|
7
|
+
require 'json'
|
8
|
+
require 'ostruct'
|
9
|
+
require 'uri'
|
9
10
|
|
10
11
|
# An wrapper for the Billomat API.
|
11
12
|
module Billomat
|
13
|
+
# Setup a Zeitwerk autoloader instance and configure it
|
14
|
+
loader = Zeitwerk::Loader.for_gem
|
15
|
+
|
16
|
+
# Finish the auto loader configuration
|
17
|
+
loader.setup
|
18
|
+
|
19
|
+
# Make sure to eager load all constants
|
20
|
+
loader.eager_load
|
21
|
+
|
12
22
|
class << self
|
13
23
|
attr_writer :configuration
|
14
24
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: billomat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
@@ -9,8 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-01-
|
12
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: activesupport
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '6.1'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '6.1'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: rest-client
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,6 +39,20 @@ dependencies:
|
|
25
39
|
- - "~>"
|
26
40
|
- !ruby/object:Gem::Version
|
27
41
|
version: '2.1'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: zeitwerk
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '2.6'
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '2.6'
|
28
56
|
description: Wrapper for the Billomat API
|
29
57
|
email:
|
30
58
|
- hermann.mayer92@gmail.com
|
@@ -41,6 +69,7 @@ files:
|
|
41
69
|
- ".rubocop.yml"
|
42
70
|
- ".simplecov"
|
43
71
|
- ".yardopts"
|
72
|
+
- Appraisals
|
44
73
|
- CHANGELOG.md
|
45
74
|
- CODE_OF_CONDUCT.md
|
46
75
|
- Dockerfile
|
@@ -59,8 +88,9 @@ files:
|
|
59
88
|
- config/docker/.inputrc
|
60
89
|
- doc/assets/project.svg
|
61
90
|
- docker-compose.yml
|
91
|
+
- gemfiles/rails_6.1.gemfile
|
92
|
+
- gemfiles/rails_7.1.gemfile
|
62
93
|
- lib/billomat.rb
|
63
|
-
- lib/billomat/actions.rb
|
64
94
|
- lib/billomat/actions/cancel.rb
|
65
95
|
- lib/billomat/actions/complete.rb
|
66
96
|
- lib/billomat/actions/email.rb
|
@@ -68,7 +98,6 @@ files:
|
|
68
98
|
- lib/billomat/actions/uncancel.rb
|
69
99
|
- lib/billomat/configuration.rb
|
70
100
|
- lib/billomat/gateway.rb
|
71
|
-
- lib/billomat/models.rb
|
72
101
|
- lib/billomat/models/base.rb
|
73
102
|
- lib/billomat/models/client.rb
|
74
103
|
- lib/billomat/models/contact.rb
|
data/lib/billomat/actions.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'billomat/actions/complete'
|
4
|
-
require 'billomat/actions/email'
|
5
|
-
require 'billomat/actions/pdf'
|
6
|
-
require 'billomat/actions/cancel'
|
7
|
-
require 'billomat/actions/uncancel'
|
8
|
-
|
9
|
-
module Billomat
|
10
|
-
# Actions are API calls that do not directly represent a resource.
|
11
|
-
# They are mostly non-RESTful actions that are called on a resources.
|
12
|
-
module Actions; end
|
13
|
-
end
|
data/lib/billomat/models.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'billomat/models/base'
|
4
|
-
require 'billomat/models/client'
|
5
|
-
require 'billomat/models/credit_note'
|
6
|
-
require 'billomat/models/credit_note_item'
|
7
|
-
require 'billomat/models/invoice'
|
8
|
-
require 'billomat/models/invoice_comment'
|
9
|
-
require 'billomat/models/invoice_item'
|
10
|
-
require 'billomat/models/invoice_payment'
|
11
|
-
require 'billomat/models/contact'
|
12
|
-
require 'billomat/models/tag'
|
13
|
-
require 'billomat/models/template'
|
14
|
-
|
15
|
-
module Billomat
|
16
|
-
# Models represent a resource in the API, e.g. invoices, clients.
|
17
|
-
module Models; end
|
18
|
-
end
|