-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from recurly/v4
Version 4.0.0
- Loading branch information
Showing
64 changed files
with
1,453 additions
and
829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# check to see if protobuf folder is empty | ||
if [ ! -d "$HOME/travis-phantomjs" ]; then | ||
mkdir $HOME/travis-phantomjs | ||
wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $HOME/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 | ||
tar -xvf $HOME/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $HOME/travis-phantomjs | ||
export PATH=$HOME/travis-phantomjs:$PATH | ||
else | ||
echo 'Using cached phantom-js'; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
language: node_js | ||
sudo: false | ||
node_js: | ||
- '0.12' | ||
install: | ||
- mkdir travis-phantomjs | ||
- wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 | ||
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs | ||
- export PATH=$PWD/travis-phantomjs:$PATH | ||
- '4.1' | ||
before_install: | ||
- bash .travis-install-phantom.sh | ||
cache: | ||
directories: | ||
- $HOME/travis-phantomjs | ||
script: | ||
- 'if [ -n "$ARTIFACT" ]; then make test; else make test-sauce; fi' | ||
before_script: | ||
- 'if [ -n "$ARTIFACT" ]; then gem install travis-artifacts; fi' | ||
after_success: | ||
- 'if [ -n "$ARTIFACT" ]; then cd build; travis-artifacts upload --path recurly.min.js --target-path artifacts/$TRAVIS_COMMIT; fi' | ||
addons: | ||
artifacts: | ||
paths: | ||
- build | ||
target_paths: | ||
- artifacts/$TRAVIS_COMMIT | ||
s3_region: us-west-1 | ||
permissions: public-read | ||
env: | ||
global: | ||
- secure: 1Fve9UwwgFSoX0Qemh2CkAN9Nyo/bkT5nrHx0MVbc4jRziw8IWdluOPNnzg+Zpx7NXu1BPIUsOvMCjsfJcpJhiuqNPMZZHFfT7vOXW3Htj3UbxrQKpNpyFPQSfCoO4Xz7a3VNusLLqx1RTnFr7plV9F7vrUf8IsL1yYXCyWa6W0= | ||
- secure: QLUFB2xoxYmlhIgsuyZzcOY9qKeB6Ct/WOmXXfOkX5bOMyWvjnTtWK5x2qRn813qFBX3/xED9CcQhmJBEgzCBCXodFkgAXGON1mIqJvN5ubBs2fsejF4+/dnVnSiZ3zy0bQKEofTJJZisESaQ4N7a/CmIXgBJtFedDGvxB4ibSs= | ||
- secure: NUIojJW7KxzxTvWDKAwPb9ph8x1G/tEE3UL50HRsCOjEbtKYWJT887T3ZAzTXMslZictEeBUD9d4/BymUUy6dOfvohhMCZbXy5ebFHDnCiayPnoxtYXDjaoSZoMTM/wkcFBCNXtauzrkAD1q+aSauONLcSSu0IM5V4LMsCRAz3E= | ||
- secure: hP6DZjohCePpsqNoD0gzaOwWij4GIh3znS0SY87HCVzsymkrL23t0R4vKxmqOp+qQ3erSwDFT0B6NImWMnIhroIBNzWXrZ8AsT8PACv/fCOzxpR0UuiBOZMPXnkCzygoSmLYF/Xg72kyDSAABdWNwPxLEc0tBIH/e0iN8G2R2sg= | ||
- ARTIFACTS_BUCKET=recurly-js | ||
- secure: dzZNq3i4t8fMRoQWSKr4QQNSh4dBk9u1pDtwBh+dNx4bbgNC2EyXOcjL6vTPH0poDf71ggbt5VpyiqebU9bTA3+hMrMLJPPqKT54z7o58ESoUB1VHzWh40p++2uvZwIJC2HSWTdQDp/Hl3JDG4dCyD4sxuJrACa50gHp8xj0Pcc= | ||
- secure: HcEuKA0wbmbdDo9xXzZ8ICZW750EYNKzqeAYIXJWAVhnMwKQ/LXbJhbBhV4jSjWc73pTAi9ZD57UqxoH4/14KpwK8MKPxN5QZV5l4O/1HtOyL/REMhM1dr9RCM0wbSPMeVU/vwggIeW/YSk2WHYEc+smtWAjQeJJiV8+WS4eAu8= | ||
- secure: jQt9v3zZAKmq774J4TOm8a6Zgxea83faf++RRM3azsgLSz5vLfZK6IH4UiC9SmiMZVTYa87mTA71+IO8Mg0lUDJoF8F3EHB+U957el4fDdGak5OULz6FCh0tME1lsstHi+GJ3GtdJGA1DsC6bUR+DsPB5anZZ+wl3QGdUCJToeY= | ||
- secure: Bv5h9pXMa5O0EdOuN2Dt1n9/+T1dMHimnn6XQb0ozjfwzjfhcPR6eKHkOxDVJ0c1rzne48ql0FK0P42QaCdZpEmy8wUyUTmI1gTMhjILcFbQFk+r9GOwGJsPttLNRS2J9+8u5tEDZjf5LiCnPBjy6vIinK7nlas93xTLTQwNEmI= | ||
- secure: yIrHdkLhWtO37N24cRU71PK80zvkPzlJ1Jm+1MS3C6/icgJ8At1N/UgpBdxuBs1tlJm1O7Ahk+/MhpGWlspx9tCF7Hzw9Rj0xpKhqsvM155zgH582xNPwNebiCr/tmsH2/ELgFBBgC9sCW5luzeKx9nyuedGA4fmD2fK5Phc5EE= | ||
matrix: | ||
- BROWSER: chrome | ||
- BROWSER: firefox | ||
- BROWSER: safari | ||
- BROWSER: ie:11 | ||
- BROWSER: ie:10 | ||
- BROWSER: ie:9 | ||
- BROWSER: iphone:8 | ||
- BROWSER: iphone:7 | ||
- BROWSER: iphone:6 | ||
# - BROWSER: chrome | ||
# - BROWSER: firefox | ||
# - BROWSER: safari | ||
# - BROWSER: ie:11 | ||
# - BROWSER: ie:10 | ||
# - BROWSER: ie:9 | ||
# - BROWSER: iphone:8 | ||
# - BROWSER: iphone:7 | ||
# - BROWSER: iphone:6 | ||
- ARTIFACT: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,48 @@ | ||
BIN = node_modules/.bin | ||
DUO = $(BIN)/duo | ||
T = $(BIN)/duo-test -m test/api.js -R spec -P 8378 | ||
# T = $(BIN)/duo-test -m test/api.js -R spec -P 8378 | ||
|
||
BIN = node_modules/.bin | ||
WEBPACK = $(BIN)/webpack | ||
KARMA = $(BIN)/karma | ||
SERVER = $(BIN)/webpack-dev-server | ||
SRC = index.js $(shell find lib -type f -name '*.js') | ||
TESTS = $(wildcard test/*.test.js) | ||
|
||
test: test-phantomjs | ||
|
||
test-phantomjs: build build/test.js | ||
@$(T) phantomjs | ||
|
||
test-browser: build build/test.js | ||
@$(T) browser | ||
TESTS = $(shell find test -type f -name '*.js') | ||
|
||
test-sauce: BROWSER ?= ie:9 | ||
test-sauce: build build/test.js | ||
@$(T) saucelabs -b $(BROWSER) | ||
server: build | ||
@$(SERVER) --inline --hot --port 8020 | ||
|
||
build: build/recurly.min.js | ||
|
||
build/recurly.js: index.js $(SRC) node_modules component.json | ||
build/recurly.js: index.js $(SRC) node_modules | ||
@mkdir -p $(@D) | ||
@$(DUO) --quiet --stdout --global recurly < $< > $@ | ||
@$(WEBPACK) --display-reasons --display-chunks | ||
|
||
build/recurly.min.js: build/recurly.js | ||
@$(BIN)/uglifyjs $< --output $@ | ||
@$(WEBPACK) -p | ||
|
||
build/test.js: $(SRC) $(TESTS) | ||
@$(WEBPACK) --config webpack.test.config.js | ||
|
||
test: build build/test.js | ||
@$(KARMA) start karma.conf.js | ||
|
||
test-sauce: | ||
|
||
# test: test-phantomjs | ||
|
||
# test-phantomjs: build build/test.js | ||
# @$(T) phantomjs | ||
|
||
build/test.js: TESTFILE = $(foreach test, $(TESTS), 'require("./$(test)");') | ||
build/test.js: $(TESTS) | ||
@echo $(TESTFILE) | $(DUO) --quiet --development --type js --stdout > $@ | ||
# test-browser: build build/test.js | ||
# @$(T) browser | ||
|
||
watch: node_modules | ||
@$(BIN)/wr $(MAKE) component.json $(SRC) | ||
# test-sauce: BROWSER ?= ie:9 | ||
# test-sauce: build build/test.js | ||
# @$(T) saucelabs -b $(BROWSER) | ||
|
||
node_modules: package.json | ||
@npm install --silent | ||
|
||
clean: | ||
@rm -rf node_modules components/duo.json build | ||
@rm -rf node_modules build | ||
|
||
.PHONY: test watch clean | ||
.PHONY: test clean |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['mocha', 'fixture', 'sinon', 'phantomjs-shim', 'source-map-support'], | ||
files: [ | ||
'build/recurly.js', | ||
'build/test.js', | ||
{ pattern: 'test/support/fixtures/*' }, | ||
], | ||
proxies: { '/api': 'http://localhost:9877' }, | ||
preprocessors: { | ||
'test/support/fixtures/*.html': ['html2js'], | ||
'test/support/fixtures/*.json': ['json_fixtures'] | ||
}, | ||
jsonFixturesPreprocessor: { | ||
variableName: '__json__' | ||
}, | ||
reporters: ['mocha'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['PhantomJS'], | ||
singleRun: true, | ||
concurrency: Infinity | ||
}); | ||
}; | ||
|
||
var server = require('./test/server'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.