From: cedlemo <nu...@co...> - 2017-12-06 09:30:59
|
cedlemo 2017-12-06 18:30:36 +0900 (Wed, 06 Dec 2017) New Revision: 67e9b4088fa356d5038f7ebf504b2e7a59bc76d5 https://github.com/ruby-gnome2/ggit/commit/67e9b4088fa356d5038f7ebf504b2e7a59bc76d5 Message: Update with new Gio api: File.path to File.open(:path => path) Modified files: test/test-config.rb test/test-repository.rb Modified: test/test-config.rb (+1 -1) =================================================================== --- test/test-config.rb 2017-05-13 23:01:22 +0900 (3a590ef) +++ test/test-config.rb 2017-12-06 18:30:36 +0900 (17d8754) @@ -20,7 +20,7 @@ class TestConfig < Test::Unit::TestCase FileUtils.mkdir_p("#{@path}/config") FileUtils.cp("#{@path}/gitconfig", "#{@path}/config/") @config_file_path = "#{@path}/config/gitconfig" - @file = Gio::File.path(@config_file_path) + @file = Gio::File.open(:path => @config_file_path) puts @file.path end Modified: test/test-repository.rb (+5 -5) =================================================================== --- test/test-repository.rb 2017-05-13 23:01:22 +0900 (7ca2ce3) +++ test/test-repository.rb 2017-12-06 18:30:36 +0900 (7be37ca) @@ -22,20 +22,20 @@ class TestRepository < Test::Unit::TestCase end def test_repository_init_non_bare_repository - dir = Gio::File.path("#{@path}/non_bare_repo/test") + dir = Gio::File.open(:path => "#{@path}/non_bare_repo/test") Ggit::Repository.init_repository(dir, false) assert(File.exist?(@path + "/non_bare_repo/test/.git/config")) end def test_repository_init_bare_repository - dir = Gio::File.path("#{@path}/bare_repo/test/.git") + dir = Gio::File.open(:path => "#{@path}/bare_repo/test/.git") repo = Ggit::Repository.init_repository(dir, true) assert(File.exist?(@path + "/bare_repo/test/.git/config")) assert(repo.empty?) end def test_repository_clone - destination = Gio::File.path("#{@path}/ggit-clone") + destination = Gio::File.open(:path => "#{@path}/ggit-clone") repo = Ggit::Repository.clone(@url, destination) assert(File.exist?(@path + "/ggit-clone/.git/config")) assert_false(repo.empty?) @@ -44,7 +44,7 @@ class TestRepository < Test::Unit::TestCase def test_repository_bare_clone options = Ggit::CloneOptions.new(:bare => true) - destination = Gio::File.path("#{@path}/ggit-clone-bare") + destination = Gio::File.open(:path => "#{@path}/ggit-clone-bare") repo = Ggit::Repository.clone(@url, destination, options) assert(File.exist?(@path + "/ggit-clone-bare/config")) assert_false(repo.empty?) @@ -53,7 +53,7 @@ class TestRepository < Test::Unit::TestCase def test_repository_checkout_clone options = Ggit::CloneOptions.new(:checkout_branch => "master") - destination = Gio::File.path("#{@path}/ggit-clone-checkout") + destination = Gio::File.open(:path => "#{@path}/ggit-clone-checkout") repo = Ggit::Repository.clone(@url, destination, options) assert(File.exist?(@path + "/ggit-clone-checkout/.git/config")) assert_false(repo.empty?) |