Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
14dab987
Commit
14dab987
authored
Jun 17, 2014
by
Matt Martz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instantiate psobject directly
parent
ac6ccb77
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
12 deletions
+12
-12
library/windows/assemble.ps1
+1
-1
library/windows/async_wrapper.ps1
+1
-1
library/windows/command.ps1
+1
-1
library/windows/copy.ps1
+1
-1
library/windows/file.ps1
+1
-1
library/windows/ping.ps1
+1
-1
library/windows/slurp.ps1
+2
-2
library/windows/stat.ps1
+3
-3
library/windows/win_ping
+1
-1
No files found.
library/windows/assemble.ps1
View file @
14dab987
...
...
@@ -8,6 +8,6 @@ If ($args.Length -gt 0)
$data
=
'FIXME'
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name fixme -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/async_wrapper.ps1
View file @
14dab987
...
...
@@ -8,6 +8,6 @@ If ($args.Length -gt 0)
$data
=
'FIXME'
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name fixme -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/command.ps1
View file @
14dab987
...
...
@@ -8,6 +8,6 @@ If ($args.Length -gt 0)
$data
=
'FIXME'
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name fixme -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/copy.ps1
View file @
14dab987
...
...
@@ -8,6 +8,6 @@ If ($args.Length -gt 0)
$data
=
'FIXME'
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name fixme -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/file.ps1
View file @
14dab987
...
...
@@ -8,6 +8,6 @@ If ($args.Length -gt 0)
$data
=
'FIXME'
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name fixme -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/ping.ps1
View file @
14dab987
...
...
@@ -12,6 +12,6 @@ If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'data'
$data
=
$params
.data;
}
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name ping -Value
$data
;
echo
$result
|
ConvertTo-Json
;
library/windows/slurp.ps1
View file @
14dab987
#!powershell
# WANT_JSON
$params
=
'{}'
|
ConvertFrom-Json
;
$params
=
New-Object
psobject
;
If
(
$args
.Length -gt 0
)
{
$params
=
Get-Content
$args
[
0] |
ConvertFrom-Json
;
...
...
@@ -27,7 +27,7 @@ If (-not $src)
$bytes
=
[
System.IO.File]::ReadAllBytes
(
$src
)
;
$content
=
[
System.Convert]::ToBase64String
(
$bytes
)
;
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name content -Value
$content
;
$result
|
Add-Member
-MemberType NoteProperty -Name encoding -Value
'base64'
;
echo
$result
|
ConvertTo-Json
;
library/windows/stat.ps1
View file @
14dab987
#!powershell
# WANT_JSON
$params
=
'{}'
|
ConvertFrom-Json
;
$params
=
New-Object
psobject
;
If
(
$args
.Length -gt 0
)
{
$params
=
Get-Content
$args
[
0] |
ConvertFrom-Json
;
...
...
@@ -19,7 +19,7 @@ If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'get_m
$get_md5
=
$params
.get_md5;
}
$stat
=
'{}'
|
ConvertFrom-Json
;
$stat
=
New-Object
psobject
;
If
(
Test-Path
$path
)
{
$stat
|
Add-Member
-MemberType NoteProperty -Name exists -Value
$TRUE
;
...
...
@@ -45,7 +45,7 @@ If ($get_md5 -and $stat.exists -and -not $stat.isdir)
$stat
|
Add-Member
-MemberType NoteProperty -Name md5 -Value
$path_md5
;
}
$result
=
'{}'
|
ConvertFrom-Json
;
$result
=
New-Object
psobject
;
$result
|
Add-Member
-MemberType NoteProperty -Name stat -Value
$stat
;
$result
|
Add-Member
-MemberType NoteProperty -Name changed -Value
$FALSE
;
echo
$result
|
ConvertTo-Json
;
library/windows/win_ping
View file @
14dab987
...
...
@@ -12,7 +12,7 @@ If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'data'
$data = $params.data;
}
$result =
'{}' | ConvertFrom-Json
;
$result =
New-Object psobject
;
$result | Add-Member -MemberType NoteProperty -Name ping -Value $data;
echo $result | ConvertTo-Json;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment