stones 1.3.0 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dbcef569e33c5fe01085f0a4ae54b6fea11608e1f2080c1f1446b296f0b1b45
4
- data.tar.gz: a3a6d9d7b7d0543597145c607862545dfe9fdac8e10180f701fec3bc0428a681
3
+ metadata.gz: 6ece3ae88ecdb0fc34d65fb38b7d780df2383c92ee54d809a55d5ed1a49a26a5
4
+ data.tar.gz: 2303da40505b0ac5f6259e15594bc69631c7c64790db6bfbcefd5159e3c40d61
5
5
  SHA512:
6
- metadata.gz: 17d4769db0be53c7b1252d6cace5ff47a9d7e0d05b093568112120e922ee6f375358630591b7a4df402dea143af54dfc59bb8b6d0cf6955aacadfcc96d323938
7
- data.tar.gz: 3f9bc095946d13030a8bf7e2d7b8b97112e9dd66b9d7dc1925aa1172b48ffac106aee3ab79ec7efbc899ab614875e5b672701f1fa517424f3bd62557e9152f24
6
+ metadata.gz: 4ac6e38a839eacfc5b300c0d150773046cf12579517e47fabe9b1a1dcd1bbe4e9b4d40fa886dc6c8c359072d63f0baaa03fc691c26644c3a6689accee1fb30cb
7
+ data.tar.gz: eefba761d244bd4618fe910a8378ed41c143e2e71bf2454c31718cc093b7925fb8609cf32437fbd9a14173c520e43c96c3681a81dfd93191a78a05aa67801761
data/MIT-LICENSE CHANGED
@@ -1,5 +1,3 @@
1
- The MIT License (MIT)
2
-
3
1
  Copyright (c) 2012-2024 Dittmar Krall (www.matiq.com)
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining
data/README.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Stones
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/stones.png)](http://badge.fury.io/rb/stones)
3
+ [![Gem Version](https://badge.fury.io/rb/stones.svg)](http://badge.fury.io/rb/stones)
4
4
  [![GEM Downloads](https://img.shields.io/gem/dt/stones?color=168AFE&logo=ruby&logoColor=FE1616)](https://rubygems.org/gems/stones)
5
+ [![rake](https://github.com/matique/stones/actions/workflows/rake.yml/badge.svg)](https://github.com/matique/stones/actions/workflows/rake.yml)
6
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
7
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)
5
8
 
6
9
  Each time I created a new Rails project these files are required.
7
10
  I got tired of it and collected them in a gem.
@@ -19,6 +22,7 @@ Files:
19
22
  app/assets/stylesheets/print.css
20
23
  app/assets/stylesheets/reset.css
21
24
  app/components/about_component.rb
25
+ app/components/flash_component.rb
22
26
  app/views/layouts/application.html.erb
23
27
  app/views/layouts/_body.slim
24
28
  app/views/layouts/_flash.slim
@@ -41,8 +45,8 @@ and run "bundle install".
41
45
  ## Recommended
42
46
 
43
47
  - rvm
44
- - ruby 3.1+
45
- - rails 7.0+
48
+ - ruby 3.3+
49
+ - rails 7.2+
46
50
 
47
51
  Dropped/cleaned files (still available in version 0.2.5):
48
52
 
@@ -50,6 +54,26 @@ Dropped/cleaned files (still available in version 0.2.5):
50
54
  - .watchr
51
55
  - lib/tasks/backup.rake
52
56
 
57
+ ## AboutComponent
58
+
59
+ ### Usage
60
+ ```ruby
61
+ ...
62
+ render AboutComponent(title: "My App", text: "Does something")
63
+ ...
64
+ ```
65
+
66
+ ## FlashComponent
67
+
68
+ ### Usage
69
+ ```ruby
70
+ ...
71
+ flash[:error] = "Something failed"
72
+ ...
73
+ render FlashComponent.new(flash)
74
+ ...
75
+ ```
76
+
53
77
  ## Rails
54
78
 
55
79
  "stones" takes care of a tag-head change introduced by Rails 7.x.
@@ -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
@@ -1,21 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stones
4
- VERSION = '1.3.0' # 2024-04-20
5
- # VERSION = '1.2.4' # 2023-12-13
6
- # VERSION = '1.2.3' # 2023-07-19
7
- # VERSION = '1.2.2' # 2023-04-15
8
- # VERSION = '1.2.1' # 2022-09-29
9
- # VERSION = '1.2.0' # 2022-02-12
10
- # VERSION = '1.1.3' # 2021-06-23
11
- # VERSION = '1.1.2' # 2020-04-27
12
- # VERSION = '1.1.1' # 2020-03-22
13
- # VERSION = '1.1.0' # 2020-03-02
14
- # VERSION = '1.0.10'# 2019-09-27
15
- # VERSION = '1.0.9' # 2018-11-11
16
- # VERSION = '1.0.7' # 2018-11-10
17
- # VERSION = '1.0.6' # 2018-10-29
18
- # VERSION = '1.0.5' # 2018-09-09
19
- # VERSION = '1.0.4' # 2018-08-06
20
- # VERSION = '1.0.3'
4
+ VERSION = "1.3.1" # 2024-10-21
5
+ # VERSION = "1.3.0" # 2024-04-20
6
+ # VERSION = "1.2.4" # 2023-12-13
7
+ # VERSION = "1.2.3" # 2023-07-19
8
+ # VERSION = "1.2.2" # 2023-04-15
9
+ # VERSION = "1.2.1" # 2022-09-29
10
+ # VERSION = "1.2.0" # 2022-02-12
11
+ # VERSION = "1.1.3" # 2021-06-23
12
+ # VERSION = "1.1.2" # 2020-04-27
13
+ # VERSION = "1.1.1" # 2020-03-22
14
+ # VERSION = "1.1.0" # 2020-03-02
15
+ # VERSION = "1.0.10"# 2019-09-27
16
+ # VERSION = "1.0.9" # 2018-11-11
17
+ # VERSION = "1.0.7" # 2018-11-10
18
+ # VERSION = "1.0.6" # 2018-10-29
19
+ # VERSION = "1.0.5" # 2018-09-09
20
+ # VERSION = "1.0.4" # 2018-08-06
21
+ # VERSION = "1.0.3"
21
22
  end
@@ -1,20 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stones
4
- VERSION = '1.2.4' # 2023-12-13
5
- # VERSION = '1.2.3' # 2023-07-19
6
- # VERSION = '1.2.2' # 2023-04-15
7
- # VERSION = '1.2.1' # 2022-09-29
8
- # VERSION = '1.2.0' # 2022-02-12
9
- # VERSION = '1.1.3' # 2021-06-23
10
- # VERSION = '1.1.2' # 2020-04-27
11
- # VERSION = '1.1.1' # 2020-03-22
12
- # VERSION = '1.1.0' # 2020-03-02
13
- # VERSION = '1.0.10'# 2019-09-27
14
- # VERSION = '1.0.9' # 2018-11-11
15
- # VERSION = '1.0.7' # 2018-11-10
16
- # VERSION = '1.0.6' # 2018-10-29
17
- # VERSION = '1.0.5' # 2018-09-09
18
- # VERSION = '1.0.4' # 2018-08-06
19
- # VERSION = '1.0.3'
4
+ VERSION = "1.3.0" # 2024-10-21
5
+ # VERSION = "1.3.0" # 2024-04-20
6
+ # VERSION = "1.2.4" # 2023-12-13
7
+ # VERSION = "1.2.3" # 2023-07-19
8
+ # VERSION = "1.2.2" # 2023-04-15
9
+ # VERSION = "1.2.1" # 2022-09-29
10
+ # VERSION = "1.2.0" # 2022-02-12
11
+ # VERSION = "1.1.3" # 2021-06-23
12
+ # VERSION = "1.1.2" # 2020-04-27
13
+ # VERSION = "1.1.1" # 2020-03-22
14
+ # VERSION = "1.1.0" # 2020-03-02
15
+ # VERSION = "1.0.10"# 2019-09-27
16
+ # VERSION = "1.0.9" # 2018-11-11
17
+ # VERSION = "1.0.7" # 2018-11-10
18
+ # VERSION = "1.0.6" # 2018-10-29
19
+ # VERSION = "1.0.5" # 2018-09-09
20
+ # VERSION = "1.0.4" # 2018-08-06
21
+ # VERSION = "1.0.3"
20
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stones
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dittmar Krall
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-20 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: combustion
@@ -71,6 +71,7 @@ files:
71
71
  - app/assets/stylesheets/print.css
72
72
  - app/assets/stylesheets/reset.css
73
73
  - app/components/about_component.rb
74
+ - app/components/flash_component.rb
74
75
  - app/views/layouts/_body.slim
75
76
  - app/views/layouts/_flash.slim
76
77
  - app/views/layouts/_footer.slim
@@ -88,7 +89,7 @@ homepage: https://github.com/matique/stones
88
89
  licenses:
89
90
  - MIT
90
91
  metadata: {}
91
- post_install_message:
92
+ post_install_message:
92
93
  rdoc_options: []
93
94
  require_paths:
94
95
  - lib
@@ -103,8 +104,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
104
  - !ruby/object:Gem::Version
104
105
  version: '0'
105
106
  requirements: []
106
- rubygems_version: 3.5.9
107
- signing_key:
107
+ rubygems_version: 3.5.20
108
+ signing_key:
108
109
  specification_version: 4
109
110
  summary: Stones contains some basic files.
110
111
  test_files: []