rails-interactive 0.1.7 → 0.1.8
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/Gemfile.lock +1 -1
- data/lib/rails_interactive/templates/setup_graphql.rb +10 -0
- data/lib/rails_interactive/templates/setup_haml.rb +18 -0
- data/lib/rails_interactive/templates/setup_kaminari.rb +7 -0
- data/lib/rails_interactive/templates/setup_slim.rb +19 -0
- data/lib/rails_interactive/version.rb +1 -1
- data/lib/rails_interactive.rb +12 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 603090ac1b9b8c849321c7cba9861f54577c33ca2140fba83f06ba898c229a0a
|
4
|
+
data.tar.gz: 8cd7ce670ce1806e6039486aa0a6d26a3b237c571cea9ce501306a3ab5a795c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd590968411d6381d448f0466d3afd4fb2b43e2599ef51142c22a80d921b317523f943d57f3baa6ec5a89bf4370af0766fb36622ac44bd81cfd088926edd15aa
|
7
|
+
data.tar.gz: a11ed5e1d003b4aa98ba0584da41dd6a270735b324c76690632ab627b93ec387f6ae8b354e007145a06ed3dc222efe9b086672af49e9413fa96dd2f5db841a86
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
def bundle_install
|
4
|
+
Bundler.with_unbundled_env { run "bundle install" }
|
5
|
+
end
|
6
|
+
|
7
|
+
run "bundle add haml"
|
8
|
+
bundle_install
|
9
|
+
|
10
|
+
if yes?("Would you like to convert your existing *.erb files to *.haml files? [y/n]")
|
11
|
+
run "bundle add erb2haml --group 'development'"
|
12
|
+
bundle_install
|
13
|
+
if yes?("Would you like to keep the original *.erb files? [y/n]")
|
14
|
+
rake "haml:convert_erbs"
|
15
|
+
else
|
16
|
+
rake "haml:replace_erbs"
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
def bundle_install
|
4
|
+
Bundler.with_unbundled_env { run "bundle install" }
|
5
|
+
end
|
6
|
+
|
7
|
+
run "bundle add slim-rails"
|
8
|
+
|
9
|
+
bundle_install
|
10
|
+
|
11
|
+
if yes?("Would you like to convert your existing *.erb files to *.slim files? [y/n]")
|
12
|
+
run "bundle add html2slim --group 'development'"
|
13
|
+
bundle_install
|
14
|
+
if yes?("Would you like to keep the original *.erb files? [y/n]")
|
15
|
+
run "erb2slim app/views"
|
16
|
+
else
|
17
|
+
run "erb2slim app/views -d"
|
18
|
+
end
|
19
|
+
end
|
data/lib/rails_interactive.rb
CHANGED
@@ -29,6 +29,7 @@ module RailsInteractive
|
|
29
29
|
database
|
30
30
|
features
|
31
31
|
code_quality_tool
|
32
|
+
template_engines
|
32
33
|
admin_panel
|
33
34
|
testing_tools
|
34
35
|
|
@@ -52,6 +53,9 @@ module RailsInteractive
|
|
52
53
|
# Code Quality Template
|
53
54
|
system("bin/rails app:template LOCATION=templates/setup_#{@inputs[:code_quality_tool]}.rb")
|
54
55
|
|
56
|
+
# HTML Template Engines
|
57
|
+
system("bin/rails app:template LOCATION=templates/setup_#{@inputs[:template_engine]}.rb")
|
58
|
+
|
55
59
|
# Admin Panel Template
|
56
60
|
system("bin/rails app:template LOCATION=templates/setup_#{@inputs[:admin_panel]}.rb")
|
57
61
|
|
@@ -99,7 +103,7 @@ module RailsInteractive
|
|
99
103
|
end
|
100
104
|
|
101
105
|
def features
|
102
|
-
features = %w[devise cancancan omniauth pundit brakeman sidekiq]
|
106
|
+
features = %w[devise cancancan omniauth pundit brakeman sidekiq graphql kaminari]
|
103
107
|
|
104
108
|
@inputs[:features] = Prompt.new("Choose project features: ", "multi_select", features).perform
|
105
109
|
end
|
@@ -124,5 +128,12 @@ module RailsInteractive
|
|
124
128
|
@inputs[:testing_tools] =
|
125
129
|
Prompt.new("Choose project's testing tools: ", "multi_select", testing_tools).perform
|
126
130
|
end
|
131
|
+
|
132
|
+
def template_engines
|
133
|
+
template_engines = { "HAML" => "haml", "SLIM" => "slim" }
|
134
|
+
|
135
|
+
@inputs[:template_engine] =
|
136
|
+
Prompt.new("Choose project's template engine: ", "select", template_engines).perform
|
137
|
+
end
|
127
138
|
end
|
128
139
|
end
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oguzhan Ince
|
@@ -141,12 +141,16 @@ files:
|
|
141
141
|
- lib/rails_interactive/templates/setup_brakeman.rb
|
142
142
|
- lib/rails_interactive/templates/setup_cancancan.rb
|
143
143
|
- lib/rails_interactive/templates/setup_devise.rb
|
144
|
+
- lib/rails_interactive/templates/setup_graphql.rb
|
145
|
+
- lib/rails_interactive/templates/setup_haml.rb
|
146
|
+
- lib/rails_interactive/templates/setup_kaminari.rb
|
144
147
|
- lib/rails_interactive/templates/setup_omniauth.rb
|
145
148
|
- lib/rails_interactive/templates/setup_pundit.rb
|
146
149
|
- lib/rails_interactive/templates/setup_rails_admin.rb
|
147
150
|
- lib/rails_interactive/templates/setup_rspec.rb
|
148
151
|
- lib/rails_interactive/templates/setup_rubocop.rb
|
149
152
|
- lib/rails_interactive/templates/setup_sidekiq.rb
|
153
|
+
- lib/rails_interactive/templates/setup_slim.rb
|
150
154
|
- lib/rails_interactive/templates/setup_standardrb.rb
|
151
155
|
- lib/rails_interactive/version.rb
|
152
156
|
- rails-interactive.gemspec
|