tdl-client-ruby 0.26.1 → 0.29.4
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/.github/dependabot.yml +11 -0
- data/.github/workflows/build_and_test.yml +45 -0
- data/.github/workflows/publish.yml +39 -0
- data/.github/workflows/release.yml +46 -0
- data/.gitmodules +0 -6
- data/.ruby-version +1 -0
- data/Gemfile +1 -1
- data/README.md +75 -46
- data/Rakefile +0 -6
- data/lib/tdl/audit/presentation_utils.rb +48 -0
- data/lib/tdl/queue/abstractions/request.rb +0 -8
- data/lib/tdl/queue/abstractions/response/fatal_error_response.rb +3 -6
- data/lib/tdl/queue/abstractions/response/valid_response.rb +0 -6
- data/lib/tdl/queue/queue_based_implementation_runner.rb +20 -4
- data/lib/tdl/runner/challenge_server_client.rb +7 -7
- data/lib/tdl/runner/recording_system.rb +6 -6
- data/lib/tdl/runner/round_management.rb +1 -1
- data/tdl-client-ruby.gemspec +16 -43
- data/tdl-client-ruby.iml +44 -31
- metadata +51 -72
- data/lib/tdl/previous_version.rb +0 -4
- data/lib/tdl/util.rb +0 -25
- data/release.sh +0 -44
- data/startExternalDependencies.sh +0 -19
- data/stopExternalDependencies.sh +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e64bfd9dd197392feb63e983cf7e7c750a7230c22df262f36df9bb0b2a0220c0
|
4
|
+
data.tar.gz: 0e6729ab9ca8032daf6cec1729ced178eb73a9a92843b01634169db3935defb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0902bab8f5252f03c9c023f9d7ddf375a23640bd341c1fdfdb45039bf53cf7157616060a637016f0a10b89b08d557bf174383dea3d57c3e080c97090ad5f1b70'
|
7
|
+
data.tar.gz: 70d5e958a0d07dade50f43190e321ed7e49bc299c88df38428326aabd28ddb79ca03a8f7f475503a828d2a34a47ff275534ab46167e7edb3266f0c909e5b2680
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "monthly"
|
@@ -0,0 +1,45 @@
|
|
1
|
+
name: Ruby test
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build-and-test:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
services:
|
11
|
+
activemq:
|
12
|
+
image: apache/activemq-classic:6.1.0
|
13
|
+
ports:
|
14
|
+
- 28161:8161
|
15
|
+
- 21613:61613
|
16
|
+
challenge-server:
|
17
|
+
image: wiremock/wiremock:3.7.0
|
18
|
+
ports:
|
19
|
+
- 8222:8080
|
20
|
+
recording-server:
|
21
|
+
image: wiremock/wiremock:3.7.0
|
22
|
+
ports:
|
23
|
+
- 41375:8080
|
24
|
+
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v4
|
27
|
+
with:
|
28
|
+
submodules: 'true'
|
29
|
+
|
30
|
+
# ~~~~~~~~~~~~~ Ruby setup ~~~~~~~~~~~~~
|
31
|
+
- name: Set up Ruby
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: '3.4' # Adjust to your Ruby version
|
35
|
+
bundler-cache: true
|
36
|
+
|
37
|
+
- name: Display Ruby version
|
38
|
+
run: ruby -v
|
39
|
+
|
40
|
+
- name: Install dependencies
|
41
|
+
run: bundle install
|
42
|
+
|
43
|
+
# ~~~~~~~~~~~~~ Test ~~~~~~~~~~~~~
|
44
|
+
- name: Run tests
|
45
|
+
run: bundle exec rake features
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Publish to RubyGems
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: read
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
deploy:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v4
|
17
|
+
|
18
|
+
# ~~~~~~~~~~~~~ Ruby setup ~~~~~~~~~~~~~
|
19
|
+
- name: Set up Ruby
|
20
|
+
uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: '3.4'
|
23
|
+
bundler-cache: true
|
24
|
+
|
25
|
+
- name: Display Ruby version
|
26
|
+
run: ruby -v
|
27
|
+
|
28
|
+
- name: Install dependencies
|
29
|
+
run: bundle install
|
30
|
+
|
31
|
+
# ~~~~~~~~~~~~~ Build gem ~~~~~~~~~~~~~
|
32
|
+
- name: Build gem
|
33
|
+
run: gem build tdl-client-ruby.gemspec
|
34
|
+
|
35
|
+
# ~~~~~~~~~~~~~ Publish to RubyGems ~~~~~~~~~~~~~
|
36
|
+
- name: Push to RubyGems
|
37
|
+
run: gem push *.gem
|
38
|
+
env:
|
39
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
name: Create GitHub Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
permissions:
|
9
|
+
contents: write
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build_and_release:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- name: Checkout
|
17
|
+
uses: actions/checkout@v4
|
18
|
+
|
19
|
+
# ~~~~~~~~~~~~~ Ruby setup ~~~~~~~~~~~~~
|
20
|
+
- name: Set up Ruby
|
21
|
+
uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: '3.4' # adjust as needed
|
24
|
+
bundler-cache: true
|
25
|
+
|
26
|
+
- name: Display Ruby version
|
27
|
+
run: ruby -v
|
28
|
+
|
29
|
+
- name: Install dependencies
|
30
|
+
run: bundle install
|
31
|
+
|
32
|
+
# ~~~~~~~~~~~~~ Build the gem ~~~~~~~~~~~~~
|
33
|
+
- name: Build gem
|
34
|
+
run: gem build your_gem.gemspec
|
35
|
+
|
36
|
+
- name: Rename gem for consistency
|
37
|
+
run: |
|
38
|
+
mkdir -p pkg
|
39
|
+
mv *.gem pkg/tdl-client-ruby.gem
|
40
|
+
|
41
|
+
# ~~~~~~~~~~~~~ Create GitHub Release ~~~~~~~~~~~~~
|
42
|
+
- name: Upload Release Asset
|
43
|
+
uses: softprops/action-gh-release@v2
|
44
|
+
if: startsWith(github.ref, 'refs/tags/')
|
45
|
+
with:
|
46
|
+
files: pkg/tdl-client-ruby.gem
|
data/.gitmodules
CHANGED
@@ -1,9 +1,3 @@
|
|
1
|
-
[submodule "broker"]
|
2
|
-
path = broker
|
3
|
-
url = git@github.com:julianghionoiu/tdl-client-test-broker.git
|
4
1
|
[submodule "features/spec"]
|
5
2
|
path = features/spec
|
6
3
|
url = git@github.com:julianghionoiu/tdl-client-spec.git
|
7
|
-
[submodule "wiremock"]
|
8
|
-
path = wiremock
|
9
|
-
url = git@github.com:julianghionoiu/tdl-client-test-wiremock.git
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.4.2
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -25,26 +25,35 @@ Ruby client to connect to the central kata server.
|
|
25
25
|
|
26
26
|
### Installing
|
27
27
|
|
28
|
-
#### Install
|
28
|
+
#### Install RBENV
|
29
|
+
|
29
30
|
```bash
|
30
|
-
|
31
|
-
|
31
|
+
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
|
32
|
+
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
|
33
|
+
|
34
|
+
# Then activate
|
35
|
+
~/.rbenv/bin/rbenv init
|
32
36
|
```
|
33
37
|
|
34
38
|
#### Install ruby
|
35
39
|
```bash
|
36
|
-
|
37
|
-
|
40
|
+
rbenv install 3.4.2
|
41
|
+
rbenv local 3.4.2
|
42
|
+
ruby --version
|
38
43
|
```
|
39
44
|
|
40
|
-
|
41
|
-
```
|
42
|
-
|
45
|
+
If the above fails, you might need to install libyaml:
|
46
|
+
```shell
|
47
|
+
https://pyyaml.org/download/libyaml/
|
48
|
+
|
49
|
+
./configure
|
50
|
+
make
|
51
|
+
make install
|
43
52
|
```
|
44
53
|
|
45
|
-
#### Install
|
54
|
+
#### Install bundler
|
46
55
|
```bash
|
47
|
-
gem install
|
56
|
+
gem install bundler
|
48
57
|
```
|
49
58
|
|
50
59
|
#### Install cucumber
|
@@ -57,62 +66,82 @@ gem install cucumber
|
|
57
66
|
bundle install
|
58
67
|
```
|
59
68
|
|
60
|
-
#### Manual
|
61
69
|
|
62
|
-
|
70
|
+
# Testing
|
63
71
|
|
64
|
-
|
72
|
+
All test require the ActiveMQ broker and Wiremock to be started.
|
65
73
|
|
66
|
-
Start
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
```
|
74
|
+
Start ActiveMQ
|
75
|
+
```shell
|
76
|
+
export ACTIVEMQ_CONTAINER=apache/activemq-classic:6.1.0
|
77
|
+
docker run -d -it --rm -p 28161:8161 -p 21613:61613 -p 21616:61616 --name activemq ${ACTIVEMQ_CONTAINER}
|
78
|
+
```
|
71
79
|
|
72
|
-
|
73
|
-
|
74
|
-
|
80
|
+
The ActiveMQ web UI can be accessed at:
|
81
|
+
http://localhost:28161/admin/
|
82
|
+
use admin/admin to login
|
83
|
+
|
84
|
+
Start two Wiremock servers
|
85
|
+
```shell
|
86
|
+
export WIREMOCK_CONTAINER=wiremock/wiremock:3.7.0
|
87
|
+
docker run -d -it --rm -p 8222:8080 --name challenge-server ${WIREMOCK_CONTAINER}
|
88
|
+
docker run -d -it --rm -p 41375:8080 --name recording-server ${WIREMOCK_CONTAINER}
|
89
|
+
```
|
90
|
+
|
91
|
+
The Wiremock admin UI can be found at:
|
92
|
+
http://localhost:8222/__admin/
|
93
|
+
and docs at
|
94
|
+
http://localhost:8222/__admin/docs
|
75
95
|
|
76
|
-
### Testing
|
77
96
|
|
78
|
-
|
79
|
-
The following commands are available for the broker.
|
97
|
+
# Cleanup
|
80
98
|
|
99
|
+
Stop dependencies
|
81
100
|
```
|
82
|
-
|
83
|
-
|
84
|
-
|
101
|
+
docker stop activemq
|
102
|
+
docker stop recording-server
|
103
|
+
docker stop challenge-server
|
85
104
|
```
|
86
105
|
|
87
|
-
|
88
|
-
|
89
|
-
```bash
|
90
|
-
./startExternalDependencies.sh
|
91
|
-
```
|
106
|
+
# Tests
|
92
107
|
|
93
|
-
Run tests with
|
108
|
+
Run tests with:
|
109
|
+
```
|
110
|
+
bundle exec rake features
|
111
|
+
```
|
94
112
|
To run a single scenario execute `cucumber path/to/file.feature:line_no`
|
95
113
|
Recommendation is to use the cucumber command instead of rake always outside of CI.
|
96
114
|
|
97
|
-
|
98
|
-
|
99
|
-
Stop external dependencies
|
115
|
+
# To release
|
116
|
+
Set version manually in `tdl-client-ruby.gemspec`:
|
100
117
|
```
|
101
|
-
|
102
|
-
python wiremock/wiremock-wrapper.py stop 41375
|
103
|
-
python wiremock/wiremock-wrapper.py stop 8222
|
118
|
+
VERSION = "0.29.1"
|
104
119
|
```
|
105
120
|
|
106
|
-
|
121
|
+
Commit the changes
|
122
|
+
```
|
123
|
+
export RELEASE_TAG="v$(cat tdl-client-ruby.gemspec | grep "VERSION =" | cut -d "\"" -f2)"
|
124
|
+
echo ${RELEASE_TAG}
|
107
125
|
|
108
|
-
|
109
|
-
|
126
|
+
git add --all
|
127
|
+
git commit -m "Releasing version ${RELEASE_TAG}"
|
128
|
+
|
129
|
+
git tag -a "${RELEASE_TAG}" -m "${RELEASE_TAG}"
|
130
|
+
git push --tags
|
131
|
+
git push
|
110
132
|
```
|
111
133
|
|
134
|
+
Wait for the Github build to finish, then go to:
|
135
|
+
https://pypi.org/
|
112
136
|
|
113
|
-
## To
|
137
|
+
## To manually build the RubyGems files
|
114
138
|
|
115
|
-
|
116
|
-
```
|
117
|
-
|
139
|
+
Build the gem:
|
140
|
+
```shell
|
141
|
+
bundle exec rake build
|
118
142
|
```
|
143
|
+
|
144
|
+
Deploy the gem to RubyGems:
|
145
|
+
```shell
|
146
|
+
bundle exec rake release
|
147
|
+
```
|
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rake/testtask'
|
2
|
-
require 'coveralls/rake/task'
|
3
2
|
|
4
3
|
|
5
4
|
#~~~~~~~ Test
|
@@ -18,9 +17,6 @@ Cucumber::Rake::Task.new(:features) do |t|
|
|
18
17
|
t.cucumber_opts = 'features'
|
19
18
|
end
|
20
19
|
|
21
|
-
Coveralls::RakeTask.new
|
22
|
-
task :features_with_coveralls => [:features, 'coveralls:push']
|
23
|
-
|
24
20
|
#~~~~~~~~~ Play
|
25
21
|
|
26
22
|
desc 'Run the example'
|
@@ -37,8 +33,6 @@ end
|
|
37
33
|
|
38
34
|
#~~~~~~~~ Deploy
|
39
35
|
|
40
|
-
require 'tdl/previous_version'
|
41
|
-
|
42
36
|
task :build do
|
43
37
|
system 'gem build tdl-client-ruby.gemspec'
|
44
38
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module TDL
|
2
|
+
module PresentationUtil
|
3
|
+
|
4
|
+
def self.to_displayable_request(params)
|
5
|
+
return params.map{ |param|
|
6
|
+
TDL::PresentationUtil.serialize_and_compress(param)
|
7
|
+
}.join(', ')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.to_displayable_response(value)
|
11
|
+
return TDL::PresentationUtil.serialize_and_compress(value)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def self.serialize_and_compress(value)
|
16
|
+
representation = JSON.generate(value, quirks_mode: true)
|
17
|
+
|
18
|
+
if list_like?(value)
|
19
|
+
representation = representation.gsub(',', ', ')
|
20
|
+
elsif multiline_string?(representation)
|
21
|
+
representation = suppress_extra_lines(representation)
|
22
|
+
end
|
23
|
+
|
24
|
+
representation
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.list_like?(value)
|
28
|
+
value.is_a?(Array)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.multiline_string?(value)
|
32
|
+
value.include?("\\n")
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.suppress_extra_lines(value)
|
36
|
+
return value.to_s unless value.is_a?(String)
|
37
|
+
|
38
|
+
parts = value.split("\\n")
|
39
|
+
top_line = parts[0]
|
40
|
+
remaining_lines = parts.size - 1
|
41
|
+
|
42
|
+
representation = "#{top_line} .. ( #{remaining_lines} more line"
|
43
|
+
representation += "s" if remaining_lines > 1
|
44
|
+
representation += " )\""
|
45
|
+
representation
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'tdl/util'
|
2
|
-
|
3
1
|
module TDL
|
4
2
|
class Request
|
5
3
|
attr_reader :original_message, :id, :method, :params
|
@@ -10,11 +8,5 @@ module TDL
|
|
10
8
|
@method = request_data.fetch('method')
|
11
9
|
@params = request_data.fetch('params')
|
12
10
|
end
|
13
|
-
|
14
|
-
def audit_text
|
15
|
-
"id = #{id}, req = #{method}(#{params.map{ |param|
|
16
|
-
TDL::Util.compress_data(param)
|
17
|
-
}.join(', ')})"
|
18
|
-
end
|
19
11
|
end
|
20
12
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'logging'
|
2
|
+
require 'tdl/audit/presentation_utils'
|
2
3
|
require 'tdl/queue/processing_rules'
|
3
4
|
require 'tdl/queue/transport/remote_broker'
|
4
5
|
|
@@ -54,11 +55,11 @@ module TDL
|
|
54
55
|
|
55
56
|
def process_next_request_from(remote_broker, request)
|
56
57
|
@audit.start_line
|
57
|
-
@audit.
|
58
|
+
@audit.log_request(request)
|
58
59
|
|
59
60
|
# Obtain response from user
|
60
61
|
response = @processing_rules.get_response_for(request)
|
61
|
-
@audit.
|
62
|
+
@audit.log_response(response)
|
62
63
|
|
63
64
|
# Act
|
64
65
|
after_response(remote_broker, request, response)
|
@@ -98,12 +99,27 @@ class AuditStream
|
|
98
99
|
@str = ''
|
99
100
|
end
|
100
101
|
|
101
|
-
def
|
102
|
-
|
102
|
+
def log_request(request)
|
103
|
+
params_as_string = TDL::PresentationUtil.to_displayable_request(request.params)
|
104
|
+
text = "id = #{request.id}, req = #{request.method}(#{params_as_string})"
|
105
|
+
|
103
106
|
if not text.empty? and @str.length > 0
|
104
107
|
@str << ', '
|
105
108
|
end
|
109
|
+
@str << text
|
110
|
+
end
|
106
111
|
|
112
|
+
def log_response(response)
|
113
|
+
if response.instance_variable_defined?(:@result)
|
114
|
+
representation = TDL::PresentationUtil.to_displayable_response(response.result)
|
115
|
+
text = "resp = #{representation}"
|
116
|
+
else
|
117
|
+
text = "error = #{response.message}" + ", (NOT PUBLISHED)"
|
118
|
+
end
|
119
|
+
|
120
|
+
if not text.empty? and @str.length > 0
|
121
|
+
@str << ', '
|
122
|
+
end
|
107
123
|
@str << text
|
108
124
|
end
|
109
125
|
|
@@ -20,8 +20,8 @@ class ChallengeServerClient
|
|
20
20
|
|
21
21
|
def send_action(action)
|
22
22
|
encoded_path = @journey_id.encode('utf-8')
|
23
|
-
url = "#{@base_url}/action/#{action}/#{encoded_path}"
|
24
|
-
response =
|
23
|
+
url = URI("#{@base_url}/action/#{action}/#{encoded_path}")
|
24
|
+
response = Net::HTTP.post(url, "", {'Accept'=> @accept_header, 'Accept-Charset'=> 'UTF-8'})
|
25
25
|
ensure_status_ok(response)
|
26
26
|
response.body
|
27
27
|
end
|
@@ -30,18 +30,18 @@ class ChallengeServerClient
|
|
30
30
|
|
31
31
|
def get(name)
|
32
32
|
journey_id_utf8 = @journey_id.encode('utf-8')
|
33
|
-
url = "#{@base_url}/#{name}/#{journey_id_utf8}"
|
34
|
-
response =
|
33
|
+
url = URI("#{@base_url}/#{name}/#{journey_id_utf8}")
|
34
|
+
response = Net::HTTP.get_response(url, {'Accept'=> @accept_header, 'Accept-Charset'=> 'UTF-8'})
|
35
35
|
ensure_status_ok(response)
|
36
36
|
response.body
|
37
37
|
end
|
38
38
|
|
39
39
|
def ensure_status_ok(response)
|
40
|
-
if client_error?(response.code)
|
40
|
+
if client_error?(response.code.to_i)
|
41
41
|
raise ClientErrorException, response.body
|
42
|
-
elsif server_error?(response.code)
|
42
|
+
elsif server_error?(response.code.to_i)
|
43
43
|
raise ServerErrorException, response.body
|
44
|
-
elsif other_error_response?(response.code)
|
44
|
+
elsif other_error_response?(response.code.to_i)
|
45
45
|
raise OtherCommunicationException, response.body
|
46
46
|
end
|
47
47
|
end
|
@@ -1,4 +1,5 @@
|
|
1
|
-
require '
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
2
3
|
require 'tdl/runner/runner_action'
|
3
4
|
|
4
5
|
RECORDING_SYSTEM_ENDPOINT = 'http://localhost:41375'
|
@@ -26,8 +27,8 @@ class RecordingSystem
|
|
26
27
|
|
27
28
|
def is_running
|
28
29
|
begin
|
29
|
-
response =
|
30
|
-
if response.
|
30
|
+
response = Net::HTTP.get_response(URI("#{RECORDING_SYSTEM_ENDPOINT}/status"))
|
31
|
+
if response.is_a?(Net::HTTPSuccess) and response.body.start_with?('OK')
|
31
32
|
return true
|
32
33
|
end
|
33
34
|
rescue StandardError => e
|
@@ -57,10 +58,9 @@ class RecordingSystem
|
|
57
58
|
end
|
58
59
|
|
59
60
|
begin
|
60
|
-
response =
|
61
|
-
parameters: body
|
61
|
+
response = Net::HTTP.post(URI("#{RECORDING_SYSTEM_ENDPOINT}#{endpoint}"), body)
|
62
62
|
|
63
|
-
unless response.
|
63
|
+
unless response.is_a?(Net::HTTPSuccess)
|
64
64
|
puts "Recording system returned code: #{response.code}"
|
65
65
|
return
|
66
66
|
end
|
@@ -18,7 +18,7 @@ module RoundManagement
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def display_and_save_description(label, description, audit_stream, working_directory)
|
21
|
-
Dir.mkdir(File.join(working_directory, CHALLENGES_FOLDER)) unless File.
|
21
|
+
Dir.mkdir(File.join(working_directory, CHALLENGES_FOLDER)) unless File.exist?(File.join(working_directory, CHALLENGES_FOLDER))
|
22
22
|
|
23
23
|
output_description = File.open("#{working_directory}/#{CHALLENGES_FOLDER}/#{label}.txt", 'w')
|
24
24
|
output_description << description
|
data/tdl-client-ruby.gemspec
CHANGED
@@ -1,36 +1,9 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'tdl/previous_version'
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
# Add increment to Version class
|
9
|
-
class ComparableVersion < Gem::Version
|
10
|
-
def increment
|
11
|
-
segments = self.segments.dup
|
12
|
-
segments[-1] = segments[-1].succ
|
13
|
-
|
14
|
-
self.class.new segments.join('.')
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# Get Spec version from Git
|
19
|
-
spec_folder = File.expand_path('../features/spec',__FILE__).to_s
|
20
|
-
major_minor_version = `git --git-dir #{spec_folder}/.git describe --all | cut -d '/' -f 2 | tr -d 'v'`.strip
|
21
|
-
|
22
|
-
# Compute next version
|
23
|
-
previous_version = ComparableVersion.new(TDL::PREVIOUS_VERSION)
|
24
|
-
new_spec_version = ComparableVersion.new(major_minor_version+'.1')
|
25
|
-
if new_spec_version > previous_version
|
26
|
-
current_version = new_spec_version
|
27
|
-
else
|
28
|
-
current_version = previous_version.increment
|
29
|
-
end
|
30
|
-
# puts "previous_version = #{previous_version}"
|
31
|
-
# puts "current_version = #{current_version}"
|
32
|
-
|
33
|
-
VERSION = "#{current_version}"
|
5
|
+
#
|
6
|
+
VERSION = "0.29.4"
|
34
7
|
|
35
8
|
|
36
9
|
#~~~~~ Create gemspec
|
@@ -38,7 +11,7 @@ VERSION = "#{current_version}"
|
|
38
11
|
Gem::Specification.new do |spec|
|
39
12
|
spec.name = 'tdl-client-ruby'
|
40
13
|
spec.version = VERSION
|
41
|
-
spec.metadata = {
|
14
|
+
spec.metadata = {}
|
42
15
|
spec.authors = ['Julian Ghionoiu']
|
43
16
|
spec.email = ['iulian.ghionoiu@gmail.com']
|
44
17
|
|
@@ -50,17 +23,17 @@ Gem::Specification.new do |spec|
|
|
50
23
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
51
24
|
spec.require_paths = ['lib']
|
52
25
|
|
53
|
-
spec.add_runtime_dependency 'stomp', '1.
|
54
|
-
spec.add_runtime_dependency 'logging', '2.
|
55
|
-
|
56
|
-
|
57
|
-
spec.add_development_dependency '
|
58
|
-
spec.add_development_dependency '
|
59
|
-
spec.add_development_dependency 'minitest', '
|
60
|
-
spec.add_development_dependency '
|
61
|
-
spec.add_development_dependency '
|
62
|
-
spec.add_development_dependency '
|
63
|
-
spec.add_development_dependency '
|
64
|
-
spec.add_development_dependency '
|
65
|
-
spec.add_development_dependency '
|
26
|
+
spec.add_runtime_dependency 'stomp', '1.4.10'
|
27
|
+
spec.add_runtime_dependency 'logging', '2.3.1'
|
28
|
+
|
29
|
+
spec.add_development_dependency 'bundler'
|
30
|
+
spec.add_development_dependency 'rake', '~> 13.2.1'
|
31
|
+
spec.add_development_dependency 'minitest', '~> 5.25.5'
|
32
|
+
spec.add_development_dependency 'minitest-reporters', '~> 1.7.1'
|
33
|
+
spec.add_development_dependency 'json', '~> 2.9.1'
|
34
|
+
spec.add_development_dependency 'cucumber', '~> 9.2.1'
|
35
|
+
spec.add_development_dependency 'debase', '~> 0.2.9'
|
36
|
+
spec.add_development_dependency 'ostruct', '~> 0.6.1'
|
37
|
+
spec.add_development_dependency 'logger', '~> 1.6.6'
|
38
|
+
spec.add_development_dependency 'syslog', '~> 0.3.0'
|
66
39
|
end
|
data/tdl-client-ruby.iml
CHANGED
@@ -15,41 +15,54 @@
|
|
15
15
|
<excludeFolder url="file://$MODULE_DIR$/broker/.cache" />
|
16
16
|
<excludeFolder url="file://$MODULE_DIR$/coverage" />
|
17
17
|
</content>
|
18
|
-
<orderEntry type="jdk" jdkName="rbenv:
|
18
|
+
<orderEntry type="jdk" jdkName="rbenv: 3.2.2" jdkType="RUBY_SDK" />
|
19
19
|
<orderEntry type="sourceFolder" forTests="false" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="cucumber (
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="cucumber-
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
37
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
38
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
39
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
40
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
41
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
42
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
43
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
44
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
45
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
46
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
47
|
-
<orderEntry type="library" scope="PROVIDED" name="
|
48
|
-
<orderEntry type="library" scope="PROVIDED" name="tins (v1.6.0, rbenv: 2.2.2) [gem]" level="application" />
|
49
|
-
<orderEntry type="library" scope="PROVIDED" name="unirest (v1.1.2, rbenv: 2.2.2) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="ansi (v1.5.0, rbenv: 3.2.2) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="builder (v3.2.4, rbenv: 3.2.2) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.17, rbenv: 3.2.2) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber (v8.0.0, rbenv: 3.2.2) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-ci-environment (v9.2.0, rbenv: 3.2.2) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-core (v11.0.0, rbenv: 3.2.2) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-cucumber-expressions (v15.2.0, rbenv: 3.2.2) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-gherkin (v23.0.1, rbenv: 3.2.2) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-html-formatter (v19.2.0, rbenv: 3.2.2) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-messages (v18.0.0, rbenv: 3.2.2) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="cucumber-tag-expressions (v4.1.0, rbenv: 3.2.2) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="debase (v3.0.0.beta.6, rbenv: 3.2.2) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="debase-ruby_core_source (v0.10.18, rbenv: 3.2.2) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, rbenv: 3.2.2) [gem]" level="application" />
|
34
|
+
<orderEntry type="library" scope="PROVIDED" name="ffi (v1.15.5, rbenv: 3.2.2) [gem]" level="application" />
|
35
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v2.6.3, rbenv: 3.2.2) [gem]" level="application" />
|
36
|
+
<orderEntry type="library" scope="PROVIDED" name="little-plugger (v1.1.4, rbenv: 3.2.2) [gem]" level="application" />
|
37
|
+
<orderEntry type="library" scope="PROVIDED" name="logging (v2.3.1, rbenv: 3.2.2) [gem]" level="application" />
|
38
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types (v3.4.1, rbenv: 3.2.2) [gem]" level="application" />
|
39
|
+
<orderEntry type="library" scope="PROVIDED" name="mime-types-data (v3.2023.0218.1, rbenv: 3.2.2) [gem]" level="application" />
|
40
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest (v5.18.1, rbenv: 3.2.2) [gem]" level="application" />
|
41
|
+
<orderEntry type="library" scope="PROVIDED" name="minitest-reporters (v1.6.0, rbenv: 3.2.2) [gem]" level="application" />
|
42
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.15.0, rbenv: 3.2.2) [gem]" level="application" />
|
43
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_test (v1.1.0, rbenv: 3.2.2) [gem]" level="application" />
|
44
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, rbenv: 3.2.2) [gem]" level="application" />
|
45
|
+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, rbenv: 3.2.2) [gem]" level="application" />
|
46
|
+
<orderEntry type="library" scope="PROVIDED" name="stomp (v1.4.10, rbenv: 3.2.2) [gem]" level="application" />
|
47
|
+
<orderEntry type="library" scope="PROVIDED" name="sys-uname (v1.2.3, rbenv: 3.2.2) [gem]" level="application" />
|
50
48
|
</component>
|
51
49
|
<component name="RModuleSettingsStorage">
|
52
50
|
<LOAD_PATH number="1" string0="$MODULE_DIR$/../../tdl-warmup/ruby/lib" />
|
53
51
|
<I18N_FOLDERS number="0" />
|
54
52
|
</component>
|
53
|
+
<component name="RakeTasksCache">
|
54
|
+
<option name="myRootTask">
|
55
|
+
<RakeTaskImpl id="rake">
|
56
|
+
<subtasks>
|
57
|
+
<RakeTaskImpl description="Run the example" fullCommand="example" id="example" />
|
58
|
+
<RakeTaskImpl description="Run Cucumber features" fullCommand="features" id="features" />
|
59
|
+
<RakeTaskImpl description="Run the test playground" fullCommand="playground" id="playground" />
|
60
|
+
<RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
|
61
|
+
<RakeTaskImpl description="" fullCommand="build" id="build" />
|
62
|
+
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
63
|
+
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
64
|
+
</subtasks>
|
65
|
+
</RakeTaskImpl>
|
66
|
+
</option>
|
67
|
+
</component>
|
55
68
|
</module>
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdl-client-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julian Ghionoiu
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: stomp
|
@@ -16,186 +15,168 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
18
|
+
version: 1.4.10
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - '='
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
25
|
+
version: 1.4.10
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: logging
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - '='
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.
|
32
|
+
version: 2.3.1
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - '='
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.
|
39
|
+
version: 2.3.1
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
41
|
+
name: bundler
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
|
-
- -
|
44
|
+
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :
|
46
|
+
version: '0'
|
47
|
+
type: :development
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
|
-
- -
|
51
|
+
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
53
|
+
version: '0'
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
55
|
+
name: rake
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
60
|
+
version: 13.2.1
|
62
61
|
type: :development
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
67
|
+
version: 13.2.1
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
69
|
+
name: minitest
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
74
|
+
version: 5.25.5
|
76
75
|
type: :development
|
77
76
|
prerelease: false
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
79
|
- - "~>"
|
81
80
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
81
|
+
version: 5.25.5
|
83
82
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: minitest
|
83
|
+
name: minitest-reporters
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
|
-
- -
|
86
|
+
- - "~>"
|
88
87
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
88
|
+
version: 1.7.1
|
90
89
|
type: :development
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
|
-
- -
|
93
|
+
- - "~>"
|
95
94
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
95
|
+
version: 1.7.1
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
97
|
+
name: json
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
100
|
- - "~>"
|
102
101
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
104
|
-
- - ">="
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version: 1.0.19
|
102
|
+
version: 2.9.1
|
107
103
|
type: :development
|
108
104
|
prerelease: false
|
109
105
|
version_requirements: !ruby/object:Gem::Requirement
|
110
106
|
requirements:
|
111
107
|
- - "~>"
|
112
108
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 1.0.19
|
109
|
+
version: 2.9.1
|
117
110
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
111
|
+
name: cucumber
|
119
112
|
requirement: !ruby/object:Gem::Requirement
|
120
113
|
requirements:
|
121
114
|
- - "~>"
|
122
115
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
116
|
+
version: 9.2.1
|
124
117
|
type: :development
|
125
118
|
prerelease: false
|
126
119
|
version_requirements: !ruby/object:Gem::Requirement
|
127
120
|
requirements:
|
128
121
|
- - "~>"
|
129
122
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
123
|
+
version: 9.2.1
|
131
124
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
125
|
+
name: debase
|
133
126
|
requirement: !ruby/object:Gem::Requirement
|
134
127
|
requirements:
|
135
128
|
- - "~>"
|
136
129
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.
|
130
|
+
version: 0.2.9
|
138
131
|
type: :development
|
139
132
|
prerelease: false
|
140
133
|
version_requirements: !ruby/object:Gem::Requirement
|
141
134
|
requirements:
|
142
135
|
- - "~>"
|
143
136
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.
|
137
|
+
version: 0.2.9
|
145
138
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
139
|
+
name: ostruct
|
147
140
|
requirement: !ruby/object:Gem::Requirement
|
148
141
|
requirements:
|
149
142
|
- - "~>"
|
150
143
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
152
|
-
- - "~>"
|
153
|
-
- !ruby/object:Gem::Version
|
154
|
-
version: 1.8.3
|
144
|
+
version: 0.6.1
|
155
145
|
type: :development
|
156
146
|
prerelease: false
|
157
147
|
version_requirements: !ruby/object:Gem::Requirement
|
158
148
|
requirements:
|
159
149
|
- - "~>"
|
160
150
|
- !ruby/object:Gem::Version
|
161
|
-
version:
|
162
|
-
- - "~>"
|
163
|
-
- !ruby/object:Gem::Version
|
164
|
-
version: 1.8.3
|
151
|
+
version: 0.6.1
|
165
152
|
- !ruby/object:Gem::Dependency
|
166
|
-
name:
|
153
|
+
name: logger
|
167
154
|
requirement: !ruby/object:Gem::Requirement
|
168
155
|
requirements:
|
169
|
-
- - "
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version: 2.0.0
|
172
|
-
- - "<"
|
156
|
+
- - "~>"
|
173
157
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
158
|
+
version: 1.6.6
|
175
159
|
type: :development
|
176
160
|
prerelease: false
|
177
161
|
version_requirements: !ruby/object:Gem::Requirement
|
178
162
|
requirements:
|
179
|
-
- - "
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: 2.0.0
|
182
|
-
- - "<"
|
163
|
+
- - "~>"
|
183
164
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
165
|
+
version: 1.6.6
|
185
166
|
- !ruby/object:Gem::Dependency
|
186
|
-
name:
|
167
|
+
name: syslog
|
187
168
|
requirement: !ruby/object:Gem::Requirement
|
188
169
|
requirements:
|
189
170
|
- - "~>"
|
190
171
|
- !ruby/object:Gem::Version
|
191
|
-
version: 0.
|
172
|
+
version: 0.3.0
|
192
173
|
type: :development
|
193
174
|
prerelease: false
|
194
175
|
version_requirements: !ruby/object:Gem::Requirement
|
195
176
|
requirements:
|
196
177
|
- - "~>"
|
197
178
|
- !ruby/object:Gem::Version
|
198
|
-
version: 0.
|
179
|
+
version: 0.3.0
|
199
180
|
description: A ruby client to connect to the kata server
|
200
181
|
email:
|
201
182
|
- iulian.ghionoiu@gmail.com
|
@@ -203,8 +184,13 @@ executables: []
|
|
203
184
|
extensions: []
|
204
185
|
extra_rdoc_files: []
|
205
186
|
files:
|
187
|
+
- ".github/dependabot.yml"
|
188
|
+
- ".github/workflows/build_and_test.yml"
|
189
|
+
- ".github/workflows/publish.yml"
|
190
|
+
- ".github/workflows/release.yml"
|
206
191
|
- ".gitignore"
|
207
192
|
- ".gitmodules"
|
193
|
+
- ".ruby-version"
|
208
194
|
- CODE_OF_CONDUCT.md
|
209
195
|
- Gemfile
|
210
196
|
- LICENSE
|
@@ -212,7 +198,7 @@ files:
|
|
212
198
|
- Rakefile
|
213
199
|
- lib/tdl.rb
|
214
200
|
- lib/tdl/audit/console_audit_stream.rb
|
215
|
-
- lib/tdl/
|
201
|
+
- lib/tdl/audit/presentation_utils.rb
|
216
202
|
- lib/tdl/queue/abstractions/processing_rule.rb
|
217
203
|
- lib/tdl/queue/abstractions/request.rb
|
218
204
|
- lib/tdl/queue/abstractions/response/fatal_error_response.rb
|
@@ -231,18 +217,12 @@ files:
|
|
231
217
|
- lib/tdl/runner/round_management.rb
|
232
218
|
- lib/tdl/runner/runner_action.rb
|
233
219
|
- lib/tdl/thread_timer.rb
|
234
|
-
- lib/tdl/util.rb
|
235
|
-
- release.sh
|
236
|
-
- startExternalDependencies.sh
|
237
|
-
- stopExternalDependencies.sh
|
238
220
|
- tdl-client-ruby.gemspec
|
239
221
|
- tdl-client-ruby.iml
|
240
222
|
homepage: https://github.com/julianghionoiu/tdl-client-ruby
|
241
223
|
licenses:
|
242
224
|
- GPL-3.0
|
243
|
-
metadata:
|
244
|
-
previous_version: 0.25.1
|
245
|
-
post_install_message:
|
225
|
+
metadata: {}
|
246
226
|
rdoc_options: []
|
247
227
|
require_paths:
|
248
228
|
- lib
|
@@ -257,8 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
237
|
- !ruby/object:Gem::Version
|
258
238
|
version: '0'
|
259
239
|
requirements: []
|
260
|
-
rubygems_version: 3.
|
261
|
-
signing_key:
|
240
|
+
rubygems_version: 3.6.2
|
262
241
|
specification_version: 4
|
263
242
|
summary: A client to connect to the central kata server.
|
264
243
|
test_files: []
|
data/lib/tdl/previous_version.rb
DELETED
data/lib/tdl/util.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
module TDL
|
2
|
-
module Util
|
3
|
-
def self.compress_text(text)
|
4
|
-
# DEBT compress text should not add quotes
|
5
|
-
top_line, *remaing_content = text.split("\n")
|
6
|
-
lines_remaining = remaing_content.size
|
7
|
-
|
8
|
-
if lines_remaining > 1
|
9
|
-
"\"#{top_line} .. ( #{lines_remaining} more lines )\""
|
10
|
-
elsif lines_remaining == 1
|
11
|
-
"\"#{top_line} .. ( 1 more line )\""
|
12
|
-
else
|
13
|
-
"\"#{top_line}\""
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.compress_data(data)
|
18
|
-
if data.respond_to?(:split)
|
19
|
-
"#{TDL::Util.compress_text(data)}"
|
20
|
-
else
|
21
|
-
"#{data}"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/release.sh
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
SCRIPT_FOLDER="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
4
|
-
VERSION_FILE="${SCRIPT_FOLDER}/lib/tdl/previous_version.rb"
|
5
|
-
TMP_VERSION_FILE="${SCRIPT_FOLDER}/out/versions.txt"
|
6
|
-
|
7
|
-
|
8
|
-
function gemspec_property() {
|
9
|
-
local property=$1
|
10
|
-
cat ${TMP_VERSION_FILE} | grep ${property} | cut -d "=" -f2 | tr -d " "
|
11
|
-
}
|
12
|
-
|
13
|
-
echo "Reading gemspec properties. This might take some time."
|
14
|
-
|
15
|
-
# Previous
|
16
|
-
ruby <<-EOS | tee ${TMP_VERSION_FILE}
|
17
|
-
require "rubygems"
|
18
|
-
spec = Gem::Specification::load("tdl-client-ruby.gemspec")
|
19
|
-
puts "PREVIOUS_VERSION = #{spec.metadata['previous_version']}"
|
20
|
-
puts "CURRENT_VERSION = #{spec.version}"
|
21
|
-
EOS
|
22
|
-
PREVIOUS_VERSION=`gemspec_property PREVIOUS_VERSION`
|
23
|
-
CURRENT_VERSION=`gemspec_property CURRENT_VERSION`
|
24
|
-
|
25
|
-
|
26
|
-
# Prompt for version confirmation
|
27
|
-
read -p "Going to release version ${CURRENT_VERSION} (previous ${PREVIOUS_VERSION}). Proceed ? [y/n] "
|
28
|
-
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
29
|
-
then
|
30
|
-
echo "Aborting."
|
31
|
-
exit
|
32
|
-
fi
|
33
|
-
|
34
|
-
# Release current version
|
35
|
-
git tag -a "v${CURRENT_VERSION}" -m "Release ${CURRENT_VERSION}"
|
36
|
-
git push origin "v${CURRENT_VERSION}"
|
37
|
-
echo "Pushed tag to Git origin. It will now trigger the deployment pipeline."
|
38
|
-
|
39
|
-
cat > "${VERSION_FILE}" <<-EOF
|
40
|
-
module TDL
|
41
|
-
PREVIOUS_VERSION = '$CURRENT_VERSION'
|
42
|
-
# the current MAJOR.MINOR version is dynamically computed from the version of the Spec
|
43
|
-
end
|
44
|
-
EOF
|
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
set -e
|
4
|
-
set -u
|
5
|
-
set -o pipefail
|
6
|
-
|
7
|
-
startWiremocks() {
|
8
|
-
echo "~~~~~~~~~~ Starting Wiremocks on ports 41375 and 8222 ~~~~~~~~~"
|
9
|
-
python wiremock/wiremock-wrapper.py start 41375
|
10
|
-
python wiremock/wiremock-wrapper.py start 8222
|
11
|
-
}
|
12
|
-
|
13
|
-
startBroker() {
|
14
|
-
echo "~~~~~~~~~~ Starting Broker ~~~~~~~~~"
|
15
|
-
python broker/activemq-wrapper.py start
|
16
|
-
}
|
17
|
-
|
18
|
-
startWiremocks
|
19
|
-
startBroker
|
data/stopExternalDependencies.sh
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
set -e
|
4
|
-
set -u
|
5
|
-
set -o pipefail
|
6
|
-
|
7
|
-
stopProcessAtPort() {
|
8
|
-
PORT=$1
|
9
|
-
PID=$(netstat -tulpn | grep :${PORT} | awk '{print $7}' | tr -d "/java" || true)
|
10
|
-
if [[ -z "${PID}" ]]; then
|
11
|
-
echo "~~~~~~~~~~ Process on port ${PORT} stopped ~~~~~~~~~"
|
12
|
-
else
|
13
|
-
kill -9 ${PID}
|
14
|
-
echo "~~~~~~~~~~ Process on port ${PORT} killed ~~~~~~~~~"
|
15
|
-
fi
|
16
|
-
}
|
17
|
-
|
18
|
-
stopWiremocks() {
|
19
|
-
echo "~~~~~~~~~~ Stopping Wiremocks listening on ports 41375 and 8222 ~~~~~~~~~"
|
20
|
-
python wiremock/wiremock-wrapper.py stop || true
|
21
|
-
|
22
|
-
stopProcessAtPort 41375
|
23
|
-
stopProcessAtPort 8222
|
24
|
-
}
|
25
|
-
|
26
|
-
stopBroker() {
|
27
|
-
echo "~~~~~~~~~~ Stoping Broker ~~~~~~~~~"
|
28
|
-
python broker/activemq-wrapper.py stop || true
|
29
|
-
}
|
30
|
-
|
31
|
-
stopWiremocks
|
32
|
-
stopBroker
|