rails_maint 0.1.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 +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +178 -0
- data/exe/rails_maint +3 -0
- data/lib/rails_maint/assets/default.css +65 -0
- data/lib/rails_maint/assets/locales/en.yml +5 -0
- data/lib/rails_maint/assets/locales/tr.yml +5 -0
- data/lib/rails_maint/assets/maintenance.html +26 -0
- data/lib/rails_maint/cli.rb +93 -0
- data/lib/rails_maint/helpers/maintenance_page_helper.rb +51 -0
- data/lib/rails_maint/middleware.rb +46 -0
- data/lib/rails_maint/version.rb +3 -0
- data/lib/rails_maint.rb +10 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f2b1b8a1904b4d02c2f73d2274afdef2bd999883d326e1c12308802454b97c22
|
4
|
+
data.tar.gz: 5772a26f65a8c5bd00d76ed7b155fb6bb34fd4f20e524a337d0da1b2471c663c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fef32a839d45b57beed5f2bb3937a41b00ec546557c5117d061c6104bdd55d35576ce35634cef15c421ed10261d1dbfcd4992856c4afce23d07c021c0c14144a
|
7
|
+
data.tar.gz: 7315dcadd5a482c59c85a301e157b2fd786459d6f15c75434992f6498c0ac6da27acd346854754b923afa9b4e7139c3643c1c2e9e15122cb0b6be294518dfe54
|
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# LICENSE.txt
|
2
|
+
MIT License
|
3
|
+
|
4
|
+
Copyright (c) 2024 CodesCaptain
|
5
|
+
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
8
|
+
in the Software without restriction, including without limitation the rights
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
11
|
+
furnished to do so, subject to the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
14
|
+
copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
# RailsMaint
|
2
|
+
|
3
|
+
RailsMaint is a simple and customizable maintenance mode gem for Rails applications. It allows you to display a sleek maintenance page to your users during maintenance work.
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
- 🚀 Easy setup and usage
|
8
|
+
- 🎨 Customizable, modern maintenance page design
|
9
|
+
- 🌍 Multi-language support (English and Turkish)
|
10
|
+
- 🔒 IP whitelist support
|
11
|
+
- 💻 Simple CLI commands
|
12
|
+
- 🎯 Rails Middleware integration
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
1. Add this line to your application's Gemfile:
|
17
|
+
|
18
|
+
```
|
19
|
+
gem 'rails_maint'
|
20
|
+
```
|
21
|
+
|
22
|
+
2. Execute:
|
23
|
+
|
24
|
+
```
|
25
|
+
bundle install
|
26
|
+
```
|
27
|
+
|
28
|
+
3. Add the middleware to your Rails application's `config/application.rb`:
|
29
|
+
|
30
|
+
```
|
31
|
+
config.middleware.use RailsMaint::Middleware
|
32
|
+
```
|
33
|
+
|
34
|
+
## Usage
|
35
|
+
|
36
|
+
### Installing the Gem
|
37
|
+
|
38
|
+
```
|
39
|
+
# For English (default)
|
40
|
+
rails_maint install
|
41
|
+
|
42
|
+
# For Turkish
|
43
|
+
rails_maint install --locale=tr
|
44
|
+
```
|
45
|
+
|
46
|
+
This command creates the following files:
|
47
|
+
- `config/rails_maint.yml` - Configuration file
|
48
|
+
- `config/locales/rails_maint.{locale}.yml` - Language file
|
49
|
+
|
50
|
+
### Managing Maintenance Mode
|
51
|
+
|
52
|
+
```
|
53
|
+
# To enable maintenance mode
|
54
|
+
rails_maint enable
|
55
|
+
|
56
|
+
# To disable maintenance mode
|
57
|
+
rails_maint disable
|
58
|
+
|
59
|
+
# To remove all files
|
60
|
+
rails_maint uninstall
|
61
|
+
```
|
62
|
+
|
63
|
+
## Configuration
|
64
|
+
|
65
|
+
You can customize your settings in `config/rails_maint.yml`:
|
66
|
+
|
67
|
+
```
|
68
|
+
# Default language setting
|
69
|
+
locale: en
|
70
|
+
|
71
|
+
# IP addresses allowed to access
|
72
|
+
white_listed_ips:
|
73
|
+
- 127.0.0.1
|
74
|
+
- ::1
|
75
|
+
# Add your IPs
|
76
|
+
# - 192.168.1.1
|
77
|
+
```
|
78
|
+
|
79
|
+
## Language Support
|
80
|
+
|
81
|
+
Language files are stored in the `config/locales` directory. You can customize existing translations or add new languages:
|
82
|
+
|
83
|
+
```
|
84
|
+
# config/locales/rails_maint.en.yml
|
85
|
+
en:
|
86
|
+
rails_maint:
|
87
|
+
title: "System Maintenance"
|
88
|
+
description: "Our system is currently being updated..."
|
89
|
+
estimated_time: "Estimated time: 1 hour"
|
90
|
+
```
|
91
|
+
|
92
|
+
```
|
93
|
+
# config/locales/rails_maint.tr.yml
|
94
|
+
tr:
|
95
|
+
rails_maint:
|
96
|
+
title: "Sistem Bakımda"
|
97
|
+
description: "Sistemimiz şu anda güncelleniyor..."
|
98
|
+
estimated_time: "Tahmini süre: 1 saat"
|
99
|
+
```
|
100
|
+
|
101
|
+
## How IP Whitelist Works
|
102
|
+
|
103
|
+
- When maintenance mode is active, IPs in the whitelist can access the site normally
|
104
|
+
- All other IPs will see the maintenance page
|
105
|
+
- If behind a proxy, the gem checks the X-Forwarded-For header
|
106
|
+
- Each IP should be added to the configuration file
|
107
|
+
|
108
|
+
## Development
|
109
|
+
|
110
|
+
1. Clone the repository
|
111
|
+
2. Install dependencies: `bundle install`
|
112
|
+
3. Run tests: `bundle exec rspec`
|
113
|
+
|
114
|
+
## Customizing the Maintenance Page
|
115
|
+
|
116
|
+
The maintenance page template can be customized by creating your own version in `public/maintenance.html`. The default template includes:
|
117
|
+
|
118
|
+
- Responsive design
|
119
|
+
- Animated maintenance icon
|
120
|
+
- Clean and modern layout
|
121
|
+
- Estimated time display
|
122
|
+
|
123
|
+
## Rails Version Support
|
124
|
+
|
125
|
+
- Rails 6.0 or higher
|
126
|
+
- Ruby 2.6 or higher
|
127
|
+
|
128
|
+
## Contributing
|
129
|
+
|
130
|
+
1. Fork it
|
131
|
+
2. Create your feature branch (`git checkout -b feature/amazing_feature`)
|
132
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
133
|
+
4. Push to the branch (`git push origin feature/amazing_feature`)
|
134
|
+
5. Create a Pull Request
|
135
|
+
|
136
|
+
## Best Practices
|
137
|
+
|
138
|
+
- Always test your changes
|
139
|
+
- Follow the Ruby Style Guide
|
140
|
+
- Write meaningful commit messages
|
141
|
+
- Add tests for new features
|
142
|
+
- Update documentation when needed
|
143
|
+
|
144
|
+
## Common Issues
|
145
|
+
|
146
|
+
### IP Whitelist Not Working
|
147
|
+
|
148
|
+
Make sure your IP is correctly added to the configuration file and you're not behind an unexpected proxy.
|
149
|
+
|
150
|
+
### Language Not Changing
|
151
|
+
|
152
|
+
Verify that:
|
153
|
+
1. The locale file exists
|
154
|
+
2. The locale is correctly set in the configuration
|
155
|
+
3. The Rails server was restarted after changes
|
156
|
+
|
157
|
+
## Security
|
158
|
+
|
159
|
+
- The gem uses Rails' built-in security features
|
160
|
+
- IP validation is performed securely
|
161
|
+
- No sensitive information is exposed
|
162
|
+
|
163
|
+
## License
|
164
|
+
|
165
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
166
|
+
|
167
|
+
## Contact & Support
|
168
|
+
|
169
|
+
- GitHub Issues: [rails_maint/issues](https://github.com/codescaptain/rails_maint/issues)
|
170
|
+
- Email: [ahmet-57-@hotmail.com](mailto:ahmet-57-@hotmail.com)
|
171
|
+
|
172
|
+
## Credits
|
173
|
+
|
174
|
+
Developed and maintained by [CodesCaptain](https://github.com/codescaptain)
|
175
|
+
|
176
|
+
## Changelog
|
177
|
+
|
178
|
+
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
|
data/exe/rails_maint
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
* {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
box-sizing: border-box;
|
5
|
+
}
|
6
|
+
|
7
|
+
body {
|
8
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
9
|
+
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
10
|
+
min-height: 100vh;
|
11
|
+
display: flex;
|
12
|
+
align-items: center;
|
13
|
+
justify-content: center;
|
14
|
+
text-align: center;
|
15
|
+
padding: 20px;
|
16
|
+
}
|
17
|
+
|
18
|
+
.maintenance-container {
|
19
|
+
background: white;
|
20
|
+
padding: 40px;
|
21
|
+
border-radius: 20px;
|
22
|
+
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
|
23
|
+
max-width: 600px;
|
24
|
+
width: 90%;
|
25
|
+
}
|
26
|
+
|
27
|
+
.icon {
|
28
|
+
width: 150px;
|
29
|
+
height: 150px;
|
30
|
+
margin-bottom: 30px;
|
31
|
+
}
|
32
|
+
|
33
|
+
h1 {
|
34
|
+
color: #2d3748;
|
35
|
+
font-size: 2.5rem;
|
36
|
+
margin-bottom: 20px;
|
37
|
+
}
|
38
|
+
|
39
|
+
p {
|
40
|
+
color: #4a5568;
|
41
|
+
font-size: 1.1rem;
|
42
|
+
line-height: 1.6;
|
43
|
+
margin-bottom: 30px;
|
44
|
+
}
|
45
|
+
|
46
|
+
.estimated-time {
|
47
|
+
background: #ebf8ff;
|
48
|
+
color: #2b6cb0;
|
49
|
+
padding: 12px 24px;
|
50
|
+
border-radius: 12px;
|
51
|
+
display: inline-block;
|
52
|
+
font-weight: 500;
|
53
|
+
margin-top: 10px;
|
54
|
+
}
|
55
|
+
|
56
|
+
@keyframes wrench-rotate {
|
57
|
+
0% { transform: rotate(-15deg); }
|
58
|
+
50% { transform: rotate(15deg); }
|
59
|
+
100% { transform: rotate(-15deg); }
|
60
|
+
}
|
61
|
+
|
62
|
+
.rotating-wrench {
|
63
|
+
animation: wrench-rotate 3s infinite ease-in-out;
|
64
|
+
display: inline-block;
|
65
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!-- lib/rails_maint/templates/maintenance.html -->
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html lang="<%= lang %>">
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
<title><%= title %></title>
|
8
|
+
<style>
|
9
|
+
<%= css_content %>
|
10
|
+
</style>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div class="maintenance-container">
|
14
|
+
<div class="rotating-wrench">
|
15
|
+
<svg class="icon" viewBox="0 0 512 512">
|
16
|
+
<path fill="#4A5568" d="M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"/>
|
17
|
+
</svg>
|
18
|
+
</div>
|
19
|
+
<h1><%= title %></h1>
|
20
|
+
<p><%= description %></p>
|
21
|
+
<div class="estimated-time">
|
22
|
+
<%= estimated_time %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
# lib/rails_maint/cli.rb
|
2
|
+
require 'thor'
|
3
|
+
require 'fileutils'
|
4
|
+
require_relative 'helpers/maintenance_page_helper'
|
5
|
+
|
6
|
+
module RailsMaint
|
7
|
+
class CLI < Thor
|
8
|
+
include MaintenancePageHelper
|
9
|
+
|
10
|
+
desc "install", "Generate configuration file and locale file"
|
11
|
+
method_option :locale, type: :string, default: 'en', desc: "Set the language for maintenance page"
|
12
|
+
def install
|
13
|
+
create_config_file
|
14
|
+
create_locale_file(options[:locale])
|
15
|
+
puts "RailsMaint has been installed with #{options[:locale]} locale."
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "enable", "Enable maintenance mode"
|
19
|
+
def enable
|
20
|
+
File.write('tmp/maintenance_mode.txt', Time.now.to_s)
|
21
|
+
puts "Maintenance mode enabled."
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "disable", "Disable maintenance mode"
|
25
|
+
def disable
|
26
|
+
delete_file('tmp/maintenance_mode.txt')
|
27
|
+
puts "Maintenance mode disabled"
|
28
|
+
end
|
29
|
+
|
30
|
+
desc "uninstall", "Remove all files created by RailsMaint"
|
31
|
+
def uninstall
|
32
|
+
delete_file('tmp/maintenance_mode.txt')
|
33
|
+
delete_file('config/rails_maint.yml')
|
34
|
+
delete_file('config/locales/rails_maint.en.yml')
|
35
|
+
delete_file('config/locales/rails_maint.tr.yml')
|
36
|
+
puts "RailsMaint has been uninstalled and all related files have been removed."
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def create_maintenance_page(locale = 'en')
|
42
|
+
maintenance_page_path = "public/maintenance.html"
|
43
|
+
unless File.exist?(maintenance_page_path)
|
44
|
+
File.write(maintenance_page_path, default_maintenance_page_content(locale))
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def create_locale_file(locale = 'en')
|
49
|
+
locale_dir = "config/locales"
|
50
|
+
FileUtils.mkdir_p(locale_dir) unless Dir.exist?(locale_dir)
|
51
|
+
|
52
|
+
locale_file_path = "#{locale_dir}/rails_maint.#{locale}.yml"
|
53
|
+
unless File.exist?(locale_file_path)
|
54
|
+
base_path = File.expand_path('../', __FILE__)
|
55
|
+
source_locale_file = File.join(base_path, "assets/locales/#{locale}.yml")
|
56
|
+
FileUtils.cp(source_locale_file, locale_file_path)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def create_config_file
|
61
|
+
config_path = "config/rails_maint.yml"
|
62
|
+
unless File.exist?(config_path)
|
63
|
+
File.write(config_path, default_config_content)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def delete_file(path)
|
68
|
+
if File.exist?(path)
|
69
|
+
File.delete(path)
|
70
|
+
puts "#{path} has been removed."
|
71
|
+
else
|
72
|
+
puts "#{path} does not exist, so it cannot be removed."
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def default_config_content
|
77
|
+
<<~YAML
|
78
|
+
# RailsMaint Configuration
|
79
|
+
# -----------------------
|
80
|
+
|
81
|
+
# Default locale for maintenance page
|
82
|
+
locale: #{options[:locale] || 'en'}
|
83
|
+
|
84
|
+
# IP addresses that can access the application during maintenance
|
85
|
+
white_listed_ips:
|
86
|
+
- 127.0.0.1
|
87
|
+
- "::1"
|
88
|
+
# Add more IPs below
|
89
|
+
# - 192.168.1.1
|
90
|
+
YAML
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# lib/rails_maint/helpers/maintenance_page_helper.rb
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
module RailsMaint
|
5
|
+
module MaintenancePageHelper
|
6
|
+
def default_maintenance_page_content(locale = 'en')
|
7
|
+
base_path = File.expand_path('../../', __FILE__)
|
8
|
+
css_file = File.join(base_path, 'assets/default.css')
|
9
|
+
html_file = File.join(base_path, 'assets/maintenance.html')
|
10
|
+
locale_file = File.join(base_path, "assets/locales/#{locale}.yml")
|
11
|
+
|
12
|
+
# CSS ve HTML içeriğini oku
|
13
|
+
css_content = File.read(css_file)
|
14
|
+
html_template = File.read(html_file)
|
15
|
+
|
16
|
+
app_locale_file = "config/locales/rails_maint.#{locale}.yml"
|
17
|
+
|
18
|
+
puts "APP LOCALE FILE: #{app_locale_file}"
|
19
|
+
translations = if File.exist?(app_locale_file)
|
20
|
+
YAML.load_file(app_locale_file)[locale]['rails_maint']
|
21
|
+
else
|
22
|
+
YAML.load_file(locale_file)[locale]['rails_maint']
|
23
|
+
end
|
24
|
+
|
25
|
+
# Placeholder'ları değiştir
|
26
|
+
html_content = html_template
|
27
|
+
.gsub('<%= css_content %>', css_content)
|
28
|
+
.gsub('<%= lang %>', locale)
|
29
|
+
.gsub('<%= title %>', translations['title'])
|
30
|
+
.gsub('<%= description %>', translations['description'])
|
31
|
+
.gsub('<%= estimated_time %>', translations['estimated_time'])
|
32
|
+
|
33
|
+
html_content
|
34
|
+
end
|
35
|
+
|
36
|
+
def available_locales
|
37
|
+
base_path = File.expand_path('../../', __FILE__)
|
38
|
+
locale_dir = File.join(base_path, 'assets/locales')
|
39
|
+
app_locale_dir = 'config/locales'
|
40
|
+
|
41
|
+
gem_locales = Dir.glob("#{locale_dir}/*.yml").map { |f| File.basename(f, '.yml') }
|
42
|
+
app_locales = if Dir.exist?(app_locale_dir)
|
43
|
+
Dir.glob("#{app_locale_dir}/rails_maint.*.yml").map { |f| File.basename(f, '.yml').split('.').last }
|
44
|
+
else
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
(gem_locales + app_locales).uniq
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# lib/rails_maint/middleware.rb
|
2
|
+
module RailsMaint
|
3
|
+
class Middleware
|
4
|
+
include MaintenancePageHelper
|
5
|
+
|
6
|
+
def initialize(app)
|
7
|
+
@app = app
|
8
|
+
end
|
9
|
+
|
10
|
+
def call(env)
|
11
|
+
if maintenance_mode_enabled? && !ip_whitelisted?(env)
|
12
|
+
[503, { 'Content-Type' => 'text/html' }, [maintenance_page]]
|
13
|
+
else
|
14
|
+
@app.call(env)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def maintenance_mode_enabled?
|
21
|
+
File.exist?('tmp/maintenance_mode.txt')
|
22
|
+
end
|
23
|
+
|
24
|
+
def ip_whitelisted?(env)
|
25
|
+
config = load_config
|
26
|
+
white_listed_ips = config['white_listed_ips'] || []
|
27
|
+
client_ip = env['HTTP_X_FORWARDED_FOR']&.split(',')&.first&.strip || env['REMOTE_ADDR']
|
28
|
+
white_listed_ips.include?(client_ip)
|
29
|
+
end
|
30
|
+
|
31
|
+
def load_config
|
32
|
+
config_path = 'config/rails_maint.yml'
|
33
|
+
if File.exist?(config_path)
|
34
|
+
YAML.load_file(config_path)
|
35
|
+
else
|
36
|
+
{}
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def maintenance_page
|
41
|
+
config = load_config
|
42
|
+
locale = config['locale'] || 'en'
|
43
|
+
default_maintenance_page_content(locale)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/rails_maint.rb
ADDED
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails_maint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- codescaptain
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-11-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '13.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '13.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.50'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.50'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.22'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.22'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.25'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.25'
|
125
|
+
description: RailsMaint is a gem that helps you enable maintenance mode for your Rails
|
126
|
+
application with customizable options and IP whitelisting.
|
127
|
+
email:
|
128
|
+
- ahmet-57-@hotmail.com
|
129
|
+
executables:
|
130
|
+
- rails_maint
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- CHANGELOG.md
|
135
|
+
- LICENSE.txt
|
136
|
+
- README.md
|
137
|
+
- exe/rails_maint
|
138
|
+
- lib/rails_maint.rb
|
139
|
+
- lib/rails_maint/assets/default.css
|
140
|
+
- lib/rails_maint/assets/locales/en.yml
|
141
|
+
- lib/rails_maint/assets/locales/tr.yml
|
142
|
+
- lib/rails_maint/assets/maintenance.html
|
143
|
+
- lib/rails_maint/cli.rb
|
144
|
+
- lib/rails_maint/helpers/maintenance_page_helper.rb
|
145
|
+
- lib/rails_maint/middleware.rb
|
146
|
+
- lib/rails_maint/version.rb
|
147
|
+
homepage: https://github.com/codescaptain/rails_maint
|
148
|
+
licenses:
|
149
|
+
- MIT
|
150
|
+
metadata:
|
151
|
+
homepage_uri: https://github.com/codescaptain/rails_maint
|
152
|
+
source_code_uri: https://github.com/codescaptain/rails_maint
|
153
|
+
changelog_uri: https://github.com/codescaptain/rails_maint/blob/main/CHANGELOG.md
|
154
|
+
allowed_push_host: https://rubygems.org
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 2.6.0
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubygems_version: 3.0.3.1
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: A maintenance mode helper for Rails applications
|
174
|
+
test_files: []
|