tourico 0.0.6 → 0.0.7

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a8d9003fcb8bcbc4c74a3818775b0681b799d7bc
4
+ data.tar.gz: 89f656b9acff35c2825a600b098347e6e3c643f4
5
+ SHA512:
6
+ metadata.gz: b81bc4f138d623fabff341f824bbf01f880752f83d8800111b59f0c2510a200a3c4e6b72783e8243c8a2a38bdec1e3e6ec160d1354511b10137105e6808c0a74
7
+ data.tar.gz: c07a3daf2bf9acd41c773651e80b08757503ab7b1b385d1c1dcde3af735b56068ff9e1e46ccbd7c3e6e51d53ccb7264139f8cf9c256046f9f3ddf9ef755cd511
data/Gemfile.lock CHANGED
@@ -1,25 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tourico (0.0.6)
5
- savon (~> 1.2.0)
4
+ tourico (0.0.7)
5
+ savon (~> 2.5.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- akami (1.2.0)
10
+ akami (1.2.2)
11
11
  gyoku (>= 0.4.0)
12
- nokogiri (>= 1.4.0)
12
+ nokogiri
13
13
  builder (3.2.2)
14
14
  diff-lcs (1.2.5)
15
- gyoku (0.4.6)
15
+ gyoku (1.1.1)
16
16
  builder (>= 2.1.2)
17
- httpi (1.1.1)
17
+ httpi (2.1.0)
18
18
  rack
19
- mini_portile (0.5.2)
19
+ rubyntlm (~> 0.3.2)
20
+ mime-types (1.25.1)
21
+ mini_portile (0.5.3)
20
22
  nokogiri (1.6.1)
21
23
  mini_portile (~> 0.5.0)
22
- nori (1.1.5)
24
+ nori (2.4.0)
23
25
  rack (1.5.2)
24
26
  rake (10.1.1)
25
27
  rspec (2.14.1)
@@ -30,16 +32,18 @@ GEM
30
32
  rspec-expectations (2.14.4)
31
33
  diff-lcs (>= 1.1.3, < 2.0)
32
34
  rspec-mocks (2.14.4)
33
- savon (1.2.0)
35
+ rubyntlm (0.3.4)
36
+ savon (2.5.0)
34
37
  akami (~> 1.2.0)
35
38
  builder (>= 2.1.2)
36
- gyoku (~> 0.4.5)
37
- httpi (~> 1.1.0)
39
+ gyoku (~> 1.1.0)
40
+ httpi (~> 2.1.0)
38
41
  nokogiri (>= 1.4.0)
39
- nori (~> 1.1.0)
40
- wasabi (~> 2.5.0)
41
- wasabi (2.5.1)
42
- httpi (~> 1.0)
42
+ nori (~> 2.4.0)
43
+ wasabi (~> 3.3.0)
44
+ wasabi (3.3.0)
45
+ httpi (~> 2.0)
46
+ mime-types (< 2.0.0)
43
47
  nokogiri (>= 1.4.0)
44
48
 
45
49
  PLATFORMS
@@ -4,66 +4,60 @@ module Tourico
4
4
  module HTTPService
5
5
 
6
6
  class << self
7
- def make_request(action, args, options = {})
8
- puts 'Making request to Tourico'
9
- client = Savon::Client.new(Tourico.hotel_service_link)
10
-
11
- #client.log_level = :error
12
-
13
- response = client.request :hot, action do
14
-
15
- soap.namespaces['xmlns:env'] = 'http://schemas.xmlsoap.org/soap/envelope/'
16
- soap.namespaces['xmlns:aut'] = 'http://schemas.tourico.com/webservices/authentication'
17
- soap.namespaces['xmlns:hot'] = 'http://tourico.com/webservices/hotelv3'
18
- soap.namespaces['xmlns:hot1'] = 'http://schemas.tourico.com/webservices/hotelv3'
19
-
20
- soap.header = {
21
- 'aut:AuthenticationHeader' => {
22
- 'aut:LoginName' => Tourico.login_name,
23
- 'aut:Password' => Tourico.password,
24
- 'aut:Culture' => Tourico.culture,
25
- 'aut:Version' => Tourico.hotels_service_version
26
- }
27
- }
28
-
29
- soap.body = args
30
-
31
- end
32
- puts 'Finished request for Tourico'
33
- if response.success?
34
- response.to_hash
35
- else
36
- nil
37
- end
38
- end
39
-
40
- def make_request_reservation_service(action, args, options = {})
41
- puts 'Making request to Tourico'
42
- client = Savon::Client.new(Tourico.hotel_service_link)
43
-
44
- response = client.request :hot, action do
45
-
46
- soap.namespaces['xmlns:env'] = 'http://www.w3.org/2003/05/soap-envelope'
47
- soap.namespaces['xmlns:web'] = 'http://tourico.com/webservices/'
48
- soap.namespaces['xmlns:hot'] = 'http://tourico.com/webservices/'
49
- soap.namespaces['xmlns:trav'] = 'http://tourico.com/travelservices/'
50
-
51
- soap.header = {
52
- 'web:LoginHeader' => {
53
- 'trav:username' => Tourico.login_name,
54
- 'trav:password' => Tourico.password,
55
- 'trav:culture' => Tourico.culture,
56
- 'trav:version' => Tourico.reservations_service_version
57
- }
58
- }
59
-
60
- soap.body = args
61
-
62
- end
63
- puts 'Finished request for Tourico'
64
- response.to_hash
65
-
66
- end
7
+ def make_request(action, args, options = {})
8
+ puts 'Making hotels request to Tourico'
9
+ client = Savon.client do
10
+ log true
11
+ wsdl `Tourico.hotel_service_link`
12
+ soap_header 'aut:AuthenticationHeader' => {
13
+ 'aut:LoginName' => Tourico.login_name,
14
+ 'aut:Password' => Tourico.password,
15
+ 'aut:Culture' => Tourico.culture,
16
+ 'aut:Version' => Tourico.hotels_service_version
17
+ }
18
+ namespaces(
19
+ 'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/',
20
+ 'xmlns:aut' => 'http://schemas.tourico.com/webservices/authentication',
21
+ 'xmlns:hot' => 'http://tourico.com/webservices/hotelv3',
22
+ 'xmlns:wsdl' => 'http://tourico.com/webservices/hotelv3',
23
+ 'xmlns:hot1' => 'http://schemas.tourico.com/webservices/hotelv3')
24
+ end
25
+
26
+ response = client.call(action, message: args)
27
+
28
+ puts 'Finished request for Tourico'
29
+ if response.success?
30
+ response.to_hash
31
+ else
32
+ nil
33
+ end
34
+ end
35
+
36
+ def make_request_reservation_service(action, args, options = {})
37
+ puts 'Making reservations request to Tourico'
38
+ client = Savon.client do
39
+
40
+ wsdl Tourico.reservation_service_link
41
+ soap_header 'aut:AuthenticationHeader' => {
42
+ 'aut:LoginName' => Tourico.login_name,
43
+ 'aut:Password' => Tourico.password,
44
+ 'aut:Culture' => Tourico.culture,
45
+ 'aut:Version' => Tourico.reservations_service_version
46
+ }
47
+ namespaces(
48
+ 'xmlns:env' => 'http://www.w3.org/2003/05/soap-envelope',
49
+ 'xmlns:web' => 'http://tourico.com/webservices/',
50
+ 'xmlns:hot' => 'http://tourico.com/webservices/',
51
+ 'xmlns:wsdl' => 'http://tourico.com/webservices/',
52
+ 'xmlns:trav' => 'http://tourico.com/travelservices/')
53
+ end
54
+
55
+ response = client.call(action, message: args)
56
+
57
+ puts 'Finished request for Tourico'
58
+ response.to_hash
59
+
60
+ end
67
61
  end
68
62
  end
69
63
  end
@@ -1,3 +1,3 @@
1
1
  module Tourico
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
data/lib/tourico.rb CHANGED
@@ -13,9 +13,9 @@ module Tourico
13
13
  self.reservation_service_link = 'http://demo-wsnew.touricoholidays.com/reservationsservice.asmx?wsdl'
14
14
  yield self
15
15
 
16
- Savon.configure do|config|
17
- config.log = false
18
- end
16
+ # Savon.configure do|config|
17
+ # config.log = false
18
+ # end
19
19
  end
20
20
 
21
21
  end
@@ -31,8 +31,8 @@ describe Tourico::Api do
31
31
  'hot1:HotelIdInfo' => '',
32
32
  :attributes! => {'hot1:HotelIdInfo' => {'id' => '1314802'}},
33
33
  },
34
- 'hot1:CheckIn' => '2013-10-23',
35
- 'hot1:CheckOut' => '2013-10-25',
34
+ 'hot1:CheckIn' => '2014-05-10',
35
+ 'hot1:CheckOut' => '2014-05-12',
36
36
  'hot1:RoomsInformation' => {
37
37
  'hot1:RoomInfo' => {
38
38
  'hot1:AdultNum' => '2',
@@ -141,8 +141,8 @@ describe Tourico::Api do
141
141
  'hot1:HotelIdInfo' => '',
142
142
  :attributes! => {'hot1:HotelIdInfo' => {'id' => '1215560'}}
143
143
  },
144
- 'hot1:CheckIn' => '2013-10-23',
145
- 'hot1:CheckOut' => '2013-10-25',
144
+ 'hot1:CheckIn' => '2014-10-23',
145
+ 'hot1:CheckOut' => '2014-10-25',
146
146
  'hot1:RoomsInformation' => {
147
147
  'hot1:RoomInfo' => {
148
148
  'hot1:AdultNum' => '2',
data/tourico.gemspec CHANGED
@@ -20,5 +20,5 @@ Gem::Specification.new do |gem|
20
20
 
21
21
  gem.add_development_dependency 'rake'
22
22
  gem.add_development_dependency 'rspec', '~> 2.6'
23
- gem.add_runtime_dependency 'savon', '~> 1.2.0'
23
+ gem.add_runtime_dependency 'savon', '~> 2.5.0'
24
24
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tourico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.0.7
6
5
  platform: ruby
7
6
  authors:
8
7
  - Vitali Margolin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-15 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,19 +41,17 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: savon
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
53
- version: 1.2.0
47
+ version: 2.5.0
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
61
- version: 1.2.0
54
+ version: 2.5.0
62
55
  description: Tourico gem is a ruby wrapper for Tourico API Affiliate Network
63
56
  email:
64
57
  - vitali.m86@gmail.com
@@ -85,33 +78,26 @@ files:
85
78
  homepage: https://github.com/vitalim/Tourico
86
79
  licenses:
87
80
  - MIT
81
+ metadata: {}
88
82
  post_install_message:
89
83
  rdoc_options: []
90
84
  require_paths:
91
85
  - lib
92
86
  required_ruby_version: !ruby/object:Gem::Requirement
93
- none: false
94
87
  requirements:
95
- - - ! '>='
88
+ - - '>='
96
89
  - !ruby/object:Gem::Version
97
90
  version: '0'
98
- segments:
99
- - 0
100
- hash: 3502645964669858427
101
91
  required_rubygems_version: !ruby/object:Gem::Requirement
102
- none: false
103
92
  requirements:
104
- - - ! '>='
93
+ - - '>='
105
94
  - !ruby/object:Gem::Version
106
95
  version: '0'
107
- segments:
108
- - 0
109
- hash: 3502645964669858427
110
96
  requirements: []
111
97
  rubyforge_project:
112
- rubygems_version: 1.8.24
98
+ rubygems_version: 2.2.0
113
99
  signing_key:
114
- specification_version: 3
100
+ specification_version: 4
115
101
  summary: Tourico gem is a ruby wrapper for Tourico API Affiliate Network
116
102
  test_files:
117
103
  - spec/models/api_spec.rb