Skip to content

Commit

Permalink
Version v0.1.8
Browse files Browse the repository at this point in the history
* Matter v0.2.0
* S3 Util
* Codeclimate ignore/duplicate code
* Search method added to Action class
  • Loading branch information
prescottprue committed Jan 16, 2016
1 parent a3642c7 commit b94ef0f
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 29 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Client library to simplify communication with Tessellate application building se

Grout is isomorphic, so it can be used within a front-end or on a server. Below are options for setups:

### Node or ES6
### NodeJS
1. Install:
`npm install --save kyper-grout`

Expand All @@ -24,7 +24,13 @@ Grout is isomorphic, so it can be used within a front-end or on a server. Below
var Grout = require('kyper-grout');
var grout = new Grout();
```
**or**

### ES6
1. Install:
`npm install --save kyper-grout`

2. Include and use `kyper-grout`:

```javascript
import Grout from 'kyper-grout';
let grout = new Grout();
Expand All @@ -36,7 +42,7 @@ Grout is isomorphic, so it can be used within a front-end or on a server. Below
Add script tag to index.html:

```html
<script src="http://cdn.kyper.io/js/grout/0.1.7/grout.js"></script>
<script src="http://cdn.kyper.io/js/grout/0.1.8/grout.js"></script>
```

#### Bower
Expand All @@ -46,14 +52,15 @@ Grout is isomorphic, so it can be used within a front-end or on a server. Below
<script src="./bower_components/kyper-grout/dist/grout.js"></script>
```
2. Begin using grout:
```javascript
var grout = new Grout();
if(grout.isLoggedIn){
console.log('The currently logged in user is', grout.currentUser);
} else {
console.warn('Not logged into grout');
}
```

```javascript
var grout = new Grout();
if(grout.isLoggedIn){
console.log('The currently logged in user is', grout.currentUser);
} else {
console.warn('Not logged into grout');
}
```

## Documentation

Expand Down
8 changes: 4 additions & 4 deletions dist/grout.js
Original file line number Diff line number Diff line change
Expand Up @@ -19327,7 +19327,6 @@ return /******/ (function(modules) { // webpackBootstrap
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var logger = _Matter2.default.utils.logger;

/**
* @description Initial AWS Config
*/
Expand All @@ -19340,7 +19339,9 @@ return /******/ (function(modules) { // webpackBootstrap
});
setConfig();
}
return new _awsSdk2.default.S3();
if (typeof _awsSdk2.default.S3 === 'function') {
return new _awsSdk2.default.S3();
}
};
/**
* @description Set AWS config credentials
Expand All @@ -19349,8 +19350,7 @@ return /******/ (function(modules) { // webpackBootstrap
return _awsSdk2.default.config.update({
credentials: new _awsSdk2.default.CognitoIdentityCredentials({
IdentityPoolId: _config2.default.aws.cognito.poolId
}),
region: _config2.default.aws.region
}), region: _config2.default.aws.region
});
};
/**
Expand Down
8 changes: 4 additions & 4 deletions dist/grout.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions lib/utils/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var _lodash = require('lodash');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var logger = _Matter2.default.utils.logger;

/**
* @description Initial AWS Config
*/
Expand All @@ -40,7 +39,9 @@ function init() {
});
setConfig();
}
return new _awsSdk2.default.S3();
if (typeof _awsSdk2.default.S3 === 'function') {
return new _awsSdk2.default.S3();
}
};
/**
* @description Set AWS config credentials
Expand All @@ -49,8 +50,7 @@ function setConfig() {
return _awsSdk2.default.config.update({
credentials: new _awsSdk2.default.CognitoIdentityCredentials({
IdentityPoolId: _config2.default.aws.cognito.poolId
}),
region: _config2.default.aws.region
}), region: _config2.default.aws.region
});
};
/**
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": "kyper-grout",
"version": "0.1.7",
"version": "0.1.8",
"description": "Library to communicate with tessellate application building/managing service.",
"main": "lib/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/utils/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import matter from '../classes/Matter';
import AWS from 'aws-sdk';
import { has } from 'lodash';
const { logger } = matter.utils;

/**
* @description Initial AWS Config
*/
Expand All @@ -15,7 +14,9 @@ export function init() {
});
setConfig();
}
return new AWS.S3();
if(typeof AWS.S3 === 'function'){
return new AWS.S3();
}
};
/**
* @description Set AWS config credentials
Expand All @@ -24,8 +25,7 @@ export function setConfig() {
return AWS.config.update({
credentials: new AWS.CognitoIdentityCredentials({
IdentityPoolId: config.aws.cognito.poolId
}),
region: config.aws.region
}), region: config.aws.region
});
};
/**
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
loaders: [
{ test: /\.js$/, loaders: ['babel-loader'], exclude: [/node_modules/] },
{ test: /aws-sdk/, loaders: ["transform?brfs"], exclude:[]},
{ test: /\.json$/, loaders: ['json'], exclude:[]},
{ test: /\.json$/, loaders: ['json'], exclude:[]}
]
},
output: {
Expand Down

0 comments on commit b94ef0f

Please sign in to comment.