osc_ruby 1.0.2 → 1.0.3

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: 3bea42b9ea886395517abeb4d2eb5bd5a3a77bfc
4
- data.tar.gz: 531a722981ee5a89736a00c0564ba7da4ee6b8a6
3
+ metadata.gz: a4816953d57954604bf2efef9a71e993c9e064da
4
+ data.tar.gz: 06cd0e61915650193c822b2b56ccb0d8e2ebb877
5
5
  SHA512:
6
- metadata.gz: 62ff5ae0109b9815c57f7ed729aa07a5c9ca6b62cb927a5012b332d120bc6d21bb0270c45980ddc173ba1e5e7cff2ae710b45b358ab20bd168b4d731407b3e5a
7
- data.tar.gz: b35d96448f4c9ab9fb519d801f0e1dcec9c4455b201d5312c5d1a2046a5a9f9a5d54235d6edd74d99e5f78d4e279d82df0272fd7d16f3bb75ab08d2a089de1e7
6
+ metadata.gz: 17c8a7590f2f1338459fe44736a98d7309d6b12329c3925a612fd670bbbf2c4b1bd6fa832c4169ddb5ec91506619b53057dd6a2e62a3d1d94245e00263459f8b
7
+ data.tar.gz: 67e0b1571808aaa97b26ac5dfb5207444bac3a65ddbfe8a4cfa103adbc3394ee77f419662fabb0c5e4559496ca6c36ee0a5dc2b68c761c2e3fc96f7d73454ad4
@@ -25,15 +25,18 @@ module OSCRuby
25
25
 
26
26
  json_response = JSON.parse(response)
27
27
 
28
- json_response.unshift("\n")
29
-
30
28
  if return_json == true
31
29
  json_response_final = NormalizeModule::query_injection(query,json_response)
32
30
  puts json_response_final
33
31
  end
34
32
 
35
- NormalizeModule::remove_new_lines(json_response)
36
-
33
+ if return_json.class == Hash
34
+ puts json_response.body
35
+ else
36
+ json_response.unshift("\n")
37
+ NormalizeModule::remove_new_lines(json_response)
38
+ end
39
+
37
40
  end
38
41
 
39
42
  end
@@ -1,3 +1,3 @@
1
1
  module OSCRuby
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
Binary file
@@ -10,15 +10,13 @@ describe OSCRuby::Connect do
10
10
 
11
11
  OSCRuby::Client.new do |config|
12
12
 
13
- config.interface = ENV['OSC_SITE']
13
+ config.interface = ENV['REDBOX_TEST']
14
14
 
15
- config.username = ENV['OSC_ADMIN']
15
+ config.username = ENV['REDBOX_ADMIN']
16
16
 
17
- config.password = ENV['OSC_PASSWORD']
17
+ config.password = ENV['REDBOX_PASSWORD']
18
18
 
19
19
  config.suppress_rules = true
20
-
21
- config.demo_site = true
22
20
 
23
21
  end
24
22
  }
@@ -51,8 +49,12 @@ describe OSCRuby::Connect do
51
49
  test = OSCRuby::Connect.generate_url_and_config(client, 'serviceProducts')
52
50
 
53
51
  interface = client.config.interface
54
-
55
- expect(test['site_url']).to eq(URI("https://#{interface}.rightnowdemo.com/services/rest/connect/v1.3/serviceProducts"))
52
+ if test['site_url'].to_s.match(/custhelp/)
53
+ demo_or_cust = "custhelp"
54
+ else
55
+ demo_or_cust = "rightnowdemo"
56
+ end
57
+ expect(test['site_url']).to eq(URI("https://#{interface}.#{demo_or_cust}.com/services/rest/connect/v1.3/serviceProducts"))
56
58
 
57
59
  expect(test['site_url']).to be_an(URI::HTTPS)
58
60
  end
@@ -126,9 +128,9 @@ describe OSCRuby::Connect do
126
128
 
127
129
  expect(final_config['site_url']).to be_an(URI::HTTPS)
128
130
 
129
- expect(final_config['username']).to eq(ENV['OSC_ADMIN'])
131
+ expect(final_config['username']).to eq(ENV['REDBOX_ADMIN'])
130
132
 
131
- expect(final_config['password']).to eq(ENV['OSC_PASSWORD'])
133
+ expect(final_config['password']).to eq(ENV['REDBOX_PASSWORD'])
132
134
 
133
135
  end
134
136
 
@@ -8,13 +8,11 @@ describe OSCRuby::QueryResults do
8
8
 
9
9
  OSCRuby::Client.new do |config|
10
10
 
11
- config.interface = ENV['OSC_SITE']
11
+ config.interface = ENV['REDBOX_TEST']
12
12
 
13
- config.username = ENV['OSC_ADMIN']
13
+ config.username = ENV['REDBOX_ADMIN']
14
14
 
15
- config.password = ENV['OSC_PASSWORD']
16
-
17
- config.demo_site = true
15
+ config.password = ENV['REDBOX_PASSWORD']
18
16
 
19
17
  end
20
18
  }
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: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Davis
@@ -167,6 +167,7 @@ files:
167
167
  - lib/osc_ruby/modules/query_module.rb
168
168
  - lib/osc_ruby/modules/validations_module.rb
169
169
  - lib/osc_ruby/version.rb
170
+ - osc_ruby-1.0.2.gem
170
171
  - osc_ruby.gemspec
171
172
  - spec/core/client_spec.rb
172
173
  - spec/core/configuration_spec.rb