Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #237 from umco/develop
Browse files Browse the repository at this point in the history
Preparing Ditto 0.12.0-beta release
  • Loading branch information
leekelleher authored Aug 3, 2018
2 parents 28b08c9 + 6c244d2 commit 6ec0a65
Show file tree
Hide file tree
Showing 80 changed files with 1,537 additions and 1,013 deletions.
3 changes: 2 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright © 2014 Umbrella Inc, Our Umbraco and other contributors
Copyright © 2018 UMCO, Our Umbraco and other contributors
Copyright © 2014 Umbrella Inc

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
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<img height="100" src="docs/assets/img/ditto.png" style="margin-bottom: 20px" alt="Ditto logo" title="Ditto">

[![Build status](https://img.shields.io/appveyor/ci/leekelleher/umbraco-ditto.svg)](https://ci.appveyor.com/project/leekelleher/umbraco-ditto)
[![Build status](https://img.shields.io/appveyor/ci/UMCO/umbraco-ditto.svg)](https://ci.appveyor.com/project/UMCO/umbraco-ditto)
[![Documentation Status](https://readthedocs.org/projects/umbraco-ditto/badge/?version=latest)](https://readthedocs.org/projects/umbraco-ditto/?badge=latest)
[![NuGet release](https://img.shields.io/nuget/v/Our.Umbraco.Ditto.svg)](https://www.nuget.org/packages/Our.Umbraco.Ditto)
[![Our Umbraco project page](https://img.shields.io/badge/our-umbraco-orange.svg)](https://our.umbraco.org/projects/developer-tools/ditto)
[![Chat on Gitter](https://img.shields.io/badge/gitter-join_chat-green.svg)](https://gitter.im/leekelleher/umbraco-ditto)

Ditto is a lightweight view-model mapper for Umbraco. It offers a simple solution to the problem of using **strongly-typed models in your MVC views**.
There are no 3<sup>rd</sup> party dependencies, other than Umbraco core itself.
Expand Down Expand Up @@ -40,25 +39,27 @@ Anyone and everyone is welcome to contribute. Please take a moment to review the
Have a question?

* [Ditto Forum](http://our.umbraco.org/projects/developer-tools/ditto/ditto-feedback/) on Our Umbraco
* [Raise an issue](https://github.com/leekelleher/umbraco-ditto/issues) on GitHub
* [Raise an issue](https://github.com/umco/umbraco-ditto/issues) on GitHub


## Ditto Team

* [Lee Kelleher](https://github.com/leekelleher)
* [Matt Brailsford](https://github.com/mattbrailsford)
* [James Jackson-South](https://github.com/JimBobSquarePants)

### Special thanks

* Thanks to [Darren Ferguson](https://github.com/darrenferguson) for inspiration in his article "[Mapping Umbraco content to POCOs for strongly typed views](http://24days.in/umbraco/2013/mapping-content-to-pocos/)" on the [24 days in Umbraco](http://24days.in/umbraco/) advent calender.
* Thanks to [Jeavon Leopold](https://github.com/Jeavon) for being a rockstar and adding AppVeyor support.
* Thanks to [Hendy Racher](https://github.com/Hendy) for testing and contributions.
* Thanks to [Jamie Pollock](https://github.com/jamiepollock) for continued support, feedback and encouragement.
* Special thanks to [James Jackson-South](https://github.com/JimBobSquarePants) for all the stellar contributions.


## License

Copyright &copy; 2014 Umbrella Inc, Our Umbraco and [other contributors](https://github.com/leekelleher/umbraco-ditto/graphs/contributors)
Copyright &copy; 2018 UMCO, Our Umbraco and [other contributors](https://github.com/umco/umbraco-ditto/graphs/contributors)

Copyright &copy; 2014 Umbrella Inc

Licensed under the [MIT License](LICENSE.md)
22 changes: 6 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image: Visual Studio 2017

# version format
version: 0.11.3.{build}
version: 0.12.0.{build}

# UMBRACO_PACKAGE_PRERELEASE_SUFFIX if a rtm release build this should be blank, otherwise if empty will default to alpha
# example UMBRACO_PACKAGE_PRERELEASE_SUFFIX=beta
Expand All @@ -12,7 +12,7 @@ cache:
- src\packages -> **\packages.config # preserve "packages" directory in the root of build folder but will reset it if packages.config is modified

build_script:
- build\build-appveyor.cmd
- build\build-appveyor.cmd

test:
assemblies:
Expand All @@ -23,30 +23,20 @@ artifacts:
- path: artifacts\*.zip

deploy:
# MyGet (Ditto feed) Deployment for builds & releases
- provider: NuGet
server: https://www.myget.org/F/umbraco-ditto/
symbol_server: https://www.myget.org/F/umbraco-ditto/symbols/api/v2/package
api_key:
secure: Q1/4K8VSwr7BjwmKDTef8y5lOc7S+jK9ELuWy67y6OVRpjxmnF9M3Gfs1kT+ir8x
artifact: /.*\.nupkg/
on:
branch: develop

# MyGet (Umbraco Community feed) Deployment for builds & releases
- provider: NuGet
server: https://www.myget.org/F/umbraco-packages/
server: https://www.myget.org/F/umbraco-packages/api/v2/package
symbol_server: https://www.myget.org/F/umbraco-packages/symbols/api/v2/package
api_key:
secure: Q1/4K8VSwr7BjwmKDTef8y5lOc7S+jK9ELuWy67y6OVRpjxmnF9M3Gfs1kT+ir8x
secure: 36/Ax5O+e6wENlhoTwgvoEBZV3FG4XjF429SNTej2qsGTAL+cdfA1kT/tm1St8vx
artifact: /.*\.nupkg/
on:
branch: develop

# GitHub Deployment for releases
- provider: GitHub
auth_token:
secure: pEozEGTqJutQwOidJU6BTB+Ix0NV4vrUnomhfeqheVz4RNwfxjEYLoqR4XabhlPz
secure: yDxrRTveSScJA35MQTOaLYVjoPKFKl2bHBkG+JMZjiN0r7AfuUCxVU3CgW8Imu4h
artifact: /.*\.zip/ # upload all Zip packages to release assets
draft: false
prerelease: false
Expand All @@ -58,7 +48,7 @@ deploy:
- provider: NuGet
server:
api_key:
secure: CGzDKxw4QI/z2VSe9ceiYlIabqGXHolgBgVNWWZjVAJ2V5WLF11IFdlp9r5Qp+Sw
secure: 0+oAleUTnr9UuJrhLW5rphRR+QGz00XX1Ui3k5kwyr2kUdEamiQ3F+gW0q8MJbDT
artifact: /.*\.nupkg/
on:
branch: master
Expand Down
10 changes: 5 additions & 5 deletions build/package.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
<MinUmbracoVersion>7.3.2</MinUmbracoVersion>
<Readme>Ditto - the friendly POCO mapper for Umbraco</Readme>
<AuthorName>Lee Kelleher, Matt Brailsford, James Jackson-South</AuthorName>
<AuthorUrl>https://github.com/leekelleher/umbraco-ditto/graphs/contributors</AuthorUrl>
<AuthorUrl>https://github.com/umco/umbraco-ditto/graphs/contributors</AuthorUrl>
<PackageLicenseName>MIT license</PackageLicenseName>
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
<ProjectUrl>https://github.com/leekelleher/umbraco-ditto</ProjectUrl>
<ProjectUrl>https://github.com/umco/umbraco-ditto</ProjectUrl>
</PropertyGroup>

<!-- NUGET ONLY PROPERTIES -->
<PropertyGroup>
<PackageId>Our.Umbraco.Ditto</PackageId>
<NuGetPackageName>Ditto for Umbraco</NuGetPackageName>
<Copyright>Copyright &#169; 2014 Umbrella Inc Ltd, Our Umbraco and other contributors</Copyright>
<Owners>Umbrella Inc Ltd</Owners>
<IconUrl>https://raw.githubusercontent.com/leekelleher/umbraco-ditto/master/docs/assets/img/logo.png</IconUrl>
<Copyright>Copyright &#169; 2014 UMCO, Umbrella Inc Ltd, Our Umbraco and other contributors</Copyright>
<Owners>UMCO</Owners>
<IconUrl>https://raw.githubusercontent.com/umco/umbraco-ditto/master/docs/assets/img/logo.png</IconUrl>
<Tags>umbraco poco mapping strongly-typed</Tags>
<Language>en-GB</Language>
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
Expand Down
Binary file modified build/tools/NuGet.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Ditto is a lightweight view-model mapper for Umbraco. It offers a simple solutio

## Where can I get it?

Ditto can be installed from either [Our Umbraco](https://our.umbraco.org/projects/developer-tools/ditto/) or [NuGet package](https://www.nuget.org/packages/Our.Umbraco.Ditto) repositories, or build manually from the [source-code](https://github.com/leekelleher/umbraco-ditto).
Ditto can be installed from either [Our Umbraco](https://our.umbraco.org/projects/developer-tools/ditto/) or [NuGet package](https://www.nuget.org/packages/Our.Umbraco.Ditto) repositories, or build manually from the [source-code](https://github.com/umco/umbraco-ditto).

For further details, please see our [installation](install) guide, then read the [getting started](getting-started) section.

## How can I get help?

For quick questions, give [Gitter](https://gitter.im/leekelleher/umbraco-ditto) a try. For more detailed questions, head over to [Our Umbraco forum](https://our.umbraco.org/projects/developer-tools/ditto/ditto-feedback/). Finally, for bugs, issues or feature requests, create a [GitHub Issue](https://github.com/leekelleher/umbraco-ditto/issues).
Feel free to ask any questions on the [Our Umbraco forum](https://our.umbraco.org/projects/developer-tools/ditto/ditto-feedback/). For any bugs, issues or feature requests, create a [GitHub Issue](https://github.com/umco/umbraco-ditto/issues).

2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you prefer, you can compile Ditto yourself, you'll need:
To clone it locally run the following git commands:

```bash
git clone https://github.com/leekelleher/umbraco-ditto.git umbraco-ditto
git clone https://github.com/umco/umbraco-ditto.git umbraco-ditto
cd umbraco-ditto
.\build.cmd
```
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: Ditto

repo_url: https://github.com/leekelleher/umbraco-ditto/tree/develop/docs
repo_url: https://github.com/umco/umbraco-ditto/tree/develop/docs

pages:
- 'Introduction': 'index.md'
Expand Down
12 changes: 8 additions & 4 deletions src/Our.Umbraco.Ditto.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27004.2009
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.Ditto", "Our.Umbraco.Ditto\Our.Umbraco.Ditto.csproj", "{3A2482A4-AD19-4C26-A449-4287DA07AB16}"
EndProject
Expand All @@ -14,8 +15,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Package", "Build Package", "{302C02F0-CA95-430F-BD43-82D0CCEC08A3}"
ProjectSection(SolutionItems) = preProject
..\appveyor.yml = ..\appveyor.yml
..\build.cmd = ..\build.cmd
..\build\build-appveyor.cmd = ..\build\build-appveyor.cmd
..\build.cmd = ..\build.cmd
..\build\package.nuspec = ..\build\package.nuspec
..\build\package.proj = ..\build\package.proj
..\build\package.xml = ..\build\package.xml
Expand Down Expand Up @@ -69,4 +70,7 @@ Global
{302C02F0-CA95-430F-BD43-82D0CCEC08A3} = {6CF4E7DA-6359-479E-A64D-2023C743BA1C}
{8A5424A2-03F9-4D89-9B68-CB286D7F8596} = {6CF4E7DA-6359-479E-A64D-2023C743BA1C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8C9C786C-59D5-42E5-9FAA-97E3936DBAED}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions src/Our.Umbraco.Ditto/Bootstrapper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Umbraco.Core;

namespace Our.Umbraco.Ditto
{
internal sealed class Bootstrapper : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
Ditto.IsDebuggingEnabled = Ditto.GetDebugFlag();
}
}
}
27 changes: 15 additions & 12 deletions src/Our.Umbraco.Ditto/Common/DittoDisposableTimer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,35 @@
namespace Our.Umbraco.Ditto
{
/// <summary>
/// Ditto's internal disposable timer for debugging and profiling purposes.
/// Ditto's internal static methods for Umbraco's disposable timer (for debugging and profiling purposes).
/// </summary>
internal class DittoDisposableTimer : DisposableTimer
internal static class DittoDisposableTimer
{
/// <summary>
/// Initializes a new instance of the <see cref="DittoDisposableTimer"/> class.
/// Profiles and tracks how long a code fragment takes, until it is disposed.
/// </summary>
/// <param name="callback">A callback method.</param>
public DittoDisposableTimer(Action<long> callback)
: base(callback)
{ }
/// <typeparam name="T">The type of the calling class.</typeparam>
/// <param name="startMessage">The starting message for the profiler.</param>
/// <returns>Returns an instance of the disposable timer.</returns>
public static DisposableTimer DebugDuration<T>(string startMessage)
{
return DebugDuration(typeof(T), startMessage);
}

/// <summary>
/// Profiles and tracks how long a code fragment takes, until it is disposed.
/// </summary>
/// <typeparam name="T">The type of the calling class.</typeparam>
/// <param name="loggerType">The type of the calling class.</param>
/// <param name="startMessage">The starting message for the profiler.</param>
/// <returns>Returns an instance of the disposable timer.</returns>
public new static DisposableTimer DebugDuration<T>(string startMessage)
public static DisposableTimer DebugDuration(Type loggerType, string startMessage)
{
if (Ditto.IsDebuggingEnabled && ApplicationContext.Current != null && ApplicationContext.Current.ProfilingLogger != null)
if (Ditto.IsDebuggingEnabled && Ditto.IsProfilingEnabled() && ApplicationContext.Current?.ProfilingLogger != null)
{
return ApplicationContext.Current.ProfilingLogger.DebugDuration<T>(startMessage);
return ApplicationContext.Current.ProfilingLogger.DebugDuration(loggerType, startMessage, "Complete");
}

return new DittoDisposableTimer((x) => { });
return default(DisposableTimer);
}
}
}
Loading

0 comments on commit 6ec0a65

Please sign in to comment.