Skip to content

Commit

Permalink
corrections found while writing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rglover committed Jun 5, 2017
1 parent 5485eb9 commit ab22ebc
Show file tree
Hide file tree
Showing 17 changed files with 127 additions and 42 deletions.
1 change: 1 addition & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ notices-for-facebook-graph-api-2
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1.5-add-dynamic-import-package
19 changes: 10 additions & 9 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.0.4 # Packages every Meteor app needs to have
meteor-base@1.1.0 # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # The database Meteor supports right now
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
standard-minifier-js@2.0.0 # JS minifier run for production mode
standard-minifier-js@2.1.0 # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers.
ecmascript@0.7.3 # Enable ECMAScript2015+ syntax in app code
ecmascript@0.8.0 # Enable ECMAScript2015+ syntax in app code
[email protected] # Server-side component of the `meteor shell` command

react-meteor-data
alanning:roles
fourseven:scss
twbs:bootstrap
accounts-base@1.2.17
accounts-base@1.3.0
[email protected]
[email protected]
accounts-facebook@1.1.1
accounts-github@1.2.1
accounts-google@1.1.2
accounts-facebook@1.2.0
accounts-github@1.3.0
accounts-google@1.2.0
themeteorchef:bert
fortawesome:fontawesome
aldeed:[email protected]
[email protected]
[email protected]
dynamic-import
static-html
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@1.4.4.3
METEOR@1.5
45 changes: 24 additions & 21 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
accounts-base@1.2.17
accounts-facebook@1.1.1
accounts-github@1.2.1
accounts-google@1.1.2
accounts-base@1.3.0
accounts-facebook@1.2.0
accounts-github@1.3.0
accounts-google@1.2.0
[email protected]
[email protected]
alanning:[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
babel-compiler@6.18.2
babel-compiler@6.19.1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
boilerplate-generator@1.0.11
boilerplate-generator@1.1.0
[email protected]
[email protected]
[email protected]
Expand All @@ -28,12 +27,15 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
fortawesome:[email protected]
fourseven:[email protected]
Expand All @@ -48,31 +50,31 @@ [email protected]
[email protected]
[email protected]
[email protected]
localstorage@1.0.12
localstorage@1.1.0
[email protected]
[email protected]
meteor-base@1.0.4
meteor-base@1.1.0
[email protected]
minifier-js@2.0.0
minimongo@1.0.23
minifier-js@2.1.0
minimongo@1.2.0
[email protected]
[email protected]
modules@0.8.2
modules-runtime@0.7.10
[email protected].17
modules@0.9.0
modules-runtime@0.8.0
[email protected].18
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].8
[email protected].9
raix:[email protected]
[email protected]
[email protected]
[email protected]
[email protected].8
[email protected].9
[email protected]
[email protected]
[email protected]
Expand All @@ -85,7 +87,8 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Expand All @@ -97,5 +100,5 @@ twbs:[email protected]
[email protected]
[email protected]
[email protected]
[email protected].15
[email protected].16
[email protected]
26 changes: 21 additions & 5 deletions imports/api/OAuth/server/methods.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { ServiceConfiguration } from 'meteor/service-configuration';
import rateLimit from '../../../modules/rate-limit';

Meteor.methods({
'oauth.verifyConfiguration': function oauthVerifyConfiguration(services) {
check(services, Array);
const verifiedServices = [];
services.forEach((service) => {
if (ServiceConfiguration.configurations.findOne({ service })) verifiedServices.push(service);
});
return verifiedServices.sort();

try {
const verifiedServices = [];
services.forEach((service) => {
if (ServiceConfiguration.configurations.findOne({ service })) {
verifiedServices.push(service);
}
});
return verifiedServices.sort();
} catch (exception) {
throw new Meteor.Error('500', exception);
}
},
});

rateLimit({
methods: [
'oauth.verifyConfiguration',
],
limit: 5,
timeRange: 1000,
});
File renamed without changes.
2 changes: 1 addition & 1 deletion imports/api/Users/server/methods.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meteor } from 'meteor/meteor';
import { check, Match } from 'meteor/check';
import editProfile from '../../../modules/server/edit-profile';
import editProfile from './edit-profile';
import rateLimit from '../../../modules/rate-limit';

Meteor.methods({
Expand Down
2 changes: 1 addition & 1 deletion imports/api/Utility/server/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import getPrivateFile from '../../../modules/server/get-private-file';
import parseMarkdown from '../../../modules/parse-markdown';

Meteor.methods({
'utility.getPage': function utilityReadFileAsText(fileName) {
'utility.getPage': function utilityGetPage(fileName) {
check(fileName, String);
return parseMarkdown(getPrivateFile(`pages/${fileName}.md`));
},
Expand Down
2 changes: 1 addition & 1 deletion imports/ui/components/InputHint/InputHint.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';

import './InputHint.scss';
import './InputHint.css';

const InputHint = ({ children }) => (
<div className="InputHint">
Expand Down
56 changes: 56 additions & 0 deletions imports/ui/components/Loading/Loading.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';

const Loading = () => (
<div className="Loading">
<svg width="44" height="44" viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg" stroke="#4285F4">
<g fill="none" fillRule="evenodd" strokeWidth="2">
<circle cx="22" cy="22" r="1">
<animate
attributeName="r"
begin="0s"
dur="1.8s"
values="1; 20"
calcMode="spline"
keyTimes="0; 1"
keySplines="0.165, 0.84, 0.44, 1"
repeatCount="indefinite"
/>
<animate
attributeName="stroke-opacity"
begin="0s"
dur="1.8s"
values="1; 0"
calcMode="spline"
keyTimes="0; 1"
keySplines="0.3, 0.61, 0.355, 1"
repeatCount="indefinite"
/>
</circle>
<circle cx="22" cy="22" r="1">
<animate
attributeName="r"
begin="-0.9s"
dur="1.8s"
values="1; 20"
calcMode="spline"
keyTimes="0; 1"
keySplines="0.165, 0.84, 0.44, 1"
repeatCount="indefinite"
/>
<animate
attributeName="stroke-opacity"
begin="-0.9s"
dur="1.8s"
values="1; 0"
calcMode="spline"
keyTimes="0; 1"
keySplines="0.3, 0.61, 0.355, 1"
repeatCount="indefinite"
/>
</circle>
</g>
</svg>
</div>
);

export default Loading;
6 changes: 4 additions & 2 deletions imports/ui/pages/Documents/Documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor';
import { createContainer } from 'meteor/react-meteor-data';
import { Bert } from 'meteor/themeteorchef:bert';
import DocumentsCollection from '../../../api/Documents/Documents';
import Loading from '../../components/Loading/Loading';

import './Documents.scss';

Expand All @@ -22,7 +23,7 @@ const handleRemove = (documentId) => {
}
};

const Documents = ({ documents, match, history }) => (
const Documents = ({ loading, documents, match, history }) => (!loading ? (
<div className="Documents">
<div className="page-header clearfix">
<h4 className="pull-left">Documents</h4>
Expand Down Expand Up @@ -63,9 +64,10 @@ const Documents = ({ documents, match, history }) => (
</tbody>
</Table> : <Alert bsStyle="warning">No documents yet!</Alert>}
</div>
);
) : <Loading />);

Documents.propTypes = {
loading: PropTypes.bool.isRequired,
documents: PropTypes.arrayOf(PropTypes.object).isRequired,
match: PropTypes.object.isRequired,
history: PropTypes.object.isRequired,
Expand Down
8 changes: 7 additions & 1 deletion imports/ui/pages/ViewDocument/ViewDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Meteor } from 'meteor/meteor';
import { Bert } from 'meteor/themeteorchef:bert';
import Documents from '../../../api/Documents/Documents';
import NotFound from '../NotFound/NotFound';
import Loading from '../../components/Loading/Loading';

const handleRemove = (documentId, history) => {
if (confirm('Are you sure? This is permanent!')) {
Expand All @@ -20,7 +21,7 @@ const handleRemove = (documentId, history) => {
}
};

const ViewDocument = ({ doc, match, history }) => (doc ? (
const renderDocument = (doc, match, history) => (doc ? (
<div className="ViewDocument">
<div className="page-header clearfix">
<h4 className="pull-left">{ doc && doc.title }</h4>
Expand All @@ -37,7 +38,12 @@ const ViewDocument = ({ doc, match, history }) => (doc ? (
</div>
) : <NotFound />);

const ViewDocument = ({ loading, doc, match, history }) => (
!loading ? renderDocument(doc, match, history) : <Loading />
);

ViewDocument.propTypes = {
loading: PropTypes.bool.isRequired,
doc: PropTypes.object.isRequired,
match: PropTypes.object.isRequired,
history: PropTypes.object.isRequired,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit ab22ebc

Please sign in to comment.