ALM Reports
uses Vagrant and Virtualbox for setting up the development environment. To start developing now on your local machine (Mac OS X, Linux or Windows):
- Install Vagrant: https://www.vagrantup.com/downloads.html
- Install Virtualbox: https://www.virtualbox.org/wiki/Downloads
- Clone this repository
git clone [email protected]:articlemetrics/alm-report.git
- Cd into it and run
vagrant up
Once the setup is complete (it might take up to 20 minutes), you'll be able to open up a browser and navigate to http://10.2.2.2, and you should see this screen:
You can also use a VM from AWS/EC2 to develop on, by first setting the relevant AWS credentials in Vagrantfile
:
aws.access_key_id = "EXAMPLE"
aws.secret_access_key = "EXAMPLE"
aws.keypair_name = "EXAMPLE"
aws.security_groups = ["EXAMPLE"]
override.ssh.private_key_path = "~/path/to/ec2/key.pem"
And then specifying the aws
provider:
vagrant up --provider=aws
Detailed instructions on how to start developing are here.
When you're ready to deploy ALM Reports
, take a look at the in-depth deployment guide.
In case you would like to setup the dependencies manually (for example for non-Vagrant local development, or for servers not provisioned with Chef), check out the manual installation guide.
There is a little bit of setup required to run the rspec tests. To run them, first create a .env file in the root of the checkout. Make sure that it meets the conditions specified below. There is a sample testing .env file in root of the repo (testing.dotenv).
-
The SOLR_URL must point to the url below; this url is used in VCR requests.
SOLR_URL=http://solr-mega-dev.soma.plos.org/solr/journals_dev/select
-
Some of the tests query the ALM Reports instance specified in the .env to lookup geocode data. Some of the tests will fail if geocode table hasn't been populated (ex: geocode_spec, search_result_spec, ...)
Assuming the above conditions are met, running the tests is pretty straightforward. Note that these were run using Ruby 2.2.2
$ bundle exec rspec spec
82 examples, 0 failures
ALM Reports is released under the MIT License.