oxidized-web 0.13.1 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of oxidized-web might be problematic. Click here for more details.

Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +12 -0
  3. data/.github/dependabot.yml +25 -0
  4. data/.github/workflows/codeql.yml +76 -0
  5. data/.github/workflows/ruby.yml +41 -0
  6. data/.github/workflows/stale.yml +20 -0
  7. data/.gitignore +3 -0
  8. data/.rubocop.yml +38 -3
  9. data/.rubocop_todo.yml +27 -211
  10. data/CHANGELOG.md +46 -0
  11. data/README.md +8 -5
  12. data/Rakefile +49 -5
  13. data/docs/development.md +182 -0
  14. data/lib/oxidized/web/public/css/oxidized.css +59 -0
  15. data/lib/oxidized/web/public/scripts/oxidized.js +1 -48
  16. data/lib/oxidized/web/public/weblibs/bootstrap-icons.css +2078 -0
  17. data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js +6314 -0
  18. data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js.map +1 -0
  19. data/lib/oxidized/web/public/weblibs/bootstrap.css +12057 -0
  20. data/lib/oxidized/web/public/weblibs/bootstrap.css.map +1 -0
  21. data/lib/oxidized/web/public/weblibs/bootstrap.js +4494 -0
  22. data/lib/oxidized/web/public/weblibs/bootstrap.js.map +1 -0
  23. data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.css +395 -0
  24. data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.js +114 -0
  25. data/lib/oxidized/web/public/weblibs/buttons.colVis.js +256 -0
  26. data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.css +517 -0
  27. data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.js +122 -0
  28. data/lib/oxidized/web/public/weblibs/dataTables.buttons.js +2936 -0
  29. data/lib/oxidized/web/public/weblibs/dataTables.js +13843 -0
  30. data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff +0 -0
  31. data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff2 +0 -0
  32. data/lib/oxidized/web/public/weblibs/jquery.js +10716 -0
  33. data/lib/oxidized/web/version.rb +7 -0
  34. data/lib/oxidized/web/views/conf_search.haml +14 -13
  35. data/lib/oxidized/web/views/diffs.haml +5 -5
  36. data/lib/oxidized/web/views/footer.haml +5 -4
  37. data/lib/oxidized/web/views/head.haml +21 -7
  38. data/lib/oxidized/web/views/layout.haml +25 -34
  39. data/lib/oxidized/web/views/node.haml +10 -8
  40. data/lib/oxidized/web/views/nodes.haml +45 -35
  41. data/lib/oxidized/web/views/stats.haml +32 -24
  42. data/lib/oxidized/web/views/version.haml +8 -6
  43. data/lib/oxidized/web/views/versions.haml +23 -24
  44. data/lib/oxidized/web/webapp.rb +117 -113
  45. data/lib/oxidized/web.rb +10 -7
  46. data/oxidized-web.gemspec +32 -18
  47. data/package-lock.json +104 -0
  48. data/package.json +21 -0
  49. data/spec/node_spec.rb +99 -0
  50. data/spec/node_version_spec.rb +102 -0
  51. data/spec/nodes_spec.rb +57 -0
  52. data/spec/root_spec.rb +18 -0
  53. data/spec/spec_helper.rb +11 -0
  54. data/spec/webapp_spec.rb +28 -0
  55. metadata +183 -74
  56. data/lib/oxidized/web/mig.rb +0 -150
  57. data/lib/oxidized/web/public/css/bootstrap.min.css +0 -5
  58. data/lib/oxidized/web/public/css/buttons.bootstrap.min.css +0 -1
  59. data/lib/oxidized/web/public/css/dataTables.bootstrap.css +0 -299
  60. data/lib/oxidized/web/public/css/dataTables.colVis.css +0 -171
  61. data/lib/oxidized/web/public/css/oxidized_custom.css +0 -19
  62. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.eot +0 -0
  63. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.svg +0 -229
  64. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  65. data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.woff +0 -0
  66. data/lib/oxidized/web/public/images/diff_15x17.png +0 -0
  67. data/lib/oxidized/web/public/images/sort_asc.png +0 -0
  68. data/lib/oxidized/web/public/images/sort_asc_disabled.png +0 -0
  69. data/lib/oxidized/web/public/images/sort_both.png +0 -0
  70. data/lib/oxidized/web/public/images/sort_desc.png +0 -0
  71. data/lib/oxidized/web/public/images/sort_desc_disabled.png +0 -0
  72. data/lib/oxidized/web/public/images/versioning_18px.png +0 -0
  73. data/lib/oxidized/web/public/scripts/bootstrap.min.js +0 -6
  74. data/lib/oxidized/web/public/scripts/dataTables.bootstrap.js +0 -186
  75. data/lib/oxidized/web/public/scripts/dataTables.colVis.js +0 -1123
  76. data/lib/oxidized/web/public/scripts/jquery-2.1.1.min.js +0 -4
  77. data/lib/oxidized/web/public/scripts/jquery.dataTables.min.js +0 -157
  78. data/lib/oxidized/web/public/scripts/jquery.min.js +0 -6
  79. data/lib/oxidized/web/public/scripts/script-migration.js +0 -15
  80. data/lib/oxidized/web/views/migration.haml +0 -46
  81. data/lib/oxidized/web/views/sass/oxidized.sass +0 -113
@@ -2,33 +2,49 @@ require 'sinatra/base'
2
2
  require 'sinatra/json'
3
3
  require 'sinatra/url_for'
4
4
  require 'tilt/haml'
5
- require 'sass'
5
+ # We need PP in node.haml, but rubocop can't see this
6
+ # rubocop:disable Lint/RedundantRequireStatement
6
7
  require 'pp'
7
- require 'oxidized/web/mig'
8
+ # rubocop:enable Lint/RedundantRequireStatement
8
9
  require 'htmlentities'
9
10
  require 'charlock_holmes'
10
11
  module Oxidized
11
12
  module API
13
+ require 'oxidized/web/version'
14
+
12
15
  class WebApp < Sinatra::Base
13
16
  helpers Sinatra::UrlForHelper
14
- set :public_folder, Proc.new { File.join(root, 'public') }
17
+ set :public_folder, proc { File.join(root, 'public') }
18
+ set :haml, { escape_html: false }
15
19
 
16
20
  get '/' do
17
21
  redirect url_for('/nodes')
18
22
  end
19
23
 
20
- get '/nodes/:filter/:value.?:format?' do
24
+ get '/favicon.ico' do
25
+ redirect url_for('/images/favicon.ico')
26
+ end
27
+
28
+ # :filter can be "group" or "model"
29
+ # URL: /nodes/group/<GroupName>[.json]
30
+ # URL: /nodes/model/<ModelName>[.json]
31
+ # an optional .json extention returns the data as JSON
32
+ #
33
+ # as GroupName can include /, we use splat to match its value
34
+ # and extract the optional ".json" with route_parse
35
+ get '/nodes/:filter/*' do
36
+ value, @json = route_parse params[:splat].first
21
37
  @data = nodes.list.select do |node|
22
- if node[params[:filter].to_sym] == params[:value]
23
- node[:status] = 'never'
24
- node[:time] = 'never'
25
- node[:group] = 'default' unless node[:group]
26
- if node[:last]
27
- node[:status] = node[:last][:status]
28
- node[:time] = node[:last][:end]
29
- end
30
- node
38
+ next unless node[params[:filter].to_sym] == value
39
+
40
+ node[:status] = 'never'
41
+ node[:time] = 'never'
42
+ node[:group] = 'default' unless node[:group]
43
+ if node[:last]
44
+ node[:status] = node[:last][:status]
45
+ node[:time] = node[:last][:end]
31
46
  end
47
+ node
32
48
  end
33
49
  out :nodes
34
50
  end
@@ -54,9 +70,7 @@ module Oxidized
54
70
  nodes_list.each do |n|
55
71
  node, @json = route_parse n[:name]
56
72
  config = nodes.fetch node, n[:group]
57
- if config[@to_research]
58
- @nodes_match.push({ node: n[:name], full_name: n[:full_name] })
59
- end
73
+ @nodes_match.push({ node: n[:name], full_name: n[:full_name] }) if config[@to_research]
60
74
  end
61
75
  @data = @nodes_match
62
76
  out :conf_search
@@ -71,40 +85,42 @@ module Oxidized
71
85
  end
72
86
 
73
87
  get '/reload.?:format?' do
74
- nodes.load
75
- @data = 'reloaded list of nodes'
88
+ node = params[:node]
89
+ node ? (nodes.load node) : nodes.load
90
+ @data = node ? "reloaded #{node}" : 'reloaded list of nodes'
76
91
  out
77
92
  end
78
93
 
79
- get '/node/fetch/:node' do
94
+ # URL: /node/fetch/<group>/<node>.json
95
+ # Gets the configuration of a node
96
+ # <group> is optional. If no group is given, nil will be passed to oxidized
97
+ # .json is optional. If given, will return the output in json format
98
+ get '/node/fetch/?*?/:node' do
99
+ node, @json = route_parse :node
100
+ group = params['splat'].first
101
+ group = nil if group.empty?
80
102
  begin
81
- node, @json = route_parse :node
82
- @data = nodes.fetch node, nil
83
- rescue NodeNotFound => error
84
- @data = error.message
103
+ @data = nodes.fetch node, group
104
+ rescue NodeNotFound => e
105
+ @data = e.message
85
106
  end
86
107
  out :text
87
108
  end
88
109
 
89
- get '/node/fetch/:group/:node' do
110
+ # URL: /node/fetch/<group>/<node>[.json]
111
+ # <group> is optional, and not used
112
+ # .json is optional. If given, will return 'ok'
113
+ # if not, it redirects to /nodes
114
+ get '/node/next/?*?/:node' do
90
115
  node, @json = route_parse :node
91
- @data = nodes.fetch node, params[:group]
92
- out :text
93
- end
94
-
95
- get '/node/next/?:group?/:node' do
96
- node, @json = route_parse :node
97
- begin
98
- nodes.next node
99
- rescue NodeNotFound
100
- end
116
+ nodes.next node
101
117
  redirect url_for('/nodes') unless @json
102
118
  @data = 'ok'
103
119
  out
104
120
  end
105
121
 
106
122
  # use this to attach author/email/message to commit
107
- put '/node/next/?:group?/:node' do
123
+ put '/node/next/?*?/:node' do
108
124
  node, @json = route_parse :node
109
125
  opt = JSON.load request.body.read
110
126
  nodes.next node, opt
@@ -119,44 +135,17 @@ module Oxidized
119
135
  out :node
120
136
  end
121
137
 
122
- # redirect to the web page for rancid - oxidized migration
123
- get '/migration' do
124
- out :migration
125
- end
126
-
127
- # get the files send
128
- post '/migration' do
129
- number = params[:number].to_i
130
- cloginrc_file = params['cloginrc'][:tempfile]
131
- path_new_file = params['path_new_file']
132
-
133
- router_db_files = Array.new
134
-
135
- i = 1
136
- while i <= number do
137
- router_db_files.push({ file: params["file#{i}"][:tempfile], group: params["group#{i}"] })
138
- i = i + 1
139
- end
140
-
141
- migration = Mig.new(router_db_files, cloginrc_file, path_new_file)
142
- migration.go_rancid_migration
143
- redirect url_for('//nodes')
144
- end
145
-
146
- get '/css/*.css' do
147
- sass "sass/#{params[:splat].first}".to_sym
148
- end
149
-
150
- # show the lists of versions for a node
138
+ # display the versions of a node
139
+ # URL: /node/version[.json]?node_full=<GroupName/NodeName>
151
140
  get '/node/version.?:format?' do
152
141
  @data = nil
153
142
  @group = nil
154
143
  @node = nil
155
144
  node_full = params[:node_full]
156
145
  if node_full.include? '/'
157
- node_full = node_full.split('/')
146
+ node_full = node_full.rpartition("/")
158
147
  @group = node_full[0]
159
- @node = node_full[1]
148
+ @node = node_full[2]
160
149
  @data = nodes.version @node, @group
161
150
  else
162
151
  @node = node_full
@@ -177,9 +166,12 @@ module Oxidized
177
166
  }
178
167
 
179
168
  the_data = nodes.get_version node, @info[:group], @info[:oid]
180
- detection = ::CharlockHolmes::EncodingDetector.detect(the_data)
181
- utf8_encoded_content = ::CharlockHolmes::Converter.convert the_data, detection[:encoding], 'UTF-8'
182
- @data = HTMLEntities.new.encode(utf8_encoded_content)
169
+ if %w[json text].include?(params[:format])
170
+ @data = the_data
171
+ else
172
+ utf8_encoded_content = convert_to_utf8(the_data)
173
+ @data = HTMLEntities.new.encode(utf8_encoded_content)
174
+ end
183
175
  out :version
184
176
  end
185
177
 
@@ -187,11 +179,9 @@ module Oxidized
187
179
  get '/node/version/diffs' do
188
180
  node, @json = route_parse :node
189
181
  @data = nil
190
- @info = {node: node, group: params[:group], oid: params[:oid], date: params[:date], num: params[:num], num2: (params[:num].to_i - 1)}
182
+ @info = { node: node, group: params[:group], oid: params[:oid], date: params[:date], num: params[:num], num2: (params[:num].to_i - 1) }
191
183
  group = nil
192
- if @info[:group] != ''
193
- group = @info[:group]
194
- end
184
+ group = @info[:group] if @info[:group] != ''
195
185
  @oids_dates = nodes.version node, group
196
186
  if params[:oid2]
197
187
  @info[:oid2] = params[:oid2]
@@ -199,18 +189,18 @@ module Oxidized
199
189
  num = @oids_dates.count + 1
200
190
  @oids_dates.each do |x|
201
191
  num -= 1
202
- if x[:oid].to_s == params[:oid2]
203
- oid2 = x[:oid]
204
- @info[:num2] = num
205
- break
206
- end
192
+ next unless x[:oid].to_s == params[:oid2]
193
+
194
+ oid2 = x[:oid]
195
+ @info[:num2] = num
196
+ break
207
197
  end
208
198
  @data = nodes.get_diff node, @info[:group], @info[:oid], oid2
209
199
  else
210
200
  @data = nodes.get_diff node, @info[:group], @info[:oid], nil
211
201
  end
212
- @stat = ['null', 'null']
213
- if @data != 'no diffs' && @data != nil
202
+ @stat = %w[null null]
203
+ if @data != 'no diffs' && !@data.nil?
214
204
  @stat = @data[:stat]
215
205
  @data = @data[:patch]
216
206
  else
@@ -225,16 +215,20 @@ module Oxidized
225
215
  redirect url_for("/node/version/diffs?node=#{params[:node]}&group=#{params[:group]}&oid=#{params[:oid]}&date=#{params[:date]}&num=#{params[:num]}&oid2=#{params[:oid2]}")
226
216
  end
227
217
 
218
+ # Taken von Haml 5.0, so it still works in 6.0
219
+ HTML_ESCAPE = { '&' => '&amp;', '<' => '&lt;', '>' => '&gt;', '"' => '&quot;', "'" => '&#39;' }.freeze
220
+ HTML_ESCAPE_ONCE_REGEX = /['"><]|&(?!(?:[a-zA-Z]+|#(?:\d+|[xX][0-9a-fA-F]+));)/
221
+
228
222
  private
229
223
 
230
- def out template = :text
231
- if @json or params[:format] == 'json'
224
+ def out(template = :text)
225
+ if @json || (params[:format] == 'json')
232
226
  if @data.is_a?(String)
233
227
  json @data.lines
234
228
  else
235
229
  json @data
236
230
  end
237
- elsif template == :text or params[:format] == 'text'
231
+ elsif (template == :text) || (params[:format] == 'text')
238
232
  content_type :text
239
233
  @data
240
234
  else
@@ -246,13 +240,16 @@ module Oxidized
246
240
  settings.nodes
247
241
  end
248
242
 
249
- def route_parse param
243
+ # checks if param ends with .json
244
+ # if so, returns param without ".json" and true
245
+ # if not, returns param and false
246
+ def route_parse(param)
250
247
  json = false
251
- if param.respond_to?(:to_str)
252
- e = param.split '.'
253
- else
254
- e = params[param].split '.'
255
- end
248
+ e = if param.respond_to?(:to_str)
249
+ param.split '.'
250
+ else
251
+ params[param].split '.'
252
+ end
256
253
  if e.last == 'json'
257
254
  e.pop
258
255
  json = true
@@ -261,40 +258,37 @@ module Oxidized
261
258
  end
262
259
 
263
260
  # give the time enlapsed between now and a date
264
- def time_from_now date
261
+ def time_from_now(date)
265
262
  if date
266
- # if the + is missing
267
- unless date.include? '+'
268
- date.insert(21, '+')
269
- end
263
+ # if the + or - is missing, insert +
264
+ date.insert(21, '+') unless date =~ /[-+]/
270
265
  date = DateTime.parse date
271
266
  now = DateTime.now.new_offset(0)
272
267
  t = ((now - date) * 24 * 60 * 60).to_i
273
268
  mm, ss = t.divmod(60)
274
269
  hh, mm = mm.divmod(60)
275
270
  dd, hh = hh.divmod(24)
276
- if dd.positive?
277
- date = "#{dd} days #{hh} hours ago"
278
- elsif hh.positive?
279
- date = "#{hh} hours #{mm} min ago"
280
- else
281
- date = "#{mm} min #{ss} sec ago"
282
- end
271
+ date = if dd.positive?
272
+ "#{dd} days #{hh} hours ago"
273
+ elsif hh.positive?
274
+ "#{hh} hours #{mm} min ago"
275
+ else
276
+ "#{mm} min #{ss} sec ago"
277
+ end
283
278
  end
284
279
  date
285
280
  end
286
281
 
287
282
  # method the give diffs in separate view (the old and the new) as in github
288
- def diff_view diff
283
+ def diff_view(diff)
289
284
  old_diff = []
290
285
  new_diff = []
291
286
 
292
- detection = ::CharlockHolmes::EncodingDetector.detect(diff)
293
- utf8_encoded_content = ::CharlockHolmes::Converter.convert diff, detection[:encoding], 'UTF-8'
287
+ utf8_encoded_content = convert_to_utf8(diff)
294
288
  HTMLEntities.new.encode(utf8_encoded_content).each_line do |line|
295
289
  if /^\+/.match(line)
296
290
  new_diff.push(line)
297
- elsif /^\-/.match(line)
291
+ elsif /^-/.match(line)
298
292
  old_diff.push(line)
299
293
  else
300
294
  new_diff.push(line)
@@ -304,20 +298,16 @@ module Oxidized
304
298
 
305
299
  length_o = old_diff.count
306
300
  length_n = new_diff.count
307
- for i in 0..[length_o, length_n].max
308
- if i > [length_o, length_n].min
309
- break
310
- end
301
+ (0..[length_o, length_n].max).each do |i|
302
+ break if i > [length_o, length_n].min
311
303
 
312
- if (/^\-.*/.match(old_diff[i])) && !(/^\+.*/.match(new_diff[i]))
304
+ if /^-.*/.match(old_diff[i]) && !/^\+.*/.match(new_diff[i])
313
305
  # tag removed latter to add color syntax
314
- insert = 'empty_line'
315
306
  # ugly way to avoid asymmetry if at display the line takes 2 line on the screen
316
307
  insert = "&nbsp;\n"
317
308
  new_diff.insert(i, insert)
318
309
  length_n += 1
319
- elsif !(/^\-.*/.match(old_diff[i])) && (/^\+.*/.match(new_diff[i]))
320
- insert = 'empty_line'
310
+ elsif !/^-.*/.match(old_diff[i]) && /^\+.*/.match(new_diff[i])
321
311
  insert = "&nbsp;\n"
322
312
  old_diff.insert(i, insert)
323
313
  length_o += 1
@@ -325,6 +315,20 @@ module Oxidized
325
315
  end
326
316
  { old_diff: old_diff, new_diff: new_diff }
327
317
  end
318
+
319
+ def escape_once(text)
320
+ text = text.to_s
321
+ text.gsub(HTML_ESCAPE_ONCE_REGEX, HTML_ESCAPE)
322
+ end
323
+
324
+ def convert_to_utf8(text)
325
+ detection = ::CharlockHolmes::EncodingDetector.detect(text)
326
+ if detection[:type] == :text
327
+ ::CharlockHolmes::Converter.convert text, detection[:encoding], 'UTF-8'
328
+ else
329
+ 'The text contains binary values - cannot display'
330
+ end
331
+ end
328
332
  end
329
333
  end
330
334
  end
data/lib/oxidized/web.rb CHANGED
@@ -3,18 +3,21 @@ require 'json'
3
3
  module Oxidized
4
4
  module API
5
5
  class Web
6
- require 'rack/handler'
6
+ require 'rack/handler/puma'
7
7
  attr_reader :thread
8
- Rack::Handler::WEBrick = Rack::Handler.get(:puma)
9
- def initialize nodes, listen
8
+
9
+ def initialize(nodes, listen)
10
10
  require 'oxidized/web/webapp'
11
11
  listen, uri = listen.split '/'
12
12
  addr, _, port = listen.rpartition ':'
13
- port, addr = addr, nil if not port
14
- uri = '/' + uri.to_s
13
+ unless port
14
+ port = addr
15
+ addr = nil
16
+ end
17
+ uri = "/#{uri}"
15
18
  @opts = {
16
19
  Host: addr,
17
- Port: port,
20
+ Port: port
18
21
  }
19
22
  WebApp.set :nodes, nodes
20
23
  @app = Rack::Builder.new do
@@ -26,7 +29,7 @@ module Oxidized
26
29
 
27
30
  def run
28
31
  @thread = Thread.new do
29
- Rack::Handler::Puma.run @app, @opts
32
+ Rack::Handler::Puma.run @app, **@opts
30
33
  exit!
31
34
  end
32
35
  end
data/oxidized-web.gemspec CHANGED
@@ -1,6 +1,10 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'oxidized/web/version'
4
+
1
5
  Gem::Specification.new do |s|
2
6
  s.name = 'oxidized-web'
3
- s.version = '0.13.1'
7
+ s.version = Oxidized::API::WEB_VERSION
4
8
  s.licenses = %w[Apache-2.0]
5
9
  s.platform = Gem::Platform::RUBY
6
10
  s.authors = ['Saku Ytti', 'Samer Abdel-Hafez']
@@ -8,26 +12,36 @@ Gem::Specification.new do |s|
8
12
  s.homepage = 'http://github.com/ytti/oxidized-web'
9
13
  s.summary = 'sinatra API + webUI for oxidized'
10
14
  s.description = 'puma+sinatra+haml webUI + REST API for oxidized'
11
- s.rubyforge_project = s.name
12
- s.files = %x(git ls-files).split("\n")
15
+ s.files = %x(git ls-files -z).split("\x0")
13
16
  s.executables = %w[]
14
17
  s.require_path = 'lib'
15
18
 
16
- s.required_ruby_version = '>= 2.3'
17
- s.add_runtime_dependency 'charlock_holmes', '~> 0.7.5'
18
- s.add_runtime_dependency 'emk-sinatra-url-for', '~> 0.2'
19
- s.add_runtime_dependency 'haml', '~> 5.0'
20
- s.add_runtime_dependency 'htmlentities', '~> 4.3'
21
- s.add_runtime_dependency 'oxidized', '~> 0.26'
22
- s.add_runtime_dependency 'puma', '~> 3.11.4'
23
- s.add_runtime_dependency 'sass', '~> 3.3'
24
- s.add_runtime_dependency 'sinatra', '~> 1.4', '>= 1.4.6'
25
- s.add_runtime_dependency 'sinatra-contrib', '~> 1.4', '>= 1.4.6'
26
- s.add_runtime_dependency 'json', '>= 1.7.0'
27
- s.add_runtime_dependency 'rack-test', '~> 0.7.0'
19
+ s.metadata['rubygems_mfa_required'] = 'true'
20
+
21
+ s.required_ruby_version = '>= 3.1'
22
+
23
+ s.add_dependency 'charlock_holmes', '~> 0.7.5'
24
+ s.add_dependency 'emk-sinatra-url-for', '~> 0.2'
25
+ s.add_dependency 'haml', '~> 6.0'
26
+ s.add_dependency 'htmlentities', '~> 4.3'
27
+ s.add_dependency 'json', '~> 2.3'
28
+ s.add_dependency 'ostruct', '~> 0.6'
29
+ s.add_dependency 'oxidized', '~> 0.31'
30
+ s.add_dependency 'puma', '>= 3.11.4'
31
+ s.add_dependency 'sinatra', '>= 1.4.6'
32
+ s.add_dependency 'sinatra-contrib', '>= 1.4.6'
28
33
 
29
- s.add_development_dependency 'bundler', '~> 2.0'
34
+ s.add_development_dependency 'bundler', '~> 2.2'
35
+ s.add_development_dependency 'minitest', '~> 5.18'
36
+ s.add_development_dependency 'mocha', '~> 2.1'
37
+ s.add_development_dependency 'rack-test', '~> 2.1'
30
38
  s.add_development_dependency 'rails_best_practices', '~> 1.19'
31
- s.add_development_dependency 'rake', '~> 10.0'
32
- s.add_development_dependency 'rubocop', '~> 0.65.0'
39
+ s.add_development_dependency 'rake', '~> 13.0'
40
+ s.add_development_dependency 'rubocop', '~> 1.72.1'
41
+ s.add_development_dependency 'rubocop-minitest', '~> 0.37.1'
42
+ s.add_development_dependency 'rubocop-rails', '~> 2.30.0'
43
+ s.add_development_dependency 'rubocop-rake', '~> 0.7.1'
44
+ s.add_development_dependency 'simplecov', '~> 0.22.0'
45
+ s.add_development_dependency 'simplecov-cobertura', '~> 2.1.0'
46
+ s.add_development_dependency 'simplecov-html', '~> 0.13.1'
33
47
  end
data/package-lock.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "oxidized-web",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "oxidized-web",
9
+ "version": "1.0.0",
10
+ "license": "Apache 2.0",
11
+ "dependencies": {
12
+ "bootstrap": "^5.3.3",
13
+ "bootstrap-icons": "^1.11.3",
14
+ "datatables.net-bs5": "^2.0.7",
15
+ "datatables.net-buttons-bs5": "^3.0.2",
16
+ "jquery": "^3.7.1"
17
+ }
18
+ },
19
+ "node_modules/@popperjs/core": {
20
+ "version": "2.11.8",
21
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
22
+ "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
23
+ "peer": true,
24
+ "funding": {
25
+ "type": "opencollective",
26
+ "url": "https://opencollective.com/popperjs"
27
+ }
28
+ },
29
+ "node_modules/bootstrap": {
30
+ "version": "5.3.3",
31
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
32
+ "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
33
+ "funding": [
34
+ {
35
+ "type": "github",
36
+ "url": "https://github.com/sponsors/twbs"
37
+ },
38
+ {
39
+ "type": "opencollective",
40
+ "url": "https://opencollective.com/bootstrap"
41
+ }
42
+ ],
43
+ "peerDependencies": {
44
+ "@popperjs/core": "^2.11.8"
45
+ }
46
+ },
47
+ "node_modules/bootstrap-icons": {
48
+ "version": "1.11.3",
49
+ "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.11.3.tgz",
50
+ "integrity": "sha512-+3lpHrCw/it2/7lBL15VR0HEumaBss0+f/Lb6ZvHISn1mlK83jjFpooTLsMWbIjJMDjDjOExMsTxnXSIT4k4ww==",
51
+ "funding": [
52
+ {
53
+ "type": "github",
54
+ "url": "https://github.com/sponsors/twbs"
55
+ },
56
+ {
57
+ "type": "opencollective",
58
+ "url": "https://opencollective.com/bootstrap"
59
+ }
60
+ ]
61
+ },
62
+ "node_modules/datatables.net": {
63
+ "version": "2.2.2",
64
+ "resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-2.2.2.tgz",
65
+ "integrity": "sha512-gfODIKE3gpgbVeZy2QGj2Dq9roO6hy00S+k1knklrqlMyAMrh1wt0Q6ryBUM7gU96U77ysbq8dYhxFdmcC/oPQ==",
66
+ "dependencies": {
67
+ "jquery": ">=1.7"
68
+ }
69
+ },
70
+ "node_modules/datatables.net-bs5": {
71
+ "version": "2.2.2",
72
+ "resolved": "https://registry.npmjs.org/datatables.net-bs5/-/datatables.net-bs5-2.2.2.tgz",
73
+ "integrity": "sha512-0mAbpUf0EpnIEc0RlN6vSrSk9y/+NuReiwDpjHYY3RfzdvH6Lt0+7Q9OU5RIbYxaFxES/z60thxdrw7IUFnBhw==",
74
+ "dependencies": {
75
+ "datatables.net": "2.2.2",
76
+ "jquery": ">=1.7"
77
+ }
78
+ },
79
+ "node_modules/datatables.net-buttons": {
80
+ "version": "3.2.2",
81
+ "resolved": "https://registry.npmjs.org/datatables.net-buttons/-/datatables.net-buttons-3.2.2.tgz",
82
+ "integrity": "sha512-+aLTbkbksNmyGpK+8KXbpwYKXYOXvZQR2ySA/8oOQeJU53Xw/67cOHowenEr2d43/RLaz+I0zvV/1Yn+jMRiDw==",
83
+ "dependencies": {
84
+ "datatables.net": "^2",
85
+ "jquery": ">=1.7"
86
+ }
87
+ },
88
+ "node_modules/datatables.net-buttons-bs5": {
89
+ "version": "3.2.2",
90
+ "resolved": "https://registry.npmjs.org/datatables.net-buttons-bs5/-/datatables.net-buttons-bs5-3.2.2.tgz",
91
+ "integrity": "sha512-xjUcbYCBHcUthD1pvo5ghTNjqE6fTMygRrKd0QjBHKQxcqxmHG/m0djD2s6cFBfm8oov132U7U2JCXgQifOoUA==",
92
+ "dependencies": {
93
+ "datatables.net-bs5": "^2",
94
+ "datatables.net-buttons": "3.2.2",
95
+ "jquery": ">=1.7"
96
+ }
97
+ },
98
+ "node_modules/jquery": {
99
+ "version": "3.7.1",
100
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
101
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
102
+ }
103
+ }
104
+ }
data/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "oxidized-web",
3
+ "version": "1.0.0",
4
+ "description": "NPM Projekt to get dependent js and css libs",
5
+ "main": "index.js",
6
+ "directories": {
7
+ "lib": "lib"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "author": "The oxidized project",
13
+ "license": "Apache 2.0",
14
+ "dependencies": {
15
+ "bootstrap": "^5.3.3",
16
+ "bootstrap-icons": "^1.11.3",
17
+ "datatables.net-bs5": "^2.0.7",
18
+ "datatables.net-buttons-bs5": "^3.0.2",
19
+ "jquery": "^3.7.1"
20
+ }
21
+ }