Skip to content

Commit

Permalink
upgrade to Path 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Mar 17, 2012
1 parent dc8ea98 commit 8986ef8
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -13,7 +13,7 @@ end


group :runtime do group :runtime do
gem "alf", "~> 0.11.1" gem "alf", "~> 0.11.1"
gem "epath", ">= 0" gem "epath", "~> 0.1.0"
gem "gnuplot", "~> 2.3.6" gem "gnuplot", "~> 2.3.6"
gem "json", ">= 0" gem "json", ">= 0"
end end
4 changes: 2 additions & 2 deletions Gemfile.lock
Expand Up @@ -7,7 +7,7 @@ GEM
quickl (~> 0.4.2) quickl (~> 0.4.2)
backports (2.3.0) backports (2.3.0)
diff-lcs (1.1.3) diff-lcs (1.1.3)
epath (0.0.1) epath (0.1.0)
gnuplot (2.3.6) gnuplot (2.3.6)
json (1.6.5) json (1.6.5)
myrrha (1.2.1) myrrha (1.2.1)
Expand All @@ -28,7 +28,7 @@ PLATFORMS


DEPENDENCIES DEPENDENCIES
alf (~> 0.11.1) alf (~> 0.11.1)
epath epath (~> 0.1.0)
gnuplot (~> 2.3.6) gnuplot (~> 2.3.6)
json json
rake (~> 0.9.2) rake (~> 0.9.2)
Expand Down
4 changes: 2 additions & 2 deletions lib/viiite/bdb/immediate.rb
Expand Up @@ -19,7 +19,7 @@ def initialize(config)
def each def each
folder = config.benchmark_folder folder = config.benchmark_folder
folder.glob(config.benchmark_pattern).each do |f| folder.glob(config.benchmark_pattern).each do |f|
yield(:name => f.relative_to(folder).without_extension.to_s, :file => f) yield(:name => f.relative_to(folder).rm_ext.to_s, :file => f)
end end
end end


Expand All @@ -28,7 +28,7 @@ def cached?
end end


def benchmark(name) def benchmark(name)
if (file = bench_file(config.benchmark_folder, name.to_s, @ext)).exist? if (file = bench_file(config.benchmark_folder, name, @ext)).exist?
return Viiite.bench(file) return Viiite.bench(file)
else else
raise NoSuchBenchmarkError, "No such benchmark #{name}" raise NoSuchBenchmarkError, "No such benchmark #{name}"
Expand Down
2 changes: 1 addition & 1 deletion lib/viiite/bdb/utils.rb
Expand Up @@ -3,7 +3,7 @@ class BDB
module Utils module Utils


def bench_file(folder, name, ext) def bench_file(folder, name, ext)
folder.join(name).replace_extension(ext) (folder/name).sub_ext(ext)
end end


def folder def folder
Expand Down
4 changes: 2 additions & 2 deletions lib/viiite/command/commons.rb
Expand Up @@ -5,10 +5,10 @@ module Commons
def single_source(argv) def single_source(argv)
raise Quickl::InvalidArgument if argv.size > 1 raise Quickl::InvalidArgument if argv.size > 1
if arg = argv.first if arg = argv.first
path = Path(arg.to_s) path = Path(arg)
if path.file? if path.file?
if path.extname == ".rb" if path.extname == ".rb"
Viiite.bench(arg.to_s).run Viiite.bench(arg).run
else else
Alf::Reader.reader(path) Alf::Reader.reader(path)
end end
Expand Down
2 changes: 1 addition & 1 deletion lib/viiite/configuration.rb
Expand Up @@ -55,7 +55,7 @@ def cache_file_for(path)
return nil unless path return nil unless path
path = path.expand path = path.expand
path = path.relative_to(benchmark_folder.expand) path = path.relative_to(benchmark_folder.expand)
(cache_folder/path).replace_extension(".rash") (cache_folder/path).sub_ext(".rash")
end end


end # class Configuration end # class Configuration
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/test_command.rb
Expand Up @@ -6,8 +6,8 @@


specify "#{input.base}: #{cmd}" do specify "#{input.base}: #{cmd}" do
argv = Quickl.parse_commandline_args(cmd)[1..-1] argv = Quickl.parse_commandline_args(cmd)[1..-1]
stdout = input.replace_extension('.stdout') stdout = input.sub_ext('.stdout')
stderr = input.replace_extension('.stderr') stderr = input.sub_ext('.stderr')
stdout_expected = stdout.exist? ? stdout.read : "" stdout_expected = stdout.exist? ? stdout.read : ""
stderr_expected = stderr.exist? ? stderr.read : "" stderr_expected = stderr.exist? ? stderr.read : ""


Expand Down
2 changes: 1 addition & 1 deletion viiite.gemspec
Expand Up @@ -127,7 +127,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("rspec", "~> 2.8.0") s.add_development_dependency("rspec", "~> 2.8.0")
s.add_development_dependency("wlang", "~> 0.10.2") s.add_development_dependency("wlang", "~> 0.10.2")
s.add_dependency("alf", "~> 0.11.1") s.add_dependency("alf", "~> 0.11.1")
s.add_dependency("epath", ">= 0") s.add_dependency("epath", "~> 0.1.0")
s.add_dependency("gnuplot", "~> 2.3.6") s.add_dependency("gnuplot", "~> 2.3.6")
s.add_dependency("json", ">= 0") s.add_dependency("json", ">= 0")


Expand Down
2 changes: 1 addition & 1 deletion viiite.noespec
Expand Up @@ -32,7 +32,7 @@ variables:
- {name: rspec, version: "~> 2.8.0", groups: [test, release]} - {name: rspec, version: "~> 2.8.0", groups: [test, release]}
- {name: wlang, version: "~> 0.10.2", groups: [release ]} - {name: wlang, version: "~> 0.10.2", groups: [release ]}
- {name: alf, version: "~> 0.11.1", groups: [runtime ]} - {name: alf, version: "~> 0.11.1", groups: [runtime ]}
- {name: epath, version: ">= 0", groups: [runtime ]} - {name: epath, version: "~> 0.1.0", groups: [runtime ]}
- {name: gnuplot, version: "~> 2.3.6", groups: [runtime ]} - {name: gnuplot, version: "~> 2.3.6", groups: [runtime ]}
- {name: json, version: ">= 0", groups: [runtime ]} - {name: json, version: ">= 0", groups: [runtime ]}
rake_tasks: rake_tasks:
Expand Down

0 comments on commit 8986ef8

Please sign in to comment.