Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dc3a90660 | ||
|
|
d48c7587d6 | ||
|
|
70d4740a69 | ||
|
|
aaae845d60 | ||
|
|
e900e74342 | ||
|
|
62ae3f162d | ||
|
|
099d26f33c | ||
|
|
89562c584a |
No files matched your search
+190
@@ -0,0 +1,190 @@
|
|||||||
|
## ChangeLog
|
||||||
|
|
||||||
|
### v1.15.0
|
||||||
|
|
||||||
|
- allow json 1.x or 2.x
|
||||||
|
|
||||||
|
### v1.14.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- #45 - Add Rscons::VarSet#values_at
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- #44 - Environment#print_builder_run_message should support string commands
|
||||||
|
|
||||||
|
### v1.13.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- #43 - Add ability to record side-effect file production
|
||||||
|
|
||||||
|
### v1.12.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- #40 - env.depends should imply env.build_after
|
||||||
|
- #41 - be more colorful
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- #39 - wait for in-progress subcommands to complete on build failure
|
||||||
|
- #42 - cloned Environments should inherit n_threads
|
||||||
|
|
||||||
|
### v1.11.1
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- fix the circular build dependency detection logic
|
||||||
|
|
||||||
|
### v1.11.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- Change default Environment :clone option to :all to clone all attributes
|
||||||
|
- #38 - raise error when circular dependencies are found
|
||||||
|
- #34 - Allow overriding n_threads on a per-Environment level
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- #35 - env.build_after should expand paths
|
||||||
|
- #36 - SHCFLAGS and SHCXXFLAGS should inherit non-SH flags by default
|
||||||
|
- #37 - Fix non-blocking thread-wait if Rscons.n_threads is set to 0
|
||||||
|
|
||||||
|
### v1.10.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- #23 - add parallelization - builds are now parallelized by default
|
||||||
|
- #31 - add LEXSUFFIX, YACCSUFFIX construction variables
|
||||||
|
- #30 - place object files for absolute source paths under build_root
|
||||||
|
- #28 - support redirecting standard output using the Command builder
|
||||||
|
- Always use a build root and default it to "build"
|
||||||
|
- Add builder features
|
||||||
|
- #8 - add SharedObject and SharedLibrary builders
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- expand target and source paths before calling Builder#create_build_target
|
||||||
|
- #29 - fix PROGSUFFIX handling
|
||||||
|
- #32 - Pre-build hooks do not respect modified key values
|
||||||
|
|
||||||
|
### v1.9.3
|
||||||
|
|
||||||
|
- Environment#parse_flags should put -std=XXX flags in CCFLAGS, not CFLAGS
|
||||||
|
|
||||||
|
### v1.9.2
|
||||||
|
|
||||||
|
- allow phony targets in conjunction with build roots
|
||||||
|
|
||||||
|
### v1.9.1
|
||||||
|
|
||||||
|
- change *SUFFIX defaults to arrays
|
||||||
|
- add various C++ file suffixes
|
||||||
|
- use ${INCPREFIX} instead of hard-coded "-I" in Preprocess builder
|
||||||
|
|
||||||
|
### v1.9.0
|
||||||
|
|
||||||
|
#### New Features
|
||||||
|
|
||||||
|
- #6 - add Install and Copy builders
|
||||||
|
- #22 - allow overriding Command builder short description with CMD_DESC variable
|
||||||
|
- #24 - add "rscons" executable
|
||||||
|
- #25 - add support for phony targets given as Symbols instead of Strings
|
||||||
|
- #26 - support registering multiple build targets with the same target name
|
||||||
|
- #27 - add Directory builder
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- #20 - fix variable references that expand to arrays in build target sources
|
||||||
|
- #21 - rework Preprocess builder to consider deep dependencies
|
||||||
|
- fix Rscons.set_suffix to append the given suffix if the filename has none
|
||||||
|
- remove ${CFLAGS} from default CPP_CMD
|
||||||
|
|
||||||
|
### v1.8.1
|
||||||
|
|
||||||
|
- fix Environment#dump when construction variables are symbols
|
||||||
|
|
||||||
|
### v1.8.0
|
||||||
|
|
||||||
|
- new Command builder to execute arbitrary user commands
|
||||||
|
- new SimpleBuilder class
|
||||||
|
- create new builders quickly by passing a block to Environment#add_builder
|
||||||
|
- improved YARD documentation
|
||||||
|
- add Environment#dump to debug Environment construction variables
|
||||||
|
|
||||||
|
### v1.7.0
|
||||||
|
|
||||||
|
- allow build hooks to register new build targets
|
||||||
|
- add post-build hooks (register with Environment#add_post_build_hook)
|
||||||
|
- clear all build targets after processing an Environment
|
||||||
|
- allow trailing slashes in arguments to Environment#build_dir
|
||||||
|
|
||||||
|
### v1.6.1
|
||||||
|
|
||||||
|
- add DEPFILESUFFIX construction variable to override dependency file suffix
|
||||||
|
- fix Environment#depends to expand its arguments for construction variables
|
||||||
|
|
||||||
|
### v1.6.0
|
||||||
|
|
||||||
|
- support lambdas as construction variable values
|
||||||
|
|
||||||
|
### v1.5.0
|
||||||
|
|
||||||
|
- add "json" as a runtime dependency
|
||||||
|
- update construction variables to match SCons more closely
|
||||||
|
- add CPPDEFPREFIX, INCPREFIX, CPPDEFINES, CCFLAGS, LIBDIRPREFIX, and LIBLINKPREFIX
|
||||||
|
- add Environment#shell
|
||||||
|
- add Environment#parse_flags, #parse_flags!, #merge_flags
|
||||||
|
- unbuffer $stdout by default
|
||||||
|
- add PROGSUFFIX construction variable (defaults to .exe on MinGW/Cygwin)
|
||||||
|
- add Rscons::BuildTarget and Builder#create_build_target
|
||||||
|
- update specs to RSpec 3.x and fix to run on MinGW/Cygwin/Linux
|
||||||
|
- add YARD documentation to get to 100% coverage
|
||||||
|
|
||||||
|
### v1.4.3
|
||||||
|
|
||||||
|
- fix builders properly using construction variable overrides
|
||||||
|
- expand nil construction variables to empty strings
|
||||||
|
|
||||||
|
### v1.4.2
|
||||||
|
|
||||||
|
- add Environment#expand_path
|
||||||
|
- expand construction variable references in builder targets and sources before invoking builder
|
||||||
|
|
||||||
|
### v1.4.1
|
||||||
|
|
||||||
|
- fix invoking a builder with no sources while a build root defined
|
||||||
|
|
||||||
|
### v1.4.0
|
||||||
|
|
||||||
|
- add CFile builder
|
||||||
|
- add Disassemble builder
|
||||||
|
- add Preprocess builder
|
||||||
|
- pass the Environment object to build hooks in the :env key of the build_op parameter
|
||||||
|
- expand target/source paths beginning with "^/" to be relative to the Environment's build root
|
||||||
|
- many performance improvements, including:
|
||||||
|
- use JSON instead of YAML for the cache to improve loading speed (Issue #7)
|
||||||
|
- store a hash of the build command instead of the full command contents in the cache
|
||||||
|
- implement copy-on-write semantics for construction variables when cloning Environments
|
||||||
|
- only load the cache once instead of on each Environment#process
|
||||||
|
- only write the cache when something has changed
|
||||||
|
- fix Cache#mkdir_p to handle relative paths (Issue #5)
|
||||||
|
- flush the cache to disk if a builder raises an exception (Issue #4)
|
||||||
|
|
||||||
|
### v1.3.0
|
||||||
|
|
||||||
|
- change Environment#execute() options parameter to accept the following options keys:
|
||||||
|
- :env to pass an environment Hash to Kernel#system
|
||||||
|
- :options to pass an options Hash to Kernel#system
|
||||||
|
|
||||||
|
### v1.2.0
|
||||||
|
|
||||||
|
- add :clone option to Environment#clone to control exactly which Environment attributes are cloned
|
||||||
|
- allow nil to be passed in to Environment#build_root=
|
||||||
|
|
||||||
|
### v1.1.0
|
||||||
|
|
||||||
|
- Change Cache#up_to_date?() and #register_build() to accept a single target
|
||||||
|
file or an array of target file names
|
||||||
+23
-24
@@ -1,38 +1,37 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
rscons (1.13.0)
|
rscons (1.15.0)
|
||||||
json (~> 1.0)
|
json (>= 1.8, < 3.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.3)
|
||||||
docile (1.1.5)
|
docile (1.1.5)
|
||||||
json (1.8.3)
|
json (2.1.0)
|
||||||
rake (10.4.2)
|
rake (12.0.0)
|
||||||
rdoc (4.2.0)
|
rdoc (5.1.0)
|
||||||
json (~> 1.4)
|
redcarpet (3.4.0)
|
||||||
redcarpet (3.3.3)
|
rspec (3.6.0)
|
||||||
rspec (3.4.0)
|
rspec-core (~> 3.6.0)
|
||||||
rspec-core (~> 3.4.0)
|
rspec-expectations (~> 3.6.0)
|
||||||
rspec-expectations (~> 3.4.0)
|
rspec-mocks (~> 3.6.0)
|
||||||
rspec-mocks (~> 3.4.0)
|
rspec-core (3.6.0)
|
||||||
rspec-core (3.4.1)
|
rspec-support (~> 3.6.0)
|
||||||
rspec-support (~> 3.4.0)
|
rspec-expectations (3.6.0)
|
||||||
rspec-expectations (3.4.0)
|
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.4.0)
|
rspec-support (~> 3.6.0)
|
||||||
rspec-mocks (3.4.0)
|
rspec-mocks (3.6.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.4.0)
|
rspec-support (~> 3.6.0)
|
||||||
rspec-support (3.4.1)
|
rspec-support (3.6.0)
|
||||||
simplecov (0.11.1)
|
simplecov (0.15.0)
|
||||||
docile (~> 1.1.0)
|
docile (~> 1.1.0)
|
||||||
json (~> 1.8)
|
json (>= 1.8, < 3)
|
||||||
simplecov-html (~> 0.10.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.10.0)
|
simplecov-html (0.10.2)
|
||||||
yard (0.8.7.6)
|
yard (0.9.9)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@@ -48,4 +47,4 @@ DEPENDENCIES
|
|||||||
yard
|
yard
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.10.6
|
1.15.4
|
||||||
@@ -562,183 +562,6 @@ env.depends("my_app", "config/link.ld", "README.txt", *Dir.glob("assets/**/*"))
|
|||||||
Documentation for the complete Rscons API can be found at
|
Documentation for the complete Rscons API can be found at
|
||||||
http://www.rubydoc.info/github/holtrop/rscons/master.
|
http://www.rubydoc.info/github/holtrop/rscons/master.
|
||||||
|
|
||||||
## Release Notes
|
|
||||||
|
|
||||||
### v1.13.0
|
|
||||||
|
|
||||||
#### New Features
|
|
||||||
|
|
||||||
- #43 - Add ability to record side-effect file production
|
|
||||||
|
|
||||||
### v1.12.0
|
|
||||||
|
|
||||||
#### New Features
|
|
||||||
|
|
||||||
- #40 - env.depends should imply env.build_after
|
|
||||||
- #41 - be more colorful
|
|
||||||
|
|
||||||
#### Fixes
|
|
||||||
|
|
||||||
- #39 - wait for in-progress subcommands to complete on build failure
|
|
||||||
- #42 - cloned Environments should inherit n_threads
|
|
||||||
|
|
||||||
### v1.11.1
|
|
||||||
|
|
||||||
#### Fixes
|
|
||||||
|
|
||||||
- fix the circular build dependency detection logic
|
|
||||||
|
|
||||||
### v1.11.0
|
|
||||||
|
|
||||||
#### New Features
|
|
||||||
|
|
||||||
- Change default Environment :clone option to :all to clone all attributes
|
|
||||||
- #38 - raise error when circular dependencies are found
|
|
||||||
- #34 - Allow overriding n_threads on a per-Environment level
|
|
||||||
|
|
||||||
#### Fixes
|
|
||||||
|
|
||||||
- #35 - env.build_after should expand paths
|
|
||||||
- #36 - SHCFLAGS and SHCXXFLAGS should inherit non-SH flags by default
|
|
||||||
- #37 - Fix non-blocking thread-wait if Rscons.n_threads is set to 0
|
|
||||||
|
|
||||||
### v1.10.0
|
|
||||||
|
|
||||||
#### New Features
|
|
||||||
|
|
||||||
- #23 - add parallelization - builds are now parallelized by default
|
|
||||||
- #31 - add LEXSUFFIX, YACCSUFFIX construction variables
|
|
||||||
- #30 - place object files for absolute source paths under build_root
|
|
||||||
- #28 - support redirecting standard output using the Command builder
|
|
||||||
- Always use a build root and default it to "build"
|
|
||||||
- Add builder features
|
|
||||||
- #8 - add SharedObject and SharedLibrary builders
|
|
||||||
|
|
||||||
#### Fixes
|
|
||||||
|
|
||||||
- expand target and source paths before calling Builder#create_build_target
|
|
||||||
- #29 - fix PROGSUFFIX handling
|
|
||||||
- #32 - Pre-build hooks do not respect modified key values
|
|
||||||
|
|
||||||
### v1.9.3
|
|
||||||
|
|
||||||
- Environment#parse_flags should put -std=XXX flags in CCFLAGS, not CFLAGS
|
|
||||||
|
|
||||||
### v1.9.2
|
|
||||||
|
|
||||||
- allow phony targets in conjunction with build roots
|
|
||||||
|
|
||||||
### v1.9.1
|
|
||||||
|
|
||||||
- change *SUFFIX defaults to arrays
|
|
||||||
- add various C++ file suffixes
|
|
||||||
- use ${INCPREFIX} instead of hard-coded "-I" in Preprocess builder
|
|
||||||
|
|
||||||
### v1.9.0
|
|
||||||
|
|
||||||
#### New Features
|
|
||||||
|
|
||||||
- #6 - add Install and Copy builders
|
|
||||||
- #22 - allow overriding Command builder short description with CMD_DESC variable
|
|
||||||
- #24 - add "rscons" executable
|
|
||||||
- #25 - add support for phony targets given as Symbols instead of Strings
|
|
||||||
- #26 - support registering multiple build targets with the same target name
|
|
||||||
- #27 - add Directory builder
|
|
||||||
|
|
||||||
#### Fixes
|
|
||||||
|
|
||||||
- #20 - fix variable references that expand to arrays in build target sources
|
|
||||||
- #21 - rework Preprocess builder to consider deep dependencies
|
|
||||||
- fix Rscons.set_suffix to append the given suffix if the filename has none
|
|
||||||
- remove ${CFLAGS} from default CPP_CMD
|
|
||||||
|
|
||||||
### v1.8.1
|
|
||||||
|
|
||||||
- fix Environment#dump when construction variables are symbols
|
|
||||||
|
|
||||||
### v1.8.0
|
|
||||||
|
|
||||||
- new Command builder to execute arbitrary user commands
|
|
||||||
- new SimpleBuilder class
|
|
||||||
- create new builders quickly by passing a block to Environment#add_builder
|
|
||||||
- improved YARD documentation
|
|
||||||
- add Environment#dump to debug Environment construction variables
|
|
||||||
|
|
||||||
### v1.7.0
|
|
||||||
|
|
||||||
- allow build hooks to register new build targets
|
|
||||||
- add post-build hooks (register with Environment#add_post_build_hook)
|
|
||||||
- clear all build targets after processing an Environment
|
|
||||||
- allow trailing slashes in arguments to Environment#build_dir
|
|
||||||
|
|
||||||
### v1.6.1
|
|
||||||
|
|
||||||
- add DEPFILESUFFIX construction variable to override dependency file suffix
|
|
||||||
- fix Environment#depends to expand its arguments for construction variables
|
|
||||||
|
|
||||||
### v1.6.0
|
|
||||||
|
|
||||||
- support lambdas as construction variable values
|
|
||||||
|
|
||||||
### v1.5.0
|
|
||||||
|
|
||||||
- add "json" as a runtime dependency
|
|
||||||
- update construction variables to match SCons more closely
|
|
||||||
- add CPPDEFPREFIX, INCPREFIX, CPPDEFINES, CCFLAGS, LIBDIRPREFIX, and LIBLINKPREFIX
|
|
||||||
- add Environment#shell
|
|
||||||
- add Environment#parse_flags, #parse_flags!, #merge_flags
|
|
||||||
- unbuffer $stdout by default
|
|
||||||
- add PROGSUFFIX construction variable (defaults to .exe on MinGW/Cygwin)
|
|
||||||
- add Rscons::BuildTarget and Builder#create_build_target
|
|
||||||
- update specs to RSpec 3.x and fix to run on MinGW/Cygwin/Linux
|
|
||||||
- add YARD documentation to get to 100% coverage
|
|
||||||
|
|
||||||
### v1.4.3
|
|
||||||
|
|
||||||
- fix builders properly using construction variable overrides
|
|
||||||
- expand nil construction variables to empty strings
|
|
||||||
|
|
||||||
### v1.4.2
|
|
||||||
|
|
||||||
- add Environment#expand_path
|
|
||||||
- expand construction variable references in builder targets and sources before invoking builder
|
|
||||||
|
|
||||||
### v1.4.1
|
|
||||||
|
|
||||||
- fix invoking a builder with no sources while a build root defined
|
|
||||||
|
|
||||||
### v1.4.0
|
|
||||||
|
|
||||||
- add CFile builder
|
|
||||||
- add Disassemble builder
|
|
||||||
- add Preprocess builder
|
|
||||||
- pass the Environment object to build hooks in the :env key of the build_op parameter
|
|
||||||
- expand target/source paths beginning with "^/" to be relative to the Environment's build root
|
|
||||||
- many performance improvements, including:
|
|
||||||
- use JSON instead of YAML for the cache to improve loading speed (Issue #7)
|
|
||||||
- store a hash of the build command instead of the full command contents in the cache
|
|
||||||
- implement copy-on-write semantics for construction variables when cloning Environments
|
|
||||||
- only load the cache once instead of on each Environment#process
|
|
||||||
- only write the cache when something has changed
|
|
||||||
- fix Cache#mkdir_p to handle relative paths (Issue #5)
|
|
||||||
- flush the cache to disk if a builder raises an exception (Issue #4)
|
|
||||||
|
|
||||||
### v1.3.0
|
|
||||||
|
|
||||||
- change Environment#execute() options parameter to accept the following options keys:
|
|
||||||
- :env to pass an environment Hash to Kernel#system
|
|
||||||
- :options to pass an options Hash to Kernel#system
|
|
||||||
|
|
||||||
### v1.2.0
|
|
||||||
|
|
||||||
- add :clone option to Environment#clone to control exactly which Environment attributes are cloned
|
|
||||||
- allow nil to be passed in to Environment#build_root=
|
|
||||||
|
|
||||||
### v1.1.0
|
|
||||||
|
|
||||||
- Change Cache#up_to_date?() and #register_build() to accept a single target
|
|
||||||
file or an array of target file names
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. Fork it
|
1. Fork it
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
Rscons::Environment.new do |env|
|
||||||
|
env.echo = :command
|
||||||
|
env.Install("inst.exe", "install.rb")
|
||||||
|
end
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
class MyBuilder < Rscons::Builder
|
||||||
|
def run(options)
|
||||||
|
env, target = options.values_at(:env, :target)
|
||||||
|
env.print_builder_run_message("MyBuilder #{target}", "MyBuilder #{target} command")
|
||||||
|
target
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Rscons::Environment.new do |env|
|
||||||
|
env.echo = :command
|
||||||
|
env.add_builder(MyBuilder.new)
|
||||||
|
env.MyBuilder("foo")
|
||||||
|
end
|
||||||
@@ -20,8 +20,7 @@ module Rscons
|
|||||||
Ansi.write($stderr, :red, "Error: `#{target}' already exists and is not a directory", :reset, "\n")
|
Ansi.write($stderr, :red, "Error: `#{target}' already exists and is not a directory", :reset, "\n")
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
desc = "Directory #{target}"
|
env.print_builder_run_message("Directory #{target}", nil)
|
||||||
env.print_builder_run_message(desc, desc)
|
|
||||||
cache.mkdir_p(target)
|
cache.mkdir_p(target)
|
||||||
target
|
target
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -43,8 +43,7 @@ module Rscons
|
|||||||
# Check the cache and copy if necessary
|
# Check the cache and copy if necessary
|
||||||
unless cache.up_to_date?(dest, :Copy, [src], env)
|
unless cache.up_to_date?(dest, :Copy, [src], env)
|
||||||
unless printed_message
|
unless printed_message
|
||||||
desc = "#{name} #{target}"
|
env.print_builder_run_message("#{name} #{target}", nil)
|
||||||
env.print_builder_run_message(desc, desc)
|
|
||||||
printed_message = true
|
printed_message = true
|
||||||
end
|
end
|
||||||
cache.mkdir_p(File.dirname(dest))
|
cache.mkdir_p(File.dirname(dest))
|
||||||
|
|||||||
@@ -885,7 +885,13 @@ module Rscons
|
|||||||
def print_builder_run_message(short_description, command)
|
def print_builder_run_message(short_description, command)
|
||||||
case @echo
|
case @echo
|
||||||
when :command
|
when :command
|
||||||
message = command_to_s(command) if command
|
if command.is_a?(Array)
|
||||||
|
message = command_to_s(command)
|
||||||
|
elsif command.is_a?(String)
|
||||||
|
message = command
|
||||||
|
elsif short_description.is_a?(String)
|
||||||
|
message = short_description
|
||||||
|
end
|
||||||
when :short
|
when :short
|
||||||
message = short_description if short_description
|
message = short_description if short_description
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -143,6 +143,19 @@ module Rscons
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Return an array containing the values associated with the given keys.
|
||||||
|
#
|
||||||
|
# @param keys [Array<String, Symbol>]
|
||||||
|
# Keys to look up in the VarSet.
|
||||||
|
#
|
||||||
|
# @return [Array]
|
||||||
|
# An array containing the values associated with the given keys.
|
||||||
|
def values_at(*keys)
|
||||||
|
keys.map do |key|
|
||||||
|
self[key]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
# Move all VarSet variables into the copy-on-access list.
|
# Move all VarSet variables into the copy-on-access list.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module Rscons
|
module Rscons
|
||||||
# gem version
|
# gem version
|
||||||
VERSION = "1.13.0"
|
VERSION = "1.15.0"
|
||||||
end
|
end
|
||||||
+1
-1
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|||||||
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
||||||
gem.require_paths = ["lib"]
|
gem.require_paths = ["lib"]
|
||||||
|
|
||||||
gem.add_dependency "json", "~> 1.0"
|
gem.add_dependency "json", ">= 1.8", "< 3.0"
|
||||||
|
|
||||||
gem.add_development_dependency "rspec"
|
gem.add_development_dependency "rspec"
|
||||||
gem.add_development_dependency "rake"
|
gem.add_development_dependency "rake"
|
||||||
|
|||||||
@@ -769,6 +769,22 @@ EOF
|
|||||||
expect(lines(result.stdout)).to eq ["165"]
|
expect(lines(result.stdout)).to eq ["165"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "prints a builder's short description with 'command' echo mode if there is no command" do
|
||||||
|
test_dir("build_dir")
|
||||||
|
|
||||||
|
result = run_test(rsconsfile: "echo_command_ruby_builder.rb")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(lines(result.stdout)).to eq ["Install inst.exe"]
|
||||||
|
end
|
||||||
|
|
||||||
|
it "supports a string for a builder's echoed 'command' with Environment#print_builder_run_message" do
|
||||||
|
test_dir("build_dir")
|
||||||
|
|
||||||
|
result = run_test(rsconsfile: "echo_command_string.rb")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(lines(result.stdout)).to eq ["MyBuilder foo command"]
|
||||||
|
end
|
||||||
|
|
||||||
context "colored output" do
|
context "colored output" do
|
||||||
it "does not output in color with --color=off" do
|
it "does not output in color with --color=off" do
|
||||||
test_dir("simple")
|
test_dir("simple")
|
||||||
|
|||||||
@@ -199,5 +199,14 @@ module Rscons
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "#values_at" do
|
||||||
|
it "returns an array of the values associated with the given keys" do
|
||||||
|
v = VarSet.new({"fuz" => "a string", "foo" => 42, "bar" => :baz,
|
||||||
|
"qax" => [3, 6], "qux" => {a: :b}})
|
||||||
|
expect(v.values_at).to eq []
|
||||||
|
expect(v.values_at(*%w[fuz qux qax])).to eq ["a string", {a: :b}, [3, 6]]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in new issue
Block a user