stones 1.4.2 → 1.4.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/MIT-LICENSE +1 -1
- data/README.md +2 -2
- data/app/components/about_component.rb +0 -2
- data/app/components/about_component.rb.bak +50 -0
- data/app/components/flash_component.rb +0 -2
- data/app/components/flash_component.rb.bak +21 -0
- data/config/initializers/concerns.rb +15 -0
- data/lib/stones/version.rb +3 -1
- data/lib/stones/version.rb.bak +2 -1
- metadata +6 -4
- data/app/views/layouts/_footer.slim.bak +0 -33
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07b1dc45b575d2759b6eefa1ba1a8f9d2f354fcf22982ae3e3de1321738a1e65
|
|
4
|
+
data.tar.gz: 77b8204871b84e8f8be6b0371f7cd348bf6041d87e7eeadb2b8623af7e1e007a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f43bea1c9e9ac54778c405789d166d8ca0502b5fdca477f355d95c4b07dbf928854034a43d464dbdd2e653ac654b07e9ad076d8ecff727f962ca3f39b56673a
|
|
7
|
+
data.tar.gz: 804d9fa4bc6ecc026f1b09c7378495c35465d7b9d54f65cc64dbe0b36d10c1ce07ff6218e9f29029c825a3871dcff6ab7166dc38833fa020e85d1847cc840826
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Files:
|
|
|
31
31
|
app/views/layouts/_html_head.slim
|
|
32
32
|
app/views/root/about.slim
|
|
33
33
|
app/views/shared/_error_explanation.html.erb
|
|
34
|
-
|
|
34
|
+
config/initializers/concerns.rb
|
|
35
35
|
|
|
36
36
|
## Installation
|
|
37
37
|
|
|
@@ -80,5 +80,5 @@ render FlashComponent.new(flash)
|
|
|
80
80
|
|
|
81
81
|
## Miscellaneous
|
|
82
82
|
|
|
83
|
-
Copyright (c) 2012-
|
|
83
|
+
Copyright (c) 2012-2026 Dittmar Krall (www.matiq.com),
|
|
84
84
|
released under the [MIT license](https://opensource.org/licenses/MIT).
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class AboutComponent < ViewComponent::Base
|
|
4
|
+
def initialize(text: "", title: nil, system_text: nil)
|
|
5
|
+
@title = title
|
|
6
|
+
arr = text.split("\n")
|
|
7
|
+
|
|
8
|
+
arr += system_text ? system_text.split("\n") : system_default
|
|
9
|
+
arr << "Time #{Time.now.localtime}"
|
|
10
|
+
@lines = arr.flatten
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
slim_template <<~HEREDOC
|
|
14
|
+
css:
|
|
15
|
+
div.about {
|
|
16
|
+
height: 70%;
|
|
17
|
+
margin: 1em 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
font-size: 1.2em;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
}
|
|
24
|
+
div.about div.rounded-box {
|
|
25
|
+
border: 1px solid grey;
|
|
26
|
+
border-radius: 0.3em;
|
|
27
|
+
padding: 5px 8px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.about
|
|
31
|
+
.rounded-box
|
|
32
|
+
- if @title
|
|
33
|
+
h1 = @title
|
|
34
|
+
hr
|
|
35
|
+
- @lines.each do |line|
|
|
36
|
+
p = line
|
|
37
|
+
HEREDOC
|
|
38
|
+
|
|
39
|
+
private
|
|
40
|
+
|
|
41
|
+
def system_default
|
|
42
|
+
arr = []
|
|
43
|
+
str = "Ruby #{RUBY_VERSION}"
|
|
44
|
+
str += "-p#{RUBY_PATCHLEVEL}" unless Rails.env.production?
|
|
45
|
+
arr << str
|
|
46
|
+
str = "Rails #{Rails.version}"
|
|
47
|
+
str += " (#{Rails.env})" unless Rails.env.production?
|
|
48
|
+
arr << str
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
class FlashComponent < ViewComponent::Base
|
|
4
|
+
def initialize(flash = {})
|
|
5
|
+
@flash = flash
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
slim_template <<~HEREDOC
|
|
9
|
+
css:
|
|
10
|
+
.flash_notice {
|
|
11
|
+
animation: animate_notice 5s linear 2s forwards;
|
|
12
|
+
}
|
|
13
|
+
@keyframes animate_notice {
|
|
14
|
+
from { opacity: 1; }
|
|
15
|
+
to { opacity: 0; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
- @flash.each do |key, value|
|
|
19
|
+
p class="flash_#\{key}" = sanitize(value)
|
|
20
|
+
HEREDOC
|
|
21
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
class << ActiveRecord::Base
|
|
2
|
+
def my_concerned_with(*concerns)
|
|
3
|
+
concerns.each do |concern|
|
|
4
|
+
require_dependency "#{name.underscore}/#{concern}"
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class << ActionController::Base
|
|
10
|
+
def my_concerned_with(*concerns)
|
|
11
|
+
concerns.each do |concern|
|
|
12
|
+
require_dependency "#{name.underscore}/#{concern}"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
data/lib/stones/version.rb
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Stones
|
|
4
|
-
VERSION = "1.4.
|
|
4
|
+
VERSION = "1.4.4" # 2026-01-04
|
|
5
|
+
# VERSION = "1.4.3" # 2025-12-21
|
|
6
|
+
# VERSION = "1.4.2" # 2025-12-13
|
|
5
7
|
# VERSION = "1.4.0" # 2025-11-03
|
|
6
8
|
# VERSION = "1.3.3" # 2025-10-30
|
|
7
9
|
# VERSION = "1.3.2" # 2025-06-20
|
data/lib/stones/version.rb.bak
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stones
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dittmar Krall
|
|
@@ -70,16 +70,18 @@ files:
|
|
|
70
70
|
- app/assets/stylesheets/print.css
|
|
71
71
|
- app/assets/stylesheets/reset.css
|
|
72
72
|
- app/components/about_component.rb
|
|
73
|
+
- app/components/about_component.rb.bak
|
|
73
74
|
- app/components/flash_component.rb
|
|
75
|
+
- app/components/flash_component.rb.bak
|
|
74
76
|
- app/views/layouts/_body.slim
|
|
75
77
|
- app/views/layouts/_flash.slim
|
|
76
78
|
- app/views/layouts/_footer.slim
|
|
77
|
-
- app/views/layouts/_footer.slim.bak
|
|
78
79
|
- app/views/layouts/_header.slim
|
|
79
80
|
- app/views/layouts/_html_head.slim
|
|
80
81
|
- app/views/layouts/application.html.erb
|
|
81
82
|
- app/views/root/about.slim
|
|
82
83
|
- app/views/shared/_error_explanation.html.erb
|
|
84
|
+
- config/initializers/concerns.rb
|
|
83
85
|
- lib/stones.rb
|
|
84
86
|
- lib/stones/engine.rb
|
|
85
87
|
- lib/stones/version.rb
|
|
@@ -93,7 +95,7 @@ require_paths:
|
|
|
93
95
|
- lib
|
|
94
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
95
97
|
requirements:
|
|
96
|
-
- - "
|
|
98
|
+
- - ">="
|
|
97
99
|
- !ruby/object:Gem::Version
|
|
98
100
|
version: '3'
|
|
99
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
@@ -102,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
104
|
- !ruby/object:Gem::Version
|
|
103
105
|
version: '0'
|
|
104
106
|
requirements: []
|
|
105
|
-
rubygems_version:
|
|
107
|
+
rubygems_version: 4.0.3
|
|
106
108
|
specification_version: 4
|
|
107
109
|
summary: Stones contains some basic files.
|
|
108
110
|
test_files: []
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
ruby:
|
|
2
|
-
# just a footer
|
|
3
|
-
# feel free to modify to your needs
|
|
4
|
-
# several constants and helpers are required
|
|
5
|
-
|
|
6
|
-
separator = ' | '
|
|
7
|
-
app = "#{APP.upcase} #{APP_VERSION || VERSION}"
|
|
8
|
-
year = Time.now.year
|
|
9
|
-
|
|
10
|
-
if Rails.env.production?
|
|
11
|
-
info_dev = "started at #{STARTED_AT}"
|
|
12
|
-
else
|
|
13
|
-
ruby = "Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
|
|
14
|
-
rails = "Rails #{Rails.version} (#{Rails.env})"
|
|
15
|
-
info_dev = "#{rails} | #{ruby} | #{STARTED_AT}"
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# e.g. http://matiq.com/de/privacy-policy before v1.1.0
|
|
19
|
-
# e.g. https://matiq.com/home/page?page=gtc
|
|
20
|
-
base = 'http://matiq.com/home/page'
|
|
21
|
-
|
|
22
|
-
footer
|
|
23
|
-
div
|
|
24
|
-
a href='http://matiq.com' © #{year} matiq UG (haftungsbeschränkt)
|
|
25
|
-
= separator
|
|
26
|
-
= link_to app.html_safe, about_path
|
|
27
|
-
div
|
|
28
|
-
= link_to t('button.terms'), "#{base}?page=gtc"
|
|
29
|
-
= separator
|
|
30
|
-
= link_to t('button.privacy'), "#{base}?page=privacy_policy"
|
|
31
|
-
= separator
|
|
32
|
-
= link_to t('button.impressum'), "#{base}?page=about"
|
|
33
|
-
div = info_dev
|