projects
/
MojoFacets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into save_change
[MojoFacets.git]
/
script
/
changes
diff --git
a/script/changes
b/script/changes
index
46ea6cc
..
ca31147
100755
(executable)
--- a/
script/changes
+++ b/
script/changes
@@
-5,20
+5,27
@@
use warnings;
use Storable;
use Mojo::Client;
use Storable;
use Mojo::Client;
+use Data::Dump qw(dump);
my $url = 'http://localhost:3000/data/edit';
my $max = 1;
my $url = 'http://localhost:3000/data/edit';
my $max = 1;
+my @changes = @ARGV;
+
my $t = Mojo::Client->new;
$t->max_redirects( 1 );
my $t = Mojo::Client->new;
$t->max_redirects( 1 );
-foreach my $c (
glob '/tmp/changes/*.data.edit'
) {
+foreach my $c (
@changes
) {
print "# $c\n";
my $params = retrieve $c;
print "# $c\n";
my $params = retrieve $c;
+ my $hash = $params->to_hash;
+ $hash->{time} = $1 if $c =~ m{/(\d+\.\d+)\.data\.edit};
+
+ warn "# hash ",dump($hash);
- my $tx = $t->post_form( $url => $
params->to_
hash );
+ my $tx = $t->post_form( $url => $hash );
if ( my $res = $tx->success) { print $res->body }
else {
my ($code, $message) = $tx->error;
if ( my $res = $tx->success) { print $res->body }
else {
my ($code, $message) = $tx->error;