Skip to content

Commit

Permalink
Merge branch 'master' of github.com:simplabs/simplabs.github.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjayjpg committed Nov 11, 2019
2 parents 9469c52 + e2fb3ba commit b32cc37
Show file tree
Hide file tree
Showing 263 changed files with 3,332 additions and 3,147 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lib/generate-blog-components/lib/files/**/*
lib/generate-blog/lib/templates/**/*
lib/global-css/css/vendor/normalize.css
src/ui/components/Header/template.hbs
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,28 @@ install:
jobs:
include:
- stage: test
name: Tests
script: yarn test
- stage: test
name: "Lint - TypeScript"
script: yarn lint:ts
- stage: test
name: "Lint - JavaScript"
script: yarn lint:js
- stage: test
name: "Lint - Handlebars"
script: yarn lint:hbs
- stage: test
name: "Lint - CSS"
script: yarn lint:css
- stage: test
name: "Lint - Markdown"
script: yarn lint:md
- stage: test
name: "Crawler"
script: yarn build && yarn crawl
- stage: test
name: "Percy"
script: yarn build && yarn percy

notifications:
Expand Down
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,41 @@ The source code for [https://simplabs.com](https://simplabs.com).
We use [Glimmer.js](https://glimmerjs.com) for rendering,
[navigo](https://github.com/krasimir/navigo) for client-side routing and
[CSS Blocks](https://css-blocks.com) for CSS. Pages are statically pre-rendered
using [Puppeteer](https://pptr.dev) and we inject critical CSS with
[critical](https://github.com/addyosmani/critical).
using [Puppeteer](https://pptr.dev).

## Installation

* `git clone <repository-url>` this repository
* `cd simplabs`
* `yarn --pure-lockfile`
- `git clone <repository-url>` this repository
- `cd simplabs`
- `yarn --pure-lockfile`

## Running / Development

* `ember serve`
* open [http://localhost:4200](http://localhost:4200).
* `yarn format` (format source files)
- `ember serve`
- open [http://localhost:4200](http://localhost:4200).
- `yarn format` (format source files)

**This project registers a service worker which you'll likely want to disable
for development. Check _"Bypass for network"_ in the _"Application"_ tab in the
Chrome Inspector to do so.**

### Testing

* `ember test` (headless)
* `ember test -s` (headful)
* `yarn lint` (check formatting)
- `ember test` (headless)
- `ember test -s` (headful)
- `yarn lint` (check formatting)

### Building

* `ember build` (development)
* `yarn build` (production, with static pre-rendering)
- `ember build` (development)
- `yarn build` (production, with static pre-rendering)

## Further Reading / Useful Links

* [Glimmer.js](https://glimmerjs.com)
* [navigo](https://github.com/krasimir/navigo)
* [CSS Blocks](https://css-blocks.com)
* [Puppeteer](https://pptr.dev)
* [critical](https://github.com/addyosmani/critical)
- [Glimmer.js](https://glimmerjs.com)
- [navigo](https://github.com/krasimir/navigo)
- [CSS Blocks](https://css-blocks.com)
- [Puppeteer](https://pptr.dev)

## Copyright

Expand Down
6 changes: 3 additions & 3 deletions _calendar/2019-05-25-emberginners.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Emberginners Workshop"
image: "/assets/images/calendar/2019-05-25-emberginners/tomster.png"
title: 'Emberginners Workshop'
image: '/assets/images/calendar/2019-05-25-emberginners/tomster.png'
location: Berlin
url: https://www.meetup.com/Ember-js-Berlin/events/260668987/
kind: meetup
---

simplabs holds a JavaScript beginner workshop for women and non-binary people
that will guide attendees through building their first web application using
EmberJS.
EmberJS.
6 changes: 3 additions & 3 deletions _calendar/2019-06-01-jsconfeu.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "JSConf.eu"
image: "/assets/images/calendar/2019-06-01-jsconfeu/logo.png"
title: 'JSConf.eu'
image: '/assets/images/calendar/2019-06-01-jsconfeu/logo.png'
location: Berlin
url: https://2019.jsconf.eu
kind: conference
---

Our own [@jjordan_dev](https://twitter.com/jjordan_dev) will speak about
crafting accessible web comics for everyone.
crafting accessible web comics for everyone.
4 changes: 2 additions & 2 deletions _calendar/2019-06-22-commitporto.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Commit Porto '19"
image: "/assets/images/calendar/2019-06-22-commitporto/logo.png"
image: '/assets/images/calendar/2019-06-22-commitporto/logo.png'
location: Porto
url: https://commitporto.com
kind: conference
---

Ricardo Mendes will tell a story about the JavaScript hype cycles and how
Ember.js has managed to keep up with them.
Ember.js has managed to keep up with them.
6 changes: 3 additions & 3 deletions _calendar/2019-07-10-fullstacklondon.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "FullStack London 2019"
image: "/assets/images/calendar/2019-07-10-fullstacklondon/logo.png"
title: 'FullStack London 2019'
image: '/assets/images/calendar/2019-07-10-fullstacklondon/logo.png'
location: London
url: https://skillsmatter.com/conferences/11213-fullstack-london-2019-the-conference-on-javascript-node-and-internet-of-things#program
kind: conference
---

Jessica Jordan will give a talk about crafting web comics for literally
everyone.
everyone.
4 changes: 2 additions & 2 deletions _calendar/2019-09-19-hiveconf.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "HiveConf '19"
image: "/assets/images/calendar/2019-09-19-hiveconf/logo.png"
image: '/assets/images/calendar/2019-09-19-hiveconf/logo.png'
location: Berlin
url: http://hiveconf19.eventbrite.com
kind: conference
---

Jessica Jordan will be joining the panel to talk about topics around Tech and
HR.
HR.
6 changes: 3 additions & 3 deletions _calendar/2019-10-17-emberfest.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "EmberFest 2019"
image: "/assets/images/calendar/2019-10-17-emberfest/logo.png"
title: 'EmberFest 2019'
image: '/assets/images/calendar/2019-10-17-emberfest/logo.png'
location: Berlin
url: https://emberfest.eu
kind: conference
---

We are co-organizing EmberFest and the team is looking forward to meeting up
with the Ember.js community in Copenhagen.
with the Ember.js community in Copenhagen.
6 changes: 3 additions & 3 deletions _calendar/2019-10-30-reactiveconf.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "ReactiveConf 2019"
image: "/assets/images/calendar/2019-10-30-reactiveconf/logo.jpg"
title: 'ReactiveConf 2019'
image: '/assets/images/calendar/2019-10-30-reactiveconf/logo.jpg'
location: Prague
url: https://reactiveconf.com
kind: conference
---

Jessica Jordan will deliver a talk at ReactiveConf in Prague this October.
Jessica Jordan will deliver a talk at ReactiveConf in Prague this October.
43 changes: 23 additions & 20 deletions _posts/2013-06-15-authentication-in-emberjs.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
---
title: "Authentication in ember.js"
author: "Marco Otte-Witte"
title: 'Authentication in ember.js'
author: 'Marco Otte-Witte'
github: marcoow
twitter: marcoow
bio: "Founding Director of simplabs, author of Ember Simple Auth"
bio: 'Founding Director of simplabs, author of Ember Simple Auth'
topic: ember
description: 'Marco Otte-Witte describes an approach for implementing a session mechanism, authentication and authorization in Ember.js applications.'
---

**Update:**_I released an Ember.js plugin that makes it very easy to implement an authentication system as described in this post: [Ember.SimpleAuth](/blog/2013/10/09/embersimpleauth)._

**Update:** _After I wrote this I found out that it’s actually not the best approach to implement authentication in Ember.js… There are some things missing and some other things can be done in a much simpler way. [I wrote a summary of the (better) authentication mechanism we moved to.](/blog/2013/08/08/better-authentication-in-emberjs "(better) authnetication with ember.js")_
**Update:** _After I wrote this I found out that it’s actually not the best approach to implement authentication in Ember.js… There are some things missing and some other things can be done in a much simpler way. [I wrote a summary of the (better) authentication mechanism we moved to.](/blog/2013/08/08/better-authentication-in-emberjs '(better) authnetication with ember.js')_

_I’m using the latest (as of mid June 2013) [ember](https://github.com/emberjs/ember.js)/[ember-data](https://github.com/emberjs/data)/[handlebars](https://github.com/wycats/handlebars.js) code directly from the respective github repositories in this example._

Expand All @@ -35,7 +36,7 @@ The general route to go with authentication in ember.js is to use **token based

That template is backed by a route that handles the submission event and posts the data to the /session route on the server - which then responds with either status 401 or 200 and a JSON containing the authentication token and the id of the authenticated user:


<!-- prettier-ignore -->
```js
App.SessionsNewRoute = Ember.Route.extend({
events: {
Expand All @@ -45,19 +46,20 @@ App.SessionsNewRoute = Ember.Route.extend({
var password = this.controller.get('password');
if (!Ember.isEmpty(loginOrEmail) && !Ember.isEmpty(password)) {
$.post('/session', {
session: { login_or_email: loginOrEmail, password: password }
}, function(data) {
session: { login_or_email: loginOrEmail, password: password },
},
function(data) {
var authToken = data.session.auth_token;
App.Store.authToken = authToken;
App.Auth = Ember.Object.create({
authToken: data.session.auth_token,
accountId: data.session.account_id
accountId: data.session.account_id,
});
router.transitionTo('index');
});
}
}
}
},
},
});
```

Expand All @@ -67,9 +69,9 @@ The response JSON from the server would look somehow like this in the successful

```json
{
session: {
auth_token: '<SOME RANDOM AUTH TOKEN>',
account_id: '<ID OF AUTHENTICATED USER>'
"session": {
"auth_token": "<SOME RANDOM AUTH TOKEN>",
"account_id": "<ID OF AUTHENTICATED USER>"
}
}
```
Expand All @@ -88,11 +90,11 @@ The next step is to actually send the authentication token to the server. As the
```js
App.AuthenticatedRESTAdapter = DS.RESTAdapter.extend({
ajax: function(url, type, hash) {
hash = hash || {};
hash = hash || {};
hash.headers = hash.headers || {};
hash.headers['X-AUTHENTICATION-TOKEN'] = this.authToken;
return this._super(url, type, hash);
}
},
});
```

Expand All @@ -117,7 +119,7 @@ App.AuthenticatedRoute = Ember.Route.extend({
if (!Ember.isEmpty(App.Auth.get('authToken')) && !Ember.isEmpty(App.Auth.get('accountId'))) {
this.transitionTo('sessions.new');
}
}
},
});
```

Expand All @@ -138,17 +140,18 @@ As the code is now spread up into a number of files and classes, I added a `Sess
```js
App.Session = DS.Model.extend({
authToken: DS.attr('string'),
account: DS.belongsTo('App.Account')
account: DS.belongsTo('App.Account'),
});
```

alongside an `App.AuthManager` accompanied by a custom initializer to clean it up:

<!-- prettier-ignore -->
```js
App.AuthManager = Ember.Object.extend({
init: function() {
this._super();
var authToken = $.cookie('auth_token');
var authToken = $.cookie('auth_token');
var authAccountId = $.cookie('auth_account');
if (!Ember.isEmpty(authToken) && !Ember.isEmpty(authAccountId)) {
this.authenticate(authToken, authAccountId);
Expand All @@ -163,7 +166,7 @@ App.AuthManager = Ember.Object.extend({
var account = App.Account.find(accountId);
this.set('session', App.Session.createRecord({
authToken: authToken,
account: account
account: account,
}));
},

Expand All @@ -180,7 +183,7 @@ App.AuthManager = Ember.Object.extend({
$.cookie('auth_token', this.get('session.authToken'));
$.cookie('auth_account', this.get('session.account.id'));
}
}.observes('session')
}.observes('session'),
});
```

Expand Down
15 changes: 8 additions & 7 deletions _posts/2013-06-27-excellent-172.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
---
title: "excellent 1.7.2"
author: "Marco Otte-Witte"
title: 'excellent 1.7.2'
author: 'Marco Otte-Witte'
github: marcoow
twitter: marcoow
bio: "Founding Director of simplabs, author of Ember Simple Auth"
bio: 'Founding Director of simplabs, author of Ember Simple Auth'
description: 'Marco Otte-Witte announces excellent 1.7.2 with 3 new checks and a more forgiving and stable parser mechanism.'
topic: ruby
---

We just released excellent 1.7.2 which includes the following fixes:

<!--break-->

* fixed `Simplabs::Excellent::Checks::Rails::CustomInitializeMethodCheck`
* fixed `Simplabs::Excellent::Checks::MethodNameCheck` so it allows method names that exist in Ruby itself
* fixed `Simplabs::Excellent::Checks::GlobalVariableCheck` so it doesn't report false positives for rescue bodies
* made the parser more forgiving/stable in some situations
- fixed `Simplabs::Excellent::Checks::Rails::CustomInitializeMethodCheck`
- fixed `Simplabs::Excellent::Checks::MethodNameCheck` so it allows method names that exist in Ruby itself
- fixed `Simplabs::Excellent::Checks::GlobalVariableCheck` so it doesn't report false positives for rescue bodies
- made the parser more forgiving/stable in some situations
17 changes: 9 additions & 8 deletions _posts/2013-06-28-excellent-200.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
title: "excellent 2.0.0"
author: "Marco Otte-Witte"
title: 'excellent 2.0.0'
author: 'Marco Otte-Witte'
github: marcoow
twitter: marcoow
bio: "Founding Director of simplabs, author of Ember Simple Auth"
bio: 'Founding Director of simplabs, author of Ember Simple Auth'
description: 'Marco Otte-Witte announces excellent 2.0.0 with support for a configuration file, a whitelist of allowed global variables and re-enabled standard checks.'
topic: ruby
---

We just released excellent 2.0.0 which has some big improvements:

<!--break-->

* now supporting config file `.excellent.yml` in current working directory to configure which specs to run/ not to run with thresholds, patterns etc.
* predefined globals will not be reported anymore (`$!`, `$@`, `$&`, `$```, `$’`, `$+`, `$1`, `$2..`, `$~`, `$=`, `$/`, `$\`, `$,`, `$;`, `$.`, `$`, `$_`, `$0`, `$*`, `$$`, `$?`, `$:`, `$"`, `$DEBUG`, `$FILENAME`, `$LOAD_PATH`, `$stdin`, `$stdout`, `$stderr`, `$VERBOSE`, `$-0`, `$-a`, `$-d`, `$-F`, `$-i`, `$-I`, `$-l`, `$-p`, `$-v`)
* enabled previously disable checks again: `AbcMetricMethodCheck`, `ControlCouplingCheck`, `CyclomaticComplexityBlockCheck`, `CyclomaticComplexityMethodCheck`, `ForLoopCheck`, `FlogBlockCheck`, `FlogClassCheck`, `FlogMethodCheck`
* testing now uses Rspec 2
* internal cleanups/simplifications
- now supporting config file `.excellent.yml` in current working directory to configure which specs to run/ not to run with thresholds, patterns etc.
- predefined globals will not be reported anymore (`$!`, `$@`, `$&`, ` $```, `\$`,`\$+`,`\$1`,`\$2..`,`\$~`,`\$=`,`\$/`,`\$\`,`\$,`,`\$;`,`\$.`,`\$`,`\$\_`,`\$0`,`\$\*`,`\$\$`,`\$?`,`\$:`,`\$"`,`\$DEBUG`,`\$FILENAME`,`\$LOAD_PATH`,`\$stdin`,`\$stdout`,`\$stderr`,`\$VERBOSE`,`\$-0`,`\$-a`,`\$-d`,`\$-F`,`\$-i`,`\$-I`,`\$-l`,`\$-p`,`\$-v`)
- enabled previously disable checks again: `AbcMetricMethodCheck`, `ControlCouplingCheck`, `CyclomaticComplexityBlockCheck`, `CyclomaticComplexityMethodCheck`, `ForLoopCheck`, `FlogBlockCheck`, `FlogClassCheck`, `FlogMethodCheck`
- testing now uses Rspec 2
- internal cleanups/simplifications
Loading

0 comments on commit b32cc37

Please sign in to comment.