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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4cb553c72a1ac7473e60f6504eb886204030c8b79e71250fa12c392246a5d1d
4
- data.tar.gz: 73a82333a7cc0bb09db3f6c20d1f63707de47b753e1b4798f815c8418c30ee9b
3
+ metadata.gz: 07b1dc45b575d2759b6eefa1ba1a8f9d2f354fcf22982ae3e3de1321738a1e65
4
+ data.tar.gz: 77b8204871b84e8f8be6b0371f7cd348bf6041d87e7eeadb2b8623af7e1e007a
5
5
  SHA512:
6
- metadata.gz: a189325cc09e74168613284fd804f4e2f58d1035cb5ec507db6340e7062703745190706ea4244ae87eccecd8a5ee8438d1c1207aede61f27a92aad06d6d5ce41
7
- data.tar.gz: 6c6d372d685862de84e62715ce2047199631f19e5ffa2e1d7ec86ea81c5760a64c308960c3fe081e396ef741ccdfc404ab5873398b026231017081f8634a8025
6
+ metadata.gz: 9f43bea1c9e9ac54778c405789d166d8ca0502b5fdca477f355d95c4b07dbf928854034a43d464dbdd2e653ac654b07e9ad076d8ecff727f962ca3f39b56673a
7
+ data.tar.gz: 804d9fa4bc6ecc026f1b09c7378495c35465d7b9d54f65cc64dbe0b36d10c1ce07ff6218e9f29029c825a3871dcff6ab7166dc38833fa020e85d1847cc840826
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2025 Dittmar Krall (www.matiq.com)
1
+ Copyright (c) 2012-2026 Dittmar Krall (www.matiq.com)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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
- # config/initializers/concerns.rb # OBSOLETE & removed
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-2025 Dittmar Krall (www.matiq.com),
83
+ Copyright (c) 2012-2026 Dittmar Krall (www.matiq.com),
84
84
  released under the [MIT license](https://opensource.org/licenses/MIT).
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class AboutComponent < ViewComponent::Base
4
2
  def initialize(text: "", title: nil, system_text: nil)
5
3
  @title = title
@@ -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
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  class FlashComponent < ViewComponent::Base
4
2
  def initialize(flash = {})
5
3
  @flash = flash
@@ -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
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stones
4
- VERSION = "1.4.2" # 2025-12-13
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
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stones
4
- VERSION = "1.4.1" # 2025-12-13
4
+ VERSION = "1.4.3" # 2025-12-21
5
+ # VERSION = "1.4.2" # 2025-12-13
5
6
  # VERSION = "1.4.0" # 2025-11-03
6
7
  # VERSION = "1.3.3" # 2025-10-30
7
8
  # VERSION = "1.3.2" # 2025-06-20
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.2
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: 3.6.9
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' &copy; #{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