Sha256: bfc6a8965bbd3786d7dc7e1d58e72374fdd560ddaf34880b0bd34d20feab6004
Contents?: true
Size: 752 Bytes
Versions: 2
Compression:
Stored size: 752 Bytes
Contents
$:.unshift File.expand_path('..', __FILE__) $:.unshift File.expand_path('../../lib', __FILE__) require 'rspec' require 'simplecov' SimpleCov.start require 'pgxn_utils' $counter = 0 LIB_PATH = File.expand_path('../../lib', __FILE__) BIN_PATH = File.expand_path('../../bin/pgxn_utils', __FILE__) DESTINATION_ROOT = File.expand_path('../pgxn_utils', __FILE__) FileUtils.rm_rf(DESTINATION_ROOT) def next_extension $counter += 1 "extension.#{$counter}" end def skeleton(extension_name, args=nil) run_pgxn_utils(:skeleton, "#{extension_name} #{args}") end def change(extension_name, args=nil) run_pgxn_utils(:skeleton, "#{extension_name} #{args}") end def run_pgxn_utils(task, args) system "#{BIN_PATH} #{task.to_s} #{args} >/dev/null" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pgxn_utils-0.1.2 | spec/spec_helper.rb |
pgxn_utils-0.1.1 | spec/spec_helper.rb |