Skip to content

Commit

Permalink
docs: bundle templates and update metadata for 0.5.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofzablocki committed Jan 13, 2017
1 parent 50b5433 commit 69dad4f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Sourcery CHANGELOG

---
## Master
## 0.5.3

### New Features
- Added support for method return types with `throws` and `rethrows`
- Added a new filter `replace`. Usage: `{{ name|replace:"substring","replacement" }}` - replaces occurrences of `substring` with `replacement` in `name` (case sensitive)
- Improved support for inferring types of variables with initial values
- Sourcery will now use parallel parsing, expect more than 2x as fast execution.
- Sourcery will now cache source artifacts, in many scenarios it will lead to order of magnitude faster processing.
- Sourcery is now bundling a set of example templates, you can access them in Templates folder.
- We now use parallel parsing and cache source artifacts. This leads to massive performance improvements:
- e.g. on big codebase of over 300 swift files:
```
Sourcery 0.5.2
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Template used to generate hashing for all types that conform to `:AutoHashable`,
It adds `:Hashable` conformance to all types, except protocols (because it would require turning them into PAT's).
For protocols it's just generating `var hashValue` comparator.

#### [Stencil template](Examples/AutoEquatable.stencil)
#### [Stencil template](Templates/AutoEquatable.stencil)

#### Available variable annotations:

Expand Down Expand Up @@ -99,7 +99,7 @@ Template used to generate hashing for all types that conform to `:AutoHashable`,
It adds `:Hashable` conformance to all types, except protocols (because it would require turning them into PAT's).
For protocols it's just generating `var hashValue` comparator.

#### [Stencil template](Examples/AutoHashable.stencil)
#### [Stencil template](Templates/AutoHashable.stencil)

#### Available variable annotations:

Expand All @@ -125,7 +125,7 @@ extension AdNodeViewModel: Hashable {

Generate `count` and `allCases` for any enumeration that is marked with `AutoCases` phantom protocol.

#### [Stencil Template](Examples/AutoCases.stencil)
#### [Stencil Template](Templates/AutoCases.stencil)

#### Example output:

Expand Down Expand Up @@ -172,7 +172,7 @@ Create a class called `ProtocolNameMock` in which it will...
* Handling success/failure cases (for callbacks) is tricky to do automatically, so you have to do that yourself.
* This is **not** a full replacement for hand-written mocks, but it will get you 90% of the way there. Any more complex logic than changing return types, you will have to implement yourself. This only removes the most boring boilerplate you have to write.

#### [Stencil template](Examples/AutoMockable.stencil)
#### [Stencil template](Templates/AutoMockable.stencil)

#### Example output:

Expand Down Expand Up @@ -203,7 +203,7 @@ What are Lenses? Great explanation by @mbrandonw

This script assumes you follow swift naming convention, e.g. structs start with an upper letter.

#### [Stencil template](Examples/AutoLenses.stencil)
#### [Stencil template](Templates/AutoLenses.stencil)

#### Example output:

Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ namespace :release do
sh %Q(mkdir -p "build")
sh %Q(mkdir -p "build/Resources")
sh %Q(cp -r bin build/)
sh %Q(cp -r Templates build/)
`cp LICENSE README.md CHANGELOG.md build`
`cp Resources/daemon.gif Resources/icon-128.png build/Resources`
`cd build; zip -r -X sourcery-#{podspec_version}.zip .`
Expand Down
4 changes: 2 additions & 2 deletions Sourcery.podspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Pod::Spec.new do |s|

s.name = "Sourcery"
s.version = "0.5.2"
s.version = "0.5.3"
s.summary = "A tool that brings meta-programming to Swift, allowing you to code generate Swift code."

s.description = <<-DESC
A tool that brings meta-programming to Swift, allowing you to code generate Swift code.
A tool that brings meta-programming to Swift, allowing you to code generate Swift code.
* Featuring daemon mode that allows you to write templates side-by-side with generated code.
* Using SourceKit so you can scan your regular code.
DESC
Expand Down
2 changes: 1 addition & 1 deletion Sourcery/Sourcery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Foundation
/// If you specify templatePath as a folder, it will create a Generated[TemplateName].swift file
/// If you specify templatePath as specific file, it will put all generated results into that single file
public class Sourcery {
public static let version: String = inUnitTests ? "Major.Minor.Patch" : "0.5.2"
public static let version: String = inUnitTests ? "Major.Minor.Patch" : "0.5.3"
public static let generationMarker: String = "// Generated using Sourcery"
public static let generationHeader = "\(Sourcery.generationMarker) \(Sourcery.version) — https://github.com/krzysztofzablocki/Sourcery\n"
+ "// DO NOT EDIT\n\n"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 69dad4f

Please sign in to comment.