rails-interactive 0.1.5 → 0.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1131b1845ea01796436e2f9b8365bf7ca6cacd48684b365e9f877fe9281d8793
|
4
|
+
data.tar.gz: 75513f09d007ee151c3d2f0300185eba131c3ae6aa4de8cb85f0df78af9873e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64401e715a895a69224790cea8172f2638f0f57201439ae610b736fafb406867096b439c4f5881bbd435e8df8a59ea21113df4ed2e7ea846cfd33b846c2c7010
|
7
|
+
data.tar.gz: e313ffb15b81f39b7275389f935b2a38a6a3ef72a6bc4fd77653ff0d3c6cf06030309e399daaa9bb8bd8b2aa767b54eb4de2ec27e28fbfb2203073f46143d608
|
data/.github/FUNDING.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails-interactive (0.1.
|
4
|
+
rails-interactive (0.1.6)
|
5
5
|
tty-prompt
|
6
6
|
|
7
7
|
GEM
|
@@ -111,9 +111,9 @@ GEM
|
|
111
111
|
net-protocol
|
112
112
|
timeout
|
113
113
|
nio4r (2.5.8)
|
114
|
-
nokogiri (1.13.
|
114
|
+
nokogiri (1.13.4-x86_64-darwin)
|
115
115
|
racc (~> 1.4)
|
116
|
-
nokogiri (1.13.
|
116
|
+
nokogiri (1.13.4-x86_64-linux)
|
117
117
|
racc (~> 1.4)
|
118
118
|
parallel (1.21.0)
|
119
119
|
parser (3.1.1.0)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
def file_contains?(filename, string)
|
4
|
+
File.foreach(filename).detect { |line| line.include?(string) }
|
5
|
+
end
|
6
|
+
|
7
|
+
run "bundle add sidekiq"
|
8
|
+
run "bundle add redis" unless file_contains? "Gemfile", "Gem 'redis'"
|
9
|
+
|
10
|
+
Bundler.with_unbundled_env { run "bundle install" }
|
11
|
+
|
12
|
+
# rubocop:disable Naming/HeredocDelimiterNaming
|
13
|
+
application do
|
14
|
+
<<~EOF
|
15
|
+
config.active_job.queue_adapter = :sidekiq
|
16
|
+
EOF
|
17
|
+
end
|
18
|
+
|
19
|
+
inject_into_file "config/routes.rb" do
|
20
|
+
<<~EOF
|
21
|
+
require "sidekiq/web"
|
22
|
+
if Rails.env.production?
|
23
|
+
Sidekiq::Web.use Rack::Auth::Basic do |username, password|
|
24
|
+
ActiveSupport::SecurityUtils.secure_compare(::Digest::SHA256.hexdigest(username), ::Digest::SHA256.hexdigest(ENV["SIDEKIQ_USERNAME"])) &
|
25
|
+
ActiveSupport::SecurityUtils.secure_compare(::Digest::SHA256.hexdigest(password), ::Digest::SHA256.hexdigest(ENV["SIDEKIQ_PASSWORD"]))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
EOF
|
29
|
+
end
|
30
|
+
# rubocop:enable Naming/HeredocDelimiterNaming
|
31
|
+
|
32
|
+
route 'mount Sidekiq::Web => "/sidekiq"'
|
data/lib/rails_interactive.rb
CHANGED
@@ -32,7 +32,7 @@ module RailsInteractive
|
|
32
32
|
database_types = { "PostgreSQL" => "-d postgresql", "MySQL" => "-d mysql", "SQLite" => "" }
|
33
33
|
@inputs[:database] = Prompt.new("Choose project's database: ", "select", database_types, required: true).perform
|
34
34
|
|
35
|
-
features = %w[devise cancancan omniauth pundit]
|
35
|
+
features = %w[devise cancancan omniauth pundit brakeman sidekiq]
|
36
36
|
@inputs[:features] = Prompt.new("Choose project features: ", "multi_select", features).perform
|
37
37
|
|
38
38
|
create
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-interactive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oguzhan Ince
|
@@ -118,6 +118,7 @@ executables:
|
|
118
118
|
extensions: []
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
|
+
- ".github/FUNDING.yml"
|
121
122
|
- ".github/workflows/main.yml"
|
122
123
|
- ".github/workflows/rspec_rubocop.yml"
|
123
124
|
- ".gitignore"
|
@@ -136,10 +137,12 @@ files:
|
|
136
137
|
- lib/rails_interactive.rb
|
137
138
|
- lib/rails_interactive/message.rb
|
138
139
|
- lib/rails_interactive/prompt.rb
|
140
|
+
- lib/rails_interactive/templates/setup_brakeman.rb
|
139
141
|
- lib/rails_interactive/templates/setup_cancancan.rb
|
140
142
|
- lib/rails_interactive/templates/setup_devise.rb
|
141
143
|
- lib/rails_interactive/templates/setup_omniauth.rb
|
142
144
|
- lib/rails_interactive/templates/setup_pundit.rb
|
145
|
+
- lib/rails_interactive/templates/setup_sidekiq.rb
|
143
146
|
- lib/rails_interactive/version.rb
|
144
147
|
- rails-interactive.gemspec
|
145
148
|
homepage: https://github.com/oguzsh/rails-interactive
|