Skip to content

PLOS/alm-report-lagotto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ALM Reports

Build Status Code Climate Test Coverage

How to start developing now?

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):

  1. Install Vagrant: https://www.vagrantup.com/downloads.html
  2. Install Virtualbox: https://www.virtualbox.org/wiki/Downloads
  3. Clone this repository git clone [email protected]:articlemetrics/alm-report.git
  4. 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:

ALM Reports screenshot

Developing using AWS/EC2

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 awsprovider:

vagrant up --provider=aws

Documentation

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.

Testing

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).

  1. 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

  2. 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

License

ALM Reports is released under the MIT License.