Skip to content

Commit

Permalink
Added SLIM gems
Browse files Browse the repository at this point in the history
Handle missing SecurityContextHolder
Made `application_setup.rb` optional.
  • Loading branch information
UweKubosch committed Apr 12, 2024
1 parent 496d86a commit 9a7f830
Show file tree
Hide file tree
Showing 472 changed files with 55,832 additions and 18 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ plugins {
}

group 'no.datek'
version '0.18.3'
final String JRUBY_VERSION = '9.4.5.0';
version '0.19.0'
final String JRUBY_VERSION = '9.4.6.0';

repositories {
mavenLocal()
Expand All @@ -17,7 +17,8 @@ repositories {

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.6'
// implementation "org.jruby:jruby:$JRUBY_VERSION"
implementation 'javax.servlet:javax.servlet-api:3.1.0'
implementation "org.jruby:jruby:$JRUBY_VERSION"
}

java {
Expand Down
33 changes: 33 additions & 0 deletions gems.locked
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
GEM
remote: https://rubygems.org/
specs:
concurrent-ruby (1.2.2)
ffi (1.15.5-java)
ffi (1.15.5-x64-mingw-ucrt)
kramdown (2.4.0)
rexml
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
slim (5.1.1)
temple (~> 0.10.0)
tilt (>= 2.1.0)
temple (0.10.2)
tilt (2.2.0)

PLATFORMS
universal-java-17
x64-mingw-ucrt

DEPENDENCIES
concurrent-ruby
kramdown
listen
slim

BUNDLED WITH
2.4.19
8 changes: 8 additions & 0 deletions gems.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'concurrent-ruby'
gem 'kramdown'
gem 'listen'
gem 'slim'
3 changes: 1 addition & 2 deletions src/main/java/no/datek/slim/AssetsController.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.datek.slim;

import java.nio.file.Path;
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.ContentDisposition;
Expand All @@ -12,8 +13,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.nio.file.Path;
import java.nio.file.Paths;

@Controller
@RequestMapping(AssetsController.PAGE_PATH)
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/gems/concurrent-ruby/concurrent-ruby.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is here so that there is a file with the same name as the gem that
# can be required by Bundler.require. Applications should normally
# require 'concurrent'.

require_relative "concurrent"
134 changes: 134 additions & 0 deletions src/main/resources/gems/concurrent-ruby/concurrent.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
require 'concurrent/version'
require 'concurrent/constants'
require 'concurrent/errors'
require 'concurrent/configuration'

require 'concurrent/atomics'
require 'concurrent/executors'
require 'concurrent/synchronization'

require 'concurrent/atomic/atomic_markable_reference'
require 'concurrent/atomic/atomic_reference'
require 'concurrent/agent'
require 'concurrent/atom'
require 'concurrent/array'
require 'concurrent/hash'
require 'concurrent/set'
require 'concurrent/map'
require 'concurrent/tuple'
require 'concurrent/async'
require 'concurrent/dataflow'
require 'concurrent/delay'
require 'concurrent/exchanger'
require 'concurrent/future'
require 'concurrent/immutable_struct'
require 'concurrent/ivar'
require 'concurrent/maybe'
require 'concurrent/mutable_struct'
require 'concurrent/mvar'
require 'concurrent/promise'
require 'concurrent/scheduled_task'
require 'concurrent/settable_struct'
require 'concurrent/timer_task'
require 'concurrent/tvar'
require 'concurrent/promises'

require 'concurrent/thread_safe/synchronized_delegator'
require 'concurrent/thread_safe/util'

require 'concurrent/options'

# @!macro internal_implementation_note
#
# @note **Private Implementation:** This abstraction is a private, internal
# implementation detail. It should never be used directly.

# @!macro monotonic_clock_warning
#
# @note Time calculations on all platforms and languages are sensitive to
# changes to the system clock. To alleviate the potential problems
# associated with changing the system clock while an application is running,
# most modern operating systems provide a monotonic clock that operates
# independently of the system clock. A monotonic clock cannot be used to
# determine human-friendly clock times. A monotonic clock is used exclusively
# for calculating time intervals. Not all Ruby platforms provide access to an
# operating system monotonic clock. On these platforms a pure-Ruby monotonic
# clock will be used as a fallback. An operating system monotonic clock is both
# faster and more reliable than the pure-Ruby implementation. The pure-Ruby
# implementation should be fast and reliable enough for most non-realtime
# operations. At this time the common Ruby platforms that provide access to an
# operating system monotonic clock are MRI 2.1 and above and JRuby (all versions).
#
# @see http://linux.die.net/man/3/clock_gettime Linux clock_gettime(3)

# @!macro copy_options
#
# ## Copy Options
#
# Object references in Ruby are mutable. This can lead to serious
# problems when the {#value} of an object is a mutable reference. Which
# is always the case unless the value is a `Fixnum`, `Symbol`, or similar
# "primitive" data type. Each instance can be configured with a few
# options that can help protect the program from potentially dangerous
# operations. Each of these options can be optionally set when the object
# instance is created:
#
# * `:dup_on_deref` When true the object will call the `#dup` method on
# the `value` object every time the `#value` method is called
# (default: false)
# * `:freeze_on_deref` When true the object will call the `#freeze`
# method on the `value` object every time the `#value` method is called
# (default: false)
# * `:copy_on_deref` When given a `Proc` object the `Proc` will be run
# every time the `#value` method is called. The `Proc` will be given
# the current `value` as its only argument and the result returned by
# the block will be the return value of the `#value` call. When `nil`
# this option will be ignored (default: nil)
#
# When multiple deref options are set the order of operations is strictly defined.
# The order of deref operations is:
# * `:copy_on_deref`
# * `:dup_on_deref`
# * `:freeze_on_deref`
#
# Because of this ordering there is no need to `#freeze` an object created by a
# provided `:copy_on_deref` block. Simply set `:freeze_on_deref` to `true`.
# Setting both `:dup_on_deref` to `true` and `:freeze_on_deref` to `true` is
# as close to the behavior of a "pure" functional language (like Erlang, Clojure,
# or Haskell) as we are likely to get in Ruby.

# @!macro deref_options
#
# @option opts [Boolean] :dup_on_deref (false) Call `#dup` before
# returning the data from {#value}
# @option opts [Boolean] :freeze_on_deref (false) Call `#freeze` before
# returning the data from {#value}
# @option opts [Proc] :copy_on_deref (nil) When calling the {#value}
# method, call the given proc passing the internal value as the sole
# argument then return the new value returned from the proc.

# @!macro executor_and_deref_options
#
# @param [Hash] opts the options used to define the behavior at update and deref
# and to specify the executor on which to perform actions
# @option opts [Executor] :executor when set use the given `Executor` instance.
# Three special values are also supported: `:io` returns the global pool for
# long, blocking (IO) tasks, `:fast` returns the global pool for short, fast
# operations, and `:immediate` returns the global `ImmediateExecutor` object.
# @!macro deref_options

# @!macro warn.edge
# @api Edge
# @note **Edge Features** are under active development and may change frequently.
#
# - Deprecations are not added before incompatible changes.
# - Edge version: _major_ is always 0, _minor_ bump means incompatible change,
# _patch_ bump means compatible change.
# - Edge features may also lack tests and documentation.
# - Features developed in `concurrent-ruby-edge` are expected to move
# to `concurrent-ruby` when finalised.


# {include:file:README.md}
module Concurrent
end
Loading

0 comments on commit 9a7f830

Please sign in to comment.