GithubHelp home page GithubHelp logo

ferki / rex-hook-file-impostor Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 54 KB

execute Rex file management commands on a copy of the managed path

Home Page: https://metacpan.org/release/Rex-Hook-File-Impostor

License: Other

Perl 100.00%
rex

rex-hook-file-impostor's Introduction

NAME

Rex::Hook::File::Impostor - execute Rex file management commands on a copy of the managed path

VERSION

version v0.2.0

SYNOPSIS

use Rex::Hook::File::Impostor;

DESCRIPTION

This module makes Rex execute file management commands on a copy of the managed path instead of the original one.

This could be particularly useful when it is loaded conditionally to be combined with other modules. For example together with Rex::Hook::File::Diff, it could be used to show a diff of file changes without actually changing the original file contents.

It works by installing a before hook for file commands, which makes a copy of the original file into a temporary directory, and then overrides the original arguments of the file commands.

DIAGNOSTICS

This module does not do any error checking (yet).

CONFIGURATION AND ENVIRONMENT

It uses the same temporary directory that is used by Rex. Therefore it can be configured with set_tmp_dir:

Rex::Config->set_tmp_dir($tmp_dir);

This module does not use any environment variables.

DEPENDENCIES

See the included cpanfile.

INCOMPATIBILITIES

There are no known incompatibilities with other modules.

BUGS AND LIMITATIONS

There are no known bugs. Make sure they are reported.

AUTHOR

Ferenc Erki <[email protected]>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2020,2021 by Ferenc Erki.

This is free software, licensed under:

The GNU Lesser General Public License, Version 3, June 2007

Early versions of this software were sponsorware. Thanks to GitHub sponsors, it is now available to everyone!

rex-hook-file-impostor's People

Watchers

 avatar  avatar

Forkers

manwar

rex-hook-file-impostor's Issues

Rex-Hook-File-Impostor-v0.1.0.2-TRIAL: Something seems to hang on 64bit Windows 8.1, Strawberry Perl

Hello,

It seems to me that something hangs on 64bit Windows 8.1 as follows.

Strawberry Perl 5.30.2 (64bit)

C:\home\sunlight2>cpan FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Mon, 05 Oct 2020 21:29:04 GMT
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.093)
Checksum for C:\Strawberry\cpan\sources\authors\id\F\FE\FERKI\Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.81)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20200314)
Configuring F/FE/FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz with Makefile.PL
CPAN: CPAN::Reporter loaded ok (v1.2018)
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Rex::Hook::File::Impostor
Writing MYMETA.yml and MYMETA.json
(C:\Strawberry\perl\bin\perl.exe Makefile.PL exited with 0)
CPAN::Reporter: Makefile.PL result is 'pass', No errors.
  FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for F/FE/FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
cp lib/Rex/Hook/File/Impostor.pm blib\lib\Rex\Hook\File\Impostor.pm
(c:\Strawberry\c\bin\gmake.exe exited with 0)
CPAN::Reporter: gmake result is 'pass', No errors.
  FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
  c:\Strawberry\c\bin\gmake.exe -- OK
Running make test for FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
(hangs)

Strawberry Perl 5.28.2 (64bit)

C:\home\gardenseat>cpan FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
CPAN: CPAN::SQLite loaded ok (v0.217)
CPAN: LWP::UserAgent loaded ok (v6.49)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
CPAN: YAML::XS loaded ok (v0.77)
Fetching with LWP:
http://cpan.strawberryperl.com/modules/02packages.details.txt.gz
Fetching with LWP:
http://cpan.strawberryperl.com/modules/03modlist.data.gz
Database was generated on Sun, 04 Oct 2020 16:33:43 GMT
Updating database file ... Done!
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/F/FE/FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
CPAN: Digest::SHA loaded ok (v6.02)
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/F/FE/FERKI/CHECKSUMS
CPAN: Compress::Zlib loaded ok (v2.096)
Checksum for C:\Strawberry\cpan\sources\authors\id\F\FE\FERKI\Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.36)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190420)
Configuring F/FE/FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz with Makefile.PL
CPAN: CPAN::Reporter loaded ok (v1.2018)
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Rex::Hook::File::Impostor
Writing MYMETA.yml and MYMETA.json
(C:\Strawberry\perl\bin\perl.exe Makefile.PL exited with 0)
CPAN::Reporter: Makefile.PL result is 'pass', No errors.
  FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for F/FE/FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
cp lib/Rex/Hook/File/Impostor.pm blib\lib\Rex\Hook\File\Impostor.pm
(C:\Strawberry\c\bin\gmake.exe exited with 0)
CPAN::Reporter: gmake result is 'pass', No errors.
  FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
  C:\Strawberry\c\bin\gmake.exe -- OK
Running make test for FERKI/Rex-Hook-File-Impostor-v0.1.0.2-TRIAL.tar.gz
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; tes
_harness(0, 'blib\lib', 'blib\arch')" t/*.t
(hangs)

Thank you,

Test failures on Windows machines

Even though the test suite is being run on Windows systems via GitHub Actions, there seems to be Windows test failure reports via CPAN Testers.

The one complainig about uniq of List::MoreUtils has already been addressed in Rex.

The others seem to fail on the copy step, which is probably related to the fact that Rex::Interface::Fs::Local is being used during the tests, and calling cp -R on Windows would fail. If that hypothesis is true, that should also be fixed on the Rex side.

Since that command is normally supposed to be run on the managed endpoint, I think I'll let the tests skip (or accept failure) in these cases until local copy operations on Windows gets supported by Rex (after filing an issue there as well).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.