alchemy-solid_errors 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c09a204a9808ac1af36183102694f839091804e3d0e2c6ac2e9ce9bb8f4355a4
4
+ data.tar.gz: 4d3117fe406b678b173938288e6aeafe51d22dcc542d623078a6afb882bc9cd0
5
+ SHA512:
6
+ metadata.gz: 1857888d7053a75a0224ec0c415f11150e0402e729d394696857767f7468046f1f06b5698db17c3d708eeac0803e18c434940469c35dae41b9b0e58fcf0314c2
7
+ data.tar.gz: f8ffcff2e916097213bd0ff044f5dbae8b1cce47ac26679abe10b2c75a51fd263adc6a235e75822a04a3124994e4bc8b5d65e1a1c1b706799c7900c2c843e4cb
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, sitediver
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # Alchemy Solid Errors
2
+
3
+ A simple integration of Solid Errors into AlchemyCMS. It adds a new menu item into the Alchemy Admin
4
+ interface and integrates the Solid Errors Backend via iframe into the Alchemy Backend. Solid Errors Backend
5
+ is only available for admin users.
6
+
7
+ ![Preview of Alchemy CMS Admin Interface with Errors Menu Point selected](preview.png)
8
+
9
+ ## Installation
10
+
11
+ Add the gem to your Gemfile and restart the application.
12
+
13
+ ```shell
14
+ $ bundle add alchemy-solid_errors
15
+ ```
16
+
17
+ ## Release a new version
18
+
19
+ First, bump the version with [gem-release](https://bundler.io/guides/creating_gem.html#releasing-the-gem):
20
+
21
+ ```shell
22
+ gem bump --version minor
23
+ ```
24
+
25
+ Second, generate the changelog entries. Set the version parameter with the upcoming version number.
26
+
27
+ ```shell
28
+ rake changelog
29
+ ```
30
+
31
+ Amend that changelog into the previous commit. After that go to [Releases Page](https://github.com/sitediver/alchemy-solid_errors/releases)
32
+ and create a new release. Be aware the tag has to start with `v` (e.g `v0.2.0`). Otherwise, the Release action will fail.
data/Rakefile ADDED
@@ -0,0 +1,37 @@
1
+ require "bundler/setup"
2
+
3
+ require "bundler/gem_tasks"
4
+
5
+ require "rspec/core"
6
+ require "rspec/core/rake_task"
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ Bundler::GemHelper.install_tasks
11
+
12
+ namespace :spec do
13
+ desc "Prepares database for testing"
14
+ task :db_prepare do
15
+ system "cd spec/dummy; RAILS_ENV=test bin/rake db:setup db:seed; cd -"
16
+ end
17
+ end
18
+
19
+ # add changelog task
20
+ require "github_changelog_generator/task"
21
+
22
+ # Temporary fix for SSL error
23
+ # Ref: https://github.com/ruby/openssl/issues/949#issuecomment-3367944960
24
+ require "openssl"
25
+ s = OpenSSL::X509::Store.new.tap(&:set_default_paths)
26
+ begin
27
+ OpenSSL::SSL::SSLContext.send(:remove_const, :DEFAULT_CERT_STORE)
28
+ rescue
29
+ nil
30
+ end
31
+ OpenSSL::SSL::SSLContext.const_set(:DEFAULT_CERT_STORE, s.freeze)
32
+
33
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
34
+ config.user = "sitediver"
35
+ config.project = "alchemy-solid_errors"
36
+ config.future_release = "v#{Alchemy::SolidErrors::VERSION}"
37
+ end
@@ -0,0 +1,6 @@
1
+ .solid-errors > iframe {
2
+ --header-height: 75px;
3
+ border: 0;
4
+ height: calc(100vh - (var(--header-height) + var(--spacing-2) * 2));
5
+ width: 100%;
6
+ }
@@ -0,0 +1,7 @@
1
+ :root {
2
+ --bulma-scheme-main: var(--body-background-color, var(--color-grey_light));
3
+ }
4
+
5
+ main {
6
+ padding: 1rem 1.5rem;
7
+ }
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module Admin
5
+ class ErrorsController < Alchemy::Admin::BaseController
6
+ authorize_resource class: :admin_errors
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ <div class="solid-errors">
2
+ <iframe src="/admin/solid_errors"></iframe>
3
+ </div>
@@ -0,0 +1,18 @@
1
+ Rails.application.config.to_prepare do
2
+ require "alchemy/solid_errors/ability"
3
+
4
+ Alchemy.register_ability(Alchemy::SolidErrors::Ability)
5
+ Alchemy.admin_stylesheets << "alchemy/solid_errors/alchemy-admin.css"
6
+
7
+ Alchemy::Modules.register_module({
8
+ name: "errors",
9
+ engine_name: "alchemy",
10
+ position: 7.1,
11
+ navigation: {
12
+ name: "modules.errors",
13
+ controller: "/alchemy/admin/errors",
14
+ action: "index",
15
+ icon: "bug"
16
+ }
17
+ })
18
+ end
@@ -0,0 +1,3 @@
1
+ Rails.application.config.to_prepare do
2
+ SolidErrors.base_controller_class = "Alchemy::Admin::ErrorsController"
3
+ end
@@ -0,0 +1,4 @@
1
+ en:
2
+ alchemy:
3
+ modules:
4
+ errors: Errors
data/config/routes.rb ADDED
@@ -0,0 +1,6 @@
1
+ Alchemy::Engine.routes.draw do
2
+ namespace :admin, path: Alchemy.admin_path, constraints: Alchemy.admin_constraints do
3
+ resources :errors, only: [:index]
4
+ mount SolidErrors::Engine, at: "/solid_errors"
5
+ end
6
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Alchemy
4
+ module SolidErrors
5
+ class Ability
6
+ include CanCan::Ability
7
+
8
+ def initialize(user)
9
+ @user = user
10
+
11
+ if admin?
12
+ can :index, :alchemy_admin_errors
13
+ can :manage, :admin_errors
14
+ end
15
+ end
16
+
17
+ private
18
+
19
+ def admin?
20
+ @user.try(:has_role?, :admin)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,12 @@
1
+ module Alchemy
2
+ module SolidErrors
3
+ class Engine < ::Rails::Engine
4
+ isolate_namespace Alchemy
5
+ engine_name "alchemy_solid_errors"
6
+
7
+ initializer "alchemy_solid_errors.assets" do |app|
8
+ app.config.assets.precompile += %w[alchemy/solid_errors/alchemy-admin.css alchemy/solid_errors/solid-errors.css]
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,5 @@
1
+ module Alchemy
2
+ module SolidErrors
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ require "alchemy/solid_errors/version"
2
+ require "alchemy/solid_errors/engine"
3
+ require "solid_errors"
4
+
5
+ module Alchemy
6
+ module SolidErrors
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :alchemy_solid_errors do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,199 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: alchemy-solid_errors
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Sascha Karnatz
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rails
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 7.2.0
19
+ - - "<"
20
+ - !ruby/object:Gem::Version
21
+ version: '8.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ version: 7.2.0
29
+ - - "<"
30
+ - !ruby/object:Gem::Version
31
+ version: '8.1'
32
+ - !ruby/object:Gem::Dependency
33
+ name: alchemy_cms
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 7.4.0
39
+ - - "<"
40
+ - !ruby/object:Gem::Version
41
+ version: '8.1'
42
+ type: :runtime
43
+ prerelease: false
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: 7.4.0
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '8.1'
52
+ - !ruby/object:Gem::Dependency
53
+ name: solid_errors
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0.7'
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0.7'
69
+ - - "<"
70
+ - !ruby/object:Gem::Version
71
+ version: '1.0'
72
+ - !ruby/object:Gem::Dependency
73
+ name: capybara
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - "~>"
77
+ - !ruby/object:Gem::Version
78
+ version: '3.0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '3.0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: factory_bot_rails
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - "~>"
91
+ - !ruby/object:Gem::Version
92
+ version: '6.0'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - "~>"
98
+ - !ruby/object:Gem::Version
99
+ version: '6.0'
100
+ - !ruby/object:Gem::Dependency
101
+ name: puma
102
+ requirement: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: '6.0'
107
+ type: :development
108
+ prerelease: false
109
+ version_requirements: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '6.0'
114
+ - !ruby/object:Gem::Dependency
115
+ name: rspec-rails
116
+ requirement: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - "~>"
119
+ - !ruby/object:Gem::Version
120
+ version: '7.1'
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - "~>"
126
+ - !ruby/object:Gem::Version
127
+ version: '7.1'
128
+ - !ruby/object:Gem::Dependency
129
+ name: selenium-webdriver
130
+ requirement: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '4.29'
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '4.29'
142
+ description: A simple integration of Solid Errors into AlchemyCMS that adds a dashboard
143
+ for error tracking.
144
+ email:
145
+ - 68833+kulturbande@users.noreply.github.com
146
+ executables: []
147
+ extensions: []
148
+ extra_rdoc_files: []
149
+ files:
150
+ - LICENSE
151
+ - README.md
152
+ - Rakefile
153
+ - app/assets/stylesheets/alchemy/solid_errors/alchemy-admin.css
154
+ - app/assets/stylesheets/alchemy/solid_errors/solid-errors.css
155
+ - app/controllers/alchemy/admin/errors_controller.rb
156
+ - app/views/alchemy/admin/errors/index.html.erb
157
+ - config/initializers/alchemy.rb
158
+ - config/initializers/solid_errors.rb
159
+ - config/locales/alchemy.en.yml
160
+ - config/routes.rb
161
+ - lib/alchemy/solid_errors.rb
162
+ - lib/alchemy/solid_errors/ability.rb
163
+ - lib/alchemy/solid_errors/engine.rb
164
+ - lib/alchemy/solid_errors/version.rb
165
+ - lib/tasks/alchemy/solid_errors/solid_errors_tasks.rake
166
+ homepage: https://sitediver.com
167
+ licenses:
168
+ - BSD-3-Clause
169
+ metadata:
170
+ allowed_push_host: https://rubygems.org
171
+ homepage_uri: https://sitediver.com
172
+ source_code_uri: https://github.com/sitediver/alchemy-solid_errors
173
+ changelog_uri: https://github.com/sitediver/alchemy-solid_errors/CHANGELOG.md
174
+ post_install_message: |
175
+ -------------------------------------------------------------
176
+ Thank you for installing Alchemy Solid Errors.
177
+ -------------------------------------------------------------
178
+
179
+ Please make sure, that alchemy-solid_errors is placed
180
+ after Alchemy CMS in your Gemfile!
181
+ -------------------------------------------------------------
182
+ rdoc_options: []
183
+ require_paths:
184
+ - lib
185
+ required_ruby_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: 3.3.0
190
+ required_rubygems_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ requirements: []
196
+ rubygems_version: 3.6.9
197
+ specification_version: 4
198
+ summary: A simple integration of Solid Errors into AlchemyCMS
199
+ test_files: []