From a122613ba3d912222a91e1e71005b16307e5e417 Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 7 Nov 2012 12:45:35 +1100 Subject: [PATCH 1/5] added scientific names table/model/etc --- .../javascripts/scientific_names.js.coffee | 3 + .../scientific_names_controller.rb | 83 +++++++++ app/helpers/scientific_names_helper.rb | 2 + app/models/crop.rb | 1 + app/models/scientific_name.rb | 4 + app/views/scientific_names/_form.html.haml | 16 ++ app/views/scientific_names/edit.html.haml | 7 + app/views/scientific_names/index.html.haml | 21 +++ app/views/scientific_names/new.html.haml | 5 + app/views/scientific_names/show.html.haml | 12 ++ config/routes.rb | 2 + db/migrate/20121001212604_create_crops.rb | 1 - .../20121107012827_create_scientific_names.rb | 10 ++ db/schema.rb | 9 +- .../scientific_names_controller_spec.rb | 164 ++++++++++++++++++ spec/helpers/scientific_names_helper_spec.rb | 15 ++ spec/models/scientific_name_spec.rb | 5 + spec/requests/scientific_names_spec.rb | 11 ++ spec/routing/scientific_names_routing_spec.rb | 35 ++++ .../scientific_names/edit.html.haml_spec.rb | 20 +++ .../scientific_names/index.html.haml_spec.rb | 23 +++ .../scientific_names/new.html.haml_spec.rb | 20 +++ .../scientific_names/show.html.haml_spec.rb | 17 ++ 23 files changed, 484 insertions(+), 2 deletions(-) create mode 100644 app/assets/javascripts/scientific_names.js.coffee create mode 100644 app/controllers/scientific_names_controller.rb create mode 100644 app/helpers/scientific_names_helper.rb create mode 100644 app/models/scientific_name.rb create mode 100644 app/views/scientific_names/_form.html.haml create mode 100644 app/views/scientific_names/edit.html.haml create mode 100644 app/views/scientific_names/index.html.haml create mode 100644 app/views/scientific_names/new.html.haml create mode 100644 app/views/scientific_names/show.html.haml create mode 100644 db/migrate/20121107012827_create_scientific_names.rb create mode 100644 spec/controllers/scientific_names_controller_spec.rb create mode 100644 spec/helpers/scientific_names_helper_spec.rb create mode 100644 spec/models/scientific_name_spec.rb create mode 100644 spec/requests/scientific_names_spec.rb create mode 100644 spec/routing/scientific_names_routing_spec.rb create mode 100644 spec/views/scientific_names/edit.html.haml_spec.rb create mode 100644 spec/views/scientific_names/index.html.haml_spec.rb create mode 100644 spec/views/scientific_names/new.html.haml_spec.rb create mode 100644 spec/views/scientific_names/show.html.haml_spec.rb diff --git a/app/assets/javascripts/scientific_names.js.coffee b/app/assets/javascripts/scientific_names.js.coffee new file mode 100644 index 000000000..761567942 --- /dev/null +++ b/app/assets/javascripts/scientific_names.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/controllers/scientific_names_controller.rb b/app/controllers/scientific_names_controller.rb new file mode 100644 index 000000000..4c1e32adc --- /dev/null +++ b/app/controllers/scientific_names_controller.rb @@ -0,0 +1,83 @@ +class ScientificNamesController < ApplicationController + # GET /scientific_names + # GET /scientific_names.json + def index + @scientific_names = ScientificName.all + + respond_to do |format| + format.html # index.html.erb + format.json { render json: @scientific_names } + end + end + + # GET /scientific_names/1 + # GET /scientific_names/1.json + def show + @scientific_name = ScientificName.find(params[:id]) + + respond_to do |format| + format.html # show.html.erb + format.json { render json: @scientific_name } + end + end + + # GET /scientific_names/new + # GET /scientific_names/new.json + def new + @scientific_name = ScientificName.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @scientific_name } + end + end + + # GET /scientific_names/1/edit + def edit + @scientific_name = ScientificName.find(params[:id]) + end + + # POST /scientific_names + # POST /scientific_names.json + def create + @scientific_name = ScientificName.new(params[:scientific_name]) + + respond_to do |format| + if @scientific_name.save + format.html { redirect_to @scientific_name, notice: 'Scientific name was successfully created.' } + format.json { render json: @scientific_name, status: :created, location: @scientific_name } + else + format.html { render action: "new" } + format.json { render json: @scientific_name.errors, status: :unprocessable_entity } + end + end + end + + # PUT /scientific_names/1 + # PUT /scientific_names/1.json + def update + @scientific_name = ScientificName.find(params[:id]) + + respond_to do |format| + if @scientific_name.update_attributes(params[:scientific_name]) + format.html { redirect_to @scientific_name, notice: 'Scientific name was successfully updated.' } + format.json { head :no_content } + else + format.html { render action: "edit" } + format.json { render json: @scientific_name.errors, status: :unprocessable_entity } + end + end + end + + # DELETE /scientific_names/1 + # DELETE /scientific_names/1.json + def destroy + @scientific_name = ScientificName.find(params[:id]) + @scientific_name.destroy + + respond_to do |format| + format.html { redirect_to scientific_names_url } + format.json { head :no_content } + end + end +end diff --git a/app/helpers/scientific_names_helper.rb b/app/helpers/scientific_names_helper.rb new file mode 100644 index 000000000..3b1a12371 --- /dev/null +++ b/app/helpers/scientific_names_helper.rb @@ -0,0 +1,2 @@ +module ScientificNamesHelper +end diff --git a/app/models/crop.rb b/app/models/crop.rb index add19073c..9efd7b272 100644 --- a/app/models/crop.rb +++ b/app/models/crop.rb @@ -2,4 +2,5 @@ class Crop < ActiveRecord::Base extend FriendlyId friendly_id :system_name, use: :slugged attr_accessible :en_wikipedia_url, :system_name + has_many :scientific_names end diff --git a/app/models/scientific_name.rb b/app/models/scientific_name.rb new file mode 100644 index 000000000..919b0639e --- /dev/null +++ b/app/models/scientific_name.rb @@ -0,0 +1,4 @@ +class ScientificName < ActiveRecord::Base + attr_accessible :crop_id, :scientific_name + belongs_to :crop +end diff --git a/app/views/scientific_names/_form.html.haml b/app/views/scientific_names/_form.html.haml new file mode 100644 index 000000000..d2389e58d --- /dev/null +++ b/app/views/scientific_names/_form.html.haml @@ -0,0 +1,16 @@ += form_for @scientific_name do |f| + - if @scientific_name.errors.any? + #error_explanation + %h2= "#{pluralize(@scientific_name.errors.count, "error")} prohibited this scientific_name from being saved:" + %ul + - @scientific_name.errors.full_messages.each do |msg| + %li= msg + + .field + = f.label :scientific_name + = f.text_field :scientific_name + .field + = f.label :crop_id + = f.number_field :crop_id + .actions + = f.submit 'Save' diff --git a/app/views/scientific_names/edit.html.haml b/app/views/scientific_names/edit.html.haml new file mode 100644 index 000000000..b4c9bdb46 --- /dev/null +++ b/app/views/scientific_names/edit.html.haml @@ -0,0 +1,7 @@ +%h1 Editing scientific_name + += render 'form' + += link_to 'Show', @scientific_name +\| += link_to 'Back', scientific_names_path diff --git a/app/views/scientific_names/index.html.haml b/app/views/scientific_names/index.html.haml new file mode 100644 index 000000000..7e24fd4c2 --- /dev/null +++ b/app/views/scientific_names/index.html.haml @@ -0,0 +1,21 @@ +%h1 Listing scientific_names + +%table + %tr + %th Scientific name + %th Crop + %th + %th + %th + + - @scientific_names.each do |scientific_name| + %tr + %td= scientific_name.scientific_name + %td= scientific_name.crop_id + %td= link_to 'Show', scientific_name + %td= link_to 'Edit', edit_scientific_name_path(scientific_name) + %td= link_to 'Destroy', scientific_name, method: :delete, data: { confirm: 'Are you sure?' } + +%br + += link_to 'New Scientific name', new_scientific_name_path diff --git a/app/views/scientific_names/new.html.haml b/app/views/scientific_names/new.html.haml new file mode 100644 index 000000000..88451a0c0 --- /dev/null +++ b/app/views/scientific_names/new.html.haml @@ -0,0 +1,5 @@ +%h1 New scientific_name + += render 'form' + += link_to 'Back', scientific_names_path diff --git a/app/views/scientific_names/show.html.haml b/app/views/scientific_names/show.html.haml new file mode 100644 index 000000000..891bd52f6 --- /dev/null +++ b/app/views/scientific_names/show.html.haml @@ -0,0 +1,12 @@ +%p#notice= notice + +%p + %b Scientific name: + = @scientific_name.scientific_name +%p + %b Crop: + = @scientific_name.crop_id + += link_to 'Edit', edit_scientific_name_path(@scientific_name) +\| += link_to 'Back', scientific_names_path diff --git a/config/routes.rb b/config/routes.rb index 902d20e0c..2d2d7204c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,6 @@ Growstuff::Application.routes.draw do + resources :scientific_names + resources :crops, :members devise_for :users diff --git a/db/migrate/20121001212604_create_crops.rb b/db/migrate/20121001212604_create_crops.rb index 7364cd199..eb958aa04 100644 --- a/db/migrate/20121001212604_create_crops.rb +++ b/db/migrate/20121001212604_create_crops.rb @@ -3,7 +3,6 @@ class CreateCrops < ActiveRecord::Migration create_table :crops do |t| t.string :system_name t.string :en_wikipedia_url - t.timestamps end end diff --git a/db/migrate/20121107012827_create_scientific_names.rb b/db/migrate/20121107012827_create_scientific_names.rb new file mode 100644 index 000000000..4651a5b91 --- /dev/null +++ b/db/migrate/20121107012827_create_scientific_names.rb @@ -0,0 +1,10 @@ +class CreateScientificNames < ActiveRecord::Migration + def change + create_table :scientific_names do |t| + t.string :scientific_name, :null => false + t.integer :crop_id, :null => false + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index b3037477b..9ebf0c71c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20121106101936) do +ActiveRecord::Schema.define(:version => 20121107012827) do create_table "crops", :force => true do |t| t.string "system_name", :null => false @@ -24,6 +24,13 @@ ActiveRecord::Schema.define(:version => 20121106101936) do add_index "crops", ["slug"], :name => "index_crops_on_slug", :unique => true add_index "crops", ["system_name"], :name => "index_crops_on_system_name" + create_table "scientific_names", :force => true do |t| + t.string "scientific_name", :null => false + t.integer "crop_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "users", :force => true do |t| t.string "email", :default => "", :null => false t.string "encrypted_password", :default => "", :null => false diff --git a/spec/controllers/scientific_names_controller_spec.rb b/spec/controllers/scientific_names_controller_spec.rb new file mode 100644 index 000000000..4c4abceb1 --- /dev/null +++ b/spec/controllers/scientific_names_controller_spec.rb @@ -0,0 +1,164 @@ +require 'spec_helper' + +# This spec was generated by rspec-rails when you ran the scaffold generator. +# It demonstrates how one might use RSpec to specify the controller code that +# was generated by Rails when you ran the scaffold generator. +# +# It assumes that the implementation code is generated by the rails scaffold +# generator. If you are using any extension libraries to generate different +# controller code, this generated spec may or may not pass. +# +# It only uses APIs available in rails and/or rspec-rails. There are a number +# of tools you can use to make these specs even more expressive, but we're +# sticking to rails and rspec-rails APIs to keep things simple and stable. +# +# Compared to earlier versions of this generator, there is very limited use of +# stubs and message expectations in this spec. Stubs are only used when there +# is no simpler way to get a handle on the object needed for the example. +# Message expectations are only used when there is no simpler way to specify +# that an instance is receiving a specific message. + +describe ScientificNamesController do + + # This should return the minimal set of attributes required to create a valid + # ScientificName. As you add validations to ScientificName, be sure to + # update the return value of this method accordingly. + def valid_attributes + { :scientific_name => 'Solanum lycopersicum', :crop_id => 1 } + end + + # This should return the minimal set of values that should be in the session + # in order to pass any filters (e.g. authentication) defined in + # ScientificNamesController. Be sure to keep this updated too. + def valid_session + {} + end + + describe "GET index" do + it "assigns all scientific_names as @scientific_names" do + scientific_name = ScientificName.create! valid_attributes + get :index, {}, valid_session + assigns(:scientific_names).should eq([scientific_name]) + end + end + + describe "GET show" do + it "assigns the requested scientific_name as @scientific_name" do + scientific_name = ScientificName.create! valid_attributes + get :show, {:id => scientific_name.to_param}, valid_session + assigns(:scientific_name).should eq(scientific_name) + end + end + + describe "GET new" do + it "assigns a new scientific_name as @scientific_name" do + get :new, {}, valid_session + assigns(:scientific_name).should be_a_new(ScientificName) + end + end + + describe "GET edit" do + it "assigns the requested scientific_name as @scientific_name" do + scientific_name = ScientificName.create! valid_attributes + get :edit, {:id => scientific_name.to_param}, valid_session + assigns(:scientific_name).should eq(scientific_name) + end + end + + describe "POST create" do + describe "with valid params" do + it "creates a new ScientificName" do + expect { + post :create, {:scientific_name => valid_attributes}, valid_session + }.to change(ScientificName, :count).by(1) + end + + it "assigns a newly created scientific_name as @scientific_name" do + post :create, {:scientific_name => valid_attributes}, valid_session + assigns(:scientific_name).should be_a(ScientificName) + assigns(:scientific_name).should be_persisted + end + + it "redirects to the created scientific_name" do + post :create, {:scientific_name => valid_attributes}, valid_session + response.should redirect_to(ScientificName.last) + end + end + + describe "with invalid params" do + it "assigns a newly created but unsaved scientific_name as @scientific_name" do + # Trigger the behavior that occurs when invalid params are submitted + ScientificName.any_instance.stub(:save).and_return(false) + post :create, {:scientific_name => {}}, valid_session + assigns(:scientific_name).should be_a_new(ScientificName) + end + + it "re-renders the 'new' template" do + # Trigger the behavior that occurs when invalid params are submitted + ScientificName.any_instance.stub(:save).and_return(false) + post :create, {:scientific_name => {}}, valid_session + response.should render_template("new") + end + end + end + + describe "PUT update" do + describe "with valid params" do + it "updates the requested scientific_name" do + scientific_name = ScientificName.create! valid_attributes + # Assuming there are no other scientific_names in the database, this + # specifies that the ScientificName created on the previous line + # receives the :update_attributes message with whatever params are + # submitted in the request. + ScientificName.any_instance.should_receive(:update_attributes).with({'these' => 'params'}) + put :update, {:id => scientific_name.to_param, :scientific_name => {'these' => 'params'}}, valid_session + end + + it "assigns the requested scientific_name as @scientific_name" do + scientific_name = ScientificName.create! valid_attributes + put :update, {:id => scientific_name.to_param, :scientific_name => valid_attributes}, valid_session + assigns(:scientific_name).should eq(scientific_name) + end + + it "redirects to the scientific_name" do + scientific_name = ScientificName.create! valid_attributes + put :update, {:id => scientific_name.to_param, :scientific_name => valid_attributes}, valid_session + response.should redirect_to(scientific_name) + end + end + + describe "with invalid params" do + it "assigns the scientific_name as @scientific_name" do + scientific_name = ScientificName.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + ScientificName.any_instance.stub(:save).and_return(false) + put :update, {:id => scientific_name.to_param, :scientific_name => {}}, valid_session + assigns(:scientific_name).should eq(scientific_name) + end + + it "re-renders the 'edit' template" do + scientific_name = ScientificName.create! valid_attributes + # Trigger the behavior that occurs when invalid params are submitted + ScientificName.any_instance.stub(:save).and_return(false) + put :update, {:id => scientific_name.to_param, :scientific_name => {}}, valid_session + response.should render_template("edit") + end + end + end + + describe "DELETE destroy" do + it "destroys the requested scientific_name" do + scientific_name = ScientificName.create! valid_attributes + expect { + delete :destroy, {:id => scientific_name.to_param}, valid_session + }.to change(ScientificName, :count).by(-1) + end + + it "redirects to the scientific_names list" do + scientific_name = ScientificName.create! valid_attributes + delete :destroy, {:id => scientific_name.to_param}, valid_session + response.should redirect_to(scientific_names_url) + end + end + +end diff --git a/spec/helpers/scientific_names_helper_spec.rb b/spec/helpers/scientific_names_helper_spec.rb new file mode 100644 index 000000000..3e4d39c6a --- /dev/null +++ b/spec/helpers/scientific_names_helper_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +# Specs in this file have access to a helper object that includes +# the ScientificNamesHelper. For example: +# +# describe ScientificNamesHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# helper.concat_strings("this","that").should == "this that" +# end +# end +# end +describe ScientificNamesHelper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/models/scientific_name_spec.rb b/spec/models/scientific_name_spec.rb new file mode 100644 index 000000000..18ace8327 --- /dev/null +++ b/spec/models/scientific_name_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe ScientificName do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/requests/scientific_names_spec.rb b/spec/requests/scientific_names_spec.rb new file mode 100644 index 000000000..0b2d8dd5a --- /dev/null +++ b/spec/requests/scientific_names_spec.rb @@ -0,0 +1,11 @@ +require 'spec_helper' + +describe "ScientificNames" do + describe "GET /scientific_names" do + it "works! (now write some real specs)" do + # Run the generator again with the --webrat flag if you want to use webrat methods/matchers + get scientific_names_path + response.status.should be(200) + end + end +end diff --git a/spec/routing/scientific_names_routing_spec.rb b/spec/routing/scientific_names_routing_spec.rb new file mode 100644 index 000000000..c78d1ff7d --- /dev/null +++ b/spec/routing/scientific_names_routing_spec.rb @@ -0,0 +1,35 @@ +require "spec_helper" + +describe ScientificNamesController do + describe "routing" do + + it "routes to #index" do + get("/scientific_names").should route_to("scientific_names#index") + end + + it "routes to #new" do + get("/scientific_names/new").should route_to("scientific_names#new") + end + + it "routes to #show" do + get("/scientific_names/1").should route_to("scientific_names#show", :id => "1") + end + + it "routes to #edit" do + get("/scientific_names/1/edit").should route_to("scientific_names#edit", :id => "1") + end + + it "routes to #create" do + post("/scientific_names").should route_to("scientific_names#create") + end + + it "routes to #update" do + put("/scientific_names/1").should route_to("scientific_names#update", :id => "1") + end + + it "routes to #destroy" do + delete("/scientific_names/1").should route_to("scientific_names#destroy", :id => "1") + end + + end +end diff --git a/spec/views/scientific_names/edit.html.haml_spec.rb b/spec/views/scientific_names/edit.html.haml_spec.rb new file mode 100644 index 000000000..237e17145 --- /dev/null +++ b/spec/views/scientific_names/edit.html.haml_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "scientific_names/edit" do + before(:each) do + @scientific_name = assign(:scientific_name, stub_model(ScientificName, + :scientific_name => "MyString", + :crop_id => 1 + )) + end + + it "renders the edit scientific_name form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form", :action => scientific_names_path(@scientific_name), :method => "post" do + assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" + assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + end + end +end diff --git a/spec/views/scientific_names/index.html.haml_spec.rb b/spec/views/scientific_names/index.html.haml_spec.rb new file mode 100644 index 000000000..5708d6506 --- /dev/null +++ b/spec/views/scientific_names/index.html.haml_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe "scientific_names/index" do + before(:each) do + assign(:scientific_names, [ + stub_model(ScientificName, + :scientific_name => "Scientific Name", + :crop_id => 1 + ), + stub_model(ScientificName, + :scientific_name => "Scientific Name", + :crop_id => 1 + ) + ]) + end + + it "renders a list of scientific_names" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "tr>td", :text => "Scientific Name".to_s, :count => 2 + assert_select "tr>td", :text => 1.to_s, :count => 2 + end +end diff --git a/spec/views/scientific_names/new.html.haml_spec.rb b/spec/views/scientific_names/new.html.haml_spec.rb new file mode 100644 index 000000000..26fda3cf1 --- /dev/null +++ b/spec/views/scientific_names/new.html.haml_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "scientific_names/new" do + before(:each) do + assign(:scientific_name, stub_model(ScientificName, + :scientific_name => "MyString", + :crop_id => 1 + ).as_new_record) + end + + it "renders new scientific_name form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form", :action => scientific_names_path, :method => "post" do + assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" + assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + end + end +end diff --git a/spec/views/scientific_names/show.html.haml_spec.rb b/spec/views/scientific_names/show.html.haml_spec.rb new file mode 100644 index 000000000..7f2a38af4 --- /dev/null +++ b/spec/views/scientific_names/show.html.haml_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +describe "scientific_names/show" do + before(:each) do + @scientific_name = assign(:scientific_name, stub_model(ScientificName, + :scientific_name => "Scientific Name", + :crop_id => 1 + )) + end + + it "renders attributes in

" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + rendered.should match(/Scientific Name/) + rendered.should match(/1/) + end +end From 876a74cee8ae69d7fa8c249a78ff4f7ecd077a6f Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 7 Nov 2012 13:07:33 +1100 Subject: [PATCH 2/5] Import crops spreadsheet. Run 'rake db:seed' to load up the data. --- db/seeds/crops.csv | 233 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 db/seeds/crops.csv diff --git a/db/seeds/crops.csv b/db/seeds/crops.csv new file mode 100644 index 000000000..b8a331b13 --- /dev/null +++ b/db/seeds/crops.csv @@ -0,0 +1,233 @@ +Achiote,Bixa orellana,https://en.wikipedia.org/wiki/Bixa_orellana +Ackee,Blighia sapida,https://en.wikipedia.org/wiki/Ackee +Acuyo,Piper auritum,https://en.wikipedia.org/wiki/Piper_auritum +Alexanders,Smyrnium olusatrum,https://en.wikipedia.org/wiki/Alexanders +Alfalfa,Medicago sativa,https://en.wikipedia.org/wiki/Alfalfa +Allspice,Pimenta dioica,https://en.wikipedia.org/wiki/Allspice +Almond,Prunus dulcis,https://en.wikipedia.org/wiki/Almond +Amaranth,Amaranthus spp.,https://en.wikipedia.org/wiki/Amaranth +Anise,Pimpinella anisum,https://en.wikipedia.org/wiki/Anise +Apple,Malus domestica,https://en.wikipedia.org/wiki/Apple +Apple mint,Mentha suaveolens,https://en.wikipedia.org/wiki/Apple_mint +Apricot,Prunus armeniaca,https://en.wikipedia.org/wiki/Apricot +Arrowroot,Maranta arundinacea,https://en.wikipedia.org/wiki/Maranta_arundinacea +Artichoke,Cynara cardunculus,https://en.wikipedia.org/wiki/Artichoke +Arugula,Eruca sativa,https://en.wikipedia.org/wiki/Arugula +Asparagus,Asparagus officinalis,https://en.wikipedia.org/wiki/Asparagus +Avocado,Persea americana,https://en.wikipedia.org/wiki/Avocado +Banana,Musa spp.,https://en.wikipedia.org/wiki/Banana +Barley,Hordeum vulgare,https://en.wikipedia.org/wiki/Barley +Basil,Ocimum basilicum,https://en.wikipedia.org/wiki/Basil +Bay,Laurus nobilis,https://en.wikipedia.org/wiki/Bay_Laurel +Bean,Phaseolus vulgaris,https://en.wikipedia.org/wiki/Common_bean +Beet,Beta vulgaris,https://en.wikipedia.org/wiki/Beet +Bell pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Bell_pepper +Bitter melon,Momordica charantia,https://en.wikipedia.org/wiki/Bitter_melon +Blackberry,Rubus fruticosus,https://en.wikipedia.org/wiki/Blackberry +Blackcurrant,Ribes spp.,https://en.wikipedia.org/wiki/Ribes +Borage,Borago officinalis,https://en.wikipedia.org/wiki/Borage +Breadfruit,Artocarpus altilis,https://en.wikipedia.org/wiki/Breadfruit +Broccoli,Brassica oleracea,https://en.wikipedia.org/wiki/Broccoli +brussels sprout,Brassica oleracea,https://en.wikipedia.org/wiki/Brussels_sprout +Buckwheat,Fagopyrum esculentum,https://en.wikipedia.org/wiki/Buckwheat +Cabbage,Brassica oleracea,https://en.wikipedia.org/wiki/Cabbage +Cape gooseberry,Physalis peruviana,https://en.wikipedia.org/wiki/Physalis_peruviana +Caper,Capparis spinosa,https://en.wikipedia.org/wiki/Caper +Cardoon,Cynara cardunculus,https://en.wikipedia.org/wiki/Cardoon +Carrot,Daucus carota,https://en.wikipedia.org/wiki/Carrot +Cassava,Manihot esculenta,https://en.wikipedia.org/wiki/Cassava +Catnip,Nepeta cataria,https://en.wikipedia.org/wiki/Nepeta_cataria +Cauliflower,Brassica oleracea,https://en.wikipedia.org/wiki/Cauliflower +Cayenne pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Cayenne_pepper +Celeriac,Apium graveolens var. rapaceum,https://en.wikipedia.org/wiki/Celeriac +Celery,Apium graveolens,https://en.wikipedia.org/wiki/Celery +Chamomile,Matricaria chamomila,https://en.wikipedia.org/wiki/Matricaria_recutita +Chaya,Cnidoscolus aconitifolius,https://en.wikipedia.org/wiki/Cnidoscolus_aconitifolius +Chayote,Sechium edule,https://en.wikipedia.org/wiki/Chayote +Cherry,Prunus avium,https://en.wikipedia.org/wiki/Cherry +Chervil,Anthriscus cerefolium,https://en.wikipedia.org/wiki/Chervil +Chestnut,Castanea spp.,https://en.wikipedia.org/wiki/Chestnut +Chickpeas,Cicer arietinum,https://en.wikipedia.org/wiki/Chickpea +Chickweed,Stellaria,https://en.wikipedia.org/wiki/Stellaria +Chicory,Cichorium intybus,https://en.wikipedia.org/wiki/Chicory +Chinese cabbage,Brassica rapa (pekinensis),https://en.wikipedia.org/wiki/Chinese_cabbage +Chives,Allium schoenoprasum,https://en.wikipedia.org/wiki/Chives +Cicely,Myrrhis odorata,https://en.wikipedia.org/wiki/Cicely +Citron,Citrus medica,https://en.wikipedia.org/wiki/Citron +Coconut,Cocos nucifera,https://en.wikipedia.org/wiki/Coconut +Collard greens,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Collard_greens +Comfrey,Symphytum officinale,https://en.wikipedia.org/wiki/Comfrey +Coriander,Coriandrum sativum,https://en.wikipedia.org/wiki/Coriander +Corn,Zea mays,https://en.wikipedia.org/wiki/Corn +Corn salad,Valerianella locusta,https://en.wikipedia.org/wiki/Corn_salad +Cress,Lepidium sativum,https://en.wikipedia.org/wiki/Garden_cress +Cucumber,Cucumis sativus,https://en.wikipedia.org/wiki/Cucumbers +Cumin,Cuminum cyminum,https://en.wikipedia.org/wiki/Cumin +Cumquat,Citrus japonica,https://en.wikipedia.org/wiki/Kumquat +Curry leaf,Murraya koenigii,https://en.wikipedia.org/wiki/Curry-leaf_Tree +Curry plant,Helichrysum italicum,https://en.wikipedia.org/wiki/Helichrysum_italicum +Daikon,Raphanus sativus Longipinnatus group,https://en.wikipedia.org/wiki/Daikon +Dandelion,Taraxacum officinale,https://en.wikipedia.org/wiki/Dandelion +Dates,Phoenix dactylifera,https://en.wikipedia.org/wiki/Date_%28fruit%29 +Desert lime,Citrus glauca,https://en.wikipedia.org/wiki/Citrus_glauca +Dill,Anethum graveolens,https://en.wikipedia.org/wiki/Dill +Dog rose,Rosa canina,https://en.wikipedia.org/wiki/Rosa_canina +Durian,Durio,https://en.wikipedia.org/wiki/Durian +Eggplant,Solanum melongena,https://en.wikipedia.org/wiki/Eggplant +Elderberry,Sambucus nigra,https://en.wikipedia.org/wiki/Sambucus_nigra +Endive,Cichorium endivia,https://en.wikipedia.org/wiki/Endive +Epazote,Dysphania ambrosioides,https://en.wikipedia.org/wiki/Epazote +Fava bean,Vicia faba,https://en.wikipedia.org/wiki/Vicia_faba +Feijoa,Acca sellowiana,https://en.wikipedia.org/wiki/Acca_sellowiana +Fennel,Foeniculum vulgare,https://en.wikipedia.org/wiki/Fennel +Fenugreek,Trigonella foenum-graecum,https://en.wikipedia.org/wiki/Fenugreek +Fiddlehead,Pteridium aquilinum,https://en.wikipedia.org/wiki/Fiddlehead +Fig,Ficus carica,https://en.wikipedia.org/wiki/Common_fig +Flax,Linum usitatissimum,https://en.wikipedia.org/wiki/Flax +Garlic,Allium sativum,https://en.wikipedia.org/wiki/Garlic +Garlic chives,Allium tuberosum,https://en.wikipedia.org/wiki/Garlic_chives +Ginger,Zingiber officinale,https://en.wikipedia.org/wiki/Ginger +Gooseberry,Ribes uva-crispa,https://en.wikipedia.org/wiki/Gooseberry +Grapefruit,Citrus paradisi,https://en.wikipedia.org/wiki/Grapefruit +Grapes,Vitis spp.,https://en.wikipedia.org/wiki/Grape +Guava,Psidium spp.,https://en.wikipedia.org/wiki/Guava +Habanero,Capsicum chinense,https://en.wikipedia.org/wiki/Habanero +Hibiscus,Hibiscus,https://en.wikipedia.org/wiki/Hibiscus +Horseradish,Armoracia rusticana,https://en.wikipedia.org/wiki/Horseradish +Jasmine,Jasminum officinale,https://en.wikipedia.org/wiki/Jasmine +Jerusalem artichoke,Helianthus tuberosus,https://en.wikipedia.org/wiki/Jerusalem_artichoke +Jicama,Pachyrhizus erosus,https://en.wikipedia.org/wiki/Jicama +Juniper berry,Juniperus communis,https://en.wikipedia.org/wiki/Juniper_berry +Kaffir lime,Citrus x hystrix,https://en.wikipedia.org/wiki/Kaffir_lime +Kale,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Kale +Kava,Piper methysticum,https://en.wikipedia.org/wiki/Kava +Kohlrabi,Brassica oleracea (gongylodes),https://en.wikipedia.org/wiki/Kohlrabi +Lavender,Lavandula spp.,https://en.wikipedia.org/wiki/Lavender +Leek,Allium ampeloprasum var. porrum,https://en.wikipedia.org/wiki/Leeks +Lemon,Citrus limon,https://en.wikipedia.org/wiki/Lemon +Lemon balm,Melissa officinalis,https://en.wikipedia.org/wiki/Lemon_balm +Lemon myrtle,Backhousia citriodora,https://en.wikipedia.org/wiki/Backhousia_citriodora +Lemon verbena,Aloysia citrodora,https://en.wikipedia.org/wiki/Aloysia_citrodora +Lemongrass,Cymbopogon spp.,https://en.wikipedia.org/wiki/Lemongrass +Lentils,Lens culinaris,https://en.wikipedia.org/wiki/Lentil +Lettuce,Lactuca sativa,https://en.wikipedia.org/wiki/Lettuce +Licorice,Glycyrrhiza glabra,https://en.wikipedia.org/wiki/Licorice +Lillipilli,Syzygium luehmannii,https://en.wikipedia.org/wiki/Syzygium_luehmannii +Lima bean,Phaseolus lunatus,https://en.wikipedia.org/wiki/Phaseolus_lunatus +Lime,Citrus spp.,https://en.wikipedia.org/wiki/Lime_%28fruit%29 +Lovage,Levisticum officinale,https://en.wikipedia.org/wiki/Lovage +Luffa,Luffa cylindrica,https://en.wikipedia.org/wiki/Luffa +Lupin bean,Lupinus luteus,https://en.wikipedia.org/wiki/Lupin_bean +Macadamia,Macadamia,https://en.wikipedia.org/wiki/Macadamia +Malabar spinach,Basella alba,https://en.wikipedia.org/wiki/Basella_alba +Mandarin,Citrus reticulata,https://en.wikipedia.org/wiki/Mandarin_orange +Mango,Mangifera spp.,https://en.wikipedia.org/wiki/Mango +Maracuja,Passiflora edulis,https://en.wikipedia.org/wiki/Maracuja +Marjoram,Origanum majorana,https://en.wikipedia.org/wiki/Marjoram +Marshmallow,Althaea officinalis,https://en.wikipedia.org/wiki/Althaea_officinalis +Medlars,Mespilus germanica,https://en.wikipedia.org/wiki/Mespilus_germanica +Melons,Cucumis melo,https://en.wikipedia.org/wiki/Melon +Miner's lettuce,Claytonia perfoliata,https://en.wikipedia.org/wiki/Claytonia_perfoliata +Mint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata +Mung bean,Vigna radiata,https://en.wikipedia.org/wiki/Mung_bean +Mustard,Brassica juncea,https://en.wikipedia.org/wiki/Mustard_plant +Nasturtium,Tropaeloum spp.,https://en.wikipedia.org/wiki/Tropaeolum +New Zealand spinach,Tetragonia tetragonioides,https://en.wikipedia.org/wiki/Tetragonia +Nigella,Nigella sativa,https://en.wikipedia.org/wiki/Nigella_sativa +Oats,Avena sativa,https://en.wikipedia.org/wiki/Oats +Okra,Abelmoschus esculentus,https://en.wikipedia.org/wiki/Okra +Olive,Olea europaea,https://en.wikipedia.org/wiki/Olive +Onion,Allium cepa,https://en.wikipedia.org/wiki/Onions +Orange,Citrus sinensis,https://en.wikipedia.org/wiki/Orange_%28fruit%29 +Oregano,Origanum vulgare,https://en.wikipedia.org/wiki/Oregano +Parsley,Petroselinum hortense,https://en.wikipedia.org/wiki/Parsley +Parsnip,Pastinaca sativa,https://en.wikipedia.org/wiki/Parsnip +Passion fruit,Passiflora edulis,https://en.wikipedia.org/wiki/Passionfruit +Pea,Pisum sativum,https://en.wikipedia.org/wiki/Pea +Peach,Prunus persica,https://en.wikipedia.org/wiki/Peach +Peach,Prunus persica,https://en.wikipedia.org/wiki/Peach +Peanut,Arachis hypogaea,https://en.wikipedia.org/wiki/Peanut +Pear,Pyrus spp.,https://en.wikipedia.org/wiki/Pear +Pearl millet,Pennisetum glaucum,https://en.wikipedia.org/wiki/Pearl_millet +Pecan,Carya illinoinensis,https://en.wikipedia.org/wiki/Pecan +Peppermint,Mentha x piperita,https://en.wikipedia.org/wiki/Peppermint +Persian lime,Citrus latifolia,https://en.wikipedia.org/wiki/Persian_lime +Persimmon,Diospyros spp.,https://en.wikipedia.org/wiki/Persimmon +Pigeon pea,Cajanus cajan,https://en.wikipedia.org/wiki/Pigeon_pea +Pigface,Carpobrotus glaucescens,https://en.wikipedia.org/wiki/Carpobrotus_glaucescens +Pineapple,Ananas comosus,https://en.wikipedia.org/wiki/Pineapple +Pistachio,Pistacia vera,https://en.wikipedia.org/wiki/Pistachio +Plantain,Musa spp.,https://en.wikipedia.org/wiki/Plantain +Plum,Prunus spp.,https://en.wikipedia.org/wiki/Plum +Pomegranate,Punica granatum,https://en.wikipedia.org/wiki/Pomegranate +Pomelo,Citrus maxima,https://en.wikipedia.org/wiki/Pomelo +Potato,Solanum tuberosum,https://en.wikipedia.org/wiki/Potatoes +Prickly pear,Opuntia,https://en.wikipedia.org/wiki/Opuntia +Pumpkin,Cucurbita spp.,https://en.wikipedia.org/wiki/Pumpkin +Purslane,Portulaca oleracea,https://en.wikipedia.org/wiki/Portulaca_oleracea +Quandong,Santalum acuminatum,https://en.wikipedia.org/wiki/Santalum_acuminatum +Quince,Cydonia oblonga,https://en.wikipedia.org/wiki/Quince +Quinoa,Chenopodium quinoa,https://en.wikipedia.org/wiki/Quinoa +Radicchio,Cichorium intybus,https://en.wikipedia.org/wiki/Radicchio +Radish,Raphanus sativus,https://en.wikipedia.org/wiki/Radish +Rapeseed,Brassica napus,https://en.wikipedia.org/wiki/Rapeseed +Raspberry,Rubus idaeus,https://en.wikipedia.org/wiki/Rubus_idaeus +Rhubarb,Rheum rhabarbarum,https://en.wikipedia.org/wiki/Rhubarb +Rice,Oryza sativa,https://en.wikipedia.org/wiki/Rice +Rice bean,Vigna umbellata,https://en.wikipedia.org/wiki/Ricebean +Rose,Rosa,https://en.wikipedia.org/wiki/Rose +Roselle,Hibiscus sabdariffa,https://en.wikipedia.org/wiki/Roselle_%28plant%29 +Rosemary,Rosmarinus officinalis,https://en.wikipedia.org/wiki/Rosemary +Rue,Ruta graveolens,https://en.wikipedia.org/wiki/Common_Rue +Runner bean,Phaseolus coccineus,https://en.wikipedia.org/wiki/Runner_bean +Rutabaga,Brassica napus Napobrassica group,https://en.wikipedia.org/wiki/Rutabaga +Rye,Secale cereale,https://en.wikipedia.org/wiki/Rye +Safflower,Carthamus tinctorius,https://en.wikipedia.org/wiki/Safflower +Saffron,Crocus sativus,https://en.wikipedia.org/wiki/Saffron +Sage,Salvia officinalis,https://en.wikipedia.org/wiki/Salvia_officinalis +Salad burnet,Sanguisorba minor,https://en.wikipedia.org/wiki/Salad_burnet +Salsify,Tragopogon porrifolius,https://en.wikipedia.org/wiki/Salsify +Samphire,Crithmum maritimum,https://en.wikipedia.org/wiki/Rock_samphire +Sassafras,Sassafras albidum,https://en.wikipedia.org/wiki/Sassafras_albidum +Sesame,Sesamum indicum,https://en.wikipedia.org/wiki/Sesame +Shallot,Allium cepa var. aggregatum,https://en.wikipedia.org/wiki/Shallot +Sorghum,Sorghum spp.,https://en.wikipedia.org/wiki/Sorghum +Sorrel,Rumex acetosa,https://en.wikipedia.org/wiki/Sorrel +Soursop,Annona muricata,https://en.wikipedia.org/wiki/Soursop +Soybean,Glycine max,https://en.wikipedia.org/wiki/Soybean +Spearmint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata +Spinach,Spinacia oleracea,https://en.wikipedia.org/wiki/Spinach +Star Anise,Illicium verum,https://en.wikipedia.org/wiki/Star_anise +Starfruit,Averrhoa carambola,https://en.wikipedia.org/wiki/Starfruit +Stevia,Stevia rebaudiana,https://en.wikipedia.org/wiki/Stevia +Strawberry,Fragaria ananassa,https://en.wikipedia.org/wiki/Strawberry +Summer savoury,Satureja hortensis,https://en.wikipedia.org/wiki/Summer_savory +Sunflowers,Helianthus annuus,https://en.wikipedia.org/wiki/Sunflower +Sweet potato,Ipomoea batatas,https://en.wikipedia.org/wiki/Sweet_potato +Swiss chard,Beta vulgaris var. cicla,https://en.wikipedia.org/wiki/Swiss_chard +Tamarillo,Solanum betaceum ,https://en.wikipedia.org/wiki/Tamarillo +Tamarind,Tamarindus indica,https://en.wikipedia.org/wiki/Tamarind +Tangerine,Citrus tangerina,https://en.wikipedia.org/wiki/Tangerine +Tansy,Tanacetum vulgare,https://en.wikipedia.org/wiki/Tansy +Taro,Colocasia esculenta,https://en.wikipedia.org/wiki/Taro +Tarragon,Artemisia dracunculus,https://en.wikipedia.org/wiki/Tarragon +Thyme,Thymus mongolicus,https://en.wikipedia.org/wiki/Thyme +Tomatillo,Physalis philadelphica,https://en.wikipedia.org/wiki/Tomatillo +Tomato,Solanum lycopersicum,https://en.wikipedia.org/wiki/Tomato +Turmeric,Curcuma longa,https://en.wikipedia.org/wiki/Turmeric +Turnip,Brassica rapa var. rapa,https://en.wikipedia.org/wiki/Turnip +Urad bean,Vigna mungo,https://en.wikipedia.org/wiki/Urad_(bean) +Valerian,Valeriana officinalis,https://en.wikipedia.org/wiki/Valerian_%28plant%29 +Vanilla,Vanilla planifolia,https://en.wikipedia.org/wiki/Vanilla +Walnut,Juglans spp.,https://en.wikipedia.org/wiki/Walnut +Wasabi,Wasabia japonica,https://en.wikipedia.org/wiki/Wasabi +Watermelon,Citrullus lanatus,https://en.wikipedia.org/wiki/Watermelon +Wheat,Triticum spp.,https://en.wikipedia.org/wiki/Wheat +Winter savoury,Satureja montana,https://en.wikipedia.org/wiki/Winter_savory +Wormwood,Artemisia absinthium,https://en.wikipedia.org/wiki/Artemisia_absinthium +Yam,Dioscorea spp.,https://en.wikipedia.org/wiki/Yam_(vegetable) +Yardlong bean,Vigna unguiculata (sesquipedalis),https://en.wikipedia.org/wiki/Yardlong_bean +Yarrow,Achillea millefolium,https://en.wikipedia.org/wiki/Achillea_millefolium +Zucchini,Cucurbita pepo.,https://en.wikipedia.org/wiki/Zucchini +Coffee,Coffea,https://en.wikipedia.org/wiki/Coffee +Tea,Camellia sinensis,https://en.wikipedia.org/wiki/Tea From 4e3c47a82f84ee1d410bf866ea62075bf24655e3 Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 7 Nov 2012 13:19:59 +1100 Subject: [PATCH 3/5] Showing scientific names on the crop page --- Gemfile.lock | 16 ++++++++-------- app/views/crops/show.html.haml | 7 +++++++ db/seeds.rb | 10 ++++++++++ spec/views/crops/show.html.haml_spec.rb | 20 ++++++++++++++++++-- 4 files changed, 43 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 04049ceb5..5f89daaf5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,7 +32,7 @@ GEM bcrypt-ruby (3.0.1) builder (3.0.4) cape (1.5.0) - capistrano (2.13.4) + capistrano (2.13.5) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) @@ -54,7 +54,7 @@ GEM sass (~> 3.1) compass-rails (1.0.3) compass (>= 0.12.2, < 0.14) - daemon_controller (1.0.0) + daemon_controller (1.1.0) devise (2.1.2) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.1) @@ -65,7 +65,7 @@ GEM execjs (1.4.0) multi_json (~> 1.0) fastthread (1.0.7) - friendly_id (4.0.8) + friendly_id (4.0.9) fssm (0.2.9) haml (3.1.7) haml-rails (0.3.5) @@ -90,7 +90,7 @@ GEM modular-scale (1.0.2) compass (>= 0.11.5) sassy-math (>= 1.2) - multi_json (1.3.6) + multi_json (1.3.7) net-scp (1.0.4) net-ssh (>= 1.99.1) net-sftp (2.0.5) @@ -100,7 +100,7 @@ GEM net-ssh (>= 1.99.1) nokogiri (1.5.5) orm_adapter (0.4.0) - passenger (3.0.17) + passenger (3.0.18) daemon_controller (>= 1.0.0) fastthread (>= 1.0.1) rack @@ -147,7 +147,7 @@ GEM rspec (~> 2.11.0) rvm-capistrano (1.2.7) capistrano (>= 2.0.0) - sass (3.2.1) + sass (3.2.2) sass-rails (3.2.5) railties (~> 3.2.0) sass (>= 3.1.10) @@ -164,10 +164,10 @@ GEM libv8 (~> 3.3.10) thor (0.16.0) tilt (1.3.3) - treetop (1.4.11) + treetop (1.4.12) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.33) + tzinfo (0.3.35) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml index fcd7bfcd6..93db4ef34 100644 --- a/app/views/crops/show.html.haml +++ b/app/views/crops/show.html.haml @@ -1,5 +1,12 @@ - content_for :title, @crop.system_name +%p + %b Scientific names: + +%ul + - @crop.scientific_names.each do |sn| + %li= sn.scientific_name + %p %b More information: = link_to @crop.en_wikipedia_url, @crop.en_wikipedia_url diff --git a/db/seeds.rb b/db/seeds.rb index 4edb1e857..cf9979d2c 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,3 +5,13 @@ # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) + +# import crops from CSV + +require 'csv' + +CSV.foreach(Rails.root.join('db', 'seeds', 'crops.csv')) do |row| + system_name,scientific_name,en_wikipedia_url = row + @crop = Crop.create(:system_name => system_name, :en_wikipedia_url => en_wikipedia_url) + @crop.scientific_names.create(:scientific_name => scientific_name) +end diff --git a/spec/views/crops/show.html.haml_spec.rb b/spec/views/crops/show.html.haml_spec.rb index 60a04f9d9..65a313948 100644 --- a/spec/views/crops/show.html.haml_spec.rb +++ b/spec/views/crops/show.html.haml_spec.rb @@ -3,9 +3,25 @@ require 'spec_helper' describe "crops/show" do before(:each) do @crop = assign(:crop, stub_model(Crop, - :system_name => "System Name", - :en_wikipedia_url => "En Wikipedia Url" + :id => 1, + :system_name => "Corn", + :en_wikipedia_url => "http://en.wikipedia.org/Maize" )) + @crop.scientific_names.create( + :scientific_name => "Zea mays", + :crop_id => 1 + ) + end + + it "shows the wikipedia URL" do + render + rendered.should contain "en.wikipedia.org" + end + + it "shows the scientific name" do + render + rendered.should contain "Scientific names" + rendered.should contain "Zea mays" end context "logged out" do From 6d7b04e7341e41e9faeda324f180c9b5cb927f73 Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 7 Nov 2012 13:46:01 +1100 Subject: [PATCH 4/5] Only logged in users can add/edit scientific names Some small tweaks to crops tests along the way --- app/views/crops/new.html.haml | 10 +++++- app/views/scientific_names/edit.html.haml | 14 ++++++--- app/views/scientific_names/new.html.haml | 12 +++++-- spec/views/crops/edit.html.haml_spec.rb | 3 -- spec/views/crops/new.html.haml_spec.rb | 31 ++++++++++++++----- .../scientific_names/edit.html.haml_spec.rb | 30 +++++++++++++----- .../scientific_names/new.html.haml_spec.rb | 31 ++++++++++++++----- 7 files changed, 98 insertions(+), 33 deletions(-) diff --git a/app/views/crops/new.html.haml b/app/views/crops/new.html.haml index 36b28e200..d0b78567e 100644 --- a/app/views/crops/new.html.haml +++ b/app/views/crops/new.html.haml @@ -1,5 +1,13 @@ - content_for :title, "New crop" -= render 'form' +- if user_signed_in? + = render 'form' + %ul.link-list + %li + = link_to 'Show', @crop, { :class => 'button' } + %li + = link_to 'Back', crops_path, { :class => 'button' } +- else + %div.alert-box.alert You're not logged in. Only logged in users can do this. = link_to 'Back', crops_path diff --git a/app/views/scientific_names/edit.html.haml b/app/views/scientific_names/edit.html.haml index b4c9bdb46..9cb9709d6 100644 --- a/app/views/scientific_names/edit.html.haml +++ b/app/views/scientific_names/edit.html.haml @@ -1,7 +1,11 @@ %h1 Editing scientific_name -= render 'form' - -= link_to 'Show', @scientific_name -\| -= link_to 'Back', scientific_names_path +- if user_signed_in? + = render 'form' + %ul.link-list + %li + = link_to 'Show', @scientific_name, { :class => 'button' } + %li + = link_to 'Back', scientific_names_path, { :class => 'button' } +- else + %div.alert-box.alert You're not logged in. Only logged in users can do this. diff --git a/app/views/scientific_names/new.html.haml b/app/views/scientific_names/new.html.haml index 88451a0c0..6f29ce7ee 100644 --- a/app/views/scientific_names/new.html.haml +++ b/app/views/scientific_names/new.html.haml @@ -1,5 +1,11 @@ %h1 New scientific_name -= render 'form' - -= link_to 'Back', scientific_names_path +- if user_signed_in? + = render 'form' + %ul.link-list + %li + = link_to 'Show', @scientific_name, { :class => 'button' } + %li + = link_to 'Back', scientific_names_path, { :class => 'button' } +- else + %div.alert-box.alert You're not logged in. Only logged in users can do this. diff --git a/spec/views/crops/edit.html.haml_spec.rb b/spec/views/crops/edit.html.haml_spec.rb index 429b4e4e8..51f442e4e 100644 --- a/spec/views/crops/edit.html.haml_spec.rb +++ b/spec/views/crops/edit.html.haml_spec.rb @@ -16,7 +16,6 @@ describe "crops/edit" do end context "logged in" do - before(:each) do @user = User.create(:email => "growstuff@example.com", :password => "irrelevant") @user.confirm! @@ -26,7 +25,6 @@ describe "crops/edit" do it "renders the edit crop form" do render - # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "form", :action => crops_path(@crop), :method => "post" do assert_select "input#crop_system_name", :name => "crop[system_name]" @@ -34,5 +32,4 @@ describe "crops/edit" do end end end - end diff --git a/spec/views/crops/new.html.haml_spec.rb b/spec/views/crops/new.html.haml_spec.rb index ac1f3f021..0565ef03b 100644 --- a/spec/views/crops/new.html.haml_spec.rb +++ b/spec/views/crops/new.html.haml_spec.rb @@ -8,13 +8,30 @@ describe "crops/new" do ).as_new_record) end - it "renders new crop form" do - render - - # Run the generator again with the --webrat flag if you want to use webrat matchers - assert_select "form", :action => crops_path, :method => "post" do - assert_select "input#crop_system_name", :name => "crop[system_name]" - assert_select "input#crop_en_wikipedia_url", :name => "crop[en_wikipedia_url]" + context "logged out" do + it "doesn't show the crop form if logged out" do + render + rendered.should contain "Only logged in users can do this" end end + + context "logged in" do + + before(:each) do + @user = User.create(:email => "growstuff@example.com", :password => "irrelevant") + @user.confirm! + sign_in @user + render + end + + it "renders new crop form" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form", :action => crops_path, :method => "post" do + assert_select "input#crop_system_name", :name => "crop[system_name]" + assert_select "input#crop_en_wikipedia_url", :name => "crop[en_wikipedia_url]" + end + end + end + end diff --git a/spec/views/scientific_names/edit.html.haml_spec.rb b/spec/views/scientific_names/edit.html.haml_spec.rb index 237e17145..e0ebb532b 100644 --- a/spec/views/scientific_names/edit.html.haml_spec.rb +++ b/spec/views/scientific_names/edit.html.haml_spec.rb @@ -8,13 +8,29 @@ describe "scientific_names/edit" do )) end - it "renders the edit scientific_name form" do - render - - # Run the generator again with the --webrat flag if you want to use webrat matchers - assert_select "form", :action => scientific_names_path(@scientific_name), :method => "post" do - assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" - assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + context "logged out" do + it "doesn't show the SN form if logged out" do + render + rendered.should contain "Only logged in users can do this" end end + + context "logged in" do + before(:each) do + @user = User.create(:email => "growstuff@example.com", :password => "irrelevant") + @user.confirm! + sign_in @user + render + end + + it "renders the edit scientific_name form" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form", :action => scientific_names_path(@scientific_name), :method => "post" do + assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" + assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + end + end + end + end diff --git a/spec/views/scientific_names/new.html.haml_spec.rb b/spec/views/scientific_names/new.html.haml_spec.rb index 26fda3cf1..4a0822b03 100644 --- a/spec/views/scientific_names/new.html.haml_spec.rb +++ b/spec/views/scientific_names/new.html.haml_spec.rb @@ -8,13 +8,30 @@ describe "scientific_names/new" do ).as_new_record) end - it "renders new scientific_name form" do - render - - # Run the generator again with the --webrat flag if you want to use webrat matchers - assert_select "form", :action => scientific_names_path, :method => "post" do - assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" - assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + context "logged out" do + it "doesn't show the SN form if logged out" do + render + rendered.should contain "Only logged in users can do this" end end + + context "logged in" do + before(:each) do + @user = User.create(:email => "growstuff@example.com", :password => "irrelevant") + @user.confirm! + sign_in @user + render + end + + it "renders new scientific_name form" do + render + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form", :action => scientific_names_path, :method => "post" do + assert_select "input#scientific_name_scientific_name", :name => "scientific_name[scientific_name]" + assert_select "input#scientific_name_crop_id", :name => "scientific_name[crop_id]" + end + end + + end + end From 1dccf5c4325c63b8b72529563dea132c97f45e25 Mon Sep 17 00:00:00 2001 From: Skud Date: Wed, 7 Nov 2012 13:59:03 +1100 Subject: [PATCH 5/5] standardised some capitalisation and spelling --- db/seeds/crops.csv | 456 ++++++++++++++++++++++----------------------- 1 file changed, 228 insertions(+), 228 deletions(-) diff --git a/db/seeds/crops.csv b/db/seeds/crops.csv index b8a331b13..ab0d135fa 100644 --- a/db/seeds/crops.csv +++ b/db/seeds/crops.csv @@ -1,233 +1,233 @@ -Achiote,Bixa orellana,https://en.wikipedia.org/wiki/Bixa_orellana -Ackee,Blighia sapida,https://en.wikipedia.org/wiki/Ackee -Acuyo,Piper auritum,https://en.wikipedia.org/wiki/Piper_auritum -Alexanders,Smyrnium olusatrum,https://en.wikipedia.org/wiki/Alexanders -Alfalfa,Medicago sativa,https://en.wikipedia.org/wiki/Alfalfa -Allspice,Pimenta dioica,https://en.wikipedia.org/wiki/Allspice -Almond,Prunus dulcis,https://en.wikipedia.org/wiki/Almond -Amaranth,Amaranthus spp.,https://en.wikipedia.org/wiki/Amaranth -Anise,Pimpinella anisum,https://en.wikipedia.org/wiki/Anise -Apple,Malus domestica,https://en.wikipedia.org/wiki/Apple -Apple mint,Mentha suaveolens,https://en.wikipedia.org/wiki/Apple_mint -Apricot,Prunus armeniaca,https://en.wikipedia.org/wiki/Apricot -Arrowroot,Maranta arundinacea,https://en.wikipedia.org/wiki/Maranta_arundinacea -Artichoke,Cynara cardunculus,https://en.wikipedia.org/wiki/Artichoke -Arugula,Eruca sativa,https://en.wikipedia.org/wiki/Arugula -Asparagus,Asparagus officinalis,https://en.wikipedia.org/wiki/Asparagus -Avocado,Persea americana,https://en.wikipedia.org/wiki/Avocado -Banana,Musa spp.,https://en.wikipedia.org/wiki/Banana -Barley,Hordeum vulgare,https://en.wikipedia.org/wiki/Barley -Basil,Ocimum basilicum,https://en.wikipedia.org/wiki/Basil -Bay,Laurus nobilis,https://en.wikipedia.org/wiki/Bay_Laurel -Bean,Phaseolus vulgaris,https://en.wikipedia.org/wiki/Common_bean -Beet,Beta vulgaris,https://en.wikipedia.org/wiki/Beet -Bell pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Bell_pepper -Bitter melon,Momordica charantia,https://en.wikipedia.org/wiki/Bitter_melon -Blackberry,Rubus fruticosus,https://en.wikipedia.org/wiki/Blackberry -Blackcurrant,Ribes spp.,https://en.wikipedia.org/wiki/Ribes -Borage,Borago officinalis,https://en.wikipedia.org/wiki/Borage -Breadfruit,Artocarpus altilis,https://en.wikipedia.org/wiki/Breadfruit -Broccoli,Brassica oleracea,https://en.wikipedia.org/wiki/Broccoli -brussels sprout,Brassica oleracea,https://en.wikipedia.org/wiki/Brussels_sprout -Buckwheat,Fagopyrum esculentum,https://en.wikipedia.org/wiki/Buckwheat -Cabbage,Brassica oleracea,https://en.wikipedia.org/wiki/Cabbage -Cape gooseberry,Physalis peruviana,https://en.wikipedia.org/wiki/Physalis_peruviana -Caper,Capparis spinosa,https://en.wikipedia.org/wiki/Caper -Cardoon,Cynara cardunculus,https://en.wikipedia.org/wiki/Cardoon -Carrot,Daucus carota,https://en.wikipedia.org/wiki/Carrot -Cassava,Manihot esculenta,https://en.wikipedia.org/wiki/Cassava -Catnip,Nepeta cataria,https://en.wikipedia.org/wiki/Nepeta_cataria -Cauliflower,Brassica oleracea,https://en.wikipedia.org/wiki/Cauliflower -Cayenne pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Cayenne_pepper -Celeriac,Apium graveolens var. rapaceum,https://en.wikipedia.org/wiki/Celeriac -Celery,Apium graveolens,https://en.wikipedia.org/wiki/Celery -Chamomile,Matricaria chamomila,https://en.wikipedia.org/wiki/Matricaria_recutita -Chaya,Cnidoscolus aconitifolius,https://en.wikipedia.org/wiki/Cnidoscolus_aconitifolius -Chayote,Sechium edule,https://en.wikipedia.org/wiki/Chayote -Cherry,Prunus avium,https://en.wikipedia.org/wiki/Cherry -Chervil,Anthriscus cerefolium,https://en.wikipedia.org/wiki/Chervil -Chestnut,Castanea spp.,https://en.wikipedia.org/wiki/Chestnut -Chickpeas,Cicer arietinum,https://en.wikipedia.org/wiki/Chickpea -Chickweed,Stellaria,https://en.wikipedia.org/wiki/Stellaria -Chicory,Cichorium intybus,https://en.wikipedia.org/wiki/Chicory -Chinese cabbage,Brassica rapa (pekinensis),https://en.wikipedia.org/wiki/Chinese_cabbage -Chives,Allium schoenoprasum,https://en.wikipedia.org/wiki/Chives -Cicely,Myrrhis odorata,https://en.wikipedia.org/wiki/Cicely -Citron,Citrus medica,https://en.wikipedia.org/wiki/Citron -Coconut,Cocos nucifera,https://en.wikipedia.org/wiki/Coconut -Collard greens,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Collard_greens -Comfrey,Symphytum officinale,https://en.wikipedia.org/wiki/Comfrey -Coriander,Coriandrum sativum,https://en.wikipedia.org/wiki/Coriander -Corn,Zea mays,https://en.wikipedia.org/wiki/Corn -Corn salad,Valerianella locusta,https://en.wikipedia.org/wiki/Corn_salad -Cress,Lepidium sativum,https://en.wikipedia.org/wiki/Garden_cress -Cucumber,Cucumis sativus,https://en.wikipedia.org/wiki/Cucumbers -Cumin,Cuminum cyminum,https://en.wikipedia.org/wiki/Cumin -Cumquat,Citrus japonica,https://en.wikipedia.org/wiki/Kumquat -Curry leaf,Murraya koenigii,https://en.wikipedia.org/wiki/Curry-leaf_Tree -Curry plant,Helichrysum italicum,https://en.wikipedia.org/wiki/Helichrysum_italicum -Daikon,Raphanus sativus Longipinnatus group,https://en.wikipedia.org/wiki/Daikon -Dandelion,Taraxacum officinale,https://en.wikipedia.org/wiki/Dandelion -Dates,Phoenix dactylifera,https://en.wikipedia.org/wiki/Date_%28fruit%29 -Desert lime,Citrus glauca,https://en.wikipedia.org/wiki/Citrus_glauca -Dill,Anethum graveolens,https://en.wikipedia.org/wiki/Dill -Dog rose,Rosa canina,https://en.wikipedia.org/wiki/Rosa_canina -Durian,Durio,https://en.wikipedia.org/wiki/Durian -Eggplant,Solanum melongena,https://en.wikipedia.org/wiki/Eggplant -Elderberry,Sambucus nigra,https://en.wikipedia.org/wiki/Sambucus_nigra -Endive,Cichorium endivia,https://en.wikipedia.org/wiki/Endive -Epazote,Dysphania ambrosioides,https://en.wikipedia.org/wiki/Epazote -Fava bean,Vicia faba,https://en.wikipedia.org/wiki/Vicia_faba -Feijoa,Acca sellowiana,https://en.wikipedia.org/wiki/Acca_sellowiana -Fennel,Foeniculum vulgare,https://en.wikipedia.org/wiki/Fennel -Fenugreek,Trigonella foenum-graecum,https://en.wikipedia.org/wiki/Fenugreek -Fiddlehead,Pteridium aquilinum,https://en.wikipedia.org/wiki/Fiddlehead -Fig,Ficus carica,https://en.wikipedia.org/wiki/Common_fig -Flax,Linum usitatissimum,https://en.wikipedia.org/wiki/Flax -Garlic,Allium sativum,https://en.wikipedia.org/wiki/Garlic -Garlic chives,Allium tuberosum,https://en.wikipedia.org/wiki/Garlic_chives -Ginger,Zingiber officinale,https://en.wikipedia.org/wiki/Ginger -Gooseberry,Ribes uva-crispa,https://en.wikipedia.org/wiki/Gooseberry -Grapefruit,Citrus paradisi,https://en.wikipedia.org/wiki/Grapefruit -Grapes,Vitis spp.,https://en.wikipedia.org/wiki/Grape -Guava,Psidium spp.,https://en.wikipedia.org/wiki/Guava -Habanero,Capsicum chinense,https://en.wikipedia.org/wiki/Habanero -Hibiscus,Hibiscus,https://en.wikipedia.org/wiki/Hibiscus -Horseradish,Armoracia rusticana,https://en.wikipedia.org/wiki/Horseradish -Jasmine,Jasminum officinale,https://en.wikipedia.org/wiki/Jasmine +achiote,Bixa orellana,https://en.wikipedia.org/wiki/Bixa_orellana +ackee,Blighia sapida,https://en.wikipedia.org/wiki/Ackee +acuyo,Piper auritum,https://en.wikipedia.org/wiki/Piper_auritum +alexanders,Smyrnium olusatrum,https://en.wikipedia.org/wiki/Alexanders +alfalfa,Medicago sativa,https://en.wikipedia.org/wiki/Alfalfa +allspice,Pimenta dioica,https://en.wikipedia.org/wiki/Allspice +almond,Prunus dulcis,https://en.wikipedia.org/wiki/Almond +amaranth,Amaranthus spp.,https://en.wikipedia.org/wiki/Amaranth +anise,Pimpinella anisum,https://en.wikipedia.org/wiki/Anise +apple,Malus domestica,https://en.wikipedia.org/wiki/Apple +apple mint,Mentha suaveolens,https://en.wikipedia.org/wiki/Apple_mint +apricot,Prunus armeniaca,https://en.wikipedia.org/wiki/Apricot +arrowroot,Maranta arundinacea,https://en.wikipedia.org/wiki/Maranta_arundinacea +artichoke,Cynara cardunculus,https://en.wikipedia.org/wiki/Artichoke +arugula,Eruca sativa,https://en.wikipedia.org/wiki/Arugula +asparagus,Asparagus officinalis,https://en.wikipedia.org/wiki/Asparagus +avocado,Persea americana,https://en.wikipedia.org/wiki/Avocado +banana,Musa spp.,https://en.wikipedia.org/wiki/Banana +barley,Hordeum vulgare,https://en.wikipedia.org/wiki/Barley +basil,Ocimum basilicum,https://en.wikipedia.org/wiki/Basil +bay,Laurus nobilis,https://en.wikipedia.org/wiki/Bay_Laurel +bean,Phaseolus vulgaris,https://en.wikipedia.org/wiki/Common_bean +beet,Beta vulgaris,https://en.wikipedia.org/wiki/Beet +bell pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Bell_pepper +bitter melon,Momordica charantia,https://en.wikipedia.org/wiki/Bitter_melon +blackberry,Rubus fruticosus,https://en.wikipedia.org/wiki/Blackberry +blackcurrant,Ribes spp.,https://en.wikipedia.org/wiki/Ribes +borage,Borago officinalis,https://en.wikipedia.org/wiki/Borage +breadfruit,Artocarpus altilis,https://en.wikipedia.org/wiki/Breadfruit +broccoli,Brassica oleracea,https://en.wikipedia.org/wiki/Broccoli +Brussels sprout,Brassica oleracea,https://en.wikipedia.org/wiki/Brussels_sprout +buckwheat,Fagopyrum esculentum,https://en.wikipedia.org/wiki/Buckwheat +cabbage,Brassica oleracea,https://en.wikipedia.org/wiki/Cabbage +cape gooseberry,Physalis peruviana,https://en.wikipedia.org/wiki/Physalis_peruviana +caper,Capparis spinosa,https://en.wikipedia.org/wiki/Caper +cardoon,Cynara cardunculus,https://en.wikipedia.org/wiki/Cardoon +carrot,Daucus carota,https://en.wikipedia.org/wiki/Carrot +cassava,Manihot esculenta,https://en.wikipedia.org/wiki/Cassava +catnip,Nepeta cataria,https://en.wikipedia.org/wiki/Nepeta_cataria +cauliflower,Brassica oleracea,https://en.wikipedia.org/wiki/Cauliflower +cayenne pepper,Capsicum annuum,https://en.wikipedia.org/wiki/Cayenne_pepper +celeriac,Apium graveolens var. rapaceum,https://en.wikipedia.org/wiki/Celeriac +celery,Apium graveolens,https://en.wikipedia.org/wiki/Celery +chamomile,Matricaria chamomila,https://en.wikipedia.org/wiki/Matricaria_recutita +chaya,Cnidoscolus aconitifolius,https://en.wikipedia.org/wiki/Cnidoscolus_aconitifolius +chayote,Sechium edule,https://en.wikipedia.org/wiki/Chayote +cherry,Prunus avium,https://en.wikipedia.org/wiki/Cherry +chervil,Anthriscus cerefolium,https://en.wikipedia.org/wiki/Chervil +chestnut,Castanea spp.,https://en.wikipedia.org/wiki/Chestnut +chickpeas,Cicer arietinum,https://en.wikipedia.org/wiki/Chickpea +chickweed,Stellaria,https://en.wikipedia.org/wiki/Stellaria +chicory,Cichorium intybus,https://en.wikipedia.org/wiki/Chicory +chinese cabbage,Brassica rapa (pekinensis),https://en.wikipedia.org/wiki/Chinese_cabbage +chives,Allium schoenoprasum,https://en.wikipedia.org/wiki/Chives +cicely,Myrrhis odorata,https://en.wikipedia.org/wiki/Cicely +citron,Citrus medica,https://en.wikipedia.org/wiki/Citron +coconut,Cocos nucifera,https://en.wikipedia.org/wiki/Coconut +collard greens,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Collard_greens +comfrey,Symphytum officinale,https://en.wikipedia.org/wiki/Comfrey +coriander,Coriandrum sativum,https://en.wikipedia.org/wiki/Coriander +corn,Zea mays,https://en.wikipedia.org/wiki/Corn +corn salad,Valerianella locusta,https://en.wikipedia.org/wiki/Corn_salad +cress,Lepidium sativum,https://en.wikipedia.org/wiki/Garden_cress +cucumber,Cucumis sativus,https://en.wikipedia.org/wiki/Cucumbers +cumin,Cuminum cyminum,https://en.wikipedia.org/wiki/Cumin +cumquat,Citrus japonica,https://en.wikipedia.org/wiki/Kumquat +curry leaf,Murraya koenigii,https://en.wikipedia.org/wiki/Curry-leaf_Tree +curry plant,Helichrysum italicum,https://en.wikipedia.org/wiki/Helichrysum_italicum +daikon,Raphanus sativus Longipinnatus group,https://en.wikipedia.org/wiki/Daikon +dandelion,Taraxacum officinale,https://en.wikipedia.org/wiki/Dandelion +dates,Phoenix dactylifera,https://en.wikipedia.org/wiki/Date_%28fruit%29 +desert lime,Citrus glauca,https://en.wikipedia.org/wiki/Citrus_glauca +dill,Anethum graveolens,https://en.wikipedia.org/wiki/Dill +dog rose,Rosa canina,https://en.wikipedia.org/wiki/Rosa_canina +durian,Durio,https://en.wikipedia.org/wiki/Durian +eggplant,Solanum melongena,https://en.wikipedia.org/wiki/Eggplant +elderberry,Sambucus nigra,https://en.wikipedia.org/wiki/Sambucus_nigra +endive,Cichorium endivia,https://en.wikipedia.org/wiki/Endive +epazote,Dysphania ambrosioides,https://en.wikipedia.org/wiki/Epazote +fava bean,Vicia faba,https://en.wikipedia.org/wiki/Vicia_faba +feijoa,Acca sellowiana,https://en.wikipedia.org/wiki/Acca_sellowiana +fennel,Foeniculum vulgare,https://en.wikipedia.org/wiki/Fennel +fenugreek,Trigonella foenum-graecum,https://en.wikipedia.org/wiki/Fenugreek +fiddlehead,Pteridium aquilinum,https://en.wikipedia.org/wiki/Fiddlehead +fig,Ficus carica,https://en.wikipedia.org/wiki/Common_fig +flax,Linum usitatissimum,https://en.wikipedia.org/wiki/Flax +garlic,Allium sativum,https://en.wikipedia.org/wiki/Garlic +garlic chives,Allium tuberosum,https://en.wikipedia.org/wiki/Garlic_chives +ginger,Zingiber officinale,https://en.wikipedia.org/wiki/Ginger +gooseberry,Ribes uva-crispa,https://en.wikipedia.org/wiki/Gooseberry +grapefruit,Citrus paradisi,https://en.wikipedia.org/wiki/Grapefruit +grapes,Vitis spp.,https://en.wikipedia.org/wiki/Grape +guava,Psidium spp.,https://en.wikipedia.org/wiki/Guava +habanero,Capsicum chinense,https://en.wikipedia.org/wiki/Habanero +hibiscus,Hibiscus,https://en.wikipedia.org/wiki/Hibiscus +horseradish,Armoracia rusticana,https://en.wikipedia.org/wiki/Horseradish +jasmine,Jasminum officinale,https://en.wikipedia.org/wiki/Jasmine Jerusalem artichoke,Helianthus tuberosus,https://en.wikipedia.org/wiki/Jerusalem_artichoke -Jicama,Pachyrhizus erosus,https://en.wikipedia.org/wiki/Jicama -Juniper berry,Juniperus communis,https://en.wikipedia.org/wiki/Juniper_berry -Kaffir lime,Citrus x hystrix,https://en.wikipedia.org/wiki/Kaffir_lime -Kale,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Kale -Kava,Piper methysticum,https://en.wikipedia.org/wiki/Kava -Kohlrabi,Brassica oleracea (gongylodes),https://en.wikipedia.org/wiki/Kohlrabi -Lavender,Lavandula spp.,https://en.wikipedia.org/wiki/Lavender -Leek,Allium ampeloprasum var. porrum,https://en.wikipedia.org/wiki/Leeks -Lemon,Citrus limon,https://en.wikipedia.org/wiki/Lemon -Lemon balm,Melissa officinalis,https://en.wikipedia.org/wiki/Lemon_balm -Lemon myrtle,Backhousia citriodora,https://en.wikipedia.org/wiki/Backhousia_citriodora -Lemon verbena,Aloysia citrodora,https://en.wikipedia.org/wiki/Aloysia_citrodora -Lemongrass,Cymbopogon spp.,https://en.wikipedia.org/wiki/Lemongrass -Lentils,Lens culinaris,https://en.wikipedia.org/wiki/Lentil -Lettuce,Lactuca sativa,https://en.wikipedia.org/wiki/Lettuce -Licorice,Glycyrrhiza glabra,https://en.wikipedia.org/wiki/Licorice -Lillipilli,Syzygium luehmannii,https://en.wikipedia.org/wiki/Syzygium_luehmannii -Lima bean,Phaseolus lunatus,https://en.wikipedia.org/wiki/Phaseolus_lunatus -Lime,Citrus spp.,https://en.wikipedia.org/wiki/Lime_%28fruit%29 -Lovage,Levisticum officinale,https://en.wikipedia.org/wiki/Lovage -Luffa,Luffa cylindrica,https://en.wikipedia.org/wiki/Luffa -Lupin bean,Lupinus luteus,https://en.wikipedia.org/wiki/Lupin_bean -Macadamia,Macadamia,https://en.wikipedia.org/wiki/Macadamia +jicama,Pachyrhizus erosus,https://en.wikipedia.org/wiki/Jicama +juniper berry,Juniperus communis,https://en.wikipedia.org/wiki/Juniper_berry +kaffir lime,Citrus x hystrix,https://en.wikipedia.org/wiki/Kaffir_lime +kale,Brassica oleracea (acephala),https://en.wikipedia.org/wiki/Kale +kava,Piper methysticum,https://en.wikipedia.org/wiki/Kava +kohlrabi,Brassica oleracea (gongylodes),https://en.wikipedia.org/wiki/Kohlrabi +lavender,Lavandula spp.,https://en.wikipedia.org/wiki/Lavender +leek,Allium ampeloprasum var. porrum,https://en.wikipedia.org/wiki/Leeks +lemon,Citrus limon,https://en.wikipedia.org/wiki/Lemon +lemon balm,Melissa officinalis,https://en.wikipedia.org/wiki/Lemon_balm +lemon myrtle,Backhousia citriodora,https://en.wikipedia.org/wiki/Backhousia_citriodora +lemon verbena,Aloysia citrodora,https://en.wikipedia.org/wiki/Aloysia_citrodora +lemongrass,Cymbopogon spp.,https://en.wikipedia.org/wiki/Lemongrass +lentils,Lens culinaris,https://en.wikipedia.org/wiki/Lentil +lettuce,Lactuca sativa,https://en.wikipedia.org/wiki/Lettuce +licorice,Glycyrrhiza glabra,https://en.wikipedia.org/wiki/Licorice +lillipilli,Syzygium luehmannii,https://en.wikipedia.org/wiki/Syzygium_luehmannii +lima bean,Phaseolus lunatus,https://en.wikipedia.org/wiki/Phaseolus_lunatus +lime,Citrus spp.,https://en.wikipedia.org/wiki/Lime_%28fruit%29 +lovage,Levisticum officinale,https://en.wikipedia.org/wiki/Lovage +luffa,Luffa cylindrica,https://en.wikipedia.org/wiki/Luffa +lupin bean,Lupinus luteus,https://en.wikipedia.org/wiki/Lupin_bean +macadamia,Macadamia,https://en.wikipedia.org/wiki/Macadamia Malabar spinach,Basella alba,https://en.wikipedia.org/wiki/Basella_alba -Mandarin,Citrus reticulata,https://en.wikipedia.org/wiki/Mandarin_orange -Mango,Mangifera spp.,https://en.wikipedia.org/wiki/Mango -Maracuja,Passiflora edulis,https://en.wikipedia.org/wiki/Maracuja -Marjoram,Origanum majorana,https://en.wikipedia.org/wiki/Marjoram -Marshmallow,Althaea officinalis,https://en.wikipedia.org/wiki/Althaea_officinalis -Medlars,Mespilus germanica,https://en.wikipedia.org/wiki/Mespilus_germanica -Melons,Cucumis melo,https://en.wikipedia.org/wiki/Melon -Miner's lettuce,Claytonia perfoliata,https://en.wikipedia.org/wiki/Claytonia_perfoliata -Mint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata -Mung bean,Vigna radiata,https://en.wikipedia.org/wiki/Mung_bean -Mustard,Brassica juncea,https://en.wikipedia.org/wiki/Mustard_plant -Nasturtium,Tropaeloum spp.,https://en.wikipedia.org/wiki/Tropaeolum +mandarin,Citrus reticulata,https://en.wikipedia.org/wiki/Mandarin_orange +mango,Mangifera spp.,https://en.wikipedia.org/wiki/Mango +maracuja,Passiflora edulis,https://en.wikipedia.org/wiki/Maracuja +marjoram,Origanum majorana,https://en.wikipedia.org/wiki/Marjoram +marshmallow,Althaea officinalis,https://en.wikipedia.org/wiki/Althaea_officinalis +medlar,Mespilus germanica,https://en.wikipedia.org/wiki/Mespilus_germanica +melon,Cucumis melo,https://en.wikipedia.org/wiki/Melon +miner's lettuce,Claytonia perfoliata,https://en.wikipedia.org/wiki/Claytonia_perfoliata +mint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata +mung bean,Vigna radiata,https://en.wikipedia.org/wiki/Mung_bean +mustard,Brassica juncea,https://en.wikipedia.org/wiki/Mustard_plant +nasturtium,Tropaeloum spp.,https://en.wikipedia.org/wiki/Tropaeolum New Zealand spinach,Tetragonia tetragonioides,https://en.wikipedia.org/wiki/Tetragonia -Nigella,Nigella sativa,https://en.wikipedia.org/wiki/Nigella_sativa -Oats,Avena sativa,https://en.wikipedia.org/wiki/Oats -Okra,Abelmoschus esculentus,https://en.wikipedia.org/wiki/Okra -Olive,Olea europaea,https://en.wikipedia.org/wiki/Olive -Onion,Allium cepa,https://en.wikipedia.org/wiki/Onions -Orange,Citrus sinensis,https://en.wikipedia.org/wiki/Orange_%28fruit%29 -Oregano,Origanum vulgare,https://en.wikipedia.org/wiki/Oregano -Parsley,Petroselinum hortense,https://en.wikipedia.org/wiki/Parsley -Parsnip,Pastinaca sativa,https://en.wikipedia.org/wiki/Parsnip -Passion fruit,Passiflora edulis,https://en.wikipedia.org/wiki/Passionfruit -Pea,Pisum sativum,https://en.wikipedia.org/wiki/Pea -Peach,Prunus persica,https://en.wikipedia.org/wiki/Peach -Peach,Prunus persica,https://en.wikipedia.org/wiki/Peach -Peanut,Arachis hypogaea,https://en.wikipedia.org/wiki/Peanut -Pear,Pyrus spp.,https://en.wikipedia.org/wiki/Pear -Pearl millet,Pennisetum glaucum,https://en.wikipedia.org/wiki/Pearl_millet -Pecan,Carya illinoinensis,https://en.wikipedia.org/wiki/Pecan -Peppermint,Mentha x piperita,https://en.wikipedia.org/wiki/Peppermint +nigella,Nigella sativa,https://en.wikipedia.org/wiki/Nigella_sativa +oats,Avena sativa,https://en.wikipedia.org/wiki/Oats +okra,Abelmoschus esculentus,https://en.wikipedia.org/wiki/Okra +olive,Olea europaea,https://en.wikipedia.org/wiki/Olive +onion,Allium cepa,https://en.wikipedia.org/wiki/Onions +orange,Citrus sinensis,https://en.wikipedia.org/wiki/Orange_%28fruit%29 +oregano,Origanum vulgare,https://en.wikipedia.org/wiki/Oregano +parsley,Petroselinum hortense,https://en.wikipedia.org/wiki/Parsley +parsnip,Pastinaca sativa,https://en.wikipedia.org/wiki/Parsnip +passion fruit,Passiflora edulis,https://en.wikipedia.org/wiki/Passionfruit +pea,Pisum sativum,https://en.wikipedia.org/wiki/Pea +peach,Prunus persica,https://en.wikipedia.org/wiki/Peach +peach,Prunus persica,https://en.wikipedia.org/wiki/Peach +peanut,Arachis hypogaea,https://en.wikipedia.org/wiki/Peanut +pear,Pyrus spp.,https://en.wikipedia.org/wiki/Pear +pearl millet,Pennisetum glaucum,https://en.wikipedia.org/wiki/Pearl_millet +pecan,Carya illinoinensis,https://en.wikipedia.org/wiki/Pecan +peppermint,Mentha x piperita,https://en.wikipedia.org/wiki/Peppermint Persian lime,Citrus latifolia,https://en.wikipedia.org/wiki/Persian_lime -Persimmon,Diospyros spp.,https://en.wikipedia.org/wiki/Persimmon -Pigeon pea,Cajanus cajan,https://en.wikipedia.org/wiki/Pigeon_pea -Pigface,Carpobrotus glaucescens,https://en.wikipedia.org/wiki/Carpobrotus_glaucescens -Pineapple,Ananas comosus,https://en.wikipedia.org/wiki/Pineapple -Pistachio,Pistacia vera,https://en.wikipedia.org/wiki/Pistachio -Plantain,Musa spp.,https://en.wikipedia.org/wiki/Plantain -Plum,Prunus spp.,https://en.wikipedia.org/wiki/Plum -Pomegranate,Punica granatum,https://en.wikipedia.org/wiki/Pomegranate -Pomelo,Citrus maxima,https://en.wikipedia.org/wiki/Pomelo -Potato,Solanum tuberosum,https://en.wikipedia.org/wiki/Potatoes -Prickly pear,Opuntia,https://en.wikipedia.org/wiki/Opuntia -Pumpkin,Cucurbita spp.,https://en.wikipedia.org/wiki/Pumpkin -Purslane,Portulaca oleracea,https://en.wikipedia.org/wiki/Portulaca_oleracea -Quandong,Santalum acuminatum,https://en.wikipedia.org/wiki/Santalum_acuminatum -Quince,Cydonia oblonga,https://en.wikipedia.org/wiki/Quince -Quinoa,Chenopodium quinoa,https://en.wikipedia.org/wiki/Quinoa -Radicchio,Cichorium intybus,https://en.wikipedia.org/wiki/Radicchio -Radish,Raphanus sativus,https://en.wikipedia.org/wiki/Radish -Rapeseed,Brassica napus,https://en.wikipedia.org/wiki/Rapeseed -Raspberry,Rubus idaeus,https://en.wikipedia.org/wiki/Rubus_idaeus -Rhubarb,Rheum rhabarbarum,https://en.wikipedia.org/wiki/Rhubarb -Rice,Oryza sativa,https://en.wikipedia.org/wiki/Rice -Rice bean,Vigna umbellata,https://en.wikipedia.org/wiki/Ricebean -Rose,Rosa,https://en.wikipedia.org/wiki/Rose -Roselle,Hibiscus sabdariffa,https://en.wikipedia.org/wiki/Roselle_%28plant%29 -Rosemary,Rosmarinus officinalis,https://en.wikipedia.org/wiki/Rosemary -Rue,Ruta graveolens,https://en.wikipedia.org/wiki/Common_Rue -Runner bean,Phaseolus coccineus,https://en.wikipedia.org/wiki/Runner_bean -Rutabaga,Brassica napus Napobrassica group,https://en.wikipedia.org/wiki/Rutabaga -Rye,Secale cereale,https://en.wikipedia.org/wiki/Rye -Safflower,Carthamus tinctorius,https://en.wikipedia.org/wiki/Safflower -Saffron,Crocus sativus,https://en.wikipedia.org/wiki/Saffron -Sage,Salvia officinalis,https://en.wikipedia.org/wiki/Salvia_officinalis -Salad burnet,Sanguisorba minor,https://en.wikipedia.org/wiki/Salad_burnet -Salsify,Tragopogon porrifolius,https://en.wikipedia.org/wiki/Salsify -Samphire,Crithmum maritimum,https://en.wikipedia.org/wiki/Rock_samphire -Sassafras,Sassafras albidum,https://en.wikipedia.org/wiki/Sassafras_albidum -Sesame,Sesamum indicum,https://en.wikipedia.org/wiki/Sesame -Shallot,Allium cepa var. aggregatum,https://en.wikipedia.org/wiki/Shallot -Sorghum,Sorghum spp.,https://en.wikipedia.org/wiki/Sorghum -Sorrel,Rumex acetosa,https://en.wikipedia.org/wiki/Sorrel -Soursop,Annona muricata,https://en.wikipedia.org/wiki/Soursop -Soybean,Glycine max,https://en.wikipedia.org/wiki/Soybean -Spearmint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata -Spinach,Spinacia oleracea,https://en.wikipedia.org/wiki/Spinach -Star Anise,Illicium verum,https://en.wikipedia.org/wiki/Star_anise -Starfruit,Averrhoa carambola,https://en.wikipedia.org/wiki/Starfruit -Stevia,Stevia rebaudiana,https://en.wikipedia.org/wiki/Stevia -Strawberry,Fragaria ananassa,https://en.wikipedia.org/wiki/Strawberry -Summer savoury,Satureja hortensis,https://en.wikipedia.org/wiki/Summer_savory -Sunflowers,Helianthus annuus,https://en.wikipedia.org/wiki/Sunflower -Sweet potato,Ipomoea batatas,https://en.wikipedia.org/wiki/Sweet_potato +persimmon,Diospyros spp.,https://en.wikipedia.org/wiki/Persimmon +pigeon pea,Cajanus cajan,https://en.wikipedia.org/wiki/Pigeon_pea +pigface,Carpobrotus glaucescens,https://en.wikipedia.org/wiki/Carpobrotus_glaucescens +pineapple,Ananas comosus,https://en.wikipedia.org/wiki/Pineapple +pistachio,Pistacia vera,https://en.wikipedia.org/wiki/Pistachio +plantain,Musa spp.,https://en.wikipedia.org/wiki/Plantain +plum,Prunus spp.,https://en.wikipedia.org/wiki/Plum +pomegranate,Punica granatum,https://en.wikipedia.org/wiki/Pomegranate +pomelo,Citrus maxima,https://en.wikipedia.org/wiki/Pomelo +potato,Solanum tuberosum,https://en.wikipedia.org/wiki/Potatoes +prickly pear,Opuntia,https://en.wikipedia.org/wiki/Opuntia +pumpkin,Cucurbita spp.,https://en.wikipedia.org/wiki/Pumpkin +purslane,Portulaca oleracea,https://en.wikipedia.org/wiki/Portulaca_oleracea +quandong,Santalum acuminatum,https://en.wikipedia.org/wiki/Santalum_acuminatum +quince,Cydonia oblonga,https://en.wikipedia.org/wiki/Quince +quinoa,Chenopodium quinoa,https://en.wikipedia.org/wiki/Quinoa +radicchio,Cichorium intybus,https://en.wikipedia.org/wiki/Radicchio +radish,Raphanus sativus,https://en.wikipedia.org/wiki/Radish +rapeseed,Brassica napus,https://en.wikipedia.org/wiki/Rapeseed +raspberry,Rubus idaeus,https://en.wikipedia.org/wiki/Rubus_idaeus +rhubarb,Rheum rhabarbarum,https://en.wikipedia.org/wiki/Rhubarb +rice,Oryza sativa,https://en.wikipedia.org/wiki/Rice +rice bean,Vigna umbellata,https://en.wikipedia.org/wiki/Ricebean +rose,Rosa,https://en.wikipedia.org/wiki/Rose +roselle,Hibiscus sabdariffa,https://en.wikipedia.org/wiki/Roselle_%28plant%29 +rosemary,Rosmarinus officinalis,https://en.wikipedia.org/wiki/Rosemary +rue,Ruta graveolens,https://en.wikipedia.org/wiki/Common_Rue +runner bean,Phaseolus coccineus,https://en.wikipedia.org/wiki/Runner_bean +rutabaga,Brassica napus Napobrassica group,https://en.wikipedia.org/wiki/Rutabaga +rye,Secale cereale,https://en.wikipedia.org/wiki/Rye +safflower,Carthamus tinctorius,https://en.wikipedia.org/wiki/Safflower +saffron,Crocus sativus,https://en.wikipedia.org/wiki/Saffron +sage,Salvia officinalis,https://en.wikipedia.org/wiki/Salvia_officinalis +salad burnet,Sanguisorba minor,https://en.wikipedia.org/wiki/Salad_burnet +salsify,Tragopogon porrifolius,https://en.wikipedia.org/wiki/Salsify +samphire,Crithmum maritimum,https://en.wikipedia.org/wiki/Rock_samphire +sassafras,Sassafras albidum,https://en.wikipedia.org/wiki/Sassafras_albidum +sesame,Sesamum indicum,https://en.wikipedia.org/wiki/Sesame +shallot,Allium cepa var. aggregatum,https://en.wikipedia.org/wiki/Shallot +sorghum,Sorghum spp.,https://en.wikipedia.org/wiki/Sorghum +sorrel,Rumex acetosa,https://en.wikipedia.org/wiki/Sorrel +soursop,Annona muricata,https://en.wikipedia.org/wiki/Soursop +soybean,Glycine max,https://en.wikipedia.org/wiki/Soybean +spearmint,Mentha spicata,https://en.wikipedia.org/wiki/Mentha_spicata +spinach,Spinacia oleracea,https://en.wikipedia.org/wiki/Spinach +star anise,Illicium verum,https://en.wikipedia.org/wiki/Star_anise +starfruit,Averrhoa carambola,https://en.wikipedia.org/wiki/Starfruit +stevia,Stevia rebaudiana,https://en.wikipedia.org/wiki/Stevia +strawberry,Fragaria ananassa,https://en.wikipedia.org/wiki/Strawberry +summer savory,Satureja hortensis,https://en.wikipedia.org/wiki/Summer_savory +sunflowers,Helianthus annuus,https://en.wikipedia.org/wiki/Sunflower +sweet potato,Ipomoea batatas,https://en.wikipedia.org/wiki/Sweet_potato Swiss chard,Beta vulgaris var. cicla,https://en.wikipedia.org/wiki/Swiss_chard -Tamarillo,Solanum betaceum ,https://en.wikipedia.org/wiki/Tamarillo -Tamarind,Tamarindus indica,https://en.wikipedia.org/wiki/Tamarind -Tangerine,Citrus tangerina,https://en.wikipedia.org/wiki/Tangerine -Tansy,Tanacetum vulgare,https://en.wikipedia.org/wiki/Tansy -Taro,Colocasia esculenta,https://en.wikipedia.org/wiki/Taro -Tarragon,Artemisia dracunculus,https://en.wikipedia.org/wiki/Tarragon -Thyme,Thymus mongolicus,https://en.wikipedia.org/wiki/Thyme -Tomatillo,Physalis philadelphica,https://en.wikipedia.org/wiki/Tomatillo -Tomato,Solanum lycopersicum,https://en.wikipedia.org/wiki/Tomato -Turmeric,Curcuma longa,https://en.wikipedia.org/wiki/Turmeric -Turnip,Brassica rapa var. rapa,https://en.wikipedia.org/wiki/Turnip -Urad bean,Vigna mungo,https://en.wikipedia.org/wiki/Urad_(bean) -Valerian,Valeriana officinalis,https://en.wikipedia.org/wiki/Valerian_%28plant%29 -Vanilla,Vanilla planifolia,https://en.wikipedia.org/wiki/Vanilla -Walnut,Juglans spp.,https://en.wikipedia.org/wiki/Walnut -Wasabi,Wasabia japonica,https://en.wikipedia.org/wiki/Wasabi -Watermelon,Citrullus lanatus,https://en.wikipedia.org/wiki/Watermelon -Wheat,Triticum spp.,https://en.wikipedia.org/wiki/Wheat -Winter savoury,Satureja montana,https://en.wikipedia.org/wiki/Winter_savory -Wormwood,Artemisia absinthium,https://en.wikipedia.org/wiki/Artemisia_absinthium -Yam,Dioscorea spp.,https://en.wikipedia.org/wiki/Yam_(vegetable) -Yardlong bean,Vigna unguiculata (sesquipedalis),https://en.wikipedia.org/wiki/Yardlong_bean -Yarrow,Achillea millefolium,https://en.wikipedia.org/wiki/Achillea_millefolium -Zucchini,Cucurbita pepo.,https://en.wikipedia.org/wiki/Zucchini -Coffee,Coffea,https://en.wikipedia.org/wiki/Coffee -Tea,Camellia sinensis,https://en.wikipedia.org/wiki/Tea +tamarillo,Solanum betaceum ,https://en.wikipedia.org/wiki/Tamarillo +tamarind,Tamarindus indica,https://en.wikipedia.org/wiki/Tamarind +tangerine,Citrus tangerina,https://en.wikipedia.org/wiki/Tangerine +tansy,Tanacetum vulgare,https://en.wikipedia.org/wiki/Tansy +taro,Colocasia esculenta,https://en.wikipedia.org/wiki/Taro +tarragon,Artemisia dracunculus,https://en.wikipedia.org/wiki/Tarragon +thyme,Thymus mongolicus,https://en.wikipedia.org/wiki/Thyme +tomatillo,Physalis philadelphica,https://en.wikipedia.org/wiki/Tomatillo +tomato,Solanum lycopersicum,https://en.wikipedia.org/wiki/Tomato +turmeric,Curcuma longa,https://en.wikipedia.org/wiki/Turmeric +turnip,Brassica rapa var. rapa,https://en.wikipedia.org/wiki/Turnip +urad bean,Vigna mungo,https://en.wikipedia.org/wiki/Urad_(bean) +valerian,Valeriana officinalis,https://en.wikipedia.org/wiki/Valerian_%28plant%29 +vanilla,Vanilla planifolia,https://en.wikipedia.org/wiki/Vanilla +walnut,Juglans spp.,https://en.wikipedia.org/wiki/Walnut +wasabi,Wasabia japonica,https://en.wikipedia.org/wiki/Wasabi +watermelon,Citrullus lanatus,https://en.wikipedia.org/wiki/Watermelon +wheat,Triticum spp.,https://en.wikipedia.org/wiki/Wheat +winter savory,Satureja montana,https://en.wikipedia.org/wiki/Winter_savory +wormwood,Artemisia absinthium,https://en.wikipedia.org/wiki/Artemisia_absinthium +yam,Dioscorea spp.,https://en.wikipedia.org/wiki/Yam_(vegetable) +yardlong bean,Vigna unguiculata (sesquipedalis),https://en.wikipedia.org/wiki/Yardlong_bean +yarrow,Achillea millefolium,https://en.wikipedia.org/wiki/Achillea_millefolium +zucchini,Cucurbita pepo.,https://en.wikipedia.org/wiki/Zucchini +coffee,Coffea,https://en.wikipedia.org/wiki/Coffee +tea,Camellia sinensis,https://en.wikipedia.org/wiki/Tea