Skip to content

Commit

Permalink
Merge pull request #12 from cpcwood/update-ci-and-dependencies
Browse files Browse the repository at this point in the history
Update CI and Dependencies
  • Loading branch information
cpcwood committed May 11, 2021
2 parents fc6dc6d + 3497018 commit 0ecf562
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 93 deletions.
70 changes: 70 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: 2.1

orbs:
node: circleci/node@4.3.0
ruby: circleci/ruby@1.1.3

workflows:
version: 2
test:
jobs:
- test
- deploy:
requires:
- test
filters:
branches:
only: master

defaults: &defaults
working_directory: ~/repo
docker:
- image: cimg/base:stable

jobs:
test:
<<: *defaults
environment:
GEM_HOME: ~/bundle
steps:
- checkout
- node/install:
install-yarn: true
- node/install-packages:
pkg-manager: yarn
- ruby/install:
version: '2.7.2'
- restore_cache:
keys:
- gems-v1-{{ checksum "./Gemfile.lock" }}-{{ .Branch }}
- run:
name: 'Bundle install'
command: bundle install
- save_cache:
key: gems-v1-{{ checksum "./Gemfile.lock" }}-{{ .Branch }}
paths:
- ~/bundle
- run:
name: 'Specs'
command: yarn test
- run:
name: 'Lint'
command: yarn lint
- run:
name: 'Coverage'
command: yarn coveralls
- persist_to_workspace:
root: ~/repo
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$npm_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: npm publish

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.DS_Store
node_modules
temp-files
coverage
coverage
process.yml
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

6 changes: 1 addition & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
source 'https://rubygems.org'

gem 'erubi'

group :development do
gem 'travis'
end
gem 'erubi', '~> 1.10'
58 changes: 2 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,67 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
concurrent-ruby (1.1.6)
erubi (1.9.0)
ethon (0.12.0)
ffi (>= 1.3.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (1.0.0)
faraday (~> 1.0)
ffi (1.13.0)
gh (0.17.0)
activesupport (~> 5.0)
addressable (~> 2.4)
faraday (~> 1.0)
faraday_middleware (~> 1.0)
multi_json (~> 1.0)
net-http-persistent (~> 2.9)
net-http-pipeline
highline (2.0.3)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
json (2.3.0)
launchy (2.4.3)
addressable (~> 2.3)
minitest (5.14.1)
multi_json (1.14.1)
multipart-post (2.1.1)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
public_suffix (4.0.5)
pusher-client (0.6.2)
json
websocket (~> 1.0)
thread_safe (0.3.6)
travis (1.9.1)
faraday (~> 1.0)
faraday_middleware (~> 1.0)
gh (~> 0.13)
highline (~> 2.0)
json (~> 2.3)
launchy (~> 2.1, < 2.5.0)
pusher-client (~> 0.4)
typhoeus (~> 0.6, >= 0.6.8)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
websocket (1.2.8)
erubi (1.10.0)

PLATFORMS
ruby

DEPENDENCIES
erubi
travis
erubi (~> 1.10)

BUNDLED WITH
2.1.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Jest ERB Transformer

[![npm-version](https://img.shields.io/npm/v/jest-erb-transformer.svg?color=blueviolet&style=flat-square)](https://www.npmjs.com/package/jest-erb-transformer) [![build-status](https://img.shields.io/travis/com/cpcwood/jest-erb-transformer/master.svg?style=flat-square)](https://travis-ci.com/github/cpcwood/jest-erb-transformer) [![code-coverage](https://img.shields.io/coveralls/github/cpcwood/jest-erb-transformer.svg?style=flat-square)](https://coveralls.io/github/cpcwood/jest-erb-transformer) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)
[![npm-version](https://img.shields.io/npm/v/jest-erb-transformer.svg?color=blueviolet&style=flat-square)](https://www.npmjs.com/package/jest-erb-transformer) [![build-status](https://img.shields.io/circleci/build/gh/cpcwood/jest-erb-transformer?style=flat-square)](https://app.circleci.com/pipelines/github/cpcwood/jest-erb-transformer) [![code-coverage](https://img.shields.io/coveralls/github/cpcwood/jest-erb-transformer.svg?style=flat-square)](https://coveralls.io/github/cpcwood/jest-erb-transformer) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](https://standardjs.com)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function erbTransformer (fileContent, filePath, config) {
if (child.error && child.error.code === 'ETIMEDOUT') {
throw new Error(`Compilation of '${filePath}' timed out after ${config.timeout}ms!`)
} else {
throw new Error(`Error compiling '${filePath}', status: '${child.status}', signal: '${child.signal}', error: ${child.stderr.toString()}!`)
throw new Error(`Error compiling '${filePath}', status: '${child.status}', signal: '${child.signal}', error: ${child.stderr ? child.stderr.toString() : 'undefined'}`)
}
}
const compiledFile = bufferToString(child.stdout, config.args.delimiter)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-erb-transformer",
"version": "1.2.1",
"version": "1.2.2",
"description": "Jest transformer for Embedded Ruby (`.erb`) files in Ruby projects",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,5 @@ test('user config - warning - could not be loaded', () => {
test('error - general failure of childProcess.spawnSync', () => {
expect(() => {
transformErb('./tests/rubyError.js.erb')
}).toThrow("Error compiling './tests/rubyError.js.erb', status: '1', signal: 'null', error: (erb):1:in `<main>': A ruby error (RuntimeError)")
}).toThrow("Error compiling './tests/rubyError.js.erb', status: '1', signal: 'null', error: (erb):1:in `<main>': A ruby error (RuntimeError)")
})
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2513,9 +2513,9 @@ has@^1.0.3:
function-bind "^1.1.1"

hosted-git-info@^2.1.4:
version "2.8.8"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488"
integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==
version "2.8.9"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==

html-encoding-sniffer@^2.0.1:
version "2.0.1"
Expand Down Expand Up @@ -3434,9 +3434,9 @@ lodash.sortby@^4.7.0:
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=

lodash@^4.17.19, lodash@^4.17.20:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

log-driver@^1.2.7:
version "1.2.7"
Expand Down

0 comments on commit 0ecf562

Please sign in to comment.