Skip to content

Commit

Permalink
Merge branch 'release-0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomarrocoli committed Mar 13, 2023
2 parents db9e8f2 + 57b2b80 commit 82370aa
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 0.4.2
**Add new fields to Countries JSON**
* Add :oecm_polygon_count, :oecm_point_count, :protected_area_polygon_count, :protected_area_point_count
* Add Dockerfile
* Update documentation

### 0.4.1
**Add new fields to Countries JSON**
* Add :percentage_oecms_pa_marine_cover, :oecms_pa_land_area, :oecms_pa_marine_area, :percentage_oecms_pa_land_cover
Expand Down
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ruby:2.3.0
# Install node for asset building
RUN apt-get update -qq && apt-get install -y --force-yes build-essential libpq-dev nodejs
# install npm
RUN apt-get install -y --force-yes -qq npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
# install bower
RUN npm install --global bower
RUN mkdir /ProtectedPlanetApi
WORKDIR /ProtectedPlanetApi
ADD Gemfile /ProtectedPlanetApi/Gemfile
ADD Gemfile.lock /ProtectedPlanetApi/Gemfile.lock
ADD config.ru /ProtectedPlanetApi/config.ru
ADD bower.json /ProtectedPlanetApi/bower.json
RUN gem install bundler -v 1.12.5 && bundle _1.12.5_ install
RUN bower install --allow-root
COPY . /ProtectedPlanetApi
EXPOSE 9292
CMD ["rackup"]
2 changes: 2 additions & 0 deletions api/v3/views/country.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ if @current_user.access_to?(Country, :country_statistic)
:land_area, :percentage_pa_land_cover,
:percentage_pa_marine_cover, :marine_area,
:polygons_count, :points_count,
:oecm_polygon_count, :oecm_point_count,
:protected_area_polygon_count, :protected_area_point_count,
:percentage_oecms_pa_marine_cover, :oecms_pa_land_area,
:oecms_pa_marine_area, :percentage_oecms_pa_land_cover
end
Expand Down
3 changes: 1 addition & 2 deletions config/secrets.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ production:
<<: *mailer
notifications_recipients:
- [email protected]
- [email protected]
- [email protected]
- Sara.Pruckner@unep-wcmc.org
- alanah.lewis@unep-wcmc.org
subject_prefix: "Protected Planet API - "
2 changes: 1 addition & 1 deletion db
Submodule db updated 773 files
12 changes: 12 additions & 0 deletions web/views/documentation/countries.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ Sample response:
"marine_area": 1829405.068391,
"polygons_count": 16,
"points_count": 16,
"oecm_polygon_count": 42,
"oecm_point_count": 136,
"protected_area_polygon_count": 265,
"protected_area_point_count": 8,
"percentage_oecms_pa_marine_cover": 3.628933257,
"oecms_pa_land_area": 51650.29769,
"oecms_pa_marine_area": 66591.94832,
Expand Down Expand Up @@ -130,6 +134,10 @@ Sample response:
"marine_area": null,
"polygons_count": 0,
"points_count": 2
"oecm_polygon_count": 0,
"oecm_point_count": 0,
"protected_area_polygon_count": 10772,
"protected_area_point_count": 2
},
"pame_statistics": {
"assessments": 20,
Expand Down Expand Up @@ -235,6 +243,10 @@ Sample response:
"marine_area": 10201208.33913,
"polygons_count": 1,
"points_count": 37,
"oecm_polygon_count": 0,
"oecm_point_count": 0,
"protected_area_polygon_count": 42770,
"protected_area_point_count": 56,
"percentage_oecms_pa_marine_cover": 3.628933257,
"oecms_pa_land_area": 51650.29769,
"oecms_pa_marine_area": 66591.94832,
Expand Down

0 comments on commit 82370aa

Please sign in to comment.