queueit_knownuserv3 3.6.1 → 3.7.1

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.
@@ -1,192 +1,192 @@
1
- require 'openssl'
2
- require 'base64'
3
- require 'date'
4
-
5
- module QueueIt
6
- class UserInQueueStateCookieRepository
7
- QUEUEIT_DATA_KEY = "QueueITAccepted-SDFrts345E-V3"
8
-
9
- def initialize(cookieManager)
10
- @cookieManager = cookieManager
11
- end
12
-
13
- def cancelQueueCookie(eventId, cookieDomain)
14
- cookieKey = self.class.getCookieKey(eventId)
15
- @cookieManager.setCookie(cookieKey, nil, -1, cookieDomain)
16
- end
17
-
18
- def store(eventId, queueId, fixedCookieValidityMinutes, cookieDomain, redirectType, secretKey)
19
- cookieKey = self.class.getCookieKey(eventId)
20
- cookieValue = createCookieValue(eventId, queueId, Utils.toString(fixedCookieValidityMinutes), redirectType, secretKey)
21
- @cookieManager.setCookie(cookieKey, cookieValue, Time.now + (24*60*60), cookieDomain)
22
- end
23
-
24
- def self.getCookieKey(eventId)
25
- return QUEUEIT_DATA_KEY + '_' + eventId
26
- end
27
-
28
- def createCookieValue(eventId, queueId, fixedCookieValidityMinutes, redirectType, secretKey)
29
- issueTime = Time.now.getutc.tv_sec.to_s
30
- hashValue = generateHash(eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey)
31
-
32
- fixedCookieValidityMinutesPart = ""
33
- if(!Utils.isNilOrEmpty(fixedCookieValidityMinutes))
34
- fixedCookieValidityMinutesPart = "&FixedValidityMins=" + fixedCookieValidityMinutes
35
- end
36
-
37
- cookieValue = "EventId=" + eventId + "&QueueId=" + queueId + fixedCookieValidityMinutesPart + "&RedirectType=" + redirectType + "&IssueTime=" + issueTime + "&Hash=" + hashValue
38
- return cookieValue
39
- end
40
-
41
- def getCookieNameValueMap(cookieValue)
42
- result = Hash.new
43
- cookieNameValues = cookieValue.split("&")
44
- cookieNameValues.each do |item|
45
- arr = item.split("=")
46
- if(arr.length == 2)
47
- result[arr[0]] = arr[1]
48
- end
49
- end
50
- return result
51
- end
52
-
53
- def generateHash(eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey)
54
- OpenSSL::HMAC.hexdigest('sha256', secretKey, eventId + queueId + fixedCookieValidityMinutes + redirectType + issueTime)
55
- end
56
-
57
- def isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, validateTime)
58
- begin
59
- if (!cookieNameValueMap.key?("EventId"))
60
- return false
61
- end
62
-
63
- if (!cookieNameValueMap.key?("QueueId"))
64
- return false
65
- end
66
-
67
- if (!cookieNameValueMap.key?("RedirectType"))
68
- return false
69
- end
70
-
71
- if (!cookieNameValueMap.key?("IssueTime"))
72
- return false
73
- end
74
-
75
- if (!cookieNameValueMap.key?("Hash"))
76
- return false
77
- end
78
-
79
- fixedCookieValidityMinutes = ""
80
- if (cookieNameValueMap.key?("FixedValidityMins"))
81
- fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"]
82
- end
83
-
84
- hashValue = generateHash(
85
- cookieNameValueMap["EventId"],
86
- cookieNameValueMap["QueueId"],
87
- fixedCookieValidityMinutes,
88
- cookieNameValueMap["RedirectType"],
89
- cookieNameValueMap["IssueTime"],
90
- secretKey)
91
-
92
- if (hashValue != cookieNameValueMap["Hash"])
93
- return false
94
- end
95
-
96
- if (eventId.upcase != cookieNameValueMap["EventId"].upcase)
97
- return false
98
- end
99
-
100
- if(validateTime)
101
- validity = cookieValidityMinutes
102
- if(!Utils.isNilOrEmpty(fixedCookieValidityMinutes))
103
- validity = fixedCookieValidityMinutes.to_i
104
- end
105
-
106
- expirationTime = cookieNameValueMap["IssueTime"].to_i + (validity*60)
107
- if(expirationTime < Time.now.getutc.tv_sec)
108
- return false
109
- end
110
- end
111
-
112
- return true
113
- rescue
114
- return false
115
- end
116
- end
117
-
118
- def reissueQueueCookie(eventId, cookieValidityMinutes, cookieDomain, secretKey)
119
- cookieKey = self.class.getCookieKey(eventId)
120
- cookieValue = @cookieManager.getCookie(cookieKey)
121
- if (cookieValue.nil?)
122
- return
123
- end
124
-
125
- cookieNameValueMap = getCookieNameValueMap(cookieValue)
126
- if (!isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, true))
127
- return
128
- end
129
-
130
- fixedCookieValidityMinutes = ""
131
- if (cookieNameValueMap.key?("FixedValidityMins"))
132
- fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"]
133
- end
134
-
135
- cookieValue = createCookieValue(
136
- eventId,
137
- cookieNameValueMap["QueueId"],
138
- fixedCookieValidityMinutes,
139
- cookieNameValueMap["RedirectType"],
140
- secretKey)
141
-
142
- @cookieManager.setCookie(cookieKey, cookieValue, Time.now + (24*60*60), cookieDomain)
143
- end
144
-
145
- def getState(eventId, cookieValidityMinutes, secretKey, validateTime)
146
- begin
147
- cookieKey = self.class.getCookieKey(eventId)
148
- if (@cookieManager.getCookie(cookieKey).nil?)
149
- return StateInfo.new(false, false, nil, nil, nil)
150
- end
151
- cookieNameValueMap = getCookieNameValueMap(@cookieManager.getCookie(cookieKey))
152
- if (!isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, validateTime))
153
- return StateInfo.new(true, false, nil, nil, nil)
154
- end
155
-
156
- fixedCookieValidityMinutes = nil
157
- if (cookieNameValueMap.key?("FixedValidityMins"))
158
- fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"].to_i
159
- end
160
-
161
- return StateInfo.new(
162
- true,
163
- true,
164
- cookieNameValueMap["QueueId"],
165
- fixedCookieValidityMinutes,
166
- cookieNameValueMap["RedirectType"])
167
- rescue
168
- return StateInfo.new(true, false, nil, nil, nil)
169
- end
170
- end
171
- end
172
-
173
- class StateInfo
174
- attr_reader :isFound
175
- attr_reader :isValid
176
- attr_reader :queueId
177
- attr_reader :fixedCookieValidityMinutes
178
- attr_reader :redirectType
179
-
180
- def initialize(isFound, isValid, queueId, fixedCookieValidityMinutes, redirectType)
181
- @isFound = isFound
182
- @isValid = isValid
183
- @queueId = queueId
184
- @fixedCookieValidityMinutes = fixedCookieValidityMinutes
185
- @redirectType = redirectType
186
- end
187
-
188
- def isStateExtendable
189
- return @isValid && @fixedCookieValidityMinutes.nil?
190
- end
191
- end
1
+ require 'openssl'
2
+ require 'base64'
3
+ require 'date'
4
+
5
+ module QueueIt
6
+ class UserInQueueStateCookieRepository
7
+ QUEUEIT_DATA_KEY = "QueueITAccepted-SDFrts345E-V3"
8
+
9
+ def initialize(cookieManager)
10
+ @cookieManager = cookieManager
11
+ end
12
+
13
+ def cancelQueueCookie(eventId, cookieDomain, isCookieHttpOnly, isCookieSecure)
14
+ cookieKey = self.class.getCookieKey(eventId)
15
+ @cookieManager.setCookie(cookieKey, nil, -1, cookieDomain, isCookieHttpOnly, isCookieSecure)
16
+ end
17
+
18
+ def store(eventId, queueId, fixedCookieValidityMinutes, cookieDomain, isCookieHttpOnly, isCookieSecure, redirectType, secretKey)
19
+ cookieKey = self.class.getCookieKey(eventId)
20
+ cookieValue = createCookieValue(eventId, queueId, Utils.toString(fixedCookieValidityMinutes), redirectType, secretKey)
21
+ @cookieManager.setCookie(cookieKey, cookieValue, Time.now + (24*60*60), cookieDomain, isCookieHttpOnly, isCookieSecure)
22
+ end
23
+
24
+ def self.getCookieKey(eventId)
25
+ return QUEUEIT_DATA_KEY + '_' + eventId
26
+ end
27
+
28
+ def createCookieValue(eventId, queueId, fixedCookieValidityMinutes, redirectType, secretKey)
29
+ issueTime = Time.now.getutc.tv_sec.to_s
30
+ hashValue = generateHash(eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey)
31
+
32
+ fixedCookieValidityMinutesPart = ""
33
+ if(!Utils.isNilOrEmpty(fixedCookieValidityMinutes))
34
+ fixedCookieValidityMinutesPart = "&FixedValidityMins=" + fixedCookieValidityMinutes
35
+ end
36
+
37
+ cookieValue = "EventId=" + eventId + "&QueueId=" + queueId + fixedCookieValidityMinutesPart + "&RedirectType=" + redirectType + "&IssueTime=" + issueTime + "&Hash=" + hashValue
38
+ return cookieValue
39
+ end
40
+
41
+ def getCookieNameValueMap(cookieValue)
42
+ result = Hash.new
43
+ cookieNameValues = cookieValue.split("&")
44
+ cookieNameValues.each do |item|
45
+ arr = item.split("=")
46
+ if(arr.length == 2)
47
+ result[arr[0]] = arr[1]
48
+ end
49
+ end
50
+ return result
51
+ end
52
+
53
+ def generateHash(eventId, queueId, fixedCookieValidityMinutes, redirectType, issueTime, secretKey)
54
+ OpenSSL::HMAC.hexdigest('sha256', secretKey, eventId + queueId + fixedCookieValidityMinutes + redirectType + issueTime)
55
+ end
56
+
57
+ def isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, validateTime)
58
+ begin
59
+ if (!cookieNameValueMap.key?("EventId"))
60
+ return false
61
+ end
62
+
63
+ if (!cookieNameValueMap.key?("QueueId"))
64
+ return false
65
+ end
66
+
67
+ if (!cookieNameValueMap.key?("RedirectType"))
68
+ return false
69
+ end
70
+
71
+ if (!cookieNameValueMap.key?("IssueTime"))
72
+ return false
73
+ end
74
+
75
+ if (!cookieNameValueMap.key?("Hash"))
76
+ return false
77
+ end
78
+
79
+ fixedCookieValidityMinutes = ""
80
+ if (cookieNameValueMap.key?("FixedValidityMins"))
81
+ fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"]
82
+ end
83
+
84
+ hashValue = generateHash(
85
+ cookieNameValueMap["EventId"],
86
+ cookieNameValueMap["QueueId"],
87
+ fixedCookieValidityMinutes,
88
+ cookieNameValueMap["RedirectType"],
89
+ cookieNameValueMap["IssueTime"],
90
+ secretKey)
91
+
92
+ if (hashValue != cookieNameValueMap["Hash"])
93
+ return false
94
+ end
95
+
96
+ if (eventId.upcase != cookieNameValueMap["EventId"].upcase)
97
+ return false
98
+ end
99
+
100
+ if(validateTime)
101
+ validity = cookieValidityMinutes
102
+ if(!Utils.isNilOrEmpty(fixedCookieValidityMinutes))
103
+ validity = fixedCookieValidityMinutes.to_i
104
+ end
105
+
106
+ expirationTime = cookieNameValueMap["IssueTime"].to_i + (validity*60)
107
+ if(expirationTime < Time.now.getutc.tv_sec)
108
+ return false
109
+ end
110
+ end
111
+
112
+ return true
113
+ rescue
114
+ return false
115
+ end
116
+ end
117
+
118
+ def reissueQueueCookie(eventId, cookieValidityMinutes, cookieDomain, isCookieHttpOnly, isCookieSecure, secretKey)
119
+ cookieKey = self.class.getCookieKey(eventId)
120
+ cookieValue = @cookieManager.getCookie(cookieKey)
121
+ if (cookieValue.nil?)
122
+ return
123
+ end
124
+
125
+ cookieNameValueMap = getCookieNameValueMap(cookieValue)
126
+ if (!isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, true))
127
+ return
128
+ end
129
+
130
+ fixedCookieValidityMinutes = ""
131
+ if (cookieNameValueMap.key?("FixedValidityMins"))
132
+ fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"]
133
+ end
134
+
135
+ cookieValue = createCookieValue(
136
+ eventId,
137
+ cookieNameValueMap["QueueId"],
138
+ fixedCookieValidityMinutes,
139
+ cookieNameValueMap["RedirectType"],
140
+ secretKey)
141
+
142
+ @cookieManager.setCookie(cookieKey, cookieValue, Time.now + (24*60*60), cookieDomain, isCookieHttpOnly, isCookieSecure)
143
+ end
144
+
145
+ def getState(eventId, cookieValidityMinutes, secretKey, validateTime)
146
+ begin
147
+ cookieKey = self.class.getCookieKey(eventId)
148
+ if (@cookieManager.getCookie(cookieKey).nil?)
149
+ return StateInfo.new(false, false, nil, nil, nil)
150
+ end
151
+ cookieNameValueMap = getCookieNameValueMap(@cookieManager.getCookie(cookieKey))
152
+ if (!isCookieValid(secretKey, cookieNameValueMap, eventId, cookieValidityMinutes, validateTime))
153
+ return StateInfo.new(true, false, nil, nil, nil)
154
+ end
155
+
156
+ fixedCookieValidityMinutes = nil
157
+ if (cookieNameValueMap.key?("FixedValidityMins"))
158
+ fixedCookieValidityMinutes = cookieNameValueMap["FixedValidityMins"].to_i
159
+ end
160
+
161
+ return StateInfo.new(
162
+ true,
163
+ true,
164
+ cookieNameValueMap["QueueId"],
165
+ fixedCookieValidityMinutes,
166
+ cookieNameValueMap["RedirectType"])
167
+ rescue
168
+ return StateInfo.new(true, false, nil, nil, nil)
169
+ end
170
+ end
171
+ end
172
+
173
+ class StateInfo
174
+ attr_reader :isFound
175
+ attr_reader :isValid
176
+ attr_reader :queueId
177
+ attr_reader :fixedCookieValidityMinutes
178
+ attr_reader :redirectType
179
+
180
+ def initialize(isFound, isValid, queueId, fixedCookieValidityMinutes, redirectType)
181
+ @isFound = isFound
182
+ @isValid = isValid
183
+ @queueId = queueId
184
+ @fixedCookieValidityMinutes = fixedCookieValidityMinutes
185
+ @redirectType = redirectType
186
+ end
187
+
188
+ def isStateExtendable
189
+ return @isValid && @fixedCookieValidityMinutes.nil?
190
+ end
191
+ end
192
192
  end
@@ -1,10 +1,11 @@
1
- require_relative "queueit_knownuserv3/known_user"
2
- require_relative "queueit_knownuserv3/models"
3
- require_relative "queueit_knownuserv3/connector_diagnostics"
4
- require_relative "queueit_knownuserv3/queue_url_params"
5
- require_relative "queueit_knownuserv3/user_in_queue_state_cookie_repository"
6
- require_relative "queueit_knownuserv3/user_in_queue_service"
7
- require_relative "queueit_knownuserv3/integration_config_helpers"
8
-
9
- module QueueIt
10
- end
1
+ require_relative "queueit_knownuserv3/httpcontext_provider"
2
+ require_relative "queueit_knownuserv3/known_user"
3
+ require_relative "queueit_knownuserv3/models"
4
+ require_relative "queueit_knownuserv3/connector_diagnostics"
5
+ require_relative "queueit_knownuserv3/queue_url_params"
6
+ require_relative "queueit_knownuserv3/user_in_queue_state_cookie_repository"
7
+ require_relative "queueit_knownuserv3/user_in_queue_service"
8
+ require_relative "queueit_knownuserv3/integration_config_helpers"
9
+
10
+ module QueueIt
11
+ end
@@ -1,28 +1,28 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'queueit_knownuserv3/user_in_queue_service'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "queueit_knownuserv3"
8
- spec.version = QueueIt::UserInQueueService::SDK_VERSION_NO
9
- spec.authors = ["Queue-it"]
10
- spec.email = ["support@queue-it.com"]
11
- spec.licenses = "LGPL-3.0"
12
- spec.summary = %q{ Gem for implementing Queue-it KnownUser V3}
13
- spec.homepage = "https://www.queue-it.com/"
14
-
15
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
- # delete this section to allow pushing this gem to any host.
17
-
18
- # if spec.respond_to?(:metadata)
19
- # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
20
- # else
21
- # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
- # end
23
-
24
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.require_paths = ["lib"]
28
- end
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'queueit_knownuserv3/user_in_queue_service'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "queueit_knownuserv3"
8
+ spec.version = QueueIt::UserInQueueService::SDK_VERSION_NO
9
+ spec.authors = ["Queue-it"]
10
+ spec.email = ["support@queue-it.com"]
11
+ spec.licenses = "LGPL-3.0"
12
+ spec.summary = %q{ Gem for implementing Queue-it KnownUser V3}
13
+ spec.homepage = "https://www.queue-it.com/"
14
+
15
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
+ # delete this section to allow pushing this gem to any host.
17
+
18
+ # if spec.respond_to?(:metadata)
19
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
20
+ # else
21
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ # end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+ end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queueit_knownuserv3
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
5
- prerelease:
4
+ version: 3.7.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Queue-it
9
8
  autorequire:
10
9
  bindir: exe
11
10
  cert_chain: []
12
- date: 2020-06-12 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description:
15
14
  email:
@@ -18,48 +17,43 @@ executables: []
18
17
  extensions: []
19
18
  extra_rdoc_files: []
20
19
  files:
21
- - .devcontainer/Dockerfile
22
- - .devcontainer/devcontainer.json
23
- - .gitignore
24
- - .vscode/launch.json
25
20
  - Gemfile
21
+ - LICENSE
22
+ - README.md
26
23
  - Rakefile
27
24
  - bin/console
28
25
  - bin/setup
29
- - ci-build.yml
30
26
  - lib/queueit_knownuserv3.rb
31
27
  - lib/queueit_knownuserv3/connector_diagnostics.rb
28
+ - lib/queueit_knownuserv3/httpcontext_provider.rb
32
29
  - lib/queueit_knownuserv3/integration_config_helpers.rb
33
30
  - lib/queueit_knownuserv3/known_user.rb
34
31
  - lib/queueit_knownuserv3/models.rb
35
32
  - lib/queueit_knownuserv3/queue_url_params.rb
36
33
  - lib/queueit_knownuserv3/user_in_queue_service.rb
37
34
  - lib/queueit_knownuserv3/user_in_queue_state_cookie_repository.rb
38
- - license.txt
39
35
  - queueit_knownuserv3.gemspec
40
36
  homepage: https://www.queue-it.com/
41
37
  licenses:
42
38
  - LGPL-3.0
39
+ metadata: {}
43
40
  post_install_message:
44
41
  rdoc_options: []
45
42
  require_paths:
46
43
  - lib
47
44
  required_ruby_version: !ruby/object:Gem::Requirement
48
- none: false
49
45
  requirements:
50
- - - ! '>='
46
+ - - ">="
51
47
  - !ruby/object:Gem::Version
52
48
  version: '0'
53
49
  required_rubygems_version: !ruby/object:Gem::Requirement
54
- none: false
55
50
  requirements:
56
- - - ! '>='
51
+ - - ">="
57
52
  - !ruby/object:Gem::Version
58
53
  version: '0'
59
54
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 1.8.23.2
55
+ rubygems_version: 3.0.8
62
56
  signing_key:
63
- specification_version: 3
57
+ specification_version: 4
64
58
  summary: Gem for implementing Queue-it KnownUser V3
65
59
  test_files: []
@@ -1,43 +0,0 @@
1
- #-------------------------------------------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4
- #-------------------------------------------------------------------------------------------------------------
5
-
6
- FROM ruby:1.9.3
7
-
8
- # Avoid warnings by switching to noninteractive
9
- ENV DEBIAN_FRONTEND=noninteractive
10
-
11
- # This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
12
- # this user's GID/UID must match your local user UID/GID to avoid permission issues
13
- # with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
14
- # https://aka.ms/vscode-remote/containers/non-root-user for details.
15
- ARG USERNAME=vscode
16
- ARG USER_UID=1000
17
- ARG USER_GID=$USER_UID
18
-
19
- # Configure apt and install packages
20
- RUN apt-get update \
21
- && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
22
- # Verify git, process tools installed
23
- && apt-get -y install git iproute2 procps lsb-release \
24
- #
25
- # Install ruby-debug-ide and ruby-debug-base19x
26
- #&& gem install ruby-debug-ide \
27
- #&& gem install ruby-debug-base19x \
28
- #
29
- # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
30
- && groupadd --gid $USER_GID $USERNAME \
31
- && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
32
- # [Optional] Add sudo support for the non-root user
33
- && apt-get install -y sudo \
34
- && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
35
- && chmod 0440 /etc/sudoers.d/$USERNAME \
36
- #
37
- # Clean up
38
- && apt-get autoremove -y \
39
- && apt-get clean -y \
40
- && rm -rf /var/lib/apt/lists/*
41
-
42
- # Switch back to dialog for any ad-hoc use of apt-get
43
- ENV DEBIAN_FRONTEND=
@@ -1,30 +0,0 @@
1
- // For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
2
- // https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ruby-2
3
- {
4
- "name": "Ruby",
5
- "dockerFile": "Dockerfile",
6
-
7
- // Use 'settings' to set *default* container specific settings.json values on container create.
8
- // You can edit these settings after create using File > Preferences > Settings > Remote.
9
- "settings": {
10
- "terminal.integrated.shell.linux": "/bin/bash"
11
- },
12
-
13
- "workspaceMount": "src=${localWorkspaceFolder},dst=/workspace,type=bind,consistency=delegated",
14
- "workspaceFolder": "/workspace",
15
- // Uncomment the next line if you want to publish any ports.
16
- // "appPort": [],
17
-
18
- // Uncomment the next line to run commands after the container is created.
19
- "postCreateCommand": "bundle install; gem install ruby-debug-ide -v 0.6.0; gem install ruby-debug-base19x",
20
-
21
- // Uncomment the next line to use a non-root user. On Linux, this will prevent
22
- // new files getting created as root, but you may need to update the USER_UID
23
- // and USER_GID in .devcontainer/Dockerfile to match your user if not 1000.
24
- // "runArgs": [ "-u", "vscode" ],
25
-
26
- // Add the IDs of extensions you want installed when the container is created in the array below.
27
- "extensions": [
28
- "rebornix.Ruby"
29
- ]
30
- }
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- ################################################################################
2
- # This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3
- ################################################################################
4
-
5
- /.vs
data/.vscode/launch.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "Debug",
9
- "type": "Ruby",
10
- "request": "launch",
11
- "program": "${workspaceRoot}/test/test_queueit_knownuserv3.rb",
12
- "cwd": "${workspaceRoot}"
13
- }
14
- ]
15
- }
data/ci-build.yml DELETED
@@ -1,17 +0,0 @@
1
- # Starter pipeline
2
- # Start with a minimal pipeline that you can customize to build and deploy your code.
3
- # Add steps that build, run tests, deploy, and more:
4
- # https://aka.ms/yaml
5
-
6
- trigger:
7
- - master
8
-
9
- pool:
10
- name: 'Default'
11
-
12
- steps:
13
- - task: Docker@2
14
- inputs:
15
- command: 'buildAndPush'
16
- Dockerfile: '**/test/Dockerfile'
17
- buildContext: './'