Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= Reflection
Reflection is designed to keep your development system in sync with your production system's files and database (by dumping). It uses a shared git repository to store these files, which allows you to mirror your production environment without the need of direct access to your production servers.
It provides two main command modes:
== Get it
Reflection is a gem, hosted on Gemcutter:
gem install reflection
== Stashing your production data
==== The simplest form:
$ reflection --stash --directory /path/to/your/assets --repository git@your-shared-repository.git
This will clone git@your-shared-repository.git and add the directory /path/to/your/assets to the repository. Reflection keeps a local version of your repository in HOME/.reflection/stash. So the next time you run the command, there is no need of cloning it again.
==== Now, lets include a database dump
$ reflection --stash \
--directory /path/to/your/assets \
--repository git@your-shared-repository.git \
--rails /rails/root
--rails-env production
This does the same as above, but additionally dumps your production database and adds the fresh dump to your repository.
==== I'm lazy..
You too, aren't you? So Reflection allows you to store all command line options in a config file.
$ reflection --stash \ --directory /path/to/your/assets \ --repository git@your-shared-repository.git \ --rails /rails/root \ --rails-env production \ --write /path/to/your/config
The next time you want to run the same command as above (useful for cron), you could simply call Reflection with:
$ reflection /path/to/your/config
== Getting the production stuff on your local development machine
This works exactly the same as describe above, but you would use --apply instead of --stash:
$ reflection --apply \ --directory /path/to/your/assets \ --repository git@your-shared-repository.git \ --rails /rails/root \ --rails-env development
This clones or pulls git@your-shared-repository.git (again, Reflection keeps a version of your Repository in HOME/.reflection/apply), copies the content to the specified directory (e.g. rails/application/public/assets) and optionally loads the dump into your database.
As you may have noticed, the Reflection command above got called with --rails-env development, which loads the dump in your development database (as defined by /rails/root/config/database.yml).
==== A little productivity hint
If you have a reflection.yml config file in your current application-development-directory, syncing your server-production environment is as easy as running:
$ reflection
== reflection --help
$ reflection --help Usage: reflection --COMMAND --repository=GIT_REPO --directory=PATH -or- Usage: reflection /path/to/reflection-config-file.yml
On the server side: -s, --stash Store your assets and/or a database dump in a git-repository. On the client side: -a, --apply Apply assets and/or a database dump loaded from a git-repository.
Required options for both: -r, --repository GIT_URL A Git repository(url) to be used as storage -d, --directory PATH Path to your asset directory
Additional options for both: --rails [RAILS_ROOT] Enable dumping/applying of a Rails managed MySQL database --rails-env [ENV] Rails environment to instrument --write [FILE] Create a configuration FILE from the current commandline options --force Hide tedious warnings -v, --verbose Include debug information in output --version Show version
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Andreas Wolff. See LICENSE for details.
FAQs
Unknown package
We found that reflection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.