osc_ruby 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a19c4503e2a134adf3015c3d27f1aaf7a4928ba6
4
- data.tar.gz: 8e5dc65d2b0acd9cc91a1029b8ae95784fdb1a7b
3
+ metadata.gz: eafbf5ea09a7a04457bf7dfa9598b3d8c9a5dd07
4
+ data.tar.gz: 6c5c755794d08cd99bc3473b4b1e97cf1111e14d
5
5
  SHA512:
6
- metadata.gz: 4d581c99f828f1134e9a5d7615b9c738f868f2be9e0722a44a65774c18e21c378248b473259e53922d03607870ca31ac5535c084852d511b48f4030990b77f52
7
- data.tar.gz: 9e4c10c0572672a729e083d5681115d91f3d6201b3bb3c61602b81f96c4a7fe47c72cd0a1a9a9f359ca9d955a3a0b5e3eb3d40913011afebca47752f2aceba92
6
+ metadata.gz: c06b40e74a4096f4284385d9fa8ebdbdd53c3f73d1558bd3804f00b7c7b21872886144ad9b1e4b4a080ddcf0ae314ed28e0ffa75e2b8d864ad68963784b048c1
7
+ data.tar.gz: f311c1559e87eeed8d6b2e2f4d26191ccce31df17a081173a6e08327899ec361d01786bff7132987ecee66fe80ca23e3b8d469732396ee3a25e53c4cf86ea027
@@ -19,7 +19,7 @@ module OSCRuby
19
19
  self.config ||= OSCRuby::Configuration.new
20
20
  yield(config)
21
21
 
22
- check_config
22
+ connect unless check_config == false
23
23
  end
24
24
 
25
25
  def check_config
@@ -30,27 +30,26 @@ module OSCRuby
30
30
  elsif config.password ==''
31
31
  raise ArgumentError, "Password cannot be nil or blank"
32
32
  end
33
+
34
+ true
33
35
  end
34
36
 
35
- def self.basic_auth_url
36
- uri = URI.parse(self.service_cloud_interface)
37
- end
37
+ # def connect
38
38
 
39
- def self.service_cloud_interface
40
- url = 'https://' + config.interface + '.custhelp.com/services/rest/connect/v1.3/'
41
- end
39
+ # url = 'https://' + config.interface + '.custhelp.com/services/rest/connect/v1.3/'
40
+ # uri = URI.parse(url)
42
41
 
43
- def self.connect(config,uri)
44
- Net::HTTP.start(uri.host, uri.port,
45
- :use_ssl => true) do |http|
42
+ # Net::HTTP.start(uri.host, uri.port,
43
+ # :use_ssl => true,
44
+ # :verify_mode => OpenSSL::SSL::VERIFY_NONE) do |http|
46
45
 
47
- request = Net::HTTP::Get.new uri.request_uri
48
- request.basic_auth config.username, config.password
46
+ # request = Net::HTTP::Get.new uri.request_uri
47
+ # request.basic_auth config.username, config.password
49
48
 
50
- response = http.request request # Net::HTTPResponse object
49
+ # response = http.request request # Net::HTTPResponse object
51
50
 
52
- json_response = JSON.parse(response.body)
53
- end
54
- end
51
+ # json_response = JSON.parse(response.body)
52
+ # end
53
+ # end
55
54
  end
56
55
  end
@@ -1,3 +1,3 @@
1
1
  module OSCRuby
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -56,45 +56,17 @@ describe OSCRuby::Client do
56
56
  end
57
57
  end
58
58
 
59
- context '#service_cloud_interface' do
60
- it 'should produce a valid url string' do
61
- expect do
62
- client = OSCRuby::Client.new do |config|
63
- config.interface = 'test'
64
- config.username = 'test_username'
65
- config.password = 'test_password'
66
- end
67
-
68
- client.service_cloud_interface.should eq('https://test.custhelp.com/services/rest/connect/v1.3/')
69
- end
70
- end
71
- end
72
-
73
- context '#basic_auth_url' do
74
- it 'should produce a URI::HTTPS object' do
75
- expect do
76
- client = OSCRuby::Client.new do |config|
77
- config.interface = 'test'
78
- config.username = 'test_username'
79
- config.password = 'test_password'
80
- end
81
-
82
- client.basic_auth_url.should_be a('URI::HTTPS')
83
- end
84
- end
85
- end
59
+ # context '#connect' do
60
+ # it 'should produce a JSON Response' do
61
+ # expect do
62
+ # client = OSCRuby::Client.new do |config|
63
+ # config.interface = 'qsee--tst'
64
+ # config.username = ENV['OSC_ADMIN']
65
+ # config.password = ENV['OSC_PASSWORD']
66
+ # end
86
67
 
87
- context '#basic_auth_url' do
88
- it 'should produce a JSON Response' do
89
- expect do
90
- client = OSCRuby::Client.new do |config|
91
- config.interface = 'qsee--tst'
92
- config.username = ENV['OSC_ADMIN']
93
- config.password = ENV['OSC_PASSWORD']
94
- end
95
-
96
- client.connect.should_be a('String')
97
- end
98
- end
99
- end
68
+ # client.connect.should_be a('String')
69
+ # end
70
+ # end
71
+ # end
100
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osc_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Davis