economic-rest 0.5.14 → 0.6.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: 4bcf974100cfac4f3c140924e594c9754bae2c7b966e6ca1e760ab5f63857127
4
- data.tar.gz: d7f97155fce55eca1e3d6c0739d478505eb580ad8a3817b47387b6b28d55aa7e
3
+ metadata.gz: 278962b344fb0863870814da49a72d359c3db946e2a391e4a7cc8e02a0af4663
4
+ data.tar.gz: 3bdd8ebd9455c297fd2a8f426c7d39aa1b7906f584de8055e32be3439ef538ef
5
5
  SHA512:
6
- metadata.gz: 548b7d67550b51805161568102e279e0f389a3d03bb2c658ffca8e0de109ad1d0808454039e18635eb4638db16c073d92c1cbb04bd7e5ddd5b8ac60f92127b04
7
- data.tar.gz: 1de78de5dae91fe53d4c7d3dafcb4fad3bdfb72c74d5d38f2940117cbd6fa3eebdc8e0324725e21a30bd01962e0b18256b942741e91e43e4a11fa847b73a71f2
6
+ metadata.gz: 13b95c8dae49a0f77c9aead2a101366a60f5c6bd388996b45a6caa8ff715f922ba5fde9c259fd2a7f3579d6ec165f0e772d4430884d58cdd6a999a1a4d37cfe2
7
+ data.tar.gz: 29c4391f5aa1d187753a8297a9455e43860e94f5b91860076a7fb8e4226b1f8e980a6deacf94114eb14ff5df83ccc2a87213ee7f32f63e6fb64e512a7aebe763
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- economic-rest (0.5.13)
4
+ economic-rest (0.6.0)
5
5
  activesupport
6
6
  rest-client
7
7
  savon
@@ -9,12 +9,12 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activesupport (6.0.1)
12
+ activesupport (6.1.3.1)
13
13
  concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- zeitwerk (~> 2.2)
14
+ i18n (>= 1.6, < 2)
15
+ minitest (>= 5.1)
16
+ tzinfo (~> 2.0)
17
+ zeitwerk (~> 2.3)
18
18
  addressable (2.5.2)
19
19
  public_suffix (>= 2.0.2, < 4.0)
20
20
  akami (1.3.1)
@@ -22,8 +22,8 @@ GEM
22
22
  nokogiri
23
23
  ast (2.4.0)
24
24
  awesome_print (1.8.0)
25
- builder (3.2.3)
26
- concurrent-ruby (1.1.5)
25
+ builder (3.2.4)
26
+ concurrent-ruby (1.1.8)
27
27
  coveralls (0.8.23)
28
28
  json (>= 1.8, < 3)
29
29
  simplecov (~> 0.16.1)
@@ -42,10 +42,10 @@ GEM
42
42
  http-accept (1.7.0)
43
43
  http-cookie (1.0.3)
44
44
  domain_name (~> 0.5)
45
- httpi (2.4.4)
45
+ httpi (2.4.5)
46
46
  rack
47
47
  socksify
48
- i18n (1.7.0)
48
+ i18n (1.8.10)
49
49
  concurrent-ruby (~> 1.0)
50
50
  jaro_winkler (1.5.3)
51
51
  json (2.1.0)
@@ -54,22 +54,24 @@ GEM
54
54
  rake (>= 0.9.2.2)
55
55
  metaclass (0.0.4)
56
56
  method_source (0.9.2)
57
- mime-types (3.3)
57
+ mime-types (3.3.1)
58
58
  mime-types-data (~> 3.2015)
59
- mime-types-data (3.2019.1009)
60
- mini_portile2 (2.4.0)
59
+ mime-types-data (3.2021.0225)
60
+ mini_portile2 (2.5.0)
61
61
  minitest (5.11.3)
62
62
  mocha (1.9.0)
63
63
  metaclass (~> 0.0.1)
64
64
  netrc (0.11.0)
65
- nokogiri (1.10.5)
66
- mini_portile2 (~> 2.4.0)
65
+ nokogiri (1.11.3)
66
+ mini_portile2 (~> 2.5.0)
67
+ racc (~> 1.4)
67
68
  nori (2.6.0)
68
69
  parallel (1.17.0)
69
70
  parser (2.6.4.1)
70
71
  ast (~> 2.4.0)
71
72
  public_suffix (3.0.3)
72
- rack (2.0.7)
73
+ racc (1.5.2)
74
+ rack (2.2.3)
73
75
  rainbow (3.0.0)
74
76
  rake (10.5.0)
75
77
  rest-client (2.1.0)
@@ -88,7 +90,7 @@ GEM
88
90
  rubocop (>= 0.71.0)
89
91
  ruby-progressbar (1.10.1)
90
92
  safe_yaml (1.0.4)
91
- savon (2.12.0)
93
+ savon (2.12.1)
92
94
  akami (~> 1.2)
93
95
  builder (>= 2.1.2)
94
96
  gyoku (~> 1.2)
@@ -108,22 +110,22 @@ GEM
108
110
  term-ansicolor (1.7.1)
109
111
  tins (~> 1.0)
110
112
  thor (0.20.3)
111
- thread_safe (0.3.6)
112
113
  tins (1.22.1)
113
- tzinfo (1.2.5)
114
- thread_safe (~> 0.1)
114
+ tzinfo (2.0.4)
115
+ concurrent-ruby (~> 1.0)
115
116
  unf (0.1.4)
116
117
  unf_ext
117
- unf_ext (0.0.7.6)
118
+ unf_ext (0.0.7.7)
118
119
  unicode-display_width (1.6.0)
119
- wasabi (3.5.0)
120
+ wasabi (3.6.1)
121
+ addressable
120
122
  httpi (~> 2.0)
121
123
  nokogiri (>= 1.4.2)
122
124
  webmock (3.5.1)
123
125
  addressable (>= 2.3.6)
124
126
  crack (>= 0.3.2)
125
127
  hashdiff
126
- zeitwerk (2.2.2)
128
+ zeitwerk (2.4.2)
127
129
 
128
130
  PLATFORMS
129
131
  ruby
data/README.md CHANGED
@@ -65,7 +65,7 @@ copy pasta from https://restdocs.e-conomic.com/#specifying-operator-affinity
65
65
 
66
66
  ## Development
67
67
 
68
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` or 'bundle exec m' to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
68
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec m` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
69
69
 
70
70
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
71
71
 
@@ -76,7 +76,6 @@ module Economic
76
76
  end
77
77
 
78
78
  def send_request(method:, url:, payload: "", &block)
79
- url = URI.escape(url)
80
79
  if payload.strip.empty?
81
80
  RestClient::Request.execute(method: method, url: url, headers: headers, &block)
82
81
  else
@@ -3,7 +3,7 @@ module Economic
3
3
  class BookedRepo < Economic::Invoices::Repo
4
4
  class << self
5
5
  def send(invoice, book_with_number: nil)
6
- response = send_request(method: :post, url: URI.escape(endpoint_url), payload: payload(invoice, book_with_number: book_with_number))
6
+ response = send_request(method: :post, url: endpoint_url, payload: payload(invoice, book_with_number: book_with_number))
7
7
 
8
8
  entry_hash = JSON.parse(response.body)
9
9
 
@@ -1,7 +1,7 @@
1
1
  module Economic
2
2
  class JournalVoucherRepo < Economic::BaseRepo
3
3
  def self.save(voucher)
4
- response = send_request(method: :post, url: URI.escape(Economic::JournalRepo.endpoint_url + "/" + voucher.journal.journalNumber.to_s + "/vouchers"), payload: voucher.to_h.to_json)
4
+ response = send_request(method: :post, url: "#{Economic::JournalRepo.endpoint_url}/#{voucher.journal.journalNumber}/vouchers", payload: voucher.to_h.to_json)
5
5
 
6
6
  Voucher.new(JSON.parse(response.body).first)
7
7
  end
@@ -6,7 +6,7 @@ module Economic
6
6
 
7
7
  id = Economic::BaseRepo.id_to_url_formatted_id(id)
8
8
  end_point = [superclass.endpoint_url, id, "pricing", "currency-specific-sales-prices"].join("/")
9
- response = send_request(method: :get, url: URI.escape(end_point))
9
+ response = send_request(method: :get, url: end_point)
10
10
  entry_hash = JSON.parse(response.body)
11
11
  pricings = []
12
12
 
@@ -5,7 +5,7 @@ module Economic
5
5
  id ||= product_group_or_product_group_number
6
6
 
7
7
  end_point = [ProductGroupRepo.endpoint_url, id, "products"].join("/")
8
- response = send_request(method: :get, url: URI.escape(end_point))
8
+ response = send_request(method: :get, url: end_point)
9
9
  entry_hash = JSON.parse(response.body)
10
10
  products = []
11
11
 
@@ -1,5 +1,5 @@
1
1
  module Economic
2
2
  module Rest
3
- VERSION = "0.5.14".freeze
3
+ VERSION = "0.6.0".freeze
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ module Economic
4
4
 
5
5
  class << self
6
6
  def self
7
- response = send_request(method: :get, url: URI.escape(Economic::SelfRepo.endpoint_url))
7
+ response = send_request(method: :get, url: Economic::SelfRepo.endpoint_url)
8
8
  entry_hash = JSON.parse(response.body)
9
9
  model.new(entry_hash)
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: economic-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.14
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Klogborg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-08 00:00:00.000000000 Z
11
+ date: 2021-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -324,8 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  - !ruby/object:Gem::Version
325
325
  version: '0'
326
326
  requirements: []
327
- rubyforge_project:
328
- rubygems_version: 2.7.6
327
+ rubygems_version: 3.1.2
329
328
  signing_key:
330
329
  specification_version: 4
331
330
  summary: Ruby wrapper for the e-conomic REST API, that aims at making working with