Skip to content
Browse files

Tidied all

  • Loading branch information...
1 parent 3973ea4 commit 30108a1bc2298f1f937d7e78cf9b16cde121a91e @clintongormley committed Nov 6, 2012
View
2 lib/Elastic/Model/TypeMap/Base.pm
@@ -349,7 +349,7 @@ sub _fixup_mapping {
# make 'undef' a false value for boolean fields
$defn->{null_value} = 0
if $defn->{type} eq 'boolean'
- and not exists $defn->{null_value};
+ and not exists $defn->{null_value};
return $defn;
}
View
4 lib/Elastic/Model/TypeMap/Objects.pm
@@ -95,8 +95,8 @@ sub _map_class {
return ( type => 'object', enabled => 0 )
if $attr->can('has_enabled')
- && $attr->has_enabled
- && !$attr->enabled;
+ && $attr->has_enabled
+ && !$attr->enabled;
my $class = $tc->name;
my $attrs = _class_attrs( $map, $class, $attr )
View
6 t/10_typemaps/40_index_config.t
@@ -146,12 +146,10 @@ cmp_deeply $good->index_config(),
},
'All good';
-throws_ok
- sub { cmp_deeply $bad->index_config( types => ['bad_analyzer'] ) },
+throws_ok sub { cmp_deeply $bad->index_config( types => ['bad_analyzer'] ) },
qr/Unknown analyzer \(not_defined\)/, 'Bad analyzer';
-throws_ok
- sub { cmp_deeply $bad->index_config( types => ['bad_tokenizer'] ) },
+throws_ok sub { cmp_deeply $bad->index_config( types => ['bad_tokenizer'] ) },
qr/Unknown tokenizer \(foo\)/, 'Bad tokenizer';
done_testing;
View
3 t/20_namespace/03_alias.t
@@ -50,8 +50,7 @@ ok $alias->to('myapp3'), 'Re-alias to only myapp3';
cmp_deeply $alias->aliased_to, { myapp3 => {} }, 'Is re-aliased';
ok $alias->add(
- myapp2 => { index_routing => 'foo', search_routing => 'bar' }
- ),
+ myapp2 => { index_routing => 'foo', search_routing => 'bar' } ),
'Add alias';
cmp_deeply $alias->aliased_to,
{
View
3 t/20_namespace/04_index_role.t
@@ -128,8 +128,7 @@ SKIP: {
ok $index->close, "Close $desc";
ok $index->update_settings(
- "analysis.analyzer.edge_ngrams.tokenizer" => "keyword"
- ),
+ "analysis.analyzer.edge_ngrams.tokenizer" => "keyword" ),
"Set $desc tokenizer to keyword";
is get_tokenizer($name), "keyword", "$desc tokenizer is keyword";
View
2 t/40_view/07_routing.t
@@ -49,7 +49,6 @@ is $model->view->domain('myapp')->scan->first_object->uid->routing, 'foo',
is $model->view->domain('myapp')->include_paths('*')
->scan->first_object->uid->routing, 'foo', 'scan myapp/partial';
-
note "Routing from real index";
is $model->view->domain('myapp2')->search->first_result->uid->routing, 'foo',
@@ -73,7 +72,6 @@ is $model->view->domain('myapp2')->scan->first_object->uid->routing, 'foo',
is $model->view->domain('myapp2')->include_paths('*')
->scan->first_object->uid->routing, 'foo', 'scan myapp2/partial';
-
note "Routing from filtered alias";
is $model->view->domain('myapp3')->search->first_result->uid->routing, 'foo',
View
3 t/50_scope/03_delete.t
@@ -133,8 +133,7 @@ done_testing;
sub create_user {
#===================================
my $name = shift;
- isa_ok my $user
- = $domain->create( user => { id => 1, name => 'Clint' } ),
+ isa_ok my $user = $domain->create( user => { id => 1, name => 'Clint' } ),
'MyApp::User', $name;
return $user;
}
View
8 t/60_reindex/01_basic.t
@@ -77,17 +77,17 @@ sub compare_results {
query => { match_all => {} },
'sort' => ['timestamp'],
%$q1
- )->{hits}{hits}
- };
+ )->{hits}{hits}
+ };
my @r2 = map { delete $_->{_index}; $_ } @{
$model->es->search(
size => 300,
query => { match_all => {} },
'sort' => ['timestamp'],
%$q2
- )->{hits}{hits}
- };
+ )->{hits}{hits}
+ };
cmp_deeply \@r1, \@r2, $desc;
}
View
1 t/lib/Foo/Post.pm
@@ -3,5 +3,4 @@ package Foo::Post;
use Elastic::Doc;
extends 'Foo::Post::Base';
-
1;

0 comments on commit 30108a1

Please sign in to comment.
Something went wrong with that request. Please try again.