This file contains hidden or 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
| grunt.initConfig({ | |
| karma: { | |
| dev: { | |
| configFile: 'karma.conf.js', | |
| autoWatch: true | |
| } | |
| } | |
| }); |
This file contains hidden or 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
| describe('fxpay', function() { | |
| describe('purchase()', function() { | |
| it('should error if mozPay() is undefined', function(done) { | |
| var productId = '123'; | |
| fxpay.purchase(productId, { | |
| onpurchase: function(error) { | |
| assert.equal(error, 'PAY_PLATFORM_UNAVAILABLE'); | |
| done(); | |
| }, |
This file contains hidden or 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
| describe('fxpay', function () { | |
| describe('API', function() { | |
| var api; | |
| var server; | |
| beforeEach(function() { | |
| api = new fxpay.API(); | |
| server = sinon.fakeServer.create(); | |
| }); |
This file contains hidden or 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
| grunt.initConfig({ | |
| karma: { | |
| run: { | |
| configFile: 'karma.conf.js', | |
| singleRun: true, | |
| browsers: ['PhantomJS'] | |
| }, | |
| } | |
| }); |
This file contains hidden or 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
| language: node_js | |
| node_js: | |
| - 0.10 | |
| before_script: | |
| - npm rebuild | |
| script: grunt karma:run |
This file contains hidden or 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
| before_script: | |
| - npm rebuild | |
| - "export DISPLAY=:99.0" | |
| - "sh -e /etc/init.d/xvfb start" |
This file contains hidden or 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
| grunt.initConfig({ | |
| jshint: { | |
| options: { jshintrc: __dirname + '/.jshintrc' }, | |
| files: [ | |
| 'Gruntfile.js', | |
| 'lib/*.js', | |
| 'test/*.js', | |
| ], | |
| } | |
| }); |
This file contains hidden or 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
| 11:47:1422992837 w.auth:INFO fetching FxA token from auth_response: "http://fireplace.loc/mozpay/spa/fxa-auth?state=d56038033e894fe289d6f75f9fc668be&code=4d9287d3798ed74a965505ee7d2d62c740bf4426ffbf862dcd03f20ffa4dbe6f" :/Users/kumar/dev/webpay/webpay/auth/views.py:175 | |
| 11:47:1422992837 requests_oauthlib.oauth2_session:DEBUG Requesting url https://oauth-latest.dev.lcip.org/v1/token using method POST. :/Users/kumar/.virtualenvs/webpay/lib/python2.7/site-packages/requests_oauthlib/oauth2_session.py:273 | |
| 11:47:1422992837 requests_oauthlib.oauth2_session:DEBUG Supplying headers {u'Accept': u'application/json'} and data {u'code': u'4d9287d3798ed74a965505ee7d2d62c740bf4426ffbf862dcd03f20ffa4dbe6f', u'client_secret': u'8eb806fd56338aa604117a3ee8ebe3337c8f2cf69511df52214f08383f70cc5c', u'grant_type': u'authorization_code', u'client_id': u'1947ea4dfba1911d'} :/Users/kumar/.virtualenvs/webpay/lib/python2.7/site-packages/requests_oauthlib/oauth2_session.py:274 | |
| 11:47:1422992837 requests_oauthlib.oauth2_session:DEBUG Passin |
This file contains hidden or 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
| // Fetch products from the API and also restore products from receipts. | |
| // This used to be fxpay.init() and fxpay.getProducts() | |
| // Old code: | |
| // https://github.com/mozilla/fxpay/blob/master/example/shared/js/index.js#L41-L50 | |
| // https://github.com/mozilla/fxpay/blob/master/example/shared/js/index.js#L249-L257 | |
| fxpay.getProducts().then(function(allProducts) { | |
| allProducts.forEach(function(product) { | |
| console.log('product ID:', product.id); | |
| console.log('product name:', product.name); |
This file contains hidden or 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
| ALTER TABLE `users` | |
| ADD COLUMN `last_login_attempt` DATETIME NULL DEFAULT NULL, | |
| ADD COLUMN `last_login_attempt_ip` CHAR(45) NOT NULL DEFAULT '' AFTER `last_login_attempt`, | |
| ADD COLUMN `failed_login_attempts` MEDIUMINT(8) UNSIGNED NOT NULL | |
| DEFAULT '0' AFTER `last_login_attempt_ip`; | |
| ALTER TABLE `users` CHANGE `fxa_uid` `username` varchar(255); |