Skip to content

Commit 9554894

Browse files
moozzipostmodern
authored andcommitted
Save database name as symbol in config (closes #87).
1 parent f884fcd commit 9554894

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ronin/db/cli/commands/add.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def run(name,uri=nil)
173173
validate_config!
174174

175175
ConfigFile.edit do |yaml|
176-
yaml[name] = @config
176+
yaml[name.to_sym] = @config
177177
end
178178
end
179179

spec/cli/commands/add_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121

122122
subject.run(name,uri)
123123

124-
expect(config_file_hash[name]).to eq(
124+
expect(config_file_hash[name.to_sym]).to eq(
125125
{
126126
adapter: adapter,
127127
database: database
@@ -145,7 +145,7 @@
145145

146146
subject.run(name)
147147

148-
expect(config_file_hash[name]).to eq(
148+
expect(config_file_hash[name.to_sym]).to eq(
149149
{
150150
adapter: adapter,
151151
database: database

0 commit comments

Comments
 (0)