Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
eclecticCodingND committed Apr 5, 2024
1 parent a7f8b8d commit d5005d9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/rails_app/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def self.start(args)
assets = prompt.select("How would you like to manage assets?", %w[propshaft sprockets], default: options_data.default_assets)
styling = prompt.select("How would you like to manage styling?", %w[bootstrap tailwind bulma postcss sass], default: options_data.default_styling)
database = prompt.select("Which database would you like to use?",
%w[postgresql sqlite3 mysql trilogy oracle sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc],
default: options_data.default_database)
%w[postgresql sqlite3 mysql trilogy oracle sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc],
default: options_data.default_database)

# Collect all configuration options into a hash
config_options = {
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_app/config_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def write(force: false)
end

def full_path
File.join(@config.location_paths[0] + '/' + @config.filename + @config.extname)
File.join(@config.location_paths[0] + "/" + @config.filename + @config.extname)
end

def read
Expand Down
2 changes: 1 addition & 1 deletion lib/rails_app/options_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(args)
end

def self.from_config(config_hash)
new_args = config_hash.map { |key, value| "#{value}" }
new_args = config_hash.map { |key, value| value.to_s }
new(new_args)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
it "uses the cli arguments and does not prompt for database" do
allow_any_instance_of(RailsApp::OptionsData).to receive(:default_database).and_return("postgresql")
expect(prompt).to receive(:select).with("Which database would you like to use?",
%w[postgresql sqlite3 mysql trilogy oracle sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc],
default: "postgresql")
%w[postgresql sqlite3 mysql trilogy oracle sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc],
default: "postgresql")
expect_any_instance_of(RailsApp::Command).to receive(:run)

described_class.start(%w[MyApp postgresql])
Expand Down

0 comments on commit d5005d9

Please sign in to comment.