Rscons is no longer a gem.
Run specs against the combined distributable standalone script.
This commit is contained in:
parent
bcd33fe098
commit
95ee63292e
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/dist/
|
||||
/doc/
|
||||
/pkg/
|
||||
/test/
|
||||
|
8
Gemfile
8
Gemfile
@ -1,4 +1,8 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
# Specify your gem's dependencies in rscons.gemspec
|
||||
gemspec
|
||||
gem "json"
|
||||
gem "rspec"
|
||||
gem "rake"
|
||||
gem "simplecov"
|
||||
gem "yard"
|
||||
gem "rdoc"
|
||||
|
@ -1,9 +1,3 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
rscons (1.16.0)
|
||||
json (>= 1.8, < 3.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -37,9 +31,9 @@ PLATFORMS
|
||||
x86-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
json
|
||||
rake
|
||||
rdoc
|
||||
rscons!
|
||||
rspec
|
||||
simplecov
|
||||
yard
|
||||
|
@ -1,13 +1,13 @@
|
||||
# Rscons
|
||||
|
||||
Rscons (https://github.com/holtrop/rscons) is a software construction framework
|
||||
inspired by SCons and implemented in Ruby.
|
||||
|
||||
[](http://badge.fury.io/rb/rscons)
|
||||
inspired by SCons and waf but implemented in Ruby.
|
||||
|
||||
## Installation
|
||||
|
||||
$ gem install rscons
|
||||
Rscons is distributed as a standalone Ruby script named ``rscons``. This file
|
||||
(containing the complete rscons build system) can be checked into your project
|
||||
and versioned along with your project.
|
||||
|
||||
## Usage
|
||||
|
||||
|
10
Rakefile.rb
10
Rakefile.rb
@ -5,25 +5,29 @@ rescue Bundler::BundlerError => e
|
||||
raise LoadError.new("Unable to setup Bundler; you might need to `bundle install`: #{e.message}")
|
||||
end
|
||||
|
||||
require "bundler/gem_tasks"
|
||||
require "rspec/core/rake_task"
|
||||
require "yard"
|
||||
require "rake/clean"
|
||||
require "fileutils"
|
||||
|
||||
CLEAN.include %w[build_test_run .yardoc doc coverage]
|
||||
CLOBBER.include %w[pkg]
|
||||
CLEAN.include %w[build_test_run .yardoc doc coverage test]
|
||||
CLOBBER.include %w[dist pkg]
|
||||
|
||||
task :build_dist do
|
||||
sh "ruby build_dist.rb"
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec, :example_string) do |task, args|
|
||||
FileUtils.mkdir_p("test")
|
||||
FileUtils.cp("dist/rscons", "test/rscons.rb")
|
||||
if args.example_string
|
||||
ENV["partial_specs"] = "1"
|
||||
task.rspec_opts = %W[-e "#{args.example_string}" -f documentation]
|
||||
end
|
||||
end
|
||||
|
||||
task :spec => :build_dist
|
||||
|
||||
YARD::Rake::YardocTask.new do |yard|
|
||||
yard.files = ['lib/**/*.rb']
|
||||
end
|
||||
|
@ -2,4 +2,6 @@
|
||||
|
||||
require "rscons/cli"
|
||||
|
||||
if __FILE__ == $0
|
||||
Rscons::Cli.run(ARGV)
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
module Rscons
|
||||
# gem version
|
||||
# Project version.
|
||||
VERSION = "1.16.0"
|
||||
end
|
||||
|
@ -1,28 +0,0 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
lib = File.expand_path("../lib", __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require "rscons/version"
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "rscons"
|
||||
gem.version = Rscons::VERSION
|
||||
gem.authors = ["Josh Holtrop"]
|
||||
gem.email = ["jholtrop@gmail.com"]
|
||||
gem.description = %q{Software construction library inspired by SCons and implemented in Ruby.}
|
||||
gem.summary = %q{Software construction library inspired by SCons and implemented in Ruby}
|
||||
gem.homepage = "https://github.com/holtrop/rscons"
|
||||
gem.license = "MIT"
|
||||
|
||||
gem.files = Dir["{bin,assets,lib}/**/*", "*.gemspec", "LICENSE.txt"]
|
||||
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
||||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
||||
gem.require_paths = ["lib"]
|
||||
|
||||
gem.add_dependency "json", ">= 1.8", "< 3.0"
|
||||
|
||||
gem.add_development_dependency "rspec"
|
||||
gem.add_development_dependency "rake"
|
||||
gem.add_development_dependency "simplecov"
|
||||
gem.add_development_dependency "yard"
|
||||
gem.add_development_dependency "rdoc"
|
||||
end
|
@ -62,7 +62,7 @@ describe Rscons do
|
||||
[]
|
||||
end
|
||||
rscons_args = options[:rscons_args] || []
|
||||
command = %W[ruby -I. -r _simplecov_setup #{@owd}/bin/rscons] + rsconsfile_args + rscons_args
|
||||
command = %W[ruby -I. -r _simplecov_setup #{@owd}/test/rscons.rb] + rsconsfile_args + rscons_args
|
||||
@statics[:build_test_id] ||= 0
|
||||
@statics[:build_test_id] += 1
|
||||
command_prefix =
|
||||
@ -74,6 +74,8 @@ describe Rscons do
|
||||
command_name = "#{command_prefix}#{@statics[:build_test_id]}"
|
||||
File.open("_simplecov_setup.rb", "w") do |fh|
|
||||
fh.puts <<EOF
|
||||
require "bundler"
|
||||
Bundler.setup
|
||||
require "simplecov"
|
||||
class MyFormatter
|
||||
def format(*args)
|
||||
@ -88,7 +90,6 @@ SimpleCov.start do
|
||||
end
|
||||
formatter(MyFormatter)
|
||||
end
|
||||
$LOAD_PATH.unshift(#{@owd.inspect} + "/lib")
|
||||
# force color off
|
||||
ENV["TERM"] = nil
|
||||
#{options[:ruby_setup_code]}
|
||||
|
@ -12,4 +12,4 @@ SimpleCov.start do
|
||||
merge_timeout 3600
|
||||
end
|
||||
|
||||
require "rscons"
|
||||
require_relative "../test/rscons"
|
||||
|
Loading…
x
Reference in New Issue
Block a user