Skip to content

Commit

Permalink
Merge pull request #9 from navarasu/fix_9_coverage
Browse files Browse the repository at this point in the history
Added coverage report using coverall and istanbul
  • Loading branch information
navarasu authored Jul 5, 2020
2 parents 9aaea95 + f70cb6a commit ff02d2a
Show file tree
Hide file tree
Showing 9 changed files with 1,365 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
- checkout
- node/install-packages
- run: sudo npm install -g serverless
- run: sudo chown -R circleci:circleci /home/circleci/project/
- run: sudo chown -R circleci:circleci /usr/local/lib/node_modules/
- run: npm test
- run: npm run coverage

deployment:
executor: node/default
Expand Down
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,19 @@ logs
npm-debug.log*


# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
.nyc_output

# Coverage directory used by tools like istanbul
coverage

# Dependency directories
node_modules/

.vscode

#OS
.DS_Store

.serverless-test
.serverless-test
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby-2.5.8
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1><img height="75" src="https://user-images.githubusercontent.com/20145075/86084483-aa2d4b80-baba-11ea-938d-53d6b7e37896.png" alt="iOS resume application project app icon"></h1>

[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com) [![npm](https://img.shields.io/npm/v/serverless-ruby-layer.svg)](https://www.npmjs.com/package/serverless-ruby-layer) [![Build Status](https://img.shields.io/circleci/build/github/navarasu/serverless-ruby-layer)](https://circleci.com/gh/navarasu/serverless-ruby-layer)
[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com) [![npm](https://img.shields.io/npm/v/serverless-ruby-layer.svg)](https://www.npmjs.com/package/serverless-ruby-layer) [![Build Status](https://img.shields.io/circleci/build/github/navarasu/serverless-ruby-layer)](https://circleci.com/gh/navarasu/serverless-ruby-layer) [![Coverage Status](https://coveralls.io/repos/github/navarasu/serverless-ruby-layer/badge.svg?branch=master)](https://coveralls.io/github/navarasu/serverless-ruby-layer?branch=master) [![MIT License](https://img.shields.io/npm/l/serverless-ruby-layer)](https://github.com/navarasu/serverless-ruby-layer/blob/master/LICENSE)

A Serverless Plugin to bundle ruby gems from Gemfile and deploy it to lambda layer automatically while running `severless deploy`.

Expand Down
3 changes: 2 additions & 1 deletion lib/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ const path = require('path');
const fs = require('fs-extra');
const Promise = require('bluebird');
var JSZip = require('jszip');
Promise.promisifyAll(fs);

function runCommand(cmd,args,options) {
const ps = spawnSync(cmd, args,options);
if (ps.error) {
console.log(ps.error.code)
throw new Error(ps.error);
} else if (ps.status !== 0) {
throw new Error(ps.stderr);
Expand All @@ -20,6 +20,7 @@ function docker(args, options){
}

function cleanBuild(){
this.serverless.cli.log("Cleaning ruby layer build")
this.build_path = path.join(this.servicePath,'.serverless','build','ruby_layer')
if (fs.pathExistsSync(this.build_path)){
fs.rmdirSync(this.build_path, { recursive: true })
Expand Down
Loading

0 comments on commit ff02d2a

Please sign in to comment.