Skip to content

Commit 0774fb6

Browse files
tiennoucarlosmn
authored andcommitted
Use the config_file as the starting point for repo discovery
1 parent f2aa34c commit 0774fb6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/docurium.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def initialize(config_file, repo = nil)
2323
raise "You need to specify a config file" if !config_file
2424
raise "You need to specify a valid config file" if !valid_config(config_file)
2525
@sigs = {}
26-
@repo = repo || Rugged::Repository.discover('.')
26+
@repo = repo || Rugged::Repository.discover(config_file)
2727
end
2828

2929
def init_data(version = 'HEAD')

test/gen_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_read_generated_file
1212
Docurium::CLI.gen(file.path)
1313
end
1414

15-
Docurium.new file.path
15+
assert_raises(Rugged::RepositoryError) { Docurium.new file.path }
1616
end
1717

1818
end

0 commit comments

Comments
 (0)