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

Commit 6ec0a65

Browse files
authored
Merge pull request #237 from umco/develop
Preparing Ditto 0.12.0-beta release
2 parents 28b08c9 + 6c244d2 commit 6ec0a65

File tree

80 files changed

+1537
-1013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1537
-1013
lines changed

LICENSE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

3-
Copyright © 2014 Umbrella Inc, Our Umbraco and other contributors
3+
Copyright © 2018 UMCO, Our Umbraco and other contributors
4+
Copyright © 2014 Umbrella Inc
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy of
67
this software and associated documentation files (the "Software"), to deal in

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<img height="100" src="docs/assets/img/ditto.png" style="margin-bottom: 20px" alt="Ditto logo" title="Ditto">
22

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

98
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**.
109
There are no 3<sup>rd</sup> party dependencies, other than Umbraco core itself.
@@ -40,25 +39,27 @@ Anyone and everyone is welcome to contribute. Please take a moment to review the
4039
Have a question?
4140

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

4544

4645
## Ditto Team
4746

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

5250
### Special thanks
5351

5452
* 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.
5553
* Thanks to [Jeavon Leopold](https://github.com/Jeavon) for being a rockstar and adding AppVeyor support.
5654
* Thanks to [Hendy Racher](https://github.com/Hendy) for testing and contributions.
5755
* Thanks to [Jamie Pollock](https://github.com/jamiepollock) for continued support, feedback and encouragement.
56+
* Special thanks to [James Jackson-South](https://github.com/JimBobSquarePants) for all the stellar contributions.
5857

5958

6059
## License
6160

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

6465
Licensed under the [MIT License](LICENSE.md)

appveyor.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: Visual Studio 2017
22

33
# version format
4-
version: 0.11.3.{build}
4+
version: 0.12.0.{build}
55

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

1414
build_script:
15-
- build\build-appveyor.cmd
15+
- build\build-appveyor.cmd
1616

1717
test:
1818
assemblies:
@@ -23,30 +23,20 @@ artifacts:
2323
- path: artifacts\*.zip
2424

2525
deploy:
26-
# MyGet (Ditto feed) Deployment for builds & releases
27-
- provider: NuGet
28-
server: https://www.myget.org/F/umbraco-ditto/
29-
symbol_server: https://www.myget.org/F/umbraco-ditto/symbols/api/v2/package
30-
api_key:
31-
secure: Q1/4K8VSwr7BjwmKDTef8y5lOc7S+jK9ELuWy67y6OVRpjxmnF9M3Gfs1kT+ir8x
32-
artifact: /.*\.nupkg/
33-
on:
34-
branch: develop
35-
3626
# MyGet (Umbraco Community feed) Deployment for builds & releases
3727
- provider: NuGet
38-
server: https://www.myget.org/F/umbraco-packages/
28+
server: https://www.myget.org/F/umbraco-packages/api/v2/package
3929
symbol_server: https://www.myget.org/F/umbraco-packages/symbols/api/v2/package
4030
api_key:
41-
secure: Q1/4K8VSwr7BjwmKDTef8y5lOc7S+jK9ELuWy67y6OVRpjxmnF9M3Gfs1kT+ir8x
31+
secure: 36/Ax5O+e6wENlhoTwgvoEBZV3FG4XjF429SNTej2qsGTAL+cdfA1kT/tm1St8vx
4232
artifact: /.*\.nupkg/
4333
on:
4434
branch: develop
4535

4636
# GitHub Deployment for releases
4737
- provider: GitHub
4838
auth_token:
49-
secure: pEozEGTqJutQwOidJU6BTB+Ix0NV4vrUnomhfeqheVz4RNwfxjEYLoqR4XabhlPz
39+
secure: yDxrRTveSScJA35MQTOaLYVjoPKFKl2bHBkG+JMZjiN0r7AfuUCxVU3CgW8Imu4h
5040
artifact: /.*\.zip/ # upload all Zip packages to release assets
5141
draft: false
5242
prerelease: false
@@ -58,7 +48,7 @@ deploy:
5848
- provider: NuGet
5949
server:
6050
api_key:
61-
secure: CGzDKxw4QI/z2VSe9ceiYlIabqGXHolgBgVNWWZjVAJ2V5WLF11IFdlp9r5Qp+Sw
51+
secure: 0+oAleUTnr9UuJrhLW5rphRR+QGz00XX1Ui3k5kwyr2kUdEamiQ3F+gW0q8MJbDT
6252
artifact: /.*\.nupkg/
6353
on:
6454
branch: master

build/package.proj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
<MinUmbracoVersion>7.3.2</MinUmbracoVersion>
2121
<Readme>Ditto - the friendly POCO mapper for Umbraco</Readme>
2222
<AuthorName>Lee Kelleher, Matt Brailsford, James Jackson-South</AuthorName>
23-
<AuthorUrl>https://github.com/leekelleher/umbraco-ditto/graphs/contributors</AuthorUrl>
23+
<AuthorUrl>https://github.com/umco/umbraco-ditto/graphs/contributors</AuthorUrl>
2424
<PackageLicenseName>MIT license</PackageLicenseName>
2525
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
26-
<ProjectUrl>https://github.com/leekelleher/umbraco-ditto</ProjectUrl>
26+
<ProjectUrl>https://github.com/umco/umbraco-ditto</ProjectUrl>
2727
</PropertyGroup>
2828

2929
<!-- NUGET ONLY PROPERTIES -->
3030
<PropertyGroup>
3131
<PackageId>Our.Umbraco.Ditto</PackageId>
3232
<NuGetPackageName>Ditto for Umbraco</NuGetPackageName>
33-
<Copyright>Copyright &#169; 2014 Umbrella Inc Ltd, Our Umbraco and other contributors</Copyright>
34-
<Owners>Umbrella Inc Ltd</Owners>
35-
<IconUrl>https://raw.githubusercontent.com/leekelleher/umbraco-ditto/master/docs/assets/img/logo.png</IconUrl>
33+
<Copyright>Copyright &#169; 2014 UMCO, Umbrella Inc Ltd, Our Umbraco and other contributors</Copyright>
34+
<Owners>UMCO</Owners>
35+
<IconUrl>https://raw.githubusercontent.com/umco/umbraco-ditto/master/docs/assets/img/logo.png</IconUrl>
3636
<Tags>umbraco poco mapping strongly-typed</Tags>
3737
<Language>en-GB</Language>
3838
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>

build/tools/NuGet.exe

1.06 MB
Binary file not shown.

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Ditto is a lightweight view-model mapper for Umbraco. It offers a simple solutio
55

66
## Where can I get it?
77

8-
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).
8+
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).
99

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

1212
## How can I get help?
1313

14-
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).
14+
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).
1515

docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you prefer, you can compile Ditto yourself, you'll need:
2828
To clone it locally run the following git commands:
2929

3030
```bash
31-
git clone https://github.com/leekelleher/umbraco-ditto.git umbraco-ditto
31+
git clone https://github.com/umco/umbraco-ditto.git umbraco-ditto
3232
cd umbraco-ditto
3333
.\build.cmd
3434
```

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
site_name: Ditto
22

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

55
pages:
66
- 'Introduction': 'index.md'

src/Our.Umbraco.Ditto.sln

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio 14
3-
VisualStudioVersion = 14.0.25123.0
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2009
45
MinimumVisualStudioVersion = 10.0.40219.1
56
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Our.Umbraco.Ditto", "Our.Umbraco.Ditto\Our.Umbraco.Ditto.csproj", "{3A2482A4-AD19-4C26-A449-4287DA07AB16}"
67
EndProject
@@ -14,8 +15,8 @@ EndProject
1415
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Package", "Build Package", "{302C02F0-CA95-430F-BD43-82D0CCEC08A3}"
1516
ProjectSection(SolutionItems) = preProject
1617
..\appveyor.yml = ..\appveyor.yml
17-
..\build.cmd = ..\build.cmd
1818
..\build\build-appveyor.cmd = ..\build\build-appveyor.cmd
19+
..\build.cmd = ..\build.cmd
1920
..\build\package.nuspec = ..\build\package.nuspec
2021
..\build\package.proj = ..\build\package.proj
2122
..\build\package.xml = ..\build\package.xml
@@ -69,4 +70,7 @@ Global
6970
{302C02F0-CA95-430F-BD43-82D0CCEC08A3} = {6CF4E7DA-6359-479E-A64D-2023C743BA1C}
7071
{8A5424A2-03F9-4D89-9B68-CB286D7F8596} = {6CF4E7DA-6359-479E-A64D-2023C743BA1C}
7172
EndGlobalSection
73+
GlobalSection(ExtensibilityGlobals) = postSolution
74+
SolutionGuid = {8C9C786C-59D5-42E5-9FAA-97E3936DBAED}
75+
EndGlobalSection
7276
EndGlobal

src/Our.Umbraco.Ditto/Bootstrapper.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Umbraco.Core;
2+
3+
namespace Our.Umbraco.Ditto
4+
{
5+
internal sealed class Bootstrapper : ApplicationEventHandler
6+
{
7+
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
8+
{
9+
Ditto.IsDebuggingEnabled = Ditto.GetDebugFlag();
10+
}
11+
}
12+
}

src/Our.Umbraco.Ditto/Common/DittoDisposableTimer.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,35 @@
44
namespace Our.Umbraco.Ditto
55
{
66
/// <summary>
7-
/// Ditto's internal disposable timer for debugging and profiling purposes.
7+
/// Ditto's internal static methods for Umbraco's disposable timer (for debugging and profiling purposes).
88
/// </summary>
9-
internal class DittoDisposableTimer : DisposableTimer
9+
internal static class DittoDisposableTimer
1010
{
1111
/// <summary>
12-
/// Initializes a new instance of the <see cref="DittoDisposableTimer"/> class.
12+
/// Profiles and tracks how long a code fragment takes, until it is disposed.
1313
/// </summary>
14-
/// <param name="callback">A callback method.</param>
15-
public DittoDisposableTimer(Action<long> callback)
16-
: base(callback)
17-
{ }
14+
/// <typeparam name="T">The type of the calling class.</typeparam>
15+
/// <param name="startMessage">The starting message for the profiler.</param>
16+
/// <returns>Returns an instance of the disposable timer.</returns>
17+
public static DisposableTimer DebugDuration<T>(string startMessage)
18+
{
19+
return DebugDuration(typeof(T), startMessage);
20+
}
1821

1922
/// <summary>
2023
/// Profiles and tracks how long a code fragment takes, until it is disposed.
2124
/// </summary>
22-
/// <typeparam name="T">The type of the calling class.</typeparam>
25+
/// <param name="loggerType">The type of the calling class.</param>
2326
/// <param name="startMessage">The starting message for the profiler.</param>
2427
/// <returns>Returns an instance of the disposable timer.</returns>
25-
public new static DisposableTimer DebugDuration<T>(string startMessage)
28+
public static DisposableTimer DebugDuration(Type loggerType, string startMessage)
2629
{
27-
if (Ditto.IsDebuggingEnabled && ApplicationContext.Current != null && ApplicationContext.Current.ProfilingLogger != null)
30+
if (Ditto.IsDebuggingEnabled && Ditto.IsProfilingEnabled() && ApplicationContext.Current?.ProfilingLogger != null)
2831
{
29-
return ApplicationContext.Current.ProfilingLogger.DebugDuration<T>(startMessage);
32+
return ApplicationContext.Current.ProfilingLogger.DebugDuration(loggerType, startMessage, "Complete");
3033
}
3134

32-
return new DittoDisposableTimer((x) => { });
35+
return default(DisposableTimer);
3336
}
3437
}
3538
}

0 commit comments

Comments
 (0)