rails-interactive 2.1.0 → 2.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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +1 -1
- data/lib/cli/command_handler.rb +19 -1
- data/lib/cli/config/commands.yml +15 -1
- data/lib/cli/templates/setup_active_admin.rb +8 -0
- data/lib/cli/templates/setup_devise.rb +1 -1
- data/lib/cli/templates/setup_sassc_rails.rb +4 -0
- data/lib/cli/version.rb +1 -1
- data/lib/rails_interactive.rb +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36127c97610fe0006be084e612ef004be19a5c028895125714b54972c005a109
|
4
|
+
data.tar.gz: 3aeee57f6fa0eef511e6bb54c3f5a28c876c69135664a2cfde532e89e19a0c53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5734bb977bf9f6ad5adad7be9bab11d3a251cee2d7a86a2b4b7b65f7bf5079279ef696c55979746b746836a67d7a8e7d25b38a1e82b5830f67ccf59a4abf10
|
7
|
+
data.tar.gz: 8f881c5a4c8043675575349c1a84eb0531958233c86ba5c6db2f31ea7e20659ec6791400a0a0f2a36a90978fe5b0f488b754bad20604de2f2f60f1a5e4da1181
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/cli/command_handler.rb
CHANGED
@@ -9,24 +9,42 @@ module RailsInteractive
|
|
9
9
|
class CommandHandler
|
10
10
|
def initialize
|
11
11
|
@commands = Command.new.all
|
12
|
+
@installed_commands = []
|
13
|
+
@installed_dependencies = []
|
12
14
|
end
|
13
15
|
|
14
16
|
def handle_multi_options(options, dependencies = nil)
|
15
17
|
handle_dependencies(dependencies)
|
16
|
-
|
18
|
+
|
19
|
+
options.each do |option|
|
20
|
+
@installed_commands << option
|
21
|
+
system("bin/rails app:template LOCATION=templates/setup_#{option}.rb")
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
25
|
def handle_option(option, dependencies = nil)
|
26
|
+
@installed_commands << option
|
20
27
|
handle_dependencies(dependencies)
|
28
|
+
|
21
29
|
system("bin/rails app:template LOCATION=templates/setup_#{option}.rb")
|
22
30
|
end
|
23
31
|
|
24
32
|
def handle_dependencies(dependencies)
|
25
33
|
dependencies&.each do |dependency|
|
34
|
+
next if duplicated_gem?(dependency)
|
35
|
+
|
26
36
|
puts ">> Dependency Detected: #{dependency} "
|
37
|
+
@installed_dependencies << dependency
|
38
|
+
|
27
39
|
system("bin/rails app:template LOCATION=templates/setup_#{dependency}.rb")
|
28
40
|
end
|
29
41
|
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def duplicated_gem?(option)
|
46
|
+
@installed_commands.include?(option) || @installed_dependencies.include?(option)
|
47
|
+
end
|
30
48
|
end
|
31
49
|
end
|
32
50
|
end
|
data/lib/cli/config/commands.yml
CHANGED
@@ -125,4 +125,18 @@
|
|
125
125
|
name: StandartRB
|
126
126
|
category: code_quality
|
127
127
|
description: " Ruby Style Guide, with linter & automatic code fixer. For details: https://github.com/testdouble/standard"
|
128
|
-
dependencies: null
|
128
|
+
dependencies: null
|
129
|
+
-
|
130
|
+
identifier: sassc_rails
|
131
|
+
name: Saasc Rails
|
132
|
+
category: development
|
133
|
+
description: "Integrate SassC-Ruby with Rails! For details: https://github.com/sass/sassc-rails"
|
134
|
+
dependencies: null
|
135
|
+
-
|
136
|
+
identifier: active_admin
|
137
|
+
name: ActiveAdmin
|
138
|
+
category: admin_panel
|
139
|
+
description: "The administration framework for Ruby on Rails applications. For details: https://github.com/activeadmin/activeadmin"
|
140
|
+
dependencies:
|
141
|
+
- sassc_rails
|
142
|
+
- devise
|
data/lib/cli/version.rb
CHANGED
data/lib/rails_interactive.rb
CHANGED
@@ -126,5 +126,12 @@ module RailsInteractive
|
|
126
126
|
|
127
127
|
@inputs[:database] = Prompt.new("Database: ", "select", database_types, required: true).perform
|
128
128
|
end
|
129
|
+
|
130
|
+
def admin_panel
|
131
|
+
admin_panel = { "ActiveAdmin" => "active_admin" }
|
132
|
+
|
133
|
+
@inputs[:admin_panel] =
|
134
|
+
Prompt.new("Choose project admin panel: ", "select", admin_panel).perform
|
135
|
+
end
|
129
136
|
end
|
130
137
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-interactive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oguzhan Ince
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05
|
11
|
+
date: 2022-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- lib/cli/config/commands.yml
|
171
171
|
- lib/cli/message.rb
|
172
172
|
- lib/cli/prompt.rb
|
173
|
+
- lib/cli/templates/setup_active_admin.rb
|
173
174
|
- lib/cli/templates/setup_avo.rb
|
174
175
|
- lib/cli/templates/setup_awesome_print.rb
|
175
176
|
- lib/cli/templates/setup_better_errors.rb
|
@@ -188,6 +189,7 @@ files:
|
|
188
189
|
- lib/cli/templates/setup_rails_admin.rb
|
189
190
|
- lib/cli/templates/setup_rspec.rb
|
190
191
|
- lib/cli/templates/setup_rubocop.rb
|
192
|
+
- lib/cli/templates/setup_sassc_rails.rb
|
191
193
|
- lib/cli/templates/setup_sidekiq.rb
|
192
194
|
- lib/cli/templates/setup_slim.rb
|
193
195
|
- lib/cli/templates/setup_standardrb.rb
|