Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Feat: GFW Assets - Moved version to an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo committed Apr 26, 2016
1 parent 905c04e commit 69e375e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ CODECLIMATE_REPO_TOKEN=c5c128fcb301371d4b89bec2df714028e0a75deb8d732f49f922626aa
LAYER_SPEC=layerspec_nuclear_hazard
FEEDBACK_MAIL=example@gfw-climate.com
CDB_API_HOST=https://wri-01.cartodb.com/api/v2/sql
ASSETS_VERSION=latest
```

### REDIS ###
Expand Down Expand Up @@ -60,7 +61,7 @@ redis-cli flushall
bundle install

### Install assets and front end dependencies: ###

bower install

### Run application: ###
Expand All @@ -71,43 +72,43 @@ redis-cli flushall

./start

Flush redis:
Flush redis:

./clean

## TEST ##

Run rspec:
Run rspec:
```ruby
bin/rspec
```
Run teaspoon:
Run teaspoon:
```ruby
rake teaspoon
```
Run all:
Run all:
```ruby
rake
```

## API ##

### SAMPLE ###

Getting a list of enabled countries

curl "http://localhost:5000/api/countries" -X GET \
-H "Accept: application/json; application/gfwc-v1+json" \
-H "Content-Type: application/json"

Getting a specific country

curl "http://localhost:5000/api/countries/aus" -X GET \
-H "Accept: application/json; application/gfwc-v1+json" \
-H "Content-Type: application/json"

### API DOCUMENTATION ###

For API documentation visit /api/docs

Generate the docs!
Expand Down
5 changes: 1 addition & 4 deletions app/views/shared/_gfw_assets.html.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
- if Rails.env.production?
script src="http://gfw-assets.s3.amazonaws.com/static/gfw-assets.latest.js" id="loader-gfw" data-current=".shape-climate"
- else
script src="http://gfw-assets.s3.amazonaws.com/static/gfw-assets.nightly.js" id="loader-gfw" data-current=".shape-climate"
script src="http://gfw-assets.s3.amazonaws.com/static/gfw-assets.#{ENV['ASSETS_VERSION']}.js" id="loader-gfw" data-current=".shape-climate"

0 comments on commit 69e375e

Please sign in to comment.