Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small whitespace fixes #349

Merged
merged 2 commits into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM jjmerelo/alpine-perl6
WORKDIR /code
COPY META6.json .
RUN apk add gcc libc-dev libuuid sqlite-libs
RUN zef install "NativeLibs:ver<0.0.7>:auth<github:salortiz>" --force-test
RUN zef install Config Config::Parser::json
RUN zef install "NativeLibs:ver<0.0.7>:auth<github:salortiz>" --force-test
RUN zef install Config Config::Parser::json
RUN zef install --deps-only .
ENTRYPOINT zef install -v .
VOLUME /code
2 changes: 1 addition & 1 deletion Dockerfile-no-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM jjmerelo/alpine-perl6
WORKDIR /code
COPY META6.json .
RUN apk add gcc libc-dev libuuid sqlite-libs
RUN zef install "NativeLibs:ver<0.0.7>:auth<github:salortiz>" --force-test
RUN zef install "NativeLibs:ver<0.0.7>:auth<github:salortiz>" --force-test
RUN zef install --deps-only .
ENTRYPOINT zef install -v .
VOLUME /code
2 changes: 1 addition & 1 deletion Red.iml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
</content>
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
</module>
2 changes: 1 addition & 1 deletion lib/MetamodelX/Red/Migration.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ multi method migrate(\model, Red::Model:U :$from) {

method dump-migrations(|) {
say "{ .key } => { .value.gist }" for @migrations
}
}
2 changes: 1 addition & 1 deletion lib/Red/AST.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ multi method WHICH(::?CLASS:D:) {

multi method WHICH(::?CLASS:U:) {
ValueObjAt.new: "{ self.^name }"
}
}
2 changes: 1 addition & 1 deletion lib/Red/AST/ChangeColumn.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ method optimize(@changes) {
|%lists<other>,
|@c
]
}
}
2 changes: 1 addition & 1 deletion lib/Red/AST/IsDefined.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ method find-value {
$!col
}

method gist { "{$!col.gist}.defined" }
method gist { "{$!col.gist}.defined" }
2 changes: 1 addition & 1 deletion lib/Red/AST/Optimizer/AND.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ multi method optimize(Red::AST $left is copy, Red::AST $right is copy) {

my $cols = ($lcols ∩ $rcols).elems;
.return with self.optimize: $left, $right, $cols
}
}
2 changes: 1 addition & 1 deletion lib/Red/AST/Optimizer/Case.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ multi method optimize(Red::AST :$case, Red::AST :%when, Red::AST :$else, UInt :$
self.bless: :$case, :when(%filteredWhen), :$else
}

multi method optimize(:case($), :when(%), :else($)) { Nil }
multi method optimize(:case($), :when(%), :else($)) { Nil }
2 changes: 1 addition & 1 deletion lib/Red/Driver/SQLite.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ multi method map-exception(Exception $x where { .?code == 1 and .native-message
:driver<SQLite>,
:orig-exception($x),
:table($<table>.Str)
}
}
2 changes: 1 addition & 1 deletion lib/Red/HiddenFromSQLCommenting.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ multi trait_mod:<is>(Method $r, Bool :$hidden-from-sql-commenting!) is export {
$r does role {
method is-hidden-from-sql-commenting { True }
}
}
}
2 changes: 1 addition & 1 deletion lib/Red/Migration/Column.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ has Bool $.is-auto-increment is column = False;
has Bool $.is-nullable is column = False;

has UInt $.table-id is referencing{ :column<id>, :model<Red::Migration::Table>}
has $.table is relationship( { .table-id }, :model<Red::Migration::Table>)
has $.table is relationship( { .table-id }, :model<Red::Migration::Table>)
2 changes: 1 addition & 1 deletion lib/Red/Migration/Migration.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ unit model Red::Migration::Migration is table<red_migration_version>;
has UInt $!id is id;
has Version $.version is column{ :unique };

has @.afected-tables is relationship{ { .migration-id }, :model<Red::Migration::Table> }
has @.afected-tables is relationship{ { .migration-id }, :model<Red::Migration::Table> }
2 changes: 1 addition & 1 deletion lib/Red/Migration/Table.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ has UInt $.migration-id is referencing{ :column<id>, :model<Red::Migration::
has $.migration is relationship( { .migration-id }, :model<Red::Migration::Migration> );
has @.columns is relationship( { .table-id }, :model<Red::Migration::Column>);

::?CLASS.^add-unique-constraint: { .name, .version };
::?CLASS.^add-unique-constraint: { .name, .version };
2 changes: 1 addition & 1 deletion lib/Red/Model.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ multi method perl(::?CLASS:D:) {
"{ .name.substr(2) } => { .get_value(self).perl }"
}
"{ self.^name }.new({ @attrs.join: ", " })"
}
}
2 changes: 1 addition & 1 deletion lib/Red/ResultAssociative.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ method iterator {

method gist {
"\{{self.map({ "{.key} => {.value.gist}" }).join: ", "}\}"
}
}
10 changes: 5 additions & 5 deletions lib/Red/ResultSeq.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ multi method create-map(*@ret where .all ~~ Red::AST, :filter(&)) is hidden-from
:type(.returns.^name),
:$attr,
:class(model),
|(do if $_ ~~ Red::Column {
:inflate(.inflate),
:deflate(.deflate),
} else {
|(do if $_ ~~ Red::Column {
:inflate(.inflate),
:deflate(.deflate),
} else {
:computation($_)
})
})
);
$attr does Red::Attr::Column(%data);
model.^add_attribute: $attr;
Expand Down
2 changes: 1 addition & 1 deletion lib/Red/ResultSeq/Iterator.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ submethod TWEAK(|) {
my @st-handler = $!driver.prepare: $ast;

@st-handler>>.execute unless $*RED-DRY-RUN;
$!st-handler = @st-handler.tail
$!st-handler = @st-handler.tail
}

#method is-lazy { True }
Expand Down
2 changes: 1 addition & 1 deletion lib/Red/ResultSeqSeq.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ method iterator {

method gist {
"[{self.map({ "{ .gist }" }).join: ", "}]"
}
}
2 changes: 1 addition & 1 deletion lib/X/Red/Exceptions.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ class X::Red::Driver::Mapped::Unique is X::Red::Driver::Mapped {
class X::Red::Driver::Mapped::TableExists is X::Red::Driver::Mapped {
has Str $.table is required;
method msg { "Table $!table already exists" }
}
}
2 changes: 1 addition & 1 deletion t/lib/TestRed.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ model Foo is rw {
has Str $.bar is column;
has Int $.zub-id is referencing( { Zub.id } );
has Zub $.zub is relationship( { .zub-id });
}
}