Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GAUGE_ROOT to customize the location of gauge configs and plugins #544

Closed
4 tasks done
kashishm opened this issue Jan 11, 2017 · 5 comments
Closed
4 tasks done
Assignees
Milestone

Comments

@kashishm
Copy link
Contributor

kashishm commented Jan 11, 2017

Expected behavior

Gauge configurations should be at user level rather than at system.
The location would be same as gauge plugins i.e ~/.gauge/ in mac/linux and %APPDATA%\gauge in windows.GAUGE_ROOT env var will be optional and to change the location of the configs/plugins, override GAUGE_ROOT.

Actual behavior

Currently, the configs and plugins are stored in different locations

Platform executable plugin current config new config
Mac /usr/local/bin ~/.gauge /usr/local/share ~/.gauge/
Linux /usr/local/bin ~/.gauge /usr/local/share ~/.gauge
Windows %ProgramFiles%\gauge\bin %APPDATA%\gauge %ProgramFiles%\gauge\share %APPDATA%\gauge

To change the install location for gauge and configs, we need to set GAUGE_ROOT env var and to change the plugin install location, GAUGE_HOME needs to be set.

We can have consistent behaviour if we store the configs and plugins at the same location and use one env var i.e. GAUGE_ROOT to customize it.

Test cases

  • should work on Mac
  • should work on Linux with ./install.sh interactive
  • should work on Linux with ./install.sh by giving the parameters GAUGE_PREFIX and GAUGE_PLUGINS
  • should work on Windows
@sswaroopgupta
Copy link
Contributor

The installer is not giving me an option to enter the password of admin

Installing gauge at /usr/local/bin
Enter custom install location :-

Creating /home/sswaroop/.gauge/config ...
mkdir: cannot create directory ‘/home/sswaroop/.gauge’: Permission denied

@sswaroopgupta
Copy link
Contributor

Gauge installation on linux using GAUGE_PREFIX requires the user to exec command source ~/.profile. The message in the installation looses focus when there are other plugins also getting installed. User gets an impression as though Gauge is not working as expected

@sswaroopgupta
Copy link
Contributor

Install gauge using the GAUGE_PREFIX.
use command source ~/.profile.
Now close the terminal
Re-open the terminal
gauge is not found.

@sriv
Copy link
Member

sriv commented Mar 13, 2017

when installing gauge to custom location i.e. using GAUGE_PREFIX option, it is the user's responsibility to source the respective settings in their shell. i.e. in bash, one can add source ~/.profile to their .bashrc. Gauge cannot automate this, since user may be using any shell of their preference.

@sriv sriv added ready for QA and removed ready labels Mar 13, 2017
@sswaroopgupta
Copy link
Contributor

sswaroopgupta commented Mar 14, 2017

usage example to install at custom location /tmp and selective plugins.
GAUGE_PREFIX=/tmp GAUGE_PLUGINS=java,ruby,spectacle ./install.sh for Mac and Linux.

On windows the exe provides the option to install at a custom location and select the plugins.

Note: The html-report plugin gets installed by default and cannot be overridden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants