Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
steffendsommer committed May 4, 2018
1 parent 85dd77d commit 5590ee2
Show file tree
Hide file tree
Showing 10 changed files with 294 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .codebeatignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Public/**
Resources/Assets/**
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage:
range: "0...100"
ignore:
- "Tests"
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Packages
.build
.idea
xcuserdata
*.xcodeproj
Config/secrets/
.DS_Store
/.build
/Packages
/*.xcodeproj
Package.resolved
node_modules/
bower_components/
.swift-version
CMakeLists.txt
Package.pins
12 changes: 12 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
included:
- Sources
function_body_length:
warning: 60
variable_name:
min_length:
warning: 2
line_length: 80
disabled_rules:
- opening_brace
colon:
flexible_right_spacing: true
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017-2018 Nodes

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
169 changes: 169 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"object": {
"pins": [
{
"package": "Console",
"repositoryURL": "https://github.com/vapor/console.git",
"state": {
"branch": null,
"revision": "5b9796d39f201b3dd06800437abd9d774a455e57",
"version": "3.0.2"
}
},
{
"package": "Core",
"repositoryURL": "https://github.com/vapor/core.git",
"state": {
"branch": null,
"revision": "efe79e4f59445b661ba7e6511c2a0b80645c2e72",
"version": "3.1.6"
}
},
{
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"state": {
"branch": null,
"revision": "346ae2b2ea65a4b6f4985a8e8cb25cf61da549d8",
"version": "3.1.1"
}
},
{
"package": "DatabaseKit",
"repositoryURL": "https://github.com/vapor/database-kit.git",
"state": {
"branch": null,
"revision": "0db303439e5ef8b6df50a2b6c4029edddee90cb0",
"version": "1.0.1"
}
},
{
"package": "HTTP",
"repositoryURL": "https://github.com/vapor/http.git",
"state": {
"branch": null,
"revision": "82b97f68471830759a3a8f90f53df243d0c97db1",
"version": "3.0.4"
}
},
{
"package": "Leaf",
"repositoryURL": "https://github.com/vapor/leaf.git",
"state": {
"branch": null,
"revision": "8cc35dcfcd8f9ed142a954f70431a05e866ca040",
"version": "3.0.0-rc.2.1.2"
}
},
{
"package": "Multipart",
"repositoryURL": "https://github.com/vapor/multipart.git",
"state": {
"branch": null,
"revision": "7778dcb62f3efa845e8e2808937bb347575ba7ce",
"version": "3.0.1"
}
},
{
"package": "Routing",
"repositoryURL": "https://github.com/vapor/routing.git",
"state": {
"branch": null,
"revision": "3219e328491b0853b8554c5a694add344d2c6cfb",
"version": "3.0.1"
}
},
{
"package": "Service",
"repositoryURL": "https://github.com/vapor/service.git",
"state": {
"branch": null,
"revision": "281a70b69783891900be31a9e70051b6fe19e146",
"version": "1.0.0"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "8bf1be06728214f9698b4ee13bdb6ebffe35a40b",
"version": "1.6.0"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "38955a5f806a952daf2b16fbfe9aa529749cf1dd",
"version": "1.1.0"
}
},
{
"package": "swift-nio-ssl-support",
"repositoryURL": "https://github.com/apple/swift-nio-ssl-support.git",
"state": {
"branch": null,
"revision": "c02eec4e0e6d351cd092938cf44195a8e669f555",
"version": "1.0.0"
}
},
{
"package": "swift-nio-zlib-support",
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
"state": {
"branch": null,
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
"version": "1.0.0"
}
},
{
"package": "TemplateKit",
"repositoryURL": "https://github.com/vapor/template-kit.git",
"state": {
"branch": null,
"revision": "43b57b5861d5181b906ac6411d28645e980bb638",
"version": "1.0.1"
}
},
{
"package": "URLEncodedForm",
"repositoryURL": "https://github.com/vapor/url-encoded-form.git",
"state": {
"branch": null,
"revision": "8448fa943057c01220f6a940d3b1b8e9fd92a96e",
"version": "1.0.2"
}
},
{
"package": "Validation",
"repositoryURL": "https://github.com/vapor/validation.git",
"state": {
"branch": null,
"revision": "ab6c5a352d97c8687b91ed4963aef8e7cfe0795b",
"version": "2.0.0"
}
},
{
"package": "Vapor",
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "c834f9495ff5ab9768b74f5822ff23d795e36922",
"version": "3.0.0-rc.2.8.1"
}
},
{
"package": "WebSocket",
"repositoryURL": "https://github.com/vapor/websocket.git",
"state": {
"branch": null,
"revision": "23acd21aa37a200faa2f5d5525c974efa6b5676c",
"version": "1.0.0"
}
}
]
},
"version": 1
}
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ let package = Package(
],
targets: [
.target(name: "Flash", dependencies: ["Vapor", "Leaf"]),
.testTarget(name: "FlashTests", dependencies: ["Flash"]),
]
)
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Flash ⚡️
[![Swift Version](https://img.shields.io/badge/Swift-4.1-brightgreen.svg)](http://swift.org)
[![Vapor Version](https://img.shields.io/badge/Vapor-3-F6CBCA.svg)](http://vapor.codes)
[![Circle CI](https://circleci.com/gh/nodes-vapor/flash/tree/master.svg?style=shield)](https://circleci.com/gh/nodes-vapor/flash)
[![codebeat badge](https://codebeat.co/badges/10cffe07-3d4f-420c-adb9-a98529671bfa)](https://codebeat.co/projects/github-com-nodes-vapor-flash-master)
[![codecov](https://codecov.io/gh/nodes-vapor/flash/branch/master/graph/badge.svg)](https://codecov.io/gh/nodes-vapor/flash)
[![Readme Score](http://readme-score-api.herokuapp.com/score.svg?url=https://github.com/nodes-vapor/flash)](http://clayallsopp.github.io/readme-score?url=https://github.com/nodes-vapor/flash)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/nodes-vapor/flash/master/LICENSE)

This package is to ease using flash message between your views

![image](https://cloud.githubusercontent.com/assets/1279756/21659442/fcfdd126-d2ca-11e6-8157-d6860aa02363.png)

# Installation

Update your `Package.swift` file.
```swift
.package(url: "https://github.com/nodes-vapor/flash", from: "2.0.0-beta")
```

## Getting started 🚀

TODO. While we make the docs, feel free to look at how [Admin Panel](https://github.com/nodes-vapor/admin-panel/tree/vapor-3) uses this package.

### Example of HTML

The below example uses the Vapor 3 [Bootstrap package](https://github.com/nodes-vapor/bootstrap) for generating the alert html.

```html
<div class="alerts">
#flash() {
#for(flash in all) {
#bs:alert(flash.bootstrapType) {
#(flash.message)
}
}
}
</div>

```

Add the Flash html to one file and embed it in rest of your views or through a base layout, e.g.: `#embed("alerts")`.


## 🏆 Credits

This package is developed and maintained by the Vapor team at [Nodes](https://www.nodesagency.com).
The package owner for this project is [Brett](https://github.com/brettrtoomey).


## 📄 License

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
15 changes: 15 additions & 0 deletions Tests/FlashTests/FlashTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import XCTest
import HTTP
@testable import Flash

class FlashTests: XCTestCase {
func testExample() throws {
XCTAssertTrue(true)
}

static var allTests : [(String, (FlashTests) -> () throws -> Void)] {
return [
("testExample", testExample),
]
}
}
6 changes: 6 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import XCTest
@testable import FlashTests

XCTMain([
testCase(FlashTests.allTests),
])

0 comments on commit 5590ee2

Please sign in to comment.