Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
TCFG (pronounced "tee config") is test suite configuration for the real world. TCFG offers:
Support for easily controlling which environment your tests execute against
A tiered structure to configuration which allows for every kind of configuration scenario to be supported.
Support for easily integrating standalone test suites into common Continuous Integration platforms like Jenkins.
The Wiki contains more in depth information. Some good places to start:
Start by installing the gem:
$ gem install tcfg
In the project root, make a yaml file called tcfg.yml that contains all configuration you want to be able to control. For a selenium suite, it might look something like this:
---
#start with basic defaults
BROWSER: firefox
BASE_URL: http://localhost:8080
LOG_LEVEL: INFO
#This is a special section with overrides by 'environment'
t_environments:
QA:
BASE_URL: http://qa.mysite.com
Production:
BASE_URL: https://mysite.com
Then configure RSpec to use tcfg in your spec helper file (typically called spec/spec_helper.rb):
require 'tcfg'
RSpec.configure do |config|
config.include TCFG::Helper
end
Now you can access configuration in any before, after, or it block, like:
require 'selenium-webdriver'
RSpec.configure do |config|
config.before(:all) do
@browser = Selenium::WebDriver.for tcfg['BROWSER']
end
config.before(:each) do
@browser.get tcfg['BASE_URL']
end
end
If you need to access configuration outside of a before, after, or it block you can use the TCFG module directly:
Log.level = TCFG['LOG_LEVEL']
To control your test suite, you can use environment variables. To change the browser used:
#To execute with all default configuration
$ rspec
#To change the browser used
$ T_BROWSER=chrome rspec
#To change which environment the tests execute against:
$ T_ENVIRONMENT=QA rspec
TCFG is a general purpose configuration framework. It should be possible to use with most Ruby test frameworks or even for non testing uses. If you have a use and aren't sure how to handle it with tcfg, file an issue we'll see if we can help you out.
TCFG is used in several projects that demonstrate it's capabilities.
More coming soon...
FAQs
Unknown package
We found that tcfg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.