raas-client-rails 0.1.0 → 0.1.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6c4f44354fc42a8fe599680f73fef59c0120d9265a05661ae3eea7b8c527af4
|
4
|
+
data.tar.gz: c83b4968c3f023ebd3cfcb2e2fb82e6eb12eb7126906a52bff7e7a869249c04b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: accb3436b7087aa5827111d34af8fc481f40ccd7b0ff71e3a506bccda38c0a2d078f5258664b9e280c04e73af6db8c5fe76d0aa7a27e928b38985cb3632fd492
|
7
|
+
data.tar.gz: 32f79a1e62cedb106d5ac87671f9d59452732daf63a1dd700890b87d8de3d1700e4fe35ad525f23b657f9288e4a3e0e5637aad4062101d502cb4dc304eaa2096
|
data/README.md
CHANGED
@@ -6,9 +6,10 @@ Adding extra endpoints to access RaaS. These endpoints allows you to fetch exter
|
|
6
6
|
|
7
7
|
### Set your Credentials
|
8
8
|
|
9
|
-
`landscape`, `application`, `token`
|
10
|
-
|
11
|
-
|
9
|
+
`landscape`, `application`, `token` are mandatory to interact with RaaS.
|
10
|
+
Basically, these variables can be assigned externally with files or hard-code.
|
11
|
+
Following is the example of how you set these variables on your code.
|
12
|
+
These credentials would be provided by SuTech. Please, ask [SuTech](https://www.sutech.co.jp/) adminisators for further information.
|
12
13
|
|
13
14
|
```ruby
|
14
15
|
Raas::Client::Rails::Engine.config.raas_client_rails.landscape = 'LANDSCAPE'
|
@@ -28,21 +29,32 @@ Once you install your gem, your application has several extra endpoints to inter
|
|
28
29
|
|
29
30
|
## Installation
|
30
31
|
|
31
|
-
|
32
|
+
The client is provided as [RubyGem](https://rubygems.org/gems/raas-client-rails),
|
33
|
+
and this provided as Rails Engine. you should follow the steps below to make the API work
|
34
|
+
|
35
|
+
1. Update your gem file
|
32
36
|
|
33
37
|
```ruby
|
34
38
|
gem "raas-client-rails"
|
35
39
|
```
|
36
40
|
|
37
|
-
|
41
|
+
2. install gem
|
42
|
+
|
38
43
|
```bash
|
39
|
-
$ bundle
|
44
|
+
$ bundle install
|
40
45
|
```
|
41
46
|
|
42
|
-
|
43
|
-
|
44
|
-
|
47
|
+
3. mount endPoint on `config/routes.rb`
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
mount Raas::Client::Rails::Engine => "[PATH]"
|
45
51
|
```
|
46
52
|
|
53
|
+
4. Launch your rails server
|
54
|
+
|
55
|
+
5. then you can use this with...
|
56
|
+
|
57
|
+
`/PATH/raas/endPointList`
|
58
|
+
|
47
59
|
## License
|
48
|
-
|
60
|
+
All the patents belong to SuTech
|
@@ -10,32 +10,32 @@ module Raas::Client::Rails
|
|
10
10
|
#/raas/health
|
11
11
|
def health()
|
12
12
|
prepare(params)
|
13
|
-
render plain: "Moving #{@tenant}/#{@
|
13
|
+
render plain: "Moving #{@tenant}/#{@sub}";
|
14
14
|
end
|
15
15
|
|
16
16
|
def prepare(params)
|
17
17
|
# seven arguments are needed to make this work
|
18
|
-
application = Raas::Client::Rails::Engine.config.raas_client_rails.
|
19
|
-
landscape = Raas::Client::Rails::Engine.config.raas_client_rails.
|
18
|
+
application = Raas::Client::Rails::Engine.config.raas_client_rails.application
|
19
|
+
landscape = Raas::Client::Rails::Engine.config.raas_client_rails.landscape
|
20
20
|
token = Raas::Client::Rails::Engine.config.raas_client_rails.token
|
21
21
|
@backUrl = params[:backUrl]
|
22
22
|
@subUrl = params[:subUrl]
|
23
23
|
@tenant = params[:tenant]
|
24
|
-
@
|
24
|
+
@sub = params[:sub]
|
25
25
|
@restClient = RestClient.new(application,landscape,token)
|
26
26
|
end
|
27
27
|
|
28
28
|
def report_session()
|
29
29
|
Rails.logger.warn("session parameter=#{params}");
|
30
30
|
prepare(params)
|
31
|
-
response = @restClient.createExternalSession(MSA_REPORT,@backUrl,@subUrl,@tenant,@
|
31
|
+
response = @restClient.createExternalSession(MSA_REPORT,@backUrl,@subUrl,@tenant,@sub)
|
32
32
|
render json: response.body
|
33
33
|
end
|
34
34
|
|
35
35
|
def datatraveler_session()
|
36
36
|
Rails.logger.warn("session parameter=#{params}")
|
37
37
|
prepare(params)
|
38
|
-
response = @restClient.createExternalSession(MSA_DT,@backUrl,@subUrl,@tenant,@
|
38
|
+
response = @restClient.createExternalSession(MSA_DT,@backUrl,@subUrl,@tenant,@sub)
|
39
39
|
render json: response.body
|
40
40
|
end
|
41
41
|
|
@@ -69,7 +69,7 @@ module Raas::Client::Rails
|
|
69
69
|
payload = parameters
|
70
70
|
end
|
71
71
|
Rails.logger.warn("get path=#{path} parameters=#{payload}");
|
72
|
-
response = @restClient.get(path,payload,@tenant,@
|
72
|
+
response = @restClient.get(path,payload,@tenant,@sub)
|
73
73
|
handleMime(mimeType, fileName, type, response)
|
74
74
|
end
|
75
75
|
|
@@ -98,7 +98,7 @@ module Raas::Client::Rails
|
|
98
98
|
payload = JSON.parse(parameters)
|
99
99
|
end
|
100
100
|
Rails.logger.warn("delete path=#{path} parameters=#{parameters}");
|
101
|
-
return @restClient.delete(path,payload,@tenant,@
|
101
|
+
return @restClient.delete(path,payload,@tenant,@sub)
|
102
102
|
end
|
103
103
|
|
104
104
|
#/raas/post
|
@@ -112,7 +112,7 @@ module Raas::Client::Rails
|
|
112
112
|
payload = JSON.parse(requestBody)
|
113
113
|
end
|
114
114
|
Rails.logger.warn("post path=#{path} requestBody=#{requestBody}");
|
115
|
-
response = @restClient.post(path,payload,@tenant,@
|
115
|
+
response = @restClient.post(path,payload,@tenant,@sub)
|
116
116
|
return response.body;
|
117
117
|
end
|
118
118
|
|
@@ -127,7 +127,7 @@ module Raas::Client::Rails
|
|
127
127
|
payload = JSON.parse(requestBody)
|
128
128
|
end
|
129
129
|
Rails.logger.warn("post path=#{path} requestBody=#{requestBody}");
|
130
|
-
response = @restClient.put(path,payload,@tenant,@
|
130
|
+
response = @restClient.put(path,payload,@tenant,@sub)
|
131
131
|
return response.body;
|
132
132
|
end
|
133
133
|
|
@@ -21,12 +21,12 @@ module Raas::Client::Rails
|
|
21
21
|
# ResponseEntity<String> resp = raasClient.createExternalSession(Constant.MSA_REPORT,req.getBackUrl(),req.getSubUrl(), saasContextProvider.getTenant(), saasContextProvider.getSub());
|
22
22
|
|
23
23
|
|
24
|
-
def createExternalSession(msa,backUrl,subUrl,tenant,
|
24
|
+
def createExternalSession(msa,backUrl,subUrl,tenant,sub)
|
25
25
|
body = Hash.new
|
26
26
|
body["backUrl"] = backUrl
|
27
27
|
body["subUrl"] = subUrl
|
28
28
|
body["tenant"] = tenant
|
29
|
-
body["sub"] =
|
29
|
+
body["sub"] = sub
|
30
30
|
return proxy(body,POST,"/#{msa}/external/session",nil,@token)
|
31
31
|
end
|
32
32
|
|
@@ -119,7 +119,7 @@ module Raas::Client::Rails
|
|
119
119
|
else
|
120
120
|
puts "method is not be defined..."
|
121
121
|
end
|
122
|
-
httpEntity['Accept-Encoding'] = ''
|
122
|
+
httpEntity['Accept-Encoding'] = 'gzip'
|
123
123
|
httpEntity.body = body.to_json if body
|
124
124
|
retry_count = 0
|
125
125
|
max_retries = 4
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raas-client-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sunao Suzuki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -57,7 +57,7 @@ metadata:
|
|
57
57
|
homepage_uri: https://www.sutech.co.jp/
|
58
58
|
source_code_uri: https://github.com/SuTechDevelop/raas-client-for-rails
|
59
59
|
changelog_uri: https://github.com/SuTechDevelop/raas-client-for-rails/activity
|
60
|
-
post_install_message:
|
60
|
+
post_install_message:
|
61
61
|
rdoc_options: []
|
62
62
|
require_paths:
|
63
63
|
- lib
|
@@ -72,8 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
76
|
-
signing_key:
|
75
|
+
rubygems_version: 3.1.6
|
76
|
+
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Summary
|
79
79
|
test_files: []
|