Merge branch 'release/0.1'
This commit is contained in:
commit
744cf187a4
41 changed files with 130 additions and 77 deletions
23
.env.example
23
.env.example
|
@ -1,17 +1,17 @@
|
||||||
APP_ENV=local
|
APP_ENV=production
|
||||||
APP_KEY=SomeRandomString
|
APP_KEY=SomeRandomString # Leave this
|
||||||
APP_DEBUG=true
|
APP_DEBUG=false
|
||||||
APP_LOG_LEVEL=debug
|
APP_LOG_LEVEL=warning
|
||||||
APP_TIMEZONE=UTC
|
APP_TIMEZONE=UTC
|
||||||
APP_LANG=en
|
APP_LANG=en
|
||||||
APP_LOG=daily
|
APP_LOG=daily
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=5432
|
||||||
DB_DATABASE=homestead
|
DB_DATABASE=
|
||||||
DB_USERNAME=homestead
|
DB_USERNAME=
|
||||||
DB_PASSWORD=secret
|
DB_PASSWORD=
|
||||||
|
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
|
@ -36,12 +36,13 @@ AWS_S3_REGION=region
|
||||||
AWS_S3_BUCKET=your-bucket
|
AWS_S3_BUCKET=your-bucket
|
||||||
AWS_S3_URL=https://xxxxxxx.s3-region.amazonaws.com
|
AWS_S3_URL=https://xxxxxxx.s3-region.amazonaws.com
|
||||||
|
|
||||||
APP_URL=https://example.com
|
APP_URL=https://example.com # This one is necessary
|
||||||
APP_LONGURL=example.com
|
APP_LONGURL=example.com
|
||||||
APP_SHORTURL=examp.le
|
APP_SHORTURL=examp.le
|
||||||
|
|
||||||
ADMIN_USER=admin
|
ADMIN_USER=admin # pick something better, this is used for `/admin`
|
||||||
ADMIN_PASS=password
|
ADMIN_PASS=password
|
||||||
|
DISPLAY_NAME='Joe Bloggs' # This is used for example in the header and titles
|
||||||
|
|
||||||
TWITTER_CONSUMER_KEY=
|
TWITTER_CONSUMER_KEY=
|
||||||
TWITTER_CONSUMER_SECRET=
|
TWITTER_CONSUMER_SECRET=
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
postgresql: "9.4"
|
postgresql: "9.5"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- postgresql
|
- postgresql
|
||||||
|
@ -13,7 +14,7 @@ env:
|
||||||
- setup=basic
|
- setup=basic
|
||||||
|
|
||||||
php:
|
php:
|
||||||
- 7.0
|
- 7.0.13 # trusty comes with 7.0.7 by default which segfaults with phpdbg
|
||||||
- 7.1
|
- 7.1
|
||||||
- nightly
|
- nightly
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -145,7 +145,8 @@ class MicropubController extends Controller
|
||||||
'places' => $places,
|
'places' => $places,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
//nope, ho about a config query?
|
//nope, how about a config query?
|
||||||
|
//this should have a media endpoint as well at some point
|
||||||
if ($request->input('q') == 'config') {
|
if ($request->input('q') == 'config') {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'syndicate-to' => config('syndication.targets'),
|
'syndicate-to' => config('syndication.targets'),
|
||||||
|
|
|
@ -31,6 +31,7 @@ class Kernel extends HttpKernel
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
\App\Http\Middleware\LinkHeadersMiddleware::class,
|
\App\Http\Middleware\LinkHeadersMiddleware::class,
|
||||||
|
\App\Http\Middleware\DevTokenMiddleware::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
|
|
28
app/Http/Middleware/DevTokenMiddleware.php
Normal file
28
app/Http/Middleware/DevTokenMiddleware.php
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
||||||
|
class DevTokenMiddleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \Closure $next
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle($request, Closure $next)
|
||||||
|
{
|
||||||
|
if (config('app.env') !== 'production') {
|
||||||
|
session(['me' => env('APP_URL')]);
|
||||||
|
if (Storage::exists('dev-token')) {
|
||||||
|
session(['token' => Storage::get('dev-token')]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,6 @@ namespace App\Providers;
|
||||||
use App\Tag;
|
use App\Tag;
|
||||||
use App\Note;
|
use App\Note;
|
||||||
use Validator;
|
use Validator;
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
|
@ -46,14 +45,6 @@ class AppServiceProvider extends ServiceProvider
|
||||||
$note->tags()->attach($tagsToAdd);
|
$note->tags()->attach($tagsToAdd);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//allow micropub use in development
|
|
||||||
if (env('APP_DEBUG') == true) {
|
|
||||||
session(['me' => env('APP_URL')]);
|
|
||||||
if (Storage::exists('dev-token')) {
|
|
||||||
session(['token' => Storage::get('dev-token')]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.1 (2016-12-10)
|
||||||
|
- Much better testing of micropub endpoints locally and on TravisCI
|
||||||
|
- Updating README
|
||||||
|
- Add IWC logo to footer
|
||||||
|
|
||||||
## Version 0.0.18 (2016-12-08)
|
## Version 0.0.18 (2016-12-08)
|
||||||
- Some minor style tweaks
|
- Some minor style tweaks
|
||||||
- Fix some validation issues
|
- Fix some validation issues
|
||||||
|
|
2
public/assets/css/app.css
vendored
2
public/assets/css/app.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
@ -10,6 +10,6 @@
|
||||||
"../../../resources/assets/sass/mapbox.scss",
|
"../../../resources/assets/sass/mapbox.scss",
|
||||||
"../../../resources/assets/sass/contacts.scss"
|
"../../../resources/assets/sass/contacts.scss"
|
||||||
],
|
],
|
||||||
"mappings": "AAIA,AAAA,IAAI,AAAC,CACD,UAAU,CAAE,UAAW,CACvB,SAAS,CAAE,IAAK,CACnB,AAED,AAAA,CAAC,CACD,AAAC,CAAA,AAAA,QAAQ,CACT,AAAC,CAAA,AAAA,OAAO,AAAC,CACL,UAAU,CAAE,OAAQ,CACvB,ACXD,AAAA,IAAI,AAAC,CACD,SAAS,CAAE,IAAK,CAChB,MAAM,CAAE,MAAO,CACf,YAAY,CAAE,GAAI,CAClB,aAAa,CAAE,GAAI,CACnB,SAAS,CAAE,UAAW,CACzB,AAED,AAAA,UAAU,AAAC,CACP,UAAU,CAAE,MAAO,CACtB,AAED,AAAA,QAAQ,AAAC,CACL,WAAW,CAAE,IAAK,CACrB,AAED,AAAA,KAAK,AAAC,CACF,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,MAAO,CAC1B,AAED,AAAA,cAAc,AAAC,CACX,OAAO,CAAE,IAAK,CACd,cAAc,CAAE,GAAI,CACpB,eAAe,CAAE,aAAc,CAC/B,SAAS,CAAE,MAAO,CACrB,AAED,AAAA,aAAa,AAAC,CACV,OAAO,CAAE,IAA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AAK,CACd,cAAc,CAAE,GAAI,CACpB,UAAU,CAAE,GAAI,CAChB,aAAa,CAAE,eAAgB,CAClC,AAED,AAAS,QAAD,CAAC,GAAG,AAAC,CACT,YAAY,CAAE,MAAO,CACrB,KAAK,CAAE,KAAM,CACb,MAAM,CAAC,KAAM,CAChB",
|
||||||
"names": []
|
"names": []
|
||||||
}
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/assets/img/iwc.png
Normal file
BIN
public/assets/img/iwc.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
44
readme.md
44
readme.md
|
@ -2,4 +2,46 @@
|
||||||
|
|
||||||
This is the code that runs my website, [jonnybarnes.uk](https://jonnybarnes.uk).
|
This is the code that runs my website, [jonnybarnes.uk](https://jonnybarnes.uk).
|
||||||
|
|
||||||
It’s not quite ready for anyone else, but it will be soon :)
|
In theory this is usable by other now :D
|
||||||
|
|
||||||
|
Set up the database, this software needs [PostgreSQL](https://wwwpostgresql.org)
|
||||||
|
with the [PostGIS](http://postgis.net) plugin. After installing these:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ createdb -E utf8 db_name
|
||||||
|
$ psql -d db_name -c 'CREATE EXTENSION postgis'
|
||||||
|
```
|
||||||
|
|
||||||
|
First get the code, and make sure you’re on the `master` branch. This branch will
|
||||||
|
only have tagged releases:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ git clone https://github.com/jonnybarnes/jonnybarnes.uk mysite.com
|
||||||
|
$ cd mysite.com
|
||||||
|
$ git checkout master
|
||||||
|
```
|
||||||
|
|
||||||
|
Then we need to set up the environment variables that the app will use.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cp .env.example .env
|
||||||
|
$ vim .env
|
||||||
|
```
|
||||||
|
|
||||||
|
Fill in the various variables. Then we can set up the app:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ composer install
|
||||||
|
$ php artisan key:generate
|
||||||
|
$ php artisan migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
Now we need to edit some config values. In `config/app.php` edit `name`, and in
|
||||||
|
`config/syndication.php` edit it to the appropriate values or set targets to `null`.
|
||||||
|
|
||||||
|
Some other things that should be changed. Go to `resources/views/master.blade.php`,
|
||||||
|
you may not want to link to a projects page. Also in the `<head>` the two last links
|
||||||
|
are to my profile pic and pgp key, ammend/remove as desired.
|
||||||
|
|
||||||
|
Now point your server to `public/index.php` and viola. Essentially this is a
|
||||||
|
Laravel app so debugging things shouldn’t be too hard.
|
||||||
|
|
9
resources/assets/sass/styles.scss
vendored
9
resources/assets/sass/styles.scss
vendored
|
@ -27,3 +27,12 @@ footer {
|
||||||
font-size: 0.5rem;
|
font-size: 0.5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer p > a {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iwc-logo {
|
||||||
|
width: 100px;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Notes « Jonny Barnes
|
Notes «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Places « Jonny Barnes
|
Places «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
@section('title')Colophon for Jonny Barnes.uk @stop
|
@section('title')Colophon for @stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<h2>Colophon</h2>
|
<h2>Colophon</h2>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Contacts « Jonny Barnes
|
Contacts «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Contacts « Jonny Barnes
|
Contacts «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<html lang="en-GB">
|
<html lang="en-GB">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>@if (App::environment() == 'local'){!! "[testing] -"!!}@endif @yield('title')</title>
|
<title>@if (App::environment() == 'local'){!! "[testing] -"!!}@endif @yield('title'){{ env('DISPLAY_NAME') }}</title>
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link rel="stylesheet" href="/assets/frontend/normalize.css">
|
<link rel="stylesheet" href="/assets/frontend/normalize.css">
|
||||||
<link rel="stylesheet" href="/assets/css/app.css">
|
<link rel="stylesheet" href="/assets/css/app.css">
|
||||||
<link rel="openid.server" href="https://indieauth.com/openid">
|
<link rel="openid.server" href="https://indieauth.com/openid">
|
||||||
<link rel="openid.delegate" href="https://jonnybarnes.uk">
|
<link rel="openid.delegate" href="{{ config('app.url') }}">
|
||||||
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
|
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
|
||||||
<link rel="token_endpoint" href="{{ config('app.url') }}/api/token">
|
<link rel="token_endpoint" href="{{ config('app.url') }}/api/token">
|
||||||
<link rel="micropub" href="{{ config('app.url') }}/api/post">
|
<link rel="micropub" href="{{ config('app.url') }}/api/post">
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
<body>
|
<body>
|
||||||
<header id="topheader">
|
<header id="topheader">
|
||||||
<a rel="author" href="/">
|
<a rel="author" href="/">
|
||||||
<h1>Jonny Barnes</h1>
|
<h1>{{ env('DISPLAY_NAME') }}</h1>
|
||||||
</a>
|
</a>
|
||||||
<nav>
|
<nav>
|
||||||
<a href="/blog">Articles</a>
|
<a href="/blog">Articles</a>
|
||||||
|
@ -43,6 +43,7 @@
|
||||||
</form>
|
</form>
|
||||||
<p>The code for <code>{{ env('APP_LONGURL') }}</code> can be found on <a href="https://github.com/jonnybarnes/jonnybarnes.uk">GitHub</a>.</p>
|
<p>The code for <code>{{ env('APP_LONGURL') }}</code> can be found on <a href="https://github.com/jonnybarnes/jonnybarnes.uk">GitHub</a>.</p>
|
||||||
<p>Built with love: <a href="/colophon">Colophon</a></p>
|
<p>Built with love: <a href="/colophon">Colophon</a></p>
|
||||||
|
<p><a href="https://indieweb.org"><img src="assets/img/iwc.png" alt="Indie Web Camp logo" class="iwc-logo"></a></p>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
New Note « Jonny Barnes
|
New Note «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Articles « Jonny Barnes
|
Articles «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
{{-- This can either be edited or dropped --}}
|
||||||
@section('title')Jonny Barnes’ Projects @stop
|
@section('title')Jonny Barnes’ Projects @stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<title>Jonny Barnes.uk</title>
|
<title>{{ env('DISPLAY_NAME') }}</title>
|
||||||
<atom:link href="{{ config('app.url') }}/feed" rel="self" type="application/rss+xml" />
|
<atom:link href="{{ config('app.url') }}/feed" rel="self" type="application/rss+xml" />
|
||||||
<description>An RSS feed of the blog posts found on jonnybarnes.uk</description>
|
<description>An RSS feed of the blog posts found on {{ config('url.longurl') }}</description>
|
||||||
<link>https://jonnybarnes.uk</link>
|
<link>{{ config('app.url') }}</link>
|
||||||
<lastBuildDate>{{ $buildDate }}</lastBuildDate>
|
<lastBuildDate>{{ $buildDate }}</lastBuildDate>
|
||||||
<ttl>1800</ttl>
|
<ttl>1800</ttl>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Search « Jonny Barnes
|
Search «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
{{ strip_tags($note->note) }} « Notes « Jonny Barnes
|
{{ strip_tags($note->note) }} « Notes «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
{{ $place->name }} « Places « Jonny Barnes
|
{{ $place->name }} « Places «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
{{ strip_tags($article->title) }} <?php echo html_entity_decode("«"); ?> Jonny Barnes
|
{{ strip_tags($article->title) }} «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
Notes <?php echo html_entity_decode('«'); ?> Jonny Barnes
|
Tagged Notes «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('master')
|
@extends('master')
|
||||||
|
|
||||||
@section('title')
|
@section('title')
|
||||||
WebMentions « Jonny Barnes
|
WebMentions «
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
@ -32,18 +32,8 @@ class MicropubClientTest extends TestCase
|
||||||
|
|
||||||
public function testClientPageRecentAuth()
|
public function testClientPageRecentAuth()
|
||||||
{
|
{
|
||||||
$syndication = [
|
$this->visit($this->appurl . '/notes/new')
|
||||||
[
|
->see($this->appurl);
|
||||||
'target' => 'https://twitter.com/jonnybarnes',
|
|
||||||
'name' => 'jonnybarnes on Twitter',
|
|
||||||
]
|
|
||||||
];
|
|
||||||
$this->withSession([
|
|
||||||
'me' => $this->appurl,
|
|
||||||
'syndication' => $syndication,
|
|
||||||
])->visit($this->appurl . '/notes/new')
|
|
||||||
->see($this->appurl)
|
|
||||||
->see('https://twitter.com/jonnybarnes');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testClientCreatesNewNoteWithTag()
|
public function testClientCreatesNewNoteWithTag()
|
||||||
|
@ -51,10 +41,7 @@ class MicropubClientTest extends TestCase
|
||||||
//in this test, the syndication targets are blank
|
//in this test, the syndication targets are blank
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
$note = 'Fake note from #PHPUnit: ' . $faker->text;
|
$note = 'Fake note from #PHPUnit: ' . $faker->text;
|
||||||
$this->withSession([
|
$this->visit($this->appurl . '/notes/new')
|
||||||
'me' => $this->appurl,
|
|
||||||
'token' => $this->getToken()
|
|
||||||
])->visit($this->appurl . '/notes/new')
|
|
||||||
->type($note, 'content')
|
->type($note, 'content')
|
||||||
->press('Submit');
|
->press('Submit');
|
||||||
$this->seeInDatabase('notes', ['note' => $note]);
|
$this->seeInDatabase('notes', ['note' => $note]);
|
||||||
|
@ -78,20 +65,5 @@ class MicropubClientTest extends TestCase
|
||||||
}
|
}
|
||||||
$newNote = \App\Note::where('note', $note)->first();
|
$newNote = \App\Note::where('note', $note)->first();
|
||||||
$newNote->forceDelete();
|
$newNote->forceDelete();
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getToken()
|
|
||||||
{
|
|
||||||
$signer = new Sha256();
|
|
||||||
$token = (new Builder())
|
|
||||||
->set('client_id', 'https://quill.p3k.io')
|
|
||||||
->set('me', $this->appurl)
|
|
||||||
->set('scope', 'post')
|
|
||||||
->set('issued_at', time())
|
|
||||||
->sign($signer, env('APP_KEY'))
|
|
||||||
->getToken();
|
|
||||||
|
|
||||||
return $token;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue