[Jifty-commit] jifty branch, master, updated. 94f5231574ca1519511e57cbc9f7d2752b7c11c2

Jifty commits jifty-commit at lists.jifty.org
Thu May 6 16:12:53 EDT 2010


The branch, master has been updated
       via  94f5231574ca1519511e57cbc9f7d2752b7c11c2 (commit)
       via  58421c2446e6b194aaea591d41153b49148ebbb8 (commit)
      from  812804420a340db372f235eb4529fabcd33a5530 (commit)

Summary of changes:
 examples/Chat/lib/Chat/Action/Send.pm |    2 +-
 lib/Jifty.pm                          |    2 +-
 lib/Jifty/Manual/Cookbook.pod         |    2 +-
 lib/Jifty/Web/Session.pm              |    2 +-
 t/TestApp/lib/TestApp/View.pm         |    2 +-
 t/TestApp/t/99deprecation.t           |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 58421c2446e6b194aaea591d41153b49148ebbb8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu May 6 15:08:50 2010 -0400

    Version bump, for plugins that want to depend on Plack

diff --git a/lib/Jifty.pm b/lib/Jifty.pm
index 1132b9b..477ac74 100644
--- a/lib/Jifty.pm
+++ b/lib/Jifty.pm
@@ -13,7 +13,7 @@ BEGIN {
     require Time::Local;
 
     # Declare early to make sure Jifty::Record::schema_version works
-    $Jifty::VERSION = '1.00105';
+    $Jifty::VERSION = '1.00506';
 }
 
 =head1 NAME

commit 94f5231574ca1519511e57cbc9f7d2752b7c11c2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu May 6 15:59:45 2010 -0400

    Remove the last %ENV lookups

diff --git a/examples/Chat/lib/Chat/Action/Send.pm b/examples/Chat/lib/Chat/Action/Send.pm
index 09d5ff5..d32111b 100644
--- a/examples/Chat/lib/Chat/Action/Send.pm
+++ b/examples/Chat/lib/Chat/Action/Send.pm
@@ -11,7 +11,7 @@ use Jifty::Action schema {
 sub take_action {
     my $self = shift;
     my $msg  = $self->argument_value('message');
-    $msg = "<$1\@${ENV{'REMOTE_ADDR'}}> $msg" if $ENV{HTTP_USER_AGENT} =~ /([^\W\d]+)[\W\d]*$/;
+    $msg = "<$1\@".Jifty->web->request->address."> $msg" if Jifty->web->request->user_agent =~ /([^\W\d]+)[\W\d]*$/;
     Chat::Event::Message->new( { message => $msg } )->publish;
 }
 
diff --git a/lib/Jifty/Manual/Cookbook.pod b/lib/Jifty/Manual/Cookbook.pod
index fd2d48b..38b6fd1 100644
--- a/lib/Jifty/Manual/Cookbook.pod
+++ b/lib/Jifty/Manual/Cookbook.pod
@@ -221,7 +221,7 @@ If a lot of column could change, you can override C<_set> method:
 
         $self->SUPER::_set(column => 'changed_on', value => defer {DateTime->now});
         $self->SUPER::_set(column => 'from', 
-            value => $ENV{REMOTE_HOST}. " / ". Jifty->web->current_user->user_object->name );
+            value => Jifty->web->request->remote_host. " / ". Jifty->web->current_user->user_object->name );
 
         return ($val, $msg);
     }
diff --git a/lib/Jifty/Web/Session.pm b/lib/Jifty/Web/Session.pm
index 5ebd5c7..0a1668e 100644
--- a/lib/Jifty/Web/Session.pm
+++ b/lib/Jifty/Web/Session.pm
@@ -228,7 +228,7 @@ users, but varies according to the port the server is running on.
 sub cookie_name {
     my $self        = shift;
     my $cookie_name = $self->{'_cookie_name'};
-    my $port        = ( $ENV{'SERVER_PORT'} || 'NOPORT' );
+    my $port        = ( ( Jifty->web->request && Jifty->web->request->port) || 'NOPORT' );
     $cookie_name =~ s/\$PORT/$port/g;
     return ($cookie_name);
 }
diff --git a/t/TestApp/lib/TestApp/View.pm b/t/TestApp/lib/TestApp/View.pm
index 9c100c9..664dd0c 100644
--- a/t/TestApp/lib/TestApp/View.pm
+++ b/t/TestApp/lib/TestApp/View.pm
@@ -156,7 +156,7 @@ template 'otherplace' => page {
 };
 
 template 'naughty' => sub {
-    print STDOUT "this is bad: $ENV{REMOTE_HOST}";
+    print STDOUT "this is bad";
 };
 
 1;
diff --git a/t/TestApp/t/99deprecation.t b/t/TestApp/t/99deprecation.t
index e6d3ab2..2686453 100644
--- a/t/TestApp/t/99deprecation.t
+++ b/t/TestApp/t/99deprecation.t
@@ -11,6 +11,6 @@ my $URL     = $server->started_ok;
 my $mech    = Jifty::Test::WWW::Mechanize->new();
 my $request = HTTP::Request->new( GET => "$URL/naughty");
 my $response = $mech->request($request);
-is($response->content, 'this is bad: localhost');
+is($response->content, 'this is bad');
 $mech->warnings_like(qr/deprecated/);
 

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list