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 +4 -4
- data/lib/osc_ruby/classes/query_results.rb +7 -4
- data/lib/osc_ruby/version.rb +1 -1
- data/osc_ruby-1.0.2.gem +0 -0
- data/spec/core/connect_spec.rb +11 -9
- data/spec/core/query_results_spec.rb +3 -5
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4816953d57954604bf2efef9a71e993c9e064da
|
4
|
+
data.tar.gz: 06cd0e61915650193c822b2b56ccb0d8e2ebb877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
data/lib/osc_ruby/version.rb
CHANGED
data/osc_ruby-1.0.2.gem
ADDED
Binary file
|
data/spec/core/connect_spec.rb
CHANGED
@@ -10,15 +10,13 @@ describe OSCRuby::Connect do
|
|
10
10
|
|
11
11
|
OSCRuby::Client.new do |config|
|
12
12
|
|
13
|
-
config.interface = ENV['
|
13
|
+
config.interface = ENV['REDBOX_TEST']
|
14
14
|
|
15
|
-
config.username = ENV['
|
15
|
+
config.username = ENV['REDBOX_ADMIN']
|
16
16
|
|
17
|
-
config.password = ENV['
|
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
|
-
|
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['
|
131
|
+
expect(final_config['username']).to eq(ENV['REDBOX_ADMIN'])
|
130
132
|
|
131
|
-
expect(final_config['password']).to eq(ENV['
|
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['
|
11
|
+
config.interface = ENV['REDBOX_TEST']
|
12
12
|
|
13
|
-
config.username = ENV['
|
13
|
+
config.username = ENV['REDBOX_ADMIN']
|
14
14
|
|
15
|
-
config.password = ENV['
|
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.
|
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
|