New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-karma-sonar

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-karma-sonar - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

test.js

6

CHANGELOG.md

@@ -0,1 +1,7 @@

<a name="0.2.7"></a>
# 0.2.7 (2015-06-15)
## Bug Fixes
- Added support excluding any sonar property.
<a name="0.2.6"></a>

@@ -2,0 +8,0 @@ # 0.2.6 (2015-06-09)

2

package.json
{
"name": "grunt-karma-sonar",
"description": "Grunt plugin for integrating karma reports with sonar",
"version": "0.2.6",
"version": "0.2.7",
"homepage": "https://github.com/mdasberg/grunt-karma-sonar",

@@ -6,0 +6,0 @@ "author": {

@@ -70,2 +70,8 @@ # grunt-karma-sonar [![Build Status](https://travis-ci.org/mdasberg/grunt-karma-sonar.svg?branch=master)](https://travis-ci.org/mdasberg/grunt-karma-sonar)

#### options.excludedProperties
Type: `Array`
Default: []
Should be a list of sonar properties to exclude
#### options.instance.hostUrl

@@ -72,0 +78,0 @@ Type: `String`

@@ -16,3 +16,4 @@ 'use strict';

defaultOutputDir: '.tmp/sonar/',
scmDisabled: true
scmDisabled: true,
excludedProperties:[]
};

@@ -73,4 +74,4 @@

var value = _.result(object, key);
if (value !== undefined) {
if (value !== undefined && sonarOptions.excludedProperties.indexOf(prop) === -1) {
args.push('-D' + prop + '=' + value);

@@ -77,0 +78,0 @@ }

@@ -242,3 +242,3 @@ 'use script';

it('should set the credentials when options.instance is defined (-D) for sonar-runner', function (done) {
it('should set the credentials when options.instance is defined (-D) for sonar-runner', function (done) {
var opts = DEFAULT_OPTIONS

@@ -271,2 +271,3 @@ opts.defaultOutputDir = '.tmp/sonar/';

expect(mock.logOk[14]).toBe('-Dsonar.password=admin');
expect(mock.logOk[16]).toBe('-Dsonar.language=js');

@@ -276,3 +277,41 @@ done();

});
it('should exclude options that are excluded for sonar-runner', function (done) {
var opts = DEFAULT_OPTIONS
opts.defaultOutputDir = '.tmp/sonar/';
opts.runnerProperties = {};
opts.instance = {
hostUrl: 'http://localhost:9000',
jdbcUrl: 'jdbc:h2:tcp://localhost:9092/sonar',
jdbcUsername: 'sonar',
jdbcPassword: 'sonar',
login: 'admin',
password: 'admin'
};
opts.excludedProperties = ['sonar.language'];
var mock = getDefaultParameterMock();
mock.invoke(karmaSonar, function (err) {
expect(mock.logError.length).toBe(0);
expect(mock.logOk.length).toBe(23);
expect(mock.logOk[3]).toBe('Dry-run');
expect(mock.logOk[4]).toBe('Sonar would have been triggered with the following sonar properties:');
console.log(mock.logOk)
// options.instance
expect(mock.logOk[9]).toBe('-Dsonar.host.url=http://localhost:9000');
expect(mock.logOk[10]).toBe('-Dsonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar');
expect(mock.logOk[11]).toBe('-Dsonar.jdbc.username=sonar');
expect(mock.logOk[12]).toBe('-Dsonar.jdbc.password=sonar');
expect(mock.logOk[13]).toBe('-Dsonar.login=admin');
expect(mock.logOk[14]).toBe('-Dsonar.password=admin');
expect(mock.logOk[16]).not.toBe('-Dsonar.language=js');
done();
});
});
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc