elibri_api_client 1.1.12 → 1.1.13

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elibri_api_client (1.1.11)
4
+ elibri_api_client (1.1.13)
5
5
  activesupport (>= 2.3.5)
6
6
  elibri_onix (>= 0.1.11)
7
7
  httparty (>= 0.8.1)
@@ -10,18 +10,18 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (3.2.3)
13
+ activesupport (3.2.11)
14
14
  i18n (~> 0.6)
15
15
  multi_json (~> 1.0)
16
16
  coderay (1.0.6)
17
- elibri_onix (0.2.1)
17
+ elibri_onix (0.2.3)
18
18
  activesupport (>= 2.3.5)
19
19
  elibri_onix_dict (>= 0.0.5)
20
20
  i18n
21
21
  nokogiri
22
- elibri_onix_dict (0.0.19)
22
+ elibri_onix_dict (0.0.22)
23
23
  git (1.2.5)
24
- httparty (0.9.0)
24
+ httparty (0.10.0)
25
25
  multi_json (~> 1.0)
26
26
  multi_xml
27
27
  i18n (0.6.1)
@@ -34,9 +34,9 @@ GEM
34
34
  minitest (3.0.0)
35
35
  mocha (0.11.4)
36
36
  metaclass (~> 0.0.1)
37
- multi_json (1.3.6)
37
+ multi_json (1.5.0)
38
38
  multi_xml (0.5.1)
39
- nokogiri (1.5.5)
39
+ nokogiri (1.5.6)
40
40
  pry (0.9.9.6)
41
41
  coderay (~> 1.0.5)
42
42
  method_source (~> 0.7.1)
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ end
21
21
 
22
22
  task :default => :test
23
23
 
24
- require 'rake/rdoctask'
24
+ require 'rdoc/task'
25
25
  Rake::RDocTask.new do |rdoc|
26
26
  version = Elibri::ApiClient::VERSION
27
27
 
@@ -120,7 +120,6 @@ module Elibri
120
120
  end
121
121
  end
122
122
 
123
-
124
123
  # Zwroc ONIX dla konkretnego produktu.
125
124
  def onix_xml_for_product(product_or_rr) #:nodoc:
126
125
  if product_or_rr.kind_of? Elibri::ApiClient::ApiAdapters::V1::Product
@@ -132,6 +131,10 @@ module Elibri
132
131
  resp.parsed_response.css('Product').first
133
132
  end
134
133
 
134
+ def get_product(product_or_rr)
135
+ Elibri::ONIX::Release_3_0::Product.new(onix_xml_for_product(product_or_rr))
136
+ end
137
+
135
138
 
136
139
  private
137
140
 
@@ -105,7 +105,7 @@ module Elibri #:nodoc:
105
105
  @popped_products_count = attributes[:popped_products_count].to_i
106
106
  @xml = attributes[:xml]
107
107
  @created_at = Time.parse(attributes[:created_at]) rescue nil
108
- @onix = Elibri::ONIX::Release_3_0::ONIXMessage.from_xml(@xml) if @xml.present?
108
+ @onix = Elibri::ONIX::Release_3_0::ONIXMessage.new(@xml) if @xml.present?
109
109
  end
110
110
 
111
111
  def inspect
@@ -1,6 +1,9 @@
1
1
  module Elibri
2
2
  class ApiClient
3
- VERSION = "1.1.12"
3
+ z = $VERBOSE
4
+ $VERBOSE = nil
5
+ VERSION = "1.1.13"
4
6
  Version = VERSION
7
+ $VERBOSE = z
5
8
  end
6
9
  end
@@ -45,7 +45,7 @@ module Elibri
45
45
 
46
46
  # Metody API delegujemy do odpowiedniego adaptera:
47
47
  def_delegators :@api_adapter, :refill_all_queues!, :pending_data?, :pending_queues, :publishers, :last_pop_from_queue, :pop_from_queue,
48
- :remove_from_queue, :onix_xml_for_product
48
+ :remove_from_queue, :onix_xml_for_product, :get_product
49
49
 
50
50
  end
51
51
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elibri_api_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 12
10
- version: 1.1.12
9
+ - 13
10
+ version: 1.1.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Marcin Urba\xC5\x84ski"