diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a6ab8b10..905501744 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/app/assets/javascripts/crops.js.erb b/app/assets/javascripts/crops.js.erb index 409e7a9f2..78a3a2222 100644 --- a/app/assets/javascripts/crops.js.erb +++ b/app/assets/javascripts/crops.js.erb @@ -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 © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', + attribution: 'Map data © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', maxZoom: 18 }).addTo(cropmap); var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20 }); diff --git a/app/assets/javascripts/members.js.erb b/app/assets/javascripts/members.js.erb index d7bb5020c..51a662758 100644 --- a/app/assets/javascripts/members.js.erb +++ b/app/assets/javascripts/members.js.erb @@ -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 © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', + attribution: 'Map data © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', maxZoom: 18 }).addTo(membermap); var marker = new L.Marker(new L.LatLng(member.latitude, member.longitude)); diff --git a/app/assets/javascripts/places.js.erb b/app/assets/javascripts/places.js.erb index ad8b76266..f0322b38b 100644 --- a/app/assets/javascripts/places.js.erb +++ b/app/assets/javascripts/places.js.erb @@ -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 © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', + attribution: 'Map data © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', maxZoom: 18 }).addTo(placesmap); markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20 }); diff --git a/app/helpers/crops_helper.rb b/app/helpers/crops_helper.rb index 86b83909f..5d5282921 100644 --- a/app/helpers/crops_helper.rb +++ b/app/helpers/crops_helper.rb @@ -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 diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml index 08487eff5..b7f6d5254 100644 --- a/app/views/crops/show.html.haml +++ b/app/views/crops/show.html.haml @@ -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 + diff --git a/app/views/crops/wrangle.html.haml b/app/views/crops/wrangle.html.haml index f8dd9ab76..1cb322645 100644 --- a/app/views/crops/wrangle.html.haml +++ b/app/views/crops/wrangle.html.haml @@ -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 diff --git a/app/views/devise/registrations/_edit_apps.html.haml b/app/views/devise/registrations/_edit_apps.html.haml index cd813558a..da6e88470 100644 --- a/app/views/devise/registrations/_edit_apps.html.haml +++ b/app/views/devise/registrations/_edit_apps.html.haml @@ -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" diff --git a/app/views/layouts/_meta.html.haml b/app/views/layouts/_meta.html.haml index bdba1c88f..110660a30 100644 --- a/app/views/layouts/_meta.html.haml +++ b/app/views/layouts/_meta.html.haml @@ -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" } diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 857ddeacc..0cfbdd58e 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -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 diff --git a/app/views/members/_contact.html.haml b/app/views/members/_contact.html.haml index 3eb55d73e..69e1f60b0 100644 --- a/app/views/members/_contact.html.haml +++ b/app/views/members/_contact.html.haml @@ -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 diff --git a/app/views/places/_map_attribution.html.haml b/app/views/places/_map_attribution.html.haml index 894c88f32..f6c2e2a28 100644 --- a/app/views/places/_map_attribution.html.haml +++ b/app/views/places/_map_attribution.html.haml @@ -1,6 +1,6 @@ Map data © -= 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 © -= link_to "CloudMade", "http://cloudmade.com" += link_to "CloudMade", "https://cloudmade.com" diff --git a/app/views/shared/_markdown_help.html.haml b/app/views/shared/_markdown_help.html.haml index 55fa128d3..90c1249cf 100644 --- a/app/views/shared/_markdown_help.html.haml +++ b/app/views/shared/_markdown_help.html.haml @@ -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/). diff --git a/spec/features/crops/crop_detail_page_spec.rb b/spec/features/crops/crop_detail_page_spec.rb index b94ebe107..2e1fec723 100644 --- a/spec/features/crops/crop_detail_page_spec.rb +++ b/spec/features/crops/crop_detail_page_spec.rb @@ -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 diff --git a/spec/features/members/profile_spec.rb b/spec/features/members/profile_spec.rb index 95d9aff6b..6b6ab0f94 100644 --- a/spec/features/members/profile_spec.rb +++ b/spec/features/members/profile_spec.rb @@ -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 diff --git a/spec/views/crops/wrangle.html.haml_spec.rb b/spec/views/crops/wrangle.html.haml_spec.rb index 8b9814140..1ae400e7e 100644 --- a/spec/views/crops/wrangle.html.haml_spec.rb +++ b/spec/views/crops/wrangle.html.haml_spec.rb @@ -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