Skip to content

Commit

Permalink
Merge branch 'develop' into update_capybara-webkit
Browse files Browse the repository at this point in the history
  • Loading branch information
gsrohde committed Aug 8, 2019
2 parents e1976d2 + 8ac278c commit 62e888f
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 24 deletions.
30 changes: 21 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ For more information about this file see also [Keep a Changelog](http://keepacha

## [Unreleased]

### Added

- #643 : Moved `reindex.bety.sh` and `vacuum.bety.sh` scripts from PEcAn to BETY and provided access through entrypoint.

### Changed

- Documentation updates, now point to new [documentation location](https://pecanproject.github.io/bety-documentation/index.html)
- #652 : Better list of soil choices

### Fixed

- Updated GEM list to fix security fixes as recommended by dependbot on GitHub.


## [5.2.0] - 2019-03-11

### Added
Expand All @@ -19,7 +31,7 @@ For more information about this file see also [Keep a Changelog](http://keepacha

## [5.1.0] - 2019-01-14

### Fixes
### Fixed

- #611 : could not close alerts
- #585 : Pressing "Show" on the Covariates Edit page attempts an update
Expand All @@ -30,34 +42,34 @@ For more information about this file see also [Keep a Changelog](http://keepacha

## [5.0.5] - 2018-10-23

### Fixes
### Fixed

- #603 : Restores Rails route to make method completion work in Bulk Upload Wizard

## [5.0.4] - 2018-10-11

### Fixes
### Fixed

- #600 : Error when starting BETY as docker container due to frozen variable.

## [5.0.3] - 2018-09-28

### Fixes
### Fixed

- #593 : Replaces references to gitter with references to slack.
- #598 : Fixes issue in docker where the entrypoint referenced a wrong URL to download the initial schema from.
- #598 : Fixed issue in docker where the entrypoint referenced a wrong URL to download the initial schema from.

## [5.0.2] - 2018-08-09

### Fixes
### Fixed
- Update to sprockets gem

## [5.0.1] - 2018-08-08

### Fixes
- Fixes fuzzy matching used in search queries
### Fixed
- Fixed fuzzy matching used in search queries

## [5.0.0] - 2018-08-07

### Fixes
### Fixed
- Major upgrade to rails 5, make sure to read documentation on how to upgrade.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ GEM
xpath (3.0.0)
nokogiri (~> 1.8)
yajl-ruby (1.3.1)
yard (0.9.12)
yard (0.9.20)

PLATFORMS
ruby
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ docker run -e RAILS_RELATIVE_URL_ROOT="/bety" pecan/bety

## Documentation.

* Technical Documentation: https://pecan.gitbooks.io/betydb-documentation/content/
* Data Entry: https://pecan.gitbooks.io/betydbdoc-dataentry/content/
* Data Access: https://pecan.gitbooks.io/betydb-data-access/content/
* Technical Documentation: https://pecanproject.github.io/bety-documentation/technical/
* Data Entry: https://pecanproject.github.io/bety-documentation/dataentry/
* Data Access: https://pecan.gitbook.io/betydb-data-access/

2 changes: 1 addition & 1 deletion app/controllers/bulk_upload_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def store_trait_method_mapping_in_session
method_name: params["method_info"]["label"],
method_id: params["method_info"]["value"]
}
render(nothing: true)
render(body: nil)
end

# Step 1: Choose a file to upload.
Expand Down
13 changes: 12 additions & 1 deletion app/models/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def city_state

def sitename_state_country
output = ""

#city = city.chomp if !city.nil?
if !sitename.blank?
output += "#{sitename}"
Expand Down Expand Up @@ -262,6 +262,17 @@ def autocomplete_label
"#{sitename.squish} (#{city.squish}, #{!(state.nil? || state.empty?) ? " #{state.squish}," : ""} #{country.squish})"
end

### Class methods

def self.soil_classes

@soil_classes ||= ['clay', 'clay loam', 'loam', 'loamy sand', 'sand',
'sandy clay', 'sandy clay loam', 'sandy loam',
'silt', 'silt loam', 'silty clay', 'silty clay loam',
'peat', 'bedrock', 'other'].freeze
end


private

## Validation methods
Expand Down
8 changes: 4 additions & 4 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@

<li class="menu-docs"> <a>Docs</a>
<ul class="sub-menu">
<li><%= link_to "Data Entry", "https://pecanproject.github.io/bety-documentation/dataentry/", :target =>"_blank" %></li>
<li><%= link_to "Data Access", "https://pecan.gitbooks.io/betydb-data-access/content/", :target =>"_blank" %>></li>
<li><%= link_to "Implementation", "https://pecanproject.github.io/bety-documentation/technical", :target =>"_blank" %></li>
<li><%= link_to "Data Entry", "https://pecanproject.github.io/bety-documentation/dataentry", :target =>"_blank" %></li>
<li><%= link_to "Data Access", "https://pecan.gitbook.io/betydb-data-access/", :target =>"_blank" %>></li>
<li><%= link_to "Implementation", "https://pecanproject.github.io/bety-documentation/technical/", :target =>"_blank" %></li>
<li><%= link_to "Schema", schemas_path %>></li>
</ul>
</li>
Expand Down Expand Up @@ -292,7 +292,7 @@
<h3><strong>BETY</strong>db</h3>
<ul class="unstyled">
<li><%= link_to "Homepage", root_path %></li>
<li><%= link_to "Documentation", "https://pecan.gitbooks.io/betydb-documentation/content/", :target =>"_blank" %></li>
<li><%= link_to "Documentation", "https://pecanproject.github.io/bety-documentation/", :target =>"_blank" %></li>
<% if CONFIG[:show_crop_map_links] %>
<li><%= link_to "Maps & Data", maps_path %></li>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sites/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
<%= f.label :lon %>
<%= geometry_aware_text_field(f, :lon, { class: "input-full" }) %>
<%= f.label :soil %>
<%= f.select :soil, %w(sandloamy sandsandy loamsilt loamloamsandy clay loamsilty clay loamclay loamsandy claysilty clayclaypeat), { :include_blank => true }, :class => "input-full" %>
<%= f.select :soil, Site.soil_classes, { :include_blank => true }, :class => "input-full" %>

<div class="two columns alpha">
<%= f.label :clay_pct, "% Clay" %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sites/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
<%= f.text_field :lon, :class => "input-full" %>
<br /><br />
<%= f.label :soil %>
<%= f.select :soil, %w(sandloamy sandsandy loamsilt loamloamsandy clay loamsilty clay loamclay loamsandy claysilty clayclaypeat), { :include_blank => true }, :class => "input-full" %>
<%= f.select :soil, Site.soil_classes, { :include_blank => true }, :class => "input-full" %>

<div class="two columns alpha">
<%= f.label :clay_pct, "% Clay" %>
Expand Down
2 changes: 1 addition & 1 deletion script/db_maintenance/README
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This script was motivated by the need to repair a database where the id numbers
for new rows were allocated in the wrong range—to be specific, they were
allocated starting at 99000000001 rather than starting at the number
corresponding to the id number of the machine where the database resides. (See
https://pecan.gitbook.io/betydb-documentation/betydb-system-administration/distributed-betydb#primary-key-allocations
https://pecanproject.github.io/bety-documentation/technical/distributed-instances-of-betydb.html
for a list of BETYdb instances and their corresponding primary key allocations.)

When id numbers have been mis-allocated, three things must be done to repair the
Expand Down
2 changes: 1 addition & 1 deletion script/load.bety.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ ID_RANGE=1000000000
# before anything is done, check to make sure database exists
if ! psql ${PG_OPT} ${PG_USER} -lqt | cut -d \| -f 1 | grep -w "^ *${DATABASE} *$" > /dev/null ; then
echo "Database ${DATABASE} does not exist, please create it:"
echo "(see https://pecan.gitbooks.io/betydb-documentation/content/installing_betydb.html)"
echo "(see https://pecanproject.github.io/bety-documentation/technical/deploying-a-production-copy-of-the-betydb-web-application.html)"
echo " psql ${PG_OPT} ${PG_USER} -c \"CREATE ROLE ${OWNER} WITH LOGIN CREATEDB NOSUPERUSER NOCREATEROLE PASSWORD 'password'\""
echo " psql ${PG_OPT} ${PG_USER} -c \"CREATE DATABASE ${DATABASE} WITH OWNER ${OWNER}\""
exit 1
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
require 'capybara/rspec'
rescue => e
puts e.message
puts "Go to https://pecan.gitbooks.io/betydb-documentation/content/automated_tests.html for instructions on setting up the testing environment."
puts "Go to https://pecanproject.github.io/bety-documentation/technical/automated-tests.html for instructions on setting up the testing environment."
exit
end

Expand Down

0 comments on commit 62e888f

Please sign in to comment.