Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya N. Zykin committed Feb 4, 2023
1 parent 8606110 commit 72f2ef5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/rails7startkit/elastic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

module Rails7StartKit
class << self
# rubocop:disable Layout/LineLength
def turn_off_elastic_settings
cmd1 = `curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings -d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'`
cmd2 = `curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'`
puts cmd1
puts cmd2
end
# rubocop:enable Layout/LineLength
end
end
3 changes: 3 additions & 0 deletions bin/rails7startkit/rails7startkit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def reset
end
end

# rubocop:disable Metrics/AbcSize
def cache
puts 'Toggle App Cache in development mode'
cache_toggle_file = 'tmp/caching-dev.txt'
Expand All @@ -127,6 +128,7 @@ def cache
end
end


# Not sure if for windows it will work.
# https://stackoverflow.com/questions/11982057/how-can-i-trigger-a-shell-script-and-run-in-background-async-in-ruby
#
Expand All @@ -138,5 +140,6 @@ def cache
puma_restart
end
end
# rubocop:enable Metrics/AbcSize
end
end

0 comments on commit 72f2ef5

Please sign in to comment.