Skip to content

Commit 22877a9

Browse files
committed
Add activerecord/db/ to gitignore
After running `bundle exec rake test:sqlite3` and `bundle exec rake test:sqlite3_mem` on my VM I noticed that it had created untracked files: ```bash vagrant@ubuntu-bionic:/rails/activerecord$ git status Untracked files: (use "git add <file>..." to include in what will be committed) db/ file::memory: ``` To prevent them from being accidentally committed I put 'file::memory:' to `activerecord/db/` folder and added the folder to .gitignore Also, we could consider fixing this by removing `db/` folder in each test that creates the folder. It would be great if someone confirms that it happens not only on my VM.
1 parent 6d0895a commit 22877a9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

activerecord/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/db/
12
/sqlnet.log
23
/test/config.yml
34
/test/fixtures/*.sqlite*

activerecord/test/cases/adapters/sqlite3/transaction_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def shared_cache_flags
108108
def with_connection(options = {})
109109
db_config = ActiveRecord::Base.configurations.configs_for(env_name: "arunit", name: "primary")
110110
conn_options = options.reverse_merge(
111-
database: in_memory_db? ? "file::memory:" : db_config.database
111+
database: in_memory_db? ? "db/file::memory:" : db_config.database
112112
)
113113
conn = ActiveRecord::Base.sqlite3_connection(conn_options)
114114

0 commit comments

Comments
 (0)