Skip to content

Commit

Permalink
Merge branch 'release/4.2.5'
Browse files Browse the repository at this point in the history
* release/4.2.5: (28 commits)
  updates the changelog
  updated the changelog
  updates the changelog
  reverted the CI test config
  trying different versions
  updates to the unit versions
  added phpunit to the build matrix
  updated the matrix build
  wip
  updates to the test suite
  updated the testbench versions to support LTS
  added LTS support for testing
  refactored the setup command
  patch for the blog controller export never being called
  added the method_field() helpers to allow proper routing
  updated the form methods and csrf tokens to support LTS
  updated the csrf tokens to support the LTS
  swap out the Str::* methods in favor of ramsey/uuid to cover LTS
  added support for Laravel LTS
  Apply fixes from StyleCI (#512)
  ...
  • Loading branch information
austintoddj committed Jun 15, 2019
2 parents c418c69 + 262f3d2 commit 7147cf6
Show file tree
Hide file tree
Showing 35 changed files with 227 additions and 230 deletions.
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## [Unreleased](https://github.com/cnvs/canvas/compare/master...develop)

## [4.2.5](https://github.com/cnvs/canvas/compare/v4.2.4...v4.2.5)

## Changed
- Minor refactor of the digest email ([543398a](https://github.com/cnvs/canvas/commit/543398a3a881608b9012d9e541faafd1fef9d512))

## Added
- Added support for Laravel LTS(5.5) ([#511](https://github.com/cnvs/canvas/issues/511), [acdf9ed](https://github.com/cnvs/canvas/commit/acdf9ed80723589610031f606bf869831aecdb9d))

## Fixed
- Patch for the default controller not being built on an initial setup ([e1d8625](https://github.com/cnvs/canvas/commit/e1d8625ec04037f9ef5324e422ac5702048160a0))

## [4.2.4](https://github.com/cnvs/canvas/compare/v4.2.3...v4.2.4)

## Fixed
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
}
],
"require": {
"php": "^7.1.3",
"php": ">=7.0",
"ext-json": "*",
"illuminate/support": "~5.8.0"
"illuminate/support": "5.5.x|5.6.x|5.7.x|5.8.x"
},
"require-dev": {
"mockery/mockery": "^1.1",
"orchestra/testbench": "~3.7",
"orchestra/testbench": "3.5.x|3.6.x|3.7.x|3.8.x",
"phpunit/phpunit": "^7.5"
},
"autoload": {
Expand Down
19 changes: 10 additions & 9 deletions config/canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
| Uploads Disk
|--------------------------------------------------------------------------
|
| This is the storage disk Canvas will use to put file uploads, you can
| use any of the disks defined in your config/filesystems.php file.
| You may also configure the path files should be stored at.
| This is the storage disk Canvas will use to put file uploads, you may
| use any of the disks defined in the config/filesystems.php file and
| You may also configure the path where files are to be stored.
|
*/

Expand All @@ -51,8 +51,9 @@
| Unsplash Integration
|--------------------------------------------------------------------------
|
| Visit https://unsplash.com/oauth/applications to create a new unsplash
| app. Use the Access Key to integrate with the Unsplash API
| Visit https://unsplash.com/oauth/applications to create a new Unsplash
| app. Use the confidential Access Key given to you to integrate with
| the API. Note that demo apps are limited to 50 requests per hour.
|
*/

Expand All @@ -62,12 +63,12 @@

/*
|--------------------------------------------------------------------------
| Weekly Digest
| Notifications
|--------------------------------------------------------------------------
|
| This option enables Canvas to send notifications via e-mail. A weekly
| summary digest will be delivered via the default mail driver. This
| will provide helpful insights into your content and its impact.
| This option enables Canvas to send e-mail notifications via the default
| mail driver. If enabled, a weekly summary will be sent to each user
| that has authored content providing them with unique analytics.
|
*/

Expand Down
2 changes: 1 addition & 1 deletion public/js/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"/js/app.js": "/js/app.js?id=69680342879d37e1aef8",
"/css/app.css": "/css/app.css?id=15945757b23b49162087",
"/css/app-dark.css": "/css/app-dark.css?id=dccaea5a525f30b7cc3b",
"/js/app.js.map": "/js/app.js.map?id=b09993e9aa65cf13f2d1",
"/js/app.js.map": "/js/app.js.map?id=3a163e941758c62a7e0b",
"/favicon.ico": "/favicon.ico?id=dbb0c05daa3432643753"
}
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ php artisan storage:link

> **Note:** The following steps are optional configurations, you are not required to complete them.
**Want to get started fast?** Just run `php artisan canvas:setup` after installing Canvas. Then, navigate your browser to `http://your-app.test/blog` or any other URL that is assigned to your application. This command scaffolds a default frontend for your entire blog!
**Want to get started fast?** Just run `php artisan canvas:setup` after installing Canvas. A `--data` option may also be included in the command to generate demo data. Then, navigate your browser to `http://your-app.test/blog` or any other URL that is assigned to your application. This command scaffolds a default frontend for your entire blog!


If you want to include [Unsplash](https://unsplash.com) images in your post content, set up a new application at [https://unsplash.com/oauth/applications](https://unsplash.com/oauth/applications). Grab your access key and update `config/canvas.php`:
Expand Down
4 changes: 2 additions & 2 deletions resources/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ try {
window.trans = (string) => _.get(window.i18n, string);

/**
* Current workaround for using the Autosize library which will only resize
* elements when clicked, not on the initial page load.
* Current workaround for using the Autosize library which will only
* resize elements when clicked, not on the initial page load.
*
* @link http://www.jacklmoore.com/autosize/#faq-hidden
*/
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/SlugComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
methods: {
/**
* Convert a string to a slug.
* Trim an alphanumeric string and convert to a slug.
*
* @source https://gist.github.com/mathewbyrne/1280286
*/
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/forms/post/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form role="form" id="form-create" method="POST" action="{{ route('canvas.post.store') }}"
enctype="multipart/form-data">
@csrf
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="id" hidden value="{{ $data['id'] }}">

<div class="form-group row my-3">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/forms/post/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form role="form" id="form-edit" method="POST" action="{{ route('canvas.post.update', $data['post']->id) }}"
enctype="multipart/form-data">
@csrf
@method('PUT')
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('PUT') }}

<div class="form-group row my-3">
<div class="col-lg-12">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/forms/tag/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form role="form" id="form-create" method="POST" action="{{ route('canvas.tag.store') }}">
@csrf
<input type="hidden" name="id" hidden value="{{ $data['id'] }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="id" hidden value="{{ $tag_id }}">

<slug-component inline-template>
<div v-cloak>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/components/forms/tag/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<form role="form" id="form-edit" method="POST" action="{{ route('canvas.tag.update', $data['tag']->id) }}">
@method('PUT')
@csrf
<form role="form" id="form-edit" method="POST" action="{{ route('canvas.tag.update', $tag->id) }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('PUT') }}

<slug-component :model="{{ $data['tag'] }}" inline-template>
<slug-component :model="{{ $tag }}" inline-template>
<div v-cloak>
<div class="form-group row my-5">
<div class="col-lg-12">
<input type="text" name="name" v-model="name" value="{{ $data['tag']->name }}"
<input type="text" name="name" v-model="name" value="{{ $tag->name }}"
class="form-control-lg form-control border-0 px-0"
title="Name" required placeholder="{{ __('canvas::tags.forms.placeholder') }}">
@if ($errors->has('slug'))
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/forms/topic/create.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form role="form" id="form-create" method="POST" action="{{ route('canvas.topic.store') }}">
@csrf
<input type="hidden" name="id" hidden value="{{ $data['id'] }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="id" hidden value="{{ $topic_id }}">

<slug-component inline-template>
<div v-cloak>
Expand Down
10 changes: 5 additions & 5 deletions resources/views/components/forms/topic/edit.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<form role="form" id="form-edit" method="POST" action="{{ route('canvas.topic.update', $data['topic']->id) }}">
@method('PUT')
@csrf
<form role="form" id="form-edit" method="POST" action="{{ route('canvas.topic.update', $topic->id) }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('PUT') }}

<slug-component :model="{{ $data['topic'] }}" inline-template>
<slug-component :model="{{ $topic }}" inline-template>
<div v-cloak>
<div class="form-group row my-5">
<div class="col-lg-12">
<input type="text" name="name" v-model="name" value="{{ $data['topic']->name }}"
<input type="text" name="name" v-model="name" value="{{ $topic->name }}"
class="form-control-lg form-control border-0 px-0"
title="Name" required placeholder="{{ __('canvas::topics.forms.placeholder') }}">
@if ($errors->has('slug'))
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/modals/post/delete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</button>

<form id="form-delete" action="{{ route('canvas.post.destroy', $data['post']->id) }}" method="POST" style="display: none">
@method('DELETE')
@csrf
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('DELETE') }}
</form>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions resources/views/components/modals/post/scripts/slug.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script type="text/javascript">
$(function () {
$('#modal-settings').modal('show');
});
</script>
6 changes: 3 additions & 3 deletions resources/views/components/modals/tag/delete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{{ __('canvas::buttons.general.cancel') }}
</button>

<form id="form-delete" action="{{ route('canvas.tag.destroy', $data['tag']->id) }}" method="POST" style="display: none">
@method('DELETE')
@csrf
<form id="form-delete" action="{{ route('canvas.tag.destroy', $tag->id) }}" method="POST" style="display: none">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('DELETE') }}
</form>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/components/modals/topic/delete.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{{ __('canvas::buttons.general.cancel') }}
</button>

<form id="form-delete" action="{{ route('canvas.topic.destroy', $data['topic']->id) }}" method="POST" style="display: none">
@method('DELETE')
@csrf
<form id="form-delete" action="{{ route('canvas.topic.destroy', $topic->id) }}" method="POST" style="display: none">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
{{ method_field('DELETE') }}
</form>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/nav/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class="rounded-circle my-0"
{{ __('canvas::nav.user.logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</form>
</div>
</div>
Expand Down
6 changes: 1 addition & 5 deletions resources/views/posts/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@

@push('scripts')
@if ($errors->has('slug'))
<script type="text/javascript">
$(document).ready(function () {
$('#modal-settings').modal('show');
});
</script>
@include('canvas::components.modals.post.scripts.slug')
@endif
@endpush
6 changes: 1 addition & 5 deletions resources/views/posts/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@

@push('scripts')
@if ($errors->has('slug'))
<script type="text/javascript">
$(function () {
$('#modal-settings').modal('show');
});
</script>
@include('canvas::components.modals.post.scripts.slug')
@endif
@endpush
4 changes: 2 additions & 2 deletions resources/views/posts/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@endsection

@section('content')
<post-list :models="{{ $data['posts'] }}" :default-timezone="{{ json_encode(config('app.timezone')) }}" inline-template>
<post-list :models="{{ $posts }}" :default-timezone="{{ json_encode(config('app.timezone')) }}" inline-template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
Expand All @@ -34,7 +34,7 @@ class="form-control border-0 pl-0"
</div>
</div>

@if(count($data['posts']))
@if($posts->isNotEmpty())
<div v-cloak>
<div class="d-flex border-top py-3 align-items-center" v-for="post in filteredList">
<div class="mr-auto py-1">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/tags/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@endsection

@section('content')
<tag-list :models="{{ $data['tags'] }}" inline-template>
<tag-list :models="{{ $tags }}" inline-template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
Expand All @@ -34,7 +34,7 @@ class="form-control border-0 px-0 py-0"
</div>
</div>

@if(count($data['tags']))
@if($tags->isNotEmpty())
<div v-cloak>
<div class="d-flex border-top py-3 align-items-center" v-for="tag in filteredList">
<div class="mr-auto">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/topics/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@endsection

@section('content')
<topic-list :models="{{ $data['topics'] }}" inline-template>
<topic-list :models="{{ $topics }}" inline-template>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-10">
Expand All @@ -34,7 +34,7 @@ class="form-control border-0 px-0 py-0"
</div>
</div>

@if(count($data['topics']))
@if($topics->isNotEmpty())
<div v-cloak>
<div class="d-flex border-top py-3 align-items-center" v-for="topic in filteredList">
<div class="mr-auto">
Expand Down
6 changes: 3 additions & 3 deletions src/Console/DigestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Exception;
use Canvas\Post;
use Canvas\View;
use Canvas\Mail\WeeklyDigest;
use Canvas\Mail\Digest;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Foundation\Auth\User;
Expand All @@ -25,7 +25,7 @@ class DigestCommand extends Command
*
* @var string
*/
protected $description = 'E-mail a weekly digest of Canvas stats to a user';
protected $description = 'E-mail a weekly digest of reading stats to authors';

/**
* Execute the console command.
Expand Down Expand Up @@ -54,7 +54,7 @@ public function handle()
$data->put('end_date', now()->format('M d, Y'));

try {
Mail::send(new WeeklyDigest($data->toArray()));
Mail::send(new Digest($data->toArray()));
} catch (Exception $exception) {
logger()->error($exception->getMessage());
}
Expand Down
Loading

0 comments on commit 7147cf6

Please sign in to comment.