panacea-rails 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f070c989932466c5bb964f71f230bb1abb41df3100099c0a95d837d4f80ed8e1
4
- data.tar.gz: 6008c1a3e5d30fa6fbde589e39571a0bf33ae2fa5f801a9a8e0086ab18584402
3
+ metadata.gz: f1c98324363e231d323175486b556d638c8c70eae7c4159f03e1e694807c4126
4
+ data.tar.gz: f5d36b1f46a0929c88d6c89a205bbfb39f8ab91d7fa62c0308968cfae8d8431a
5
5
  SHA512:
6
- metadata.gz: 0c87f0e65cd4d4772fe88670b22a7721c14c68851d7e2c036764862f0729a32b12d8884e91332bfaf9ada86898c4357a676e152dc783756b3ce148ee070ca83c
7
- data.tar.gz: 9a9b10c2cbc05cd70653baac7c4284596fc04c92300e54fae023c1fcc38f30a73fb4814eb4abab938f623f922aa9dfd6bd7c0e1aa3c72c9fbdbbc6005f15681e
6
+ metadata.gz: e45645bd5145382d8814e2541b89ca976044a3abd101078fdaba7c68a6614f92cd7bf69917900abb6c37e40ed2bdaf660a422fa62ae432ae9c5d40725b05f7ac
7
+ data.tar.gz: 87c93c6b3aa129e6c85b320e65fba207ba22757394856df8957cd70f021a29a53842b2a39af2f7ee503c4dbf927c5aba3f9004b478318e3a987babe3f76b907f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- panacea-rails (0.1.4)
4
+ panacea-rails (0.2.0)
5
5
  bundler (~> 1)
6
6
  slop (~> 4.6)
7
7
  tty-prompt (~> 0.17)
@@ -10,17 +10,16 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ast (2.4.0)
13
- equatable (0.5.0)
14
- hitimes (1.2.6)
13
+ equatable (0.6.1)
15
14
  jaro_winkler (1.5.1)
16
15
  minitest (5.11.3)
17
- necromancer (0.4.0)
16
+ necromancer (0.5.0)
18
17
  parallel (1.12.1)
19
18
  parser (2.5.1.2)
20
19
  ast (~> 2.4.0)
21
- pastel (0.7.2)
22
- equatable (~> 0.5.0)
23
- tty-color (~> 0.4.0)
20
+ pastel (0.7.3)
21
+ equatable (~> 0.6)
22
+ tty-color (~> 0.5)
24
23
  powerpack (0.1.2)
25
24
  rainbow (3.0.0)
26
25
  rake (10.5.0)
@@ -36,24 +35,20 @@ GEM
36
35
  ruby-progressbar (1.9.0)
37
36
  sdoc (1.0.0)
38
37
  rdoc (>= 5.0)
39
- slop (4.6.2)
40
- timers (4.1.2)
41
- hitimes
42
- tty-color (0.4.3)
43
- tty-cursor (0.6.0)
44
- tty-prompt (0.17.1)
45
- necromancer (~> 0.4.0)
38
+ slop (4.7.0)
39
+ tty-color (0.5.0)
40
+ tty-cursor (0.7.0)
41
+ tty-prompt (0.19.0)
42
+ necromancer (~> 0.5.0)
46
43
  pastel (~> 0.7.0)
47
- timers (~> 4.0)
48
- tty-cursor (~> 0.6.0)
49
- tty-reader (~> 0.4.0)
50
- tty-reader (0.4.0)
51
- tty-cursor (~> 0.6.0)
52
- tty-screen (~> 0.6.4)
44
+ tty-reader (~> 0.6.0)
45
+ tty-reader (0.6.0)
46
+ tty-cursor (~> 0.7)
47
+ tty-screen (~> 0.7)
53
48
  wisper (~> 2.0.0)
54
- tty-screen (0.6.5)
49
+ tty-screen (0.7.0)
55
50
  unicode-display_width (1.4.0)
56
- wisper (2.0.0)
51
+ wisper (2.0.1)
57
52
 
58
53
  PLATFORMS
59
54
  ruby
@@ -66,4 +61,4 @@ DEPENDENCIES
66
61
  sdoc (~> 1.0)
67
62
 
68
63
  BUNDLED WITH
69
- 1.16.6
64
+ 1.17.2
@@ -219,49 +219,6 @@ dotenv:
219
219
  default: false
220
220
  type: boolean
221
221
 
222
- webpack:
223
- title: Do you want to use Webpacker to manage your app's frontend?
224
- default: false
225
- type: boolean
226
- subquestions:
227
- webpack_type:
228
- title: What framework do you want to pre-configure Webpack with?
229
- type: select
230
- options:
231
- - none
232
- - react
233
- - vue
234
- - angular
235
- - elm
236
- - stimulus
237
-
238
- bootswatch:
239
- title: Do you want to use a Bootswatch 3 template?
240
- default: false
241
- type: boolean
242
- disable_with: webpack
243
- subquestions:
244
- bootswatch_template_name:
245
- title: Which template do you want to setup?
246
- type: select
247
- options:
248
- - cerulean
249
- - cosmo
250
- - cyborg
251
- - darkly
252
- - flatly
253
- - journal
254
- - lumen
255
- - paper
256
- - readable
257
- - sandstone
258
- - simplex
259
- - slate
260
- - spacelab
261
- - superhero
262
- - united
263
- - yeti
264
-
265
222
  pg_search:
266
223
  title: Do you want to use pg_search gem to enable PostgreSQL's full text search?
267
224
  default: false
@@ -338,8 +295,3 @@ autocommit:
338
295
  title: What should be the commit's message?
339
296
  default: Initialize Rails App powered with Panacea
340
297
  type: text
341
-
342
- share_usage_info:
343
- title: Do you want to help us improve Panacea by sharing with us your answers? [100% anonymous]
344
- default: true
345
- type: boolean
@@ -85,7 +85,6 @@ module Panacea # :nodoc:
85
85
  def start
86
86
  welcome_message
87
87
  ask_questions
88
- track_answers
89
88
  save_answers
90
89
  end
91
90
 
@@ -48,7 +48,7 @@ module Panacea # :nodoc:
48
48
  # Add here any new method to be used from Thor / Rails Generator
49
49
  def respond_to_missing?(method_name, include_private = false)
50
50
  %i[
51
- after_bundle generate rails_command template
51
+ generate rails_command template
52
52
  run git source_paths empty_directory append_to_file
53
53
  environment application say inject_into_class
54
54
  inject_into_file directory
@@ -250,39 +250,11 @@ module Panacea # :nodoc:
250
250
 
251
251
  generate "devise:install"
252
252
  generate "devise", model_name
253
- generate "devise:i18n:views", plural_model_name if config.dig("devise_override_views")
254
- generate "devise:i18n:locale", locale
253
+ generate "devise:views" if config.dig("devise_override_views")
255
254
 
256
255
  rails_command "db:migrate"
257
256
  end
258
257
 
259
- ###
260
- # Setup booswatch-rails gem.
261
- def setup_bootswatch
262
- run "rm app/assets/stylesheets/application.css"
263
- template "templates/bootswatch/stylesheets/application.scss.tt", "app/assets/stylesheets/application.scss"
264
-
265
- inject_into_file "app/assets/javascripts/application.js", after: "//= require turbolinks" do
266
- <<~CONFS
267
-
268
- // Requires for Bootswatch
269
- //= require jquery
270
- //= require bootstrap-sprockets
271
- CONFS
272
- end
273
-
274
- run "rm app/views/layouts/application.html.erb"
275
-
276
- template "templates/bootswatch/views/shared/_navbar.html.haml", "app/views/shared/_navbar.html.haml"
277
- template "templates/bootswatch/views/shared/_flash_messages.html.haml", "app/views/shared/_flash_messages.html.haml"
278
- template "templates/bootswatch/views/layouts/application.html.haml", "app/views/layouts/application.html.haml", force: true
279
-
280
- generate "controller home index"
281
- inject_into_file "config/routes.rb", "\nroot to: 'home#index'", after: "Rails.application.routes.draw do"
282
-
283
- directory "templates/devise/views/", "app/views/devise/", force: true if config.dig("devise_override_views")
284
- end
285
-
286
258
  ###
287
259
  # Setup money_rails gem.
288
260
  def setup_money_rails
@@ -26,6 +26,8 @@ panacea_generator.update_source_paths
26
26
  panacea_generator.copy_gemfile
27
27
  panacea_generator.copy_readme
28
28
  panacea_generator.generate_panacea_document
29
+ panacea_generator.run_bundle
30
+
29
31
  panacea_generator.setup_rubocop
30
32
  panacea_generator.setup_letter_opener
31
33
  panacea_generator.setup_timezone
@@ -33,26 +35,19 @@ panacea_generator.setup_default_locale
33
35
  panacea_generator.create_database
34
36
  panacea_generator.setup_oj if panacea_config.dig("oj")
35
37
  panacea_generator.setup_dotenv if panacea_config.dig("dotenv")
36
-
37
- panacea_generator.after_bundle_hook do |generator|
38
- generator.setup_bullet
39
- generator.setup_test_suite
40
- generator.override_test_helper
41
- generator.setup_simplecov
42
- generator.setup_background_job if panacea_config.dig("background_job") != "none"
43
- generator.override_application_system_test if panacea_config.dig("headless_chrome")
44
- generator.setup_devise if panacea_config.dig("devise")
45
- generator.setup_money_rails if panacea_config.dig("money_rails")
46
- generator.setup_kaminari if panacea_config.dig("kaminari")
47
- generator.setup_webpack if panacea_config.dig("webpack")
48
- generator.setup_bootswatch if panacea_config.dig("bootswatch")
49
- generator.setup_foreman if panacea_config.dig("foreman")
50
- generator.setup_pundit if panacea_config.dig("pundit")
51
-
52
- # This should be always at the end
53
- generator.fix_offenses!
54
- generator.commit! if panacea_config.dig("autocommit")
55
- generator.setup_githook if panacea_config.dig("githook") && !options[:skip_git]
56
-
57
- generator.bye_message
58
- end
38
+ panacea_generator.setup_bullet
39
+ panacea_generator.setup_test_suite
40
+ panacea_generator.override_test_helper
41
+ panacea_generator.setup_simplecov
42
+ panacea_generator.setup_background_job if panacea_config.dig("background_job") != "none"
43
+ panacea_generator.override_application_system_test if panacea_config.dig("headless_chrome")
44
+ panacea_generator.setup_devise if panacea_config.dig("devise")
45
+ panacea_generator.setup_money_rails if panacea_config.dig("money_rails")
46
+ panacea_generator.setup_kaminari if panacea_config.dig("kaminari")
47
+ panacea_generator.setup_foreman if panacea_config.dig("foreman")
48
+ panacea_generator.setup_pundit if panacea_config.dig("pundit")
49
+
50
+ panacea_generator.fix_offenses!
51
+ panacea_generator.commit! if panacea_config.dig("autocommit")
52
+ panacea_generator.setup_githook if panacea_config.dig("githook") && !options[:skip_git]
53
+ panacea_generator.bye_message
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Panacea # :nodoc:
4
4
  module Rails # :nodoc:
5
- VERSION = "0.1.5"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
@@ -5,15 +5,16 @@ source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
6
6
 
7
7
  ruby "<%= @panacea.dig("ruby_version") %>"
8
- gem "rails", "~> 5.2.2.1"
8
+
9
+ gem "rails", "~> 6.0.0"
9
10
  gem "<%= db_gem.name %>"<%= %(, '#{db_gem.version}') if db_gem.version %>
10
11
 
11
- gem "bootsnap", ">= 1.1.0", require: false
12
+ gem "bootsnap", ">= 1.4.4", require: false
12
13
  <% if @panacea.dig("devise") -%>
13
14
  gem "devise"
14
- gem "devise-i18n"
15
15
  <% end -%>
16
16
  gem "haml-rails"
17
+ gem "image_processing", "~> 1.2"
17
18
  gem "interactor-rails"
18
19
  <% if @panacea.dig("kaminari") -%>
19
20
  gem "kaminari"
@@ -27,7 +28,7 @@ gem "money-rails", "~> 1"
27
28
  <% if @panacea.dig("pg_search") -%>
28
29
  gem "pg_search"
29
30
  <% end -%>
30
- gem "puma", "~> 3.11"
31
+ gem "puma", "~> 4.1"
31
32
  <% if @panacea.dig("pundit") -%>
32
33
  gem "pundit"
33
34
  <% end -%>
@@ -37,15 +38,16 @@ gem "redcarpet"
37
38
  gem "sass-rails", "~> 5.0"
38
39
  gem "turbolinks", "~> 5"
39
40
  gem "uglifier", ">= 1.3.0"
40
- <% if @panacea.dig("webpack") -%>
41
- gem "webpacker"
42
- <% end -%>
41
+ gem "webpacker", "~> 4.0"
43
42
 
44
43
  <% if @panacea.dig("background_job") != "none" -%>
45
44
  # Background Jobs Adapter
46
45
  gem "<%= @panacea.dig("background_job") %>"
47
46
  <% end -%>
48
47
 
48
+ # Use Redis adapter to run Action Cable in production
49
+ # gem 'redis', '~> 4.0'
50
+
49
51
  <% if @panacea.dig("bootswatch") %>
50
52
  # Bootswatch Dependencies
51
53
  gem "bootstrap-sass", "~> 3.3.7"
@@ -65,7 +67,7 @@ group :development, :test do
65
67
  gem "dotenv-rails"
66
68
  <% end -%>
67
69
  <% if @panacea.dig("factory_bot") -%>
68
- gem "factory_bot_rails", "~> 4.0"
70
+ gem "factory_bot_rails", "~> 5.0"
69
71
  <% end -%>
70
72
  gem "pry"
71
73
  gem "rubocop-rails_config"
@@ -82,13 +84,12 @@ group :development do
82
84
  end
83
85
 
84
86
  group :test do
85
- gem "capybara", ">= 2.15", "< 4.0"
86
- gem "capybara-selenium"
87
- gem "chromedriver-helper"
87
+ gem "capybara", ">= 2.15"
88
88
  <% if @panacea.dig("faker") -%>
89
89
  gem "faker"
90
90
  <% end -%>
91
91
  gem "selenium-webdriver"
92
+ gem "webdrivers"
92
93
  gem "simplecov", require: false
93
94
  <% if @panacea.dig("http_stubs") != "none" -%>
94
95
  gem "<%= @panacea.dig("http_stubs") %>"
@@ -6,6 +6,4 @@ sidekiq: bundle exec sidekiq -q default -q mailers
6
6
  redis: redis-server
7
7
  resque: bundle exec rake resque:work QUEUE='*'
8
8
  <% end -%>
9
- <% if @panacea.dig("webpack") -%>
10
9
  webpack: bin/webpack-dev-server
11
- <% end -%>
@@ -1,20 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "test_helper"
4
- require "selenium/webdriver"
4
+ require "webdrivers"
5
+ require "webdrivers/chromedriver"
5
6
 
6
- Capybara.register_driver :chrome do |app|
7
- Capybara::Selenium::Driver.new(app, browser: :chrome)
8
- end
7
+ Webdrivers.cache_time = 86_400
8
+ Webdrivers::Chromedriver.update
9
9
 
10
10
  Capybara.register_driver :headless_chrome do |app|
11
- capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
12
- chromeOptions: { args: %w(headless disable-gpu no-sandbox) }
13
- )
11
+ options = ::Selenium::WebDriver::Chrome::Options.new
12
+
13
+ options.add_argument("--headless")
14
+ options.add_argument("--no-sandbox")
15
+ options.add_argument("--disable-gpu")
16
+ options.add_argument("--window-size=1920,1080")
14
17
 
15
- Capybara::Selenium::Driver.new app,
16
- browser: :chrome,
17
- desired_capabilities: capabilities
18
+ Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
18
19
  end
19
20
 
20
21
  Capybara.javascript_driver = :headless_chrome
@@ -24,5 +25,6 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
24
25
  include Warden::Test::Helpers
25
26
 
26
27
  <% end -%>
28
+
27
29
  driven_by :headless_chrome
28
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panacea-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Moreno
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2019-03-25 00:00:00.000000000 Z
13
+ date: 2019-10-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler