feat: CasperJS 1.1-beta1
- builds on top of PhantomJS to ease scripting against Phantom
This commit is contained in:
		
							
								
								
									
										34
									
								
								CasperJS/CasperJs.nuspec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								CasperJS/CasperJs.nuspec
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| <?xml version="1.0"?> | ||||
| <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||||
|   <metadata> | ||||
|     <id>CasperJS</id> | ||||
|     <title>CasperJS</title> | ||||
|     <version>1.1-beta1</version> | ||||
|     <authors>Nicolas Perriault</authors> | ||||
|     <owners>Ethan J. Brown</owners> | ||||
|     <summary>CasperJS is a navigation scripting & testing utility for PhantomJS and SlimerJS written in Javascript</summary> | ||||
|     <description>CasperJS is an open source navigation scripting & testing utility written in Javascript for the PhantomJS WebKit headless browser and SlimerJS (Gecko). It eases the process of defining a full navigation scenario and provides useful high-level functions, methods & syntactic sugar for doing common tasks such as: | ||||
|  | ||||
| * defining & ordering browsing navigation steps | ||||
| * filling & submitting forms | ||||
| * clicking & following links | ||||
| * capturing screenshots of a page (or part of it) | ||||
| * testing remote DOM | ||||
| * logging events | ||||
| * downloading resources, including binary ones | ||||
| * writing functional test suites, saving results as JUnit XML | ||||
| * scraping Web contents</description> | ||||
|     <releaseNotes>https://github.com/n1k0/casperjs/releases/tag/1.1-beta1</releaseNotes> | ||||
|     <projectUrl>http://casperjs.org/</projectUrl> | ||||
|     <tags>casperjs javascript browser test webkit phantomjs slimerjs</tags> | ||||
|     <licenseUrl>http://en.wikipedia.org/wiki/MIT_License</licenseUrl> | ||||
|     <requireLicenseAcceptance>false</requireLicenseAcceptance> | ||||
|     <iconUrl>https://github.com/Iristyle/ChocolateyPackages/raw/master/CasperJS/casperjs_logo.jpg</iconUrl> | ||||
|     <dependencies> | ||||
|       <dependency id="PhantomJS" version="1.9.1"/> | ||||
|     </dependencies> | ||||
|   </metadata> | ||||
|   <files> | ||||
|     <file src="tools\**" target="tools" /> | ||||
|   </files> | ||||
| </package> | ||||
							
								
								
									
										
											BIN
										
									
								
								CasperJS/casperjs_logo.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								CasperJS/casperjs_logo.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 4.6 KiB | 
							
								
								
									
										41
									
								
								CasperJS/tools/chocolateyInstall.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								CasperJS/tools/chocolateyInstall.ps1
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,41 @@ | ||||
| $package = 'CasperJS' | ||||
| $version = '1.1-beta1' | ||||
|  | ||||
| try { | ||||
|   $params = @{ | ||||
|     PackageName = $package; | ||||
|     FileType = 'zip'; | ||||
|     Url = "https://github.com/n1k0/casperjs/zipball/$version"; | ||||
|     UnzipLocation = Join-Path $Env:TEMP "$package\$version"; | ||||
|   } | ||||
|  | ||||
|   if (!(Test-Path($params.UnzipLocation))) | ||||
|   { | ||||
|     New-Item $params.UnzipLocation -Type Directory | Out-Null | ||||
|   } | ||||
|  | ||||
|   # unzip to a temporary location | ||||
|   Install-ChocolateyZipPackage @params | ||||
|  | ||||
|   # then move the sha1 named package over to tools\CasperJS | ||||
|   $binRoot = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root | ||||
|   $moveTo = if (Test-Path $binRoot) { $binRoot } ` | ||||
|     else { Join-Path $Env:SystemDrive 'tools' } | ||||
|   $moveTo = Join-Path $moveTo $package | ||||
|  | ||||
|   if (Test-Path $moveTo) { Remove-Item $moveTo -Recurse -ErrorAction SilentlyContinue } | ||||
|  | ||||
|   Get-ChildItem $params.UnzipLocation | | ||||
|     Select -First 1 | | ||||
|     Move-Item -Destination $moveTo | ||||
|  | ||||
|   $batchLocation = Get-ChildItem $moveTo -Filter 'casperjs.bat' -Recurse | | ||||
|     Select -ExpandProperty 'DirectoryName' -First 1 | ||||
|  | ||||
|   Install-ChocolateyPath $batchLocation | ||||
|  | ||||
|   Write-ChocolateySuccess $package | ||||
| } catch { | ||||
|   Write-ChocolateyFailure $package "$($_.Exception.Message)" | ||||
|   throw | ||||
| } | ||||
							
								
								
									
										28
									
								
								CasperJS/tools/chocolateyUninstall.ps1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								CasperJS/tools/chocolateyUninstall.ps1
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,28 @@ | ||||
| $package = 'CasperJS' | ||||
|  | ||||
| try { | ||||
|   $installPath = Join-Path $Env:SystemDrive $Env:Chocolatey_Bin_Root | ||||
|   if (!(Test-Path $installPath)) | ||||
|   { | ||||
|     $installPath = Join-Path $Env:SystemDrive 'tools' | ||||
|   } | ||||
|   $installPath = Join-Path $installPath 'casperjs' | ||||
|  | ||||
|   if (Test-Path $installPath) | ||||
|   { | ||||
|     Remove-Item $installPath -Recurse -Force | ||||
|   } | ||||
|  | ||||
|   $binLocation = $installPath -replace '\\', '\\' | ||||
|  | ||||
|   $userPaths = [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' | | ||||
|     ? { ($_ -notmatch $binLocation) -and (![String]::IsNullOrEmpty($_)) } | | ||||
|     Select-Object -Unique | ||||
|  | ||||
|   [Environment]::SetEnvironmentVariable('Path', ($userPaths -join ';'), 'User') | ||||
|  | ||||
|   Write-ChocolateySuccess $package | ||||
| } catch { | ||||
|   Write-ChocolateyFailure $package "$($_.Exception.Message)" | ||||
|   throw | ||||
| } | ||||
		Reference in New Issue
	
	Block a user