desert_you 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: c4d1b0d0387ea7fd227a1b63740c7b94c01b99fae2e6ab8885933e0313228c1d
4
+ data.tar.gz: e51ff00b05ea38f7f8e9127360f8e07510f4cf4450e4471ec16eb56da90c5e5a
5
+ SHA512:
6
+ metadata.gz: e8985545b5ae234b83b585ec1c611e35d78beb2215b23631fb70a1cc7bcea6cd425e793acf712c048041042a184ec03ee424b6419e9c22b1d1f9a5eff59c4186
7
+ data.tar.gz: 27e1971d6cead2bf9ad655a133fc764b05b0684f17c3cd504666e56d86e52e2c220b4abdad72e8aad8629b83f828be97cc39e2717dc5aa6f653b832df3f66eff
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Eric Roberts
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Desert You Gem
2
+
3
+ Redirects any *.php call to a certain video.
4
+
5
+ ![Never gonna give you up](https://upload.wikimedia.org/wikipedia/en/f/f7/RickRoll.png)
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Rails application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'desert_you'
13
+ ```
14
+
15
+ And then run `bundle install`.
16
+
17
+ ## Usage
18
+
19
+ Mount the engine in your application's `config/routes.rb`:
20
+
21
+ ```ruby
22
+ Rails.application.routes.draw do
23
+ mount DesertYou::Engine => '/'
24
+
25
+ # ... your other routes
26
+ end
27
+ ```
28
+
29
+ Any request whose path ends in `.php` will now get a permanent redirect to
30
+ the configured video, regardless of what else is in your route set.
31
+
32
+ ## Work In Progress
33
+
34
+ Gem will be set to 1.0.0 when it is ready for use.
35
+
36
+ Image by Never Gonna Give You Up music video., Fair use, https://en.wikipedia.org/w/index.php?curid=22192466
data/config/routes.rb ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ DesertYou::Engine.routes.draw do
4
+ match '*any',
5
+ to: redirect('https://www.youtube.com/watch?v=dQw4w9WgXcQ'),
6
+ constraints: ->(request) { request.path_info.end_with?('.php') },
7
+ via: %i[get post patch delete]
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/engine'
4
+
5
+ module DesertYou
6
+ class Engine < ::Rails::Engine
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DesertYou
4
+ VERSION = '0.1.0'
5
+ end
data/lib/desert_you.rb ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'desert_you/version'
4
+ require 'desert_you/engine' if defined?(Rails::Engine)
5
+
6
+ # The empty module for the gem. Everything is in the routing.
7
+ module DesertYou; end
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: desert_you
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Eric Roberts
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2026-09-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '6.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '6.0'
27
+ description:
28
+ email:
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - LICENSE
34
+ - README.md
35
+ - config/routes.rb
36
+ - lib/desert_you.rb
37
+ - lib/desert_you/engine.rb
38
+ - lib/desert_you/version.rb
39
+ homepage: https://github.com/ERCubed/desert-you-gem
40
+ licenses:
41
+ - MIT
42
+ metadata:
43
+ rubygems_mfa_required: 'true'
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '3.0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubygems_version: 3.3.27
60
+ signing_key:
61
+ specification_version: 4
62
+ summary: Redirects all routes ending in `.php` to a certain video.
63
+ test_files: []