sie 3.3.0 → 4.0.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
- SHA1:
3
- metadata.gz: 2be3aa3c55bea68bf2195976db05d4364a057143
4
- data.tar.gz: 9590de3fac93d328cbd90b95ae411deafbed7ba0
2
+ SHA256:
3
+ metadata.gz: 12f2a07994c6646b39d43549d25640af5593d05e8ebe93145bbee75d64adc9e5
4
+ data.tar.gz: 5401be347bc8c5886678eaa63d027fad9da681d70ea477ba613dd85816d00258
5
5
  SHA512:
6
- metadata.gz: 5742310f4a4c1fdbdd0b482fe86af38ce64be2e3d106bf8c7aa7b0567bf0e32b3534bdef35f02243c49bf7fa98e7732ea75a2f9e320303892dd8685e21e699d7
7
- data.tar.gz: cbc0d7039a975f40863839dabd8247b03b37144428b8dc6171651a20fec05ae89e7df82ad4b8e68863d5bbb106c17a4ff268b2bfbffe91cd66679d699aa37b55
6
+ metadata.gz: 3f913dfe20748fc6dbba3d0486362d43e6c12251e5d6980b906b376295d71f2e34c5e1af19649a43770b55c86f7d890c0755cc3de362ffb889b628ee2bfc00cd
7
+ data.tar.gz: d60adfe6ce535b77cf77ccfc923121539e4162743c03a28e9ce877577ce9ebc42de058c0e0d2daa8af0cb12a57ea3843055ffeef808fab636aa41a9348337362
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.1
4
- - 2.0.0
3
+ - 2.6
4
+ - 2.5
5
+ - 2.4
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in sie.gemspec
4
4
  gemspec
data/Gemfile.pre_2.2.2 ADDED
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in sie.gemspec
4
+ gemspec
5
+
6
+ # Ruby <2.2.2 can't use Active Support 5.
7
+ # https://apotonick.wordpress.com/2012/08/14/different-gemfiles-for-ruby-1-8-and-1-9-on-travis-ci/
8
+ gem "activesupport", "< 5"
data/README.md CHANGED
@@ -163,6 +163,10 @@ Getting the latest code and gems:
163
163
 
164
164
  [SIE format specification rev 4B (swedish)](http://www.sie.se/wp-content/uploads/2014/01/SIE_filformat_ver_4B_080930.pdf)
165
165
 
166
+ ## See also
167
+
168
+ * [PHP port of this library](https://github.com/neam/php-sie)
169
+
166
170
 
167
171
  ## Contributing
168
172
 
data/lib/sie/document.rb CHANGED
@@ -5,8 +5,10 @@ require "active_support/core_ext/module/delegation"
5
5
 
6
6
  module Sie
7
7
  class Document
8
- # Because fortnox imposes these limits
9
- DESCRIPTION_LENGTH_MAX = 200
8
+ # Because some accounting software have limits
9
+ # - Fortnox should handle 200
10
+ # - Visma etc -> 100
11
+ DESCRIPTION_LENGTH_MAX = 100
10
12
 
11
13
  pattr_initialize :data_source
12
14
 
data/lib/sie/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Sie
2
2
  # For versioning see: http://semver.org/
3
- VERSION = "3.3.0"
3
+ VERSION = "4.0.0"
4
4
  end
data/script/test ADDED
@@ -0,0 +1 @@
1
+ script/turbux_rspec
@@ -202,15 +202,15 @@ describe Sie::Document, "#render" do
202
202
  context "with really long descriptions" do
203
203
  let(:accounts) {
204
204
  [
205
- number: 1500, description: "Customer ledger with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut. Truncated"
205
+ number: 1500, description: "k" * 101 # Make sure that the description exceeds the limit (100 chars).
206
206
  ]
207
207
  }
208
208
  let(:vouchers) {
209
209
  [
210
210
  build_voucher(
211
- description: "Payout 1 with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi e. Truncated",
211
+ description: "d" * 101,
212
212
  voucher_lines: [
213
- build_voucher_line(description: "Payout line 1 with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wi. Truncated"),
213
+ build_voucher_line(description: "v" * 101),
214
214
  build_voucher_line(description: "Payout line 2"),
215
215
  ]
216
216
  )
@@ -218,9 +218,9 @@ describe Sie::Document, "#render" do
218
218
  }
219
219
 
220
220
  it "truncates the descriptions" do
221
- expect(indexed_entry_attributes("konto", 0)).to eq("kontonr" => "1500", "kontonamn" => "Customer ledger with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut")
222
- expect(indexed_entry("ver", 0).attributes["vertext"]).to eq("Payout 1 with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi e")
223
- expect(indexed_voucher_entries(0)[0].attributes["transtext"]).to eq("Payout line 1 with really really long description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut w")
221
+ expect(indexed_entry_attributes("konto", 0)).to eq("kontonr" => "1500", "kontonamn" => "k" * 100)
222
+ expect(indexed_entry("ver", 0).attributes["vertext"]).to eq("d" * 100)
223
+ expect(indexed_voucher_entries(0)[0].attributes["transtext"]).to eq("v" * 100)
224
224
  end
225
225
  end
226
226
 
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sie
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barsoom AB
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2019-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: attr_extras
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: SIE parser and generator
@@ -87,11 +87,11 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
91
- - .rspec
92
- - .rvmrc
93
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
94
93
  - Gemfile
94
+ - Gemfile.pre_2.2.2
95
95
  - README.md
96
96
  - Rakefile
97
97
  - lib/sie.rb
@@ -133,17 +133,16 @@ require_paths:
133
133
  - lib
134
134
  required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - '>='
141
+ - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.4.5
145
+ rubygems_version: 3.0.3
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: Parses and generates SIE files (http://sie.se/)
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm ruby-2.0.0-p643@sie --create
data/script/test DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Command to run the specs the correct way when triggered from the turbux vim plugin.
4
-
5
- command = "rspec #{ARGV.first}"
6
- exit(1) unless system(command)