Permalink
Browse files

upgrade to Path 0.1.0

  • Loading branch information...
1 parent dc8ea98 commit 8986ef83359bf0b15dcbfaa54a985ca6ee71af4d @eregon eregon committed Mar 17, 2012
View
@@ -13,7 +13,7 @@ end
group :runtime do
gem "alf", "~> 0.11.1"
- gem "epath", ">= 0"
+ gem "epath", "~> 0.1.0"
gem "gnuplot", "~> 2.3.6"
gem "json", ">= 0"
end
View
@@ -7,7 +7,7 @@ GEM
quickl (~> 0.4.2)
backports (2.3.0)
diff-lcs (1.1.3)
- epath (0.0.1)
+ epath (0.1.0)
gnuplot (2.3.6)
json (1.6.5)
myrrha (1.2.1)
@@ -28,7 +28,7 @@ PLATFORMS
DEPENDENCIES
alf (~> 0.11.1)
- epath
+ epath (~> 0.1.0)
gnuplot (~> 2.3.6)
json
rake (~> 0.9.2)
@@ -19,7 +19,7 @@ def initialize(config)
def each
folder = config.benchmark_folder
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
@@ -28,7 +28,7 @@ def cached?
end
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)
else
raise NoSuchBenchmarkError, "No such benchmark #{name}"
View
@@ -3,7 +3,7 @@ class BDB
module Utils
def bench_file(folder, name, ext)
- folder.join(name).replace_extension(ext)
+ (folder/name).sub_ext(ext)
end
def folder
@@ -5,10 +5,10 @@ module Commons
def single_source(argv)
raise Quickl::InvalidArgument if argv.size > 1
if arg = argv.first
- path = Path(arg.to_s)
+ path = Path(arg)
if path.file?
if path.extname == ".rb"
- Viiite.bench(arg.to_s).run
+ Viiite.bench(arg).run
else
Alf::Reader.reader(path)
end
@@ -55,7 +55,7 @@ def cache_file_for(path)
return nil unless path
path = path.expand
path = path.relative_to(benchmark_folder.expand)
- (cache_folder/path).replace_extension(".rash")
+ (cache_folder/path).sub_ext(".rash")
end
end # class Configuration
@@ -6,8 +6,8 @@
specify "#{input.base}: #{cmd}" do
argv = Quickl.parse_commandline_args(cmd)[1..-1]
- stdout = input.replace_extension('.stdout')
- stderr = input.replace_extension('.stderr')
+ stdout = input.sub_ext('.stdout')
+ stderr = input.sub_ext('.stderr')
stdout_expected = stdout.exist? ? stdout.read : ""
stderr_expected = stderr.exist? ? stderr.read : ""
View
@@ -127,7 +127,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("rspec", "~> 2.8.0")
s.add_development_dependency("wlang", "~> 0.10.2")
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("json", ">= 0")
View
@@ -32,7 +32,7 @@ variables:
- {name: rspec, version: "~> 2.8.0", groups: [test, release]}
- {name: wlang, version: "~> 0.10.2", groups: [release ]}
- {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: json, version: ">= 0", groups: [runtime ]}
rake_tasks:

0 comments on commit 8986ef8

Please sign in to comment.