Merge remote-tracking branch 'upstream/dev' into badges

This commit is contained in:
Brenda Wallace
2019-07-11 08:49:41 +12:00
16 changed files with 33 additions and 40 deletions

View File

@@ -13,10 +13,6 @@ checks before being merged. You can run tests locally as follows:
- `rails spec` to run all Ruby tests
- `rails spec:models` to run Ruby model tests (or `rails spec:views` for view tests, etc)
- `rails static` to run all static checks (code style, unfixed Git conflicts, etc)
- `rails jasmine:ci` to run JavaScript unit tests in headless mode
- `rails jasmine` to start a server for running JavaScript unit tests in a
browser (eg for debugging). Point your browser at http://localhost:8888 to
run the tests.
- `rspec ./spec/path/to/my_spec.rb` to run all Ruby tests in the file `my_spec.rb`
- `rspec ./spec/path/to/my_spec.rb:45` to run the Ruby test starting on line 45 of
`my_spec.rb`. RSpec will output a list of command-lines in this form for all

View File

@@ -1,10 +1,10 @@
function showCropMap(cropmap) {
var mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
var mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
var mapbox_base_url = "http://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
var mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
L.tileLayer(mapbox_base_url, {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors under <a href="http://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="http://mapbox.com">Mapbox</a>',
attribution: 'Map data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="https://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(cropmap);
var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20 });

View File

@@ -1,7 +1,7 @@
if (document.getElementById("membermap") !== null) {
var mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
var mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
var mapbox_base_url = "http://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
var mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
L.Icon.Default.imagePath = '/assets'
@@ -12,7 +12,7 @@ if (document.getElementById("membermap") !== null) {
var membermap = L.map('membermap').setView([member.latitude, member.longitude], 4);
L.tileLayer(mapbox_base_url, {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors under <a href="http://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="http://mapbox.com">Mapbox</a>',
attribution: 'Map data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="https://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(membermap);
var marker = new L.Marker(new L.LatLng(member.latitude, member.longitude));

View File

@@ -2,8 +2,8 @@ if (document.getElementById("placesmap") !== null) {
places_base_path = "/places";
mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
mapbox_base_url = "http://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
nominatim_base_url = 'http://nominatim.openstreetmap.org/search/';
mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
nominatim_base_url = 'https://nominatim.openstreetmap.org/search/';
nominatim_user_agent_email = "<%= Rails.env == 'test' ? 0 : Rails.application.config.user_agent_email %>";
L.Icon.Default.imagePath = '/assets'
@@ -29,7 +29,7 @@ if (document.getElementById("placesmap") !== null) {
function showMap(placesmap) {
L.tileLayer(mapbox_base_url, {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors under <a href="http://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="http://mapbox.com">Mapbox</a>',
attribution: 'Map data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery &copy; <a href="https://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(placesmap);
markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20 });

View File

@@ -18,6 +18,6 @@ module CropsHelper
end
def crop_ebay_seeds_url(crop)
"http://rover.ebay.com/rover/1/705-53470-19255-0/1?icep_ff3=9&pub=5575213277&toolid=10001&campid=5337940151&customid=&icep_uq=#{CGI.escape crop.name}&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=181003&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229515&kwid=902099&mtid=824&kw=lg" # rubocop:disable Metrics/LineLength
"https://rover.ebay.com/rover/1/705-53470-19255-0/1?icep_ff3=9&pub=5575213277&toolid=10001&campid=5337940151&customid=&icep_uq=#{CGI.escape crop.name}&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=181003&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229515&kwid=902099&mtid=824&kw=lg" # rubocop:disable Metrics/LineLength
end
end

View File

@@ -130,7 +130,7 @@
= icon 'fas', 'external-link-alt'
OpenFarm - Growing guide
%li.list-group-item
= link_to "http://www.gardenate.com/plant/#{CGI.escape @crop.name}",
= link_to "https://www.gardenate.com/plant/#{CGI.escape @crop.name}",
target: "_blank",
class: 'card-link',
rel: "noopener noreferrer" do
@@ -138,9 +138,18 @@
Gardenate - Planting reminders
- if current_member && current_member.location
%li.list-group-item
= link_to 'http://www.google.com/search?q=' + CGI.escape(['Growing', @crop.name, current_member.location].join(' ')),
= link_to 'https://www.google.com/search?q=' + CGI.escape(['Growing', @crop.name, current_member.location].join(' ')),
target: "_blank",
class: 'card-link',
rel: "noopener noreferrer" do
= icon 'fas', 'external-link-alt'
Google
%li.list-group-item
= link_to "https://wikihow.com/wikiHowTo?search=#{CGI.escape "grow #{@crop.name}" }",
target: "_blank",
class: 'card-link',
rel: "noopener noreferrer" do
= icon 'fas', 'external-link-alt'
Wikihow instructions

View File

@@ -2,9 +2,6 @@
%ul
%li= link_to "Requests for new crops", 'http://growstuff.org/posts/skud-20130319-requests-for-new-crops'
%li= link_to "Crop wrangler guidelines", "http://wiki.growstuff.org/index.php/Crop_wrangling"
%li= link_to "crop-wranglers mailing list", "http://lists.growstuff.org/listinfo/crop-wranglers"
%li= link_to "Full crop hierarchy", hierarchy_crops_path
%li= link_to "Add Crop", new_crop_path

View File

@@ -9,7 +9,7 @@
= image_tag "twitter_32.png", size: "32x32", alt: 'Twitter logo'
- if @twitter_auth
You are connected to Twitter as
= link_to @twitter_auth.name, "http://twitter.com/#{@twitter_auth.name}"
= link_to @twitter_auth.name, "https://twitter.com/#{@twitter_auth.name}"
= link_to "Disconnect", @twitter_auth,
confirm: "Are you sure you want to remove this connection?",
method: :delete, class: "remove btn btn-danger"
@@ -22,7 +22,7 @@
= image_tag "flickr_32.png", size: "32x32", alt: 'Flickr logo'
- if @flickr_auth
You are connected to Flickr as
= link_to @flickr_auth.name, "http://flickr.com/photos/#{@flickr_auth.uid}"
= link_to @flickr_auth.name, "https://flickr.com/photos/#{@flickr_auth.uid}"
= link_to "Disconnect", @flickr_auth,
confirm: "Are you sure you want to remove this connection?",
method: :delete, class: "remove btn btn-danger"
@@ -36,7 +36,7 @@
- if @facebook_auth
You are connected to Facebook as
= succeed "." do
= link_to @facebook_auth.name, "http://facebook.com/profile/#{@facebook_auth.uid}"
= link_to @facebook_auth.name, "https://facebook.com/profile/#{@facebook_auth.uid}"
= link_to "Disconnect", @facebook_auth,
confirm: "Are you sure you want to remove this connection?",
method: :delete, class: "remove btn btn-danger"

View File

@@ -28,9 +28,6 @@
%title
= content_for?(:title) ? yield(:title) + " - #{ENV['GROWSTUFF_SITE_NAME']} " : ENV['GROWSTUFF_SITE_NAME']
= csrf_meta_tags
/ Le HTML5 shim, for IE6-8 support of HTML elements
/[if lt IE 9]
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
= stylesheet_link_tag "application", media: "all"
%link{ href: "/growstuff-apple-touch-icon-precomposed.png", rel: "apple-touch-icon-precomposed" }

View File

@@ -1,5 +1,5 @@
!!! 5
%html{ lang: "en", prefix: "og: http://ogp.me/ns#" }
%html{ lang: "en", prefix: "og: https://ogp.me/ns#" }
= yield :scripts
= render "layouts/meta"
%body

View File

@@ -4,17 +4,17 @@
- if twitter_auth
%p
= image_tag "twitter_32.png", size: "32x32", alt: 'Twitter logo'
= link_to twitter_auth.name, "http://twitter.com/#{twitter_auth.name}"
= link_to twitter_auth.name, "https://twitter.com/#{twitter_auth.name}"
- if flickr_auth
%p
= image_tag "flickr_32.png", size: "32x32", alt: 'Flickr logo'
= link_to flickr_auth.name, "http://flickr.com/photos/#{flickr_auth.uid}"
= link_to flickr_auth.name, "https://flickr.com/photos/#{flickr_auth.uid}"
- if facebook_auth
%p
= image_tag "facebook_32.png", size: "32x32", alt: 'Facebook logo'
= link_to facebook_auth.name, "http://facebook.com/profile/#{facebook_auth.uid}"
= link_to facebook_auth.name, "https://facebook.com/profile/#{facebook_auth.uid}"
- if member.show_email
%p

View File

@@ -1,6 +1,6 @@
Map data &copy;
= link_to "OpenStreetMap", "http://openstreetmap.org"
= link_to "OpenStreetMap", "https://openstreetmap.org"
contributors under
= link_to "ODbL", "http://www.openstreetmap.org/copyright"
= link_to "ODbL", "https://www.openstreetmap.org/copyright"
| Imagery &copy;
= link_to "CloudMade", "http://cloudmade.com"
= link_to "CloudMade", "https://cloudmade.com"

View File

@@ -1,5 +1,5 @@
You can use
= link_to 'Markdown', 'http://daringfireball.net/projects/markdown/syntax/'
= link_to 'Markdown', 'https://daringfireball.net/projects/markdown/syntax/'
to format your text.
%br/
For instance, *italic*, **bold**, or a link [like this](http://to.some.site.com/).

View File

@@ -72,7 +72,7 @@ describe "crop detail page", js: true do
it "has a link to gardenate" do
expect(page).to have_link "Gardenate - Planting reminders",
href: "http://www.gardenate.com/plant/#{CGI.escape crop.name}"
href: "https://www.gardenate.com/plant/#{CGI.escape crop.name}"
end
end
end

View File

@@ -74,13 +74,13 @@ describe "member profile", js: true do
it "twitter link" do
twitter_auth = create :authentication, member: member
visit member_path(member)
expect(page).to have_link twitter_auth.name, href: "http://twitter.com/#{twitter_auth.name}"
expect(page).to have_link twitter_auth.name, href: "https://twitter.com/#{twitter_auth.name}"
end
it "flickr link" do
flickr_auth = create :flickr_authentication, member: member
visit member_path(member)
expect(page).to have_link flickr_auth.name, href: "http://flickr.com/photos/#{flickr_auth.uid}"
expect(page).to have_link flickr_auth.name, href: "https://flickr.com/photos/#{flickr_auth.uid}"
end
describe 'user role labels' do

View File

@@ -16,12 +16,6 @@ describe "crops/wrangle" do
assign(:crop_wranglers, Role.crop_wranglers)
end
it 'contains handy links for wranglers' do
render
rendered.should have_content "Crop wrangler guidelines"
rendered.should have_content "mailing list"
end
it 'has a link to add a crop' do
render
assert_select "a", href: new_crop_path