thunderclap 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: c7fa69f434eff8b2c135847df146e73d589fda329f7fed2798edec6387f52e54
4
+ data.tar.gz: b33483ef186a9888a8da04e2473d9713d9b8e14f25b01dd4152a1f2236915b45
5
+ SHA512:
6
+ metadata.gz: 7a282f4fac4a0fa2cfaafdee098f4e9f7fd2b9794d7c575630cb39f405e592d59b2de4369b31e87dd8f38b3cc96e3176dc8baad363c8f9066dd254051ac965b5
7
+ data.tar.gz: d1f09f0e7e7f5677cb1723cc025a7bf52b746f0622bed283d7727d21b80d1a4eee821b146508f1b7f2a9b945fed4f2051f9261a50d3c9bd5cbcb3bbfaa9e1f30
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2024 LuigiR0jas
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Thunderclap
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "thunderclap"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install thunderclap
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
File without changes
@@ -0,0 +1,12 @@
1
+ # This module provides helper methods for the Thunderclap feature.
2
+ # frozen_string_literal: true
3
+
4
+ module ThunderclapHelper
5
+ # Renders the flash message with an optional auto dismiss delay.
6
+ #
7
+ # @param auto_dismiss_delay [Integer] The delay in milliseconds before the flash message automatically dismisses.
8
+ # @return [String] The rendered flash message.
9
+ def flash
10
+ render 'thunderclap/partials/flash'
11
+ end
12
+ end
@@ -0,0 +1,34 @@
1
+ <ul>
2
+ <% flash.each do |type, msg| %>
3
+ <li>
4
+ <div>
5
+ <span>
6
+ <% if local_assigns[:flash_type] == "notice" %>
7
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#31cb00" class="w-6 h-6">
8
+ <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
9
+ </svg>
10
+ <% elsif local_assigns[:flash_type] == "alert" %>
11
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#c1121f" class="w-6 h-6">
12
+ <path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
13
+ </svg>
14
+ <% end %>
15
+ </span>
16
+
17
+ <p><%= msg %></p>
18
+
19
+ <button type="button">
20
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="#6c757d" class="w-5 h-5">
21
+ <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
22
+ </svg>
23
+ </button>
24
+ </div>
25
+
26
+ <% if local_assigns[:redirect] %>
27
+ <%= link_to(
28
+ local_assigns[:redirect][:copy],
29
+ local_assigns[:redirect][:path]
30
+ ) %>
31
+ <% end %>
32
+ </li>
33
+ <% end %>
34
+ </ul>
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ Rails.application.routes.draw do
2
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :thunderclap do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,4 @@
1
+ module Thunderclap
2
+ class Engine < ::Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Thunderclap
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,6 @@
1
+ require "thunderclap/version"
2
+ require "thunderclap/engine"
3
+
4
+ module Thunderclap
5
+ # Your code goes here...
6
+ end
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: thunderclap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - LuigiR0jas
8
+ - JosueMagnus12
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2024-01-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 7.0.5
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 7.0.5
28
+ description: Thunderclap description
29
+ email:
30
+ - luigirojasdev@gmail.com
31
+ - contact@josuegranados.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - MIT-LICENSE
37
+ - README.md
38
+ - Rakefile
39
+ - app/assets/config/thunderclap_manifest.js
40
+ - app/helpers/thunderclap_helper.rb
41
+ - app/views/thunderclap/partials/_flash.html.erb
42
+ - config/routes.rb
43
+ - lib/tasks/thunderclap_tasks.rake
44
+ - lib/thunderclap.rb
45
+ - lib/thunderclap/engine.rb
46
+ - lib/thunderclap/version.rb
47
+ homepage: https://github.com/TelosLabs/thunderclap
48
+ licenses:
49
+ - MIT
50
+ metadata:
51
+ homepage_uri: https://github.com/TelosLabs/thunderclap
52
+ source_code_uri: https://github.com/TelosLabs/thunderclap
53
+ changelog_uri: https://github.com/TelosLabs/thunderclap
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubygems_version: 3.2.3
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: Thunderclap summary
73
+ test_files: []