Skip to content

Commit

Permalink
Merge pull request #1 from Seneca-CDOT/master
Browse files Browse the repository at this point in the history
Syncing my fork with the upstream repo
  • Loading branch information
eekbatani authored Nov 22, 2019
2 parents 03f90c9 + 00fd39b commit e80019b
Show file tree
Hide file tree
Showing 97 changed files with 3,813 additions and 6,545 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2.1
jobs:
build:
working_directory: ~/telescope
docker:
- image: circleci/node:lts
- image: circleci/redis:latest
steps:
- checkout
- run:
name: Install dependencies
command: npm install
- run:
name: Execute tests
command: npm test
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ root = true
# Size 4 space indentation
[*]
indent_style = space
indent_size = 4
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
Expand Down
64 changes: 38 additions & 26 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
module.exports = {
"extends": "airbnb-base",
"env": {
"jest": true,
"browser": true,
},
rules: {
/**
* Disallow the use of console
* https://eslint.org/docs/rules/no-console
*/
"no-console": "off",

/**
* Disallow Reassignment of Function Parameters
* https://eslint.org/docs/rules/no-param-reassign
*/
"no-param-reassign": ["error", { props: false }],

/**
* Require or disallow named function expressions
* https://eslint.org/docs/rules/func-names
*/
"func-names": "off",
}
};
module.exports = {
extends: ['airbnb-base', 'prettier'],
plugins: ['prettier'],
env: {
jest: true,
browser: true,
jquery: true,
node: true,
es2017: true,
},
rules: {
'prettier/prettier': ['error'],

/**
* Disallow the use of console
* https://eslint.org/docs/rules/no-console
*/
'no-console': 'off',

/**
* Disallow Reassignment of Function Parameters
* https://eslint.org/docs/rules/no-param-reassign
*/
'no-param-reassign': ['error', { props: false }],

/**
* Require or disallow named function expressions
* https://eslint.org/docs/rules/func-names
*/
'func-names': 'off',

/**
* Disallow enforcement of consistent linebreak style
* https://eslint.org/docs/rules/func-names
*/
'linebreak-style': 'off',
},
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# ignore package-lock.json, https://docs.npmjs.com/misc/config#package-lock
package-lock.json

# dependencies
node_modules/

Expand All @@ -13,7 +16,6 @@ build
.env.development.local
.env.test.local
.env.production.local
.vscode/

npm-debug.log*
yarn-debug.log*
Expand All @@ -24,4 +26,4 @@ yarn-error.log*
!/config-files/.gitkeep
*.exe
*.obj
*.o
*.o
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Don't create or read package-lock.json
package-lock=false
# Use exact versions of dependencies vs. semver minor updates
save-exact=true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package.json
package-lock.json
node_modules/
coverage/
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 100,
"singleQuote": true,
"endOfLine": "lf",
"semi": true,
"trailingComma": "es5",
"useTabs": false,
"tabWidth": 2
}
6 changes: 6 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

module.exports = {
extends: 'stylelint-config-recommended',
rules: {},
};
39 changes: 38 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
language: node_js
node_js:
- "stable"
- lts/*
services:
- redis-server
os:
- 'linux'
- 'osx'
- 'windows'
cache:
directories:
# On OSX, cache homebrew - https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci?answertab=active#tab-top
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_cache:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi
# Cache only .git files under "/usr/local/Homebrew" so "brew update" does not take 5min every build
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then find /usr/local/Homebrew \! -regex ".+\.git.+" -delete; fi
before_install:
# When we switch to Prettier, this CRLF fixup should go away
- cd ../..
- mv $TRAVIS_REPO_SLUG _old
- git config --global core.autocrlf false
- git clone --depth=50 _old $TRAVIS_REPO_SLUG
- cd $TRAVIS_REPO_SLUG
# Deal with Redis install per-platform
- echo $TRAVIS_OS_NAME
- echo $PATH
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update && brew install redis && brew services start redis
fi
- |
if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
redis-server --daemonize yes
redis-cli info
else
choco install redis-64
redis-server --service-install
redis-server --service-start
redis-cli info
fi
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/src/index.js",
"skipFiles": ["<node_internals>/**"]
}
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"files.eol": "\n",
"files.insertFinalNewline": true
}
76 changes: 76 additions & 0 deletions CODE-OF-CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at david.humphrey@senecacollege.ca. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ RUN apt-get update \
&& apt-get clean \
&& echo 'Finished installing dependencies'

# Copy package.json and package-lock.json
COPY package*.json ./
# Copy package.json
COPY package.json ./

# Install npm production packages
# Install npm production packages
RUN npm install --production

COPY . .
Expand Down
61 changes: 54 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
# Telescope
# Telescope <img align="left" width="100" height="100" src=https://github.com/brucremo/telescope/blob/master/images/telescope-logo.png>

A tool for tracking blogs in orbit around Seneca's open source involvement
[![Build Status](https://travis-ci.org/Seneca-CDOT/telescope.svg?branch=master)](https://travis-ci.org/Seneca-CDOT/telescope)
[![CircleCI](https://circleci.com/gh/Seneca-CDOT/telescope.svg?style=svg)](https://circleci.com/gh/Seneca-CDOT/telescope)
[![js-airbnb/prettier-style](https://img.shields.io/badge/code%20style-airbnb%2Fprettier-blue)](https://github.com/airbnb/javascript)

A tool for tracking blogs in orbit around Seneca's open source involvement. We will be working on updating this software and adding key features that can be found below listed ad MVP features.

An initial discussion of the project is available in the [Overview](docs/overview.md) document.
For contribution, the docs can be found here [Contribution](docs/CONTRIBUTING.md)

## Quick Setup Guide

Clone the source locally:

```sh
$ git clone https://github.com/Seneca-CDOT/telescope.git
$ cd telescope
```

Copy env.example to .env to create a new environment configuration.
Replace default key values in .env with credentials.

Install project dependencies:

```sh
$ npm install
```

A guide to contributing, prerequisites, and building the environment available in the [CONTRIBUTING](docs/CONTRIBUTING.md) document.
Test the app:

```sh
$ npm test
```

## MVP Features

- [ ] Written in one of node.js or Python, or a mix of the two if that makes sense
- [ ] Able to parse and use the existing [Planet Feed List format](https://wiki.cdot.senecacollege.ca/wiki/Planet_CDOT_Feed_List), especially RSS and Atom feeds
- [ ] Static HTML generated from current feed posts, shown in chronological order
- [ ] Logging, especially of errors or other issues when downloading and parsing feeds
- [ ] Process should be automatic, running continually, restart itself if it crashes
- [ ] Ability to send emails to admins, users when things go wrong or need attention
- [ ] Everything is configurable. It should be easy for the admin(s) to turn features on and off via "feature flags." It should be easy to merge new features and flag them off until they are ready to be used.
- [ ] Test harness and an initial set of tests
- [ ] Use of CI/CD, running tests and doing automatic deploys
- [ ] Running on Seneca's [Kubernetes](https://kubernetes.io/) container cloud
- [ ] Developer and User docs

# Getting the project legacy code

Expand All @@ -14,12 +55,18 @@ To grab a local copy of the legacy project.. you can run [wget](https://www.gnu.

To build the project for yourself you can follow the instructions in the [INSTALL](https://people.gnome.org/~jdub/bzr/planet/devel/trunk/INSTALL) file.

__Linux/Mac__
**Linux/Mac**

```
wget -r --no-parent https://people.gnome.org/~jdub/bzr/planet/devel/trunk/
```

__Windows__
**Windows**

1. Download wget binary [here](http://wget.addictivecode.org/FrequentlyAskedQuestions.html#download)
2. ```cd path/to/downloaded/wget```
3. ```wget -r --no-parent https://people.gnome.org/~jdub/bzr/planet/devel/trunk/```
2. `cd path/to/downloaded/wget`
3. `wget -r --no-parent https://people.gnome.org/~jdub/bzr/planet/devel/trunk/`

## License

BSD ©
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ services:
depends_on:
- redis
ports:
- "3000:3000"
- '3000:3000'
network_mode: host
redis:
image: redis:latest
ports:
- "6379:6379"
- '6379:6379'
Loading

0 comments on commit e80019b

Please sign in to comment.