INDEX

Contributing Fixes to Packages

As a Spaceify developer using the Spaceify Package Repository, you are sooner or later likely to encounter the situation where some of the packages you are using would need some fixing. Maybe there is a bug that has gone unnoticed by the original developer, or the web page the package interacts with has changed significantly. Nevertheless, it is strongly encouraged, that you help the original developer to fix the problem, and here is an example of the recommended way to do it in the Spaceify ecosystem.

Example: Fixing the vimeospacelet

Suppose you have installed the Spaceify vimeospacelet that is used for playing videos from vimeo.com on the big screen. You have most likely installed vimeospacelet on the edge using the command:

sudo spm install spaceify/vimeospacelet

However, you notice that the vimeo.com website has recently gone through a big update, and the vimeospacelet of Spaceify does not seem to work properly with the new website. You are able to locate the problem to the javascript file that the vimeospacelet injects into the vimeo.com webpage, and decide to fix the issue. You edit the javascript file using the commands

sudo su
nano /var/lib/spaceify/spacelets/spaceify/vimeospacelet/volume/application/www/vimeospacelet.js

and notice that the changes that you save are immediately reflected on the vimeo.com web page as you reload the page in you browser. After a short while of trial-and-error debugging, you get the the vimeospacelet working again. Now it is time to share your success with the rest of the world! You can do this by making a pull request to the author of vimeospacelet on GitHub.

Making a Pull Request on GitHub

In the Spaceify ecosystem it is recommended that the source of all open source packages should be made available on GitHub. Thus, you can find the URL of the GitHub repository of vimeospacelet from its manifest file with the command

sudo su
cat /var/lib/spaceify/spacelets/spaceify/vimeospacelet/volume/application/spaceify.manifest  \\ 
| grep repository

Now you start your web browser, browse to this URL, and log in to GitHub with your own credentials. Next, you create a fork of the vimeospacelet using the GitHub web interface, and clone this fork using git to a working directory on the edge node. You now can copy the vimeospacelet.js you just fixed on top of the one that you downloaded from GitHub, and commit your changes back to GitHub. You can accomplish all this with the commands

cd your_workingdir
git clone https://github.com/your_own_username/vimeospacelet.git
cd vimeospacelet/application/www/
sudo su
cp /var/lib/spaceify/spacelets/spaceify/vimeospacelet/volume/application/www/vimeospacelet.js .
chown spaceify vimeospacelet.js
exit
cd ../..
git add application/www/vimeospacelet.js
git commit -m "Fixed the spacelet to work with the latest vimeo.com"
git push

When doing this, git might ask you to configure your email address and name into its configuration variables, but this is easily accomplished by following the instructions that git gives.

Finally, you can go return to your web browser, and make the pull request from your fork to the original author of vimeospacelet using the GitHub web interface. It is now up to him/her to accept the pull request and update the package on the Spaceify Package Manager.

Close
copyright © Spaceify.org 2014