-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First shot at offline bootstraping; seems to work
- Loading branch information
Tadeusz Sośnierz
committed
Jul 23, 2012
1 parent
04b6755
commit b475cb2
Showing
32 changed files
with
850 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,22 @@ | ||
use v6; | ||
|
||
my $oldenv = %*ENV<PERL6LIB> // ''; | ||
my $env_sep = $*VM<config><osname> eq 'MSWin32' ?? ';' !! ':'; | ||
%*ENV<PERL6LIB> = join $env_sep, $oldenv, cwd() ~ '/ext', cwd() ~ '/lib'; | ||
my $home = $*OS eq 'MSWin32' ?? %*ENV<HOMEDRIVE> ~ %*ENV<HOMEPATH> !! %*ENV<HOME>; | ||
|
||
mkdir $home unless $home.IO.d; | ||
mkdir "$home/.panda" unless "$home/.panda".IO.d; | ||
my $projects = slurp 'projects.json.bootstrap'; | ||
$projects ~~ s:g/_BASEDIR_/{cwd}\/ext/; | ||
given open "$home/.panda/projects.json", :w { | ||
.say: $projects; | ||
.close; | ||
} | ||
|
||
%*ENV<PERL6LIB> ~= ":{cwd}/ext/File__Tools/lib"; | ||
%*ENV<PERL6LIB> ~= ":{cwd}/ext/JSON__Tiny/lib"; | ||
%*ENV<PERL6LIB> ~= ":{cwd}/ext/Test__Mock/lib"; | ||
%*ENV<PERL6LIB> ~= ":{cwd}/lib"; | ||
shell "perl6 bin/panda install File::Tools JSON::Tiny Test::Mock"; | ||
%*ENV<PERL6LIB> = join $env_sep, $oldenv, cwd() ~ '/lib'; | ||
shell "perl6 bin/panda install ."; | ||
|
||
unlink "$home/.panda/projects.json"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2010 Tadeusz Sośnierz | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name" : "File::Tools", | ||
"version" : "*", | ||
"description" : "Various modules for file operations", | ||
"depends" : [], | ||
"source-url" : "git://github.com/tadzik/perl6-File-Tools.git" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This Perl 6 distribution contains the following modules: | ||
|
||
File::Copy | ||
File::Find | ||
File::Mkdir |
0
ext/File/Find.pm → ext/File__Tools/lib/File/Find.pm
100755 → 100644
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use v6; | ||
use Test; | ||
use File::Find; | ||
plan 7; | ||
|
||
my $res = find(:dir<t/dir1>); | ||
my @test = $res.map({ .Str }).sort; | ||
is @test, <t/dir1/another_dir t/dir1/another_dir/empty_file t/dir1/file.bar t/dir1/file.foo t/dir1/foodir t/dir1/foodir/not_a_dir>, 'just a dir'; | ||
|
||
# names | ||
|
||
$res = find(:dir<t/dir1>, :name(/foo/)); | ||
@test = $res.map({ .Str }).sort; | ||
is @test, <t/dir1/file.foo t/dir1/foodir t/dir1/foodir/not_a_dir>, 'name with regex'; | ||
|
||
$res = find(:dir<t/dir1>, :name<file.bar>); | ||
is $res.elems, 1, 'name with a string'; | ||
|
||
$res = find(:dir<t/dir1>, :name<notexisting>); | ||
is $res.elems, 0, 'no results'; | ||
|
||
# types | ||
|
||
$res = find(:dir<t/dir1>, :type<dir>); | ||
@test = $res.map({ .Str }).sort; | ||
is @test, <t/dir1/another_dir t/dir1/foodir>, 'types: dir'; | ||
|
||
$res = find(:dir<t/dir1>, :type<dir>, :name(/foo/)); | ||
@test = $res.map({ .Str }).sort; | ||
is @test, <t/dir1/foodir>, 'types: dir, combined with name'; | ||
|
||
$res = find(:dir<t/dir1>, :type<file>, :name(/foo/)); | ||
@test = $res.map({ .Str }).sort; | ||
is @test, <t/dir1/file.foo t/dir1/foodir/not_a_dir>, | ||
'types: file, combined with name'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
use v6; | ||
use Test; | ||
use Shell::Command; | ||
plan 2; | ||
|
||
mkpath 't/dupa/foo/bar'; | ||
ok ('t/dupa/foo'.IO ~~ :d), 'mkpath, 1/2'; | ||
ok ('t/dupa/foo/bar'.IO ~~ :d), 'mkpath, 1/2'; | ||
rmdir 't/dupa/foo/bar'; | ||
rmdir 't/dupa/foo'; | ||
rmdir 't/dupa/'; |
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
foo foo | ||
asd | ||
foo bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.swp | ||
Makefile | ||
*.pir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
lib/JSON/Tiny.pm | ||
lib/JSON/Tiny/Actions.pm | ||
lib/JSON/Tiny/Grammar.pm | ||
lib/Configure.pm | ||
t/04-roundtrip.t | ||
t/03-unicode.t | ||
t/01-parse.t | ||
t/02-structure.t | ||
META.yml | ||
Makfile.in | ||
README | ||
Configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name" : "JSON::Tiny", | ||
"version" : "*", | ||
"description" : "A minimal JSON (de)serializer", | ||
"depends" : [ ], | ||
"source-url" : "git://github.com/moritz/json.git" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: JSON-Tiny | ||
version: '0.1.2_1' | ||
author: | ||
- 'Moritz Lenz <moritz@faui2k3.org>' | ||
- 'Johan Viklund <johan.viklund@gmail.com>' | ||
abstract: 'JSON parser and generator' | ||
license: artistic_2 | ||
resources: | ||
license: http://www.perlfoundation.org/artistic_2_0_notes | ||
distribution_type: module | ||
requires: | ||
perl: 6.0 | ||
provides: | ||
JSON::Tiny: | ||
file: lib/JSON/Tiny.pm | ||
version: '0.1.2_1' | ||
JSON::Tiny::Grammar: | ||
file: lib/JSON/Tiny/Grammar.pm | ||
JSON::Tiny::Actions: | ||
file: lib/JSON/Tiny/Actions.pm | ||
generated_by: 'Moritz Lenz' | ||
meta-spec: | ||
url: http://module-build.sourceforge.net/META-spec-v1.2.html | ||
version: 1.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
An initial Perl 6 grammar for JSON. | ||
|
||
This is a work in progress. For more information please join #perl6 on | ||
irc.freenode.net, and talk to moritz_ or viklund, or write a mail to | ||
perl6-users@perl.org. | ||
|
||
All files (unless noted otherwise) can be used, modified and redistributed | ||
under the terms of the Artistic License Version 2. Examples (in the | ||
documentation, in tests or distributed as separate files) can be considered | ||
public domain. | ||
|
||
To build and test this module, plese get 'ufo' from | ||
http://github.com/masak/ufo and run | ||
|
||
ufo | ||
make | ||
make test | ||
|
||
(installation is not yet supported; you can do that manually by copying the .pm | ||
files from lib/ recursivley in your ~/.perl6/lib/ dir; installing .pir files | ||
is discouraged, since simple changes in Rakudo will render them worthless, | ||
might result in confusing errors). | ||
|
||
State: | ||
|
||
The parser is pretty complete, if you find anything that it should | ||
parse and doesn't, or the other way round, please let me know. | ||
|
||
The emitter works. | ||
|
||
Both currently ignore possible surrogate pairs. | ||
|
||
Credits | ||
Moritz Lenz <moritz@faui2k3.org> | ||
Johan Viklund | ||
Jonathan Worthington |
0
ext/JSON/Tiny.pm → ext/JSON__Tiny/lib/JSON/Tiny.pm
100755 → 100644
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.