beslist 0.2.1 → 0.2.2

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
2
  SHA1:
3
- metadata.gz: a7b6cc574fd51500223839a47fcbabb144410c9f
4
- data.tar.gz: 981c6b76f818d0a10d785401216446e43460c201
3
+ metadata.gz: d5c73a67dbc5649df7d62933128148810aafbc58
4
+ data.tar.gz: 57e31af00dfba822784bee2ba6d6359de0baf4be
5
5
  SHA512:
6
- metadata.gz: a815e9018c86f8d2175bab8a7b7fcf7621a6761c278b3909aa17fd0c773d39a8e370f78ccada9545a6236793e9190d49d61bfd921786f63667960103fecfa142
7
- data.tar.gz: 805d5c7fcc41c074450edf23399415b313176dafdfc6ff53985441cb03960d7286c5fff784b038006bc008ca3c40d1b8449c3e8e87766b14212e1723ebc2132c
6
+ metadata.gz: 1bf64ea6b37f6371da84b20396aba888d8b17508b48aa6ccce3892144f6a64931a2042b538e9d94a6972c7590ede42de93854fefcbb868ea8dc4c06be770700e
7
+ data.tar.gz: 0b32cbb547fa569e694c718bdeffd8122ee2053d3d2872076a0681e7aabbd6cda4bae266810e08b9107a02422e6f3539eb61a78026f76517627dd9d5fdb95594
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/beslist.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: beslist 0.2.1 ruby lib
5
+ # stub: beslist 0.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "beslist"
9
- s.version = "0.2.1"
9
+ s.version = "0.2.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Tsyren Ochirov"]
14
- s.date = "2015-12-22"
14
+ s.date = "2015-12-24"
15
15
  s.description = "A Ruby client for the Beslist API."
16
16
  s.email = "nsu1team@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -7,7 +7,8 @@ module Beslist
7
7
 
8
8
  def initialize(options = {})
9
9
  @connection = Beslist::API::Connection.new( :client_id => options[:client_id],
10
- :shop_id => options[:shop_id])
10
+ :shop_id => options[:shop_id],
11
+ :personal_key => options[:personal_key])
11
12
  end
12
13
 
13
14
  def orders(options)
@@ -24,7 +24,7 @@ module Beslist
24
24
  end
25
25
 
26
26
  def checksum(*dynamic_parts)
27
- base = Beslist::API::Config.personal_key+options[:client_id]+options[:shop_id]
27
+ base = options[:personal_key]+options[:client_id]+options[:shop_id]
28
28
  Digest::MD5.hexdigest(base+dynamic_parts.join(''))
29
29
  end
30
30
 
@@ -6,13 +6,11 @@ module Beslist
6
6
  class << self
7
7
  attr_accessor :endpoint
8
8
  attr_accessor :prefix
9
- attr_accessor :personal_key
10
9
  attr_accessor :mode
11
10
  end
12
11
 
13
12
  self.endpoint = "https://www.beslist.nl"
14
13
  self.prefix = "/xml"
15
- self.personal_key = nil
16
14
  self.mode = 'sandbox'
17
15
 
18
16
  end
@@ -4,13 +4,11 @@ describe Beslist::API::Connection do
4
4
 
5
5
  before do
6
6
  @connection = Beslist::API::Connection.new( :client_id => Beslist::Spec.client_id,
7
- :shop_id => Beslist::Spec.shop_id)
7
+ :shop_id => Beslist::Spec.shop_id,
8
+ :personal_key => Beslist::Spec.personal_key)
8
9
  end
9
10
 
10
11
  describe '#checksum' do
11
- before do
12
- Beslist::API::Config.personal_key = '31f1a5832cc7db98fbd6ab5e802af159'
13
- end
14
12
  it 'returns md5 hexdigest' do
15
13
  expect(@connection.checksum('2015-09-01', '2015-09-03')).to eq("5439de2fa578c75d1d9ba4195efc663c")
16
14
  end
@@ -2,12 +2,12 @@ require "yaml"
2
2
 
3
3
  config = YAML.load_file "spec/connection.yml"
4
4
 
5
- Beslist::API::Config.personal_key = config['personal_key']
6
- Beslist::Spec.personal_key = Beslist::API::Config.personal_key
5
+ Beslist::Spec.personal_key = '31f1a5832cc7db98fbd6ab5e802af159'
7
6
  Beslist::Spec.client_id = '99999'
8
7
  Beslist::Spec.shop_id = '88888'
9
8
  Beslist::Spec.instance = Beslist::API::Client.new(:client_id => Beslist::Spec.client_id,
10
- :shop_id => Beslist::Spec.shop_id)
9
+ :shop_id => Beslist::Spec.shop_id,
10
+ :personal_key => Beslist::Spec.personal_key)
11
11
 
12
12
  Beslist::Spec.date_from = '2015-09-01'
13
13
  Beslist::Spec.date_to = '2015-09-03'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beslist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tsyren Ochirov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-22 00:00:00.000000000 Z
11
+ date: 2015-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_xml