Skip to content

Commit

Permalink
build scripts for appveyor ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jun 15, 2015
1 parent e398814 commit 54ed2b0
Show file tree
Hide file tree
Showing 13 changed files with 263 additions and 79 deletions.
104 changes: 83 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,46 @@
#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# Build results
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studo 2015 cache/options directory
.vs/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
Expand All @@ -43,9 +60,12 @@ x64/
*.vssscc
.builds
*.pidb
*.log
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
Expand All @@ -59,12 +79,19 @@ ipch/
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*
Expand All @@ -73,9 +100,16 @@ _TeamCity*
*.dotCover

# NCrunch
*.ncrunch*
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

Expand All @@ -93,44 +127,72 @@ DocProject/Help/html
publish/

# Publish Web Output
*.Publish.xml
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
packages/
.nuget/
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
packages/*
# Folder with nuget.exe (build.cmd will restore this)
.nuget/*
.nuget/packages.config

# Windows Azure Build Output
csx
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# xunit
.xunit/*
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Kyle Spearrin

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.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Visual Studio jQuery Code Snippets

[![Build Status](https://travis-ci.org/kspearrin/Visual-Studio-jQuery-Code-Snippets.svg)](https://travis-ci.org/kspearrin/Visual-Studio-jQuery-Code-Snippets)
[![Build status](https://ci.appveyor.com/api/projects/status/3o0b1ofu94xuqpsa?svg=true)](https://ci.appveyor.com/project/kspearrin/visual-studio-jquery-code-snippets)

I have updated the popular jQuery code snippets for use in Visual Studio 2012, 2013, and 2015. See a demo video on YouTube here: <http://www.youtube.com/watch?v=Escy0hbEkI8&hd=1>

Expand All @@ -23,7 +23,7 @@ There are over 130 code snippets for jQuery included. Check out the [snippet lis

## Changelog

**v1.5**
**v1.5.0**
- Added VS 2015 support. Thanks @madskristensen!
- Upgraded project files to VS 2013.
- Updated HTML snippet default library versions to latest.
Expand Down
41 changes: 20 additions & 21 deletions Tests/SnippetTests.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using System.IO;
using System.Xml;
using NUnit.Framework;
using Xunit;

namespace Tests
{
[TestFixture]
public class SnippetTests
{
// --- CONFIGURATION ---
Expand All @@ -14,7 +13,7 @@ public class SnippetTests
private const string Version = "1.5.0";
// --- END CONFIGURATION ---

[Test]
[Fact]
public void SnippetTitlesAreCorrect()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -26,11 +25,11 @@ public void SnippetTitlesAreCorrect()

var titleNode = snippetDoc.GetElementsByTagName("Title");
var title = titleNode[0].InnerText;
Assert.IsTrue(snippetName == title);
Assert.True(snippetName == title);
}
}

[Test]
[Fact]
public void SnippetShortcutsAreCorrect()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -42,11 +41,11 @@ public void SnippetShortcutsAreCorrect()

var shortcutNode = snippetDoc.GetElementsByTagName("Shortcut");
var shortcut = shortcutNode[0].InnerText;
Assert.IsTrue(snippetName == shortcut);
Assert.True(snippetName == shortcut);
}
}

[Test]
[Fact]
public void SnippetsHaveDescriptions()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -55,14 +54,14 @@ public void SnippetsHaveDescriptions()
snippetDoc.Load(snippetFile);

var descriptionNode = snippetDoc.GetElementsByTagName("Description");
Assert.IsTrue(descriptionNode != null);
Assert.True(descriptionNode != null);

var description = descriptionNode[0].InnerText;
Assert.IsTrue(!string.IsNullOrWhiteSpace(description) && description.Length > 10);
Assert.True(!string.IsNullOrWhiteSpace(description) && description.Length > 10);
}
}

[Test]
[Fact]
public void SnippetsHaveAuthors()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -71,14 +70,14 @@ public void SnippetsHaveAuthors()
snippetDoc.Load(snippetFile);

var authorNode = snippetDoc.GetElementsByTagName("Author");
Assert.IsTrue(authorNode != null);
Assert.True(authorNode != null);

var author = authorNode[0].InnerText;
Assert.IsTrue(!string.IsNullOrWhiteSpace(author) && author.Length > 5);
Assert.True(!string.IsNullOrWhiteSpace(author) && author.Length > 5);
}
}

[Test]
[Fact]
public void SnippetsHaveHelpUrls()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -87,24 +86,24 @@ public void SnippetsHaveHelpUrls()
snippetDoc.Load(snippetFile);

var urlNode = snippetDoc.GetElementsByTagName("HelpUrl");
Assert.IsTrue(urlNode != null);
Assert.True(urlNode != null);

var url = urlNode[0].InnerText;
Assert.IsTrue(!string.IsNullOrWhiteSpace(url) && url == HelpUrl);
Assert.True(!string.IsNullOrWhiteSpace(url) && url == HelpUrl);
}
}

[Test]
[Fact]
public void SnippetsAreProperFormattedXml()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
{
var contents = File.ReadAllText(snippetFile);
Assert.IsTrue(contents.Contains("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
Assert.True(contents.Contains("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
}
}

[Test]
[Fact]
public void SnippetsHaveCorrectVersion()
{
foreach (var snippetFile in Directory.EnumerateFiles(SnippetPath, "*.snippet", SearchOption.AllDirectories))
Expand All @@ -113,13 +112,13 @@ public void SnippetsHaveCorrectVersion()
snippetDoc.Load(snippetFile);

var snippetNode = snippetDoc.GetElementsByTagName("CodeSnippet");
Assert.IsTrue(snippetNode != null);
Assert.True(snippetNode != null);

var formatAttr = snippetNode[0].Attributes["Format"];
Assert.IsTrue(formatAttr != null);
Assert.True(formatAttr != null);

var format = formatAttr.InnerText;
Assert.IsTrue(!string.IsNullOrWhiteSpace(format) && format == Version);
Assert.True(!string.IsNullOrWhiteSpace(format) && format == Version);
}
}
}
Expand Down
Loading

0 comments on commit 54ed2b0

Please sign in to comment.