ydim 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +31 -0
- data/Rakefile +0 -8
- data/bin/ydimd +0 -1
- data/lib/ydim/server.rb +1 -1
- data/lib/ydim/version.rb +1 -1
- data/readme.md +22 -0
- data/test/suite.rb +1 -1
- data/test/test_mail.rb +2 -3
- data/test/test_server.rb +5 -5
- data/ydim.gemspec +6 -0
- metadata +74 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 70fddd3a98f0a72afb88a5a077c8c87a8ece2dd43fe3f931770cc4cf93c68f5b
|
4
|
+
data.tar.gz: 95b0da6a7782c62cc2b6092c00e98959e11e24cff49e24183eb33c1ca3268459
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ccc6c17ba86f5cd5f5a0fd22e6a102e5653b085a17e32a520bf7926a2eba536a62db1768fad08ca0da1a4a2f0faaa2fb57b9717de8fd8ac91e20dfd022c5bab5
|
7
|
+
data.tar.gz: '0018900fa6e3a092df34f1a58389773f86f9d73cb0ef01aa4e8be276c7a74279302257d05027f55d4dcb95a3d2042243b8706ce3f703d25329597d62d6170ce3'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
# see https://github.com/ruby/setup-ruby
|
19
|
+
strategy:
|
20
|
+
fail-fast: false
|
21
|
+
matrix:
|
22
|
+
os: [ubuntu-latest]
|
23
|
+
ruby: [ '2.7', '3.0', '3.1', '3.2']
|
24
|
+
runs-on: ${{ matrix.os }}
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v3
|
27
|
+
- uses: ruby/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby }}
|
30
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
31
|
+
- run: bundle exec rake test
|
data/Rakefile
CHANGED
@@ -2,19 +2,11 @@
|
|
2
2
|
# encoding: utf-8
|
3
3
|
lib = File.expand_path('../lib', __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'ydim/version'
|
6
5
|
require "bundler/gem_tasks"
|
7
6
|
require 'rspec/core/rake_task'
|
8
7
|
|
9
8
|
RSpec::Core::RakeTask.new(:spec)
|
10
9
|
|
11
|
-
# dependencies are now declared in ydim.gemspec
|
12
|
-
|
13
|
-
desc 'Offer a gem task like hoe'
|
14
|
-
task :gem => :build do
|
15
|
-
Rake::Task[:build].invoke
|
16
|
-
end
|
17
|
-
|
18
10
|
task :spec => :clean
|
19
11
|
require 'rake/testtask'
|
20
12
|
|
data/bin/ydimd
CHANGED
data/lib/ydim/server.rb
CHANGED
data/lib/ydim/version.rb
CHANGED
data/readme.md
CHANGED
@@ -6,6 +6,28 @@
|
|
6
6
|
|
7
7
|
ywesee distributed invoice manager, Ruby
|
8
8
|
|
9
|
+
## Install Ruby
|
10
|
+
|
11
|
+
* git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
12
|
+
* echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
|
13
|
+
* git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
14
|
+
|
15
|
+
## Install Postgresql
|
16
|
+
```
|
17
|
+
* sudo apt-get install postgresql-10 postgresql-contrib-10
|
18
|
+
* wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
19
|
+
* sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql-pgdg.list > /dev/null
|
20
|
+
* sudo apt-get install postgresql-10
|
21
|
+
* sudo -u postgres psql -c 'create role ydim;'
|
22
|
+
* sudo su
|
23
|
+
* su - postgres
|
24
|
+
* dropdb ydim
|
25
|
+
* createdb ydim
|
26
|
+
* -> check DB
|
27
|
+
* psql
|
28
|
+
* \l
|
29
|
+
* bzcat 22:00-postgresql_database-ch_oddb-backup.bz2 | sudo -u postgres psql -p 5433 ydim
|
30
|
+
```
|
9
31
|
## INSTALL:
|
10
32
|
|
11
33
|
* gem install ydim
|
data/test/suite.rb
CHANGED
data/test/test_mail.rb
CHANGED
@@ -69,10 +69,9 @@ module YDIM
|
|
69
69
|
assert_equal(0, ::Mail::TestMailer.deliveries.size)
|
70
70
|
Mail.send_invoice(setup_config, invoice)
|
71
71
|
assert_equal(1, ::Mail::TestMailer.deliveries.size)
|
72
|
-
assert_equal(" Sehr geehrter Herr Contact-Name\n" +
|
73
|
-
" Description\n",
|
74
|
-
::Mail::TestMailer.deliveries.first.body.to_s)
|
75
72
|
assert_equal('Rechnung Company-Name #12345, Description', ::Mail::TestMailer.deliveries.first.subject)
|
73
|
+
assert_match(/ Description/m, ::Mail::TestMailer.deliveries.first.body.parts.first.to_s)
|
74
|
+
assert_match(/ Sehr geehrter Herr Contact-Name/m, ::Mail::TestMailer.deliveries.first.body.parts.first.to_s)
|
76
75
|
end
|
77
76
|
def test_send_reminder
|
78
77
|
debitor = flexmock('Debitor')
|
data/test/test_server.rb
CHANGED
@@ -30,7 +30,7 @@ module YDIM
|
|
30
30
|
@config.should_receive(:root_key).and_return { "root_dsa.pub" }
|
31
31
|
@config.should_receive(:conf_dir).and_return { @datadir }
|
32
32
|
filepath = File.join(@datadir, "root_dsa.pub")
|
33
|
-
key = OpenSSL::PKey::DSA.new(
|
33
|
+
key = OpenSSL::PKey::DSA.new(1024)
|
34
34
|
File.open(filepath, 'w') { |fh|
|
35
35
|
fh.puts(key.public_key.to_s)
|
36
36
|
}
|
@@ -53,7 +53,7 @@ module YDIM
|
|
53
53
|
}
|
54
54
|
@config.should_receive(:conf_dir).and_return { @datadir }
|
55
55
|
filepath = File.join(@datadir, "absolute_dsa.pub")
|
56
|
-
key = OpenSSL::PKey::DSA.new(
|
56
|
+
key = OpenSSL::PKey::DSA.new(1024)
|
57
57
|
File.open(filepath, 'w') { |fh|
|
58
58
|
fh.puts(key.public_key.to_s)
|
59
59
|
}
|
@@ -68,7 +68,7 @@ module YDIM
|
|
68
68
|
FileUtils.rm_r(@datadir) if File.exist?(@datadir)
|
69
69
|
end
|
70
70
|
def test_root_user__dump
|
71
|
-
key = OpenSSL::PKey::DSA.new(
|
71
|
+
key = OpenSSL::PKey::DSA.new(1024)
|
72
72
|
@config.should_receive(:root_name).and_return { 'Root' }
|
73
73
|
@config.should_receive(:root_email).and_return { 'test@ywesee.com' }
|
74
74
|
@config.should_receive(:root_key).and_return {
|
@@ -94,7 +94,7 @@ module YDIM
|
|
94
94
|
@logger.should_receive(:error).and_return { |msg, block|
|
95
95
|
error_messages << msg << "\n" }
|
96
96
|
@logger.should_receive(:error).and_return { |msg, block| flunk(msg) }
|
97
|
-
key = OpenSSL::PKey::DSA.new(
|
97
|
+
key = OpenSSL::PKey::DSA.new(1024)
|
98
98
|
@config.should_receive(:root_name).and_return { 'Root' }
|
99
99
|
@config.should_receive(:root_email).and_return { 'test@ywesee.com' }
|
100
100
|
@config.should_receive(:root_key).and_return {
|
@@ -118,7 +118,7 @@ module YDIM
|
|
118
118
|
info_messages << msg << "\n" }
|
119
119
|
@logger.should_receive(:error).and_return { |msg, block|
|
120
120
|
error_messages << msg << "\n" }
|
121
|
-
key = OpenSSL::PKey::DSA.new(
|
121
|
+
key = OpenSSL::PKey::DSA.new(1024)
|
122
122
|
@config.should_receive(:root_name).and_return { 'Root' }
|
123
123
|
@config.should_receive(:root_email).and_return { 'test@ywesee.com' }
|
124
124
|
@config.should_receive(:root_key).and_return {
|
data/ydim.gemspec
CHANGED
@@ -17,6 +17,11 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
+
|
21
|
+
spec.add_dependency 'net-smtp'
|
22
|
+
spec.add_dependency 'net-imap'
|
23
|
+
spec.add_dependency 'net-pop'
|
24
|
+
spec.add_dependency "rexml"
|
20
25
|
spec.add_dependency "odba", '>= 1.1.2'
|
21
26
|
spec.add_dependency "ydbd-pg", '>= 0.5.5'
|
22
27
|
spec.add_dependency "ydbi", '>= 0.5.5'
|
@@ -27,6 +32,7 @@ Gem::Specification.new do |spec|
|
|
27
32
|
spec.add_dependency "ypdf-writer"
|
28
33
|
spec.add_dependency "rrba"
|
29
34
|
spec.add_dependency "hpricot"
|
35
|
+
spec.add_dependency "pkg-config"
|
30
36
|
spec.add_runtime_dependency 'deprecated', '= 2.0.1'
|
31
37
|
|
32
38
|
spec.add_development_dependency "bundler"
|
metadata
CHANGED
@@ -1,15 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ydim
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz, Niklaus Giger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: net-smtp
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: net-imap
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: net-pop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rexml
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
13
69
|
- !ruby/object:Gem::Dependency
|
14
70
|
name: odba
|
15
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,6 +206,20 @@ dependencies:
|
|
150
206
|
- - ">="
|
151
207
|
- !ruby/object:Gem::Version
|
152
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: pkg-config
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
153
223
|
- !ruby/object:Gem::Dependency
|
154
224
|
name: deprecated
|
155
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -272,6 +342,7 @@ extensions: []
|
|
272
342
|
extra_rdoc_files: []
|
273
343
|
files:
|
274
344
|
- ".gitattributes"
|
345
|
+
- ".github/workflows/ruby.yml"
|
275
346
|
- ".gitignore"
|
276
347
|
- ".travis.yml"
|
277
348
|
- Gemfile
|
@@ -345,8 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
345
416
|
- !ruby/object:Gem::Version
|
346
417
|
version: '0'
|
347
418
|
requirements: []
|
348
|
-
|
349
|
-
rubygems_version: 2.6.8
|
419
|
+
rubygems_version: 3.4.1
|
350
420
|
signing_key:
|
351
421
|
specification_version: 4
|
352
422
|
summary: ywesee distributed invoice manager
|