Merge pull request #44 from Skud/cropimport

Crop import
This commit is contained in:
pozorvlak
2012-11-08 02:25:23 -08:00
31 changed files with 836 additions and 23 deletions

View File

@@ -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)

View File

@@ -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/

View File

@@ -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

View File

@@ -0,0 +1,2 @@
module ScientificNamesHelper
end

View File

@@ -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

View File

@@ -0,0 +1,4 @@
class ScientificName < ActiveRecord::Base
attr_accessible :crop_id, :scientific_name
belongs_to :crop
end

View File

@@ -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

View File

@@ -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

View File

@@ -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'

View File

@@ -0,0 +1,11 @@
%h1 Editing scientific_name
- 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.

View File

@@ -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

View File

@@ -0,0 +1,11 @@
%h1 New scientific_name
- 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.

View File

@@ -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

View File

@@ -1,4 +1,6 @@
Growstuff::Application.routes.draw do
resources :scientific_names
resources :crops, :members
devise_for :users

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

233
db/seeds/crops.csv Normal file
View File

@@ -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
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
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 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 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
1 achiote Bixa orellana https://en.wikipedia.org/wiki/Bixa_orellana
2 ackee Blighia sapida https://en.wikipedia.org/wiki/Ackee
3 acuyo Piper auritum https://en.wikipedia.org/wiki/Piper_auritum
4 alexanders Smyrnium olusatrum https://en.wikipedia.org/wiki/Alexanders
5 alfalfa Medicago sativa https://en.wikipedia.org/wiki/Alfalfa
6 allspice Pimenta dioica https://en.wikipedia.org/wiki/Allspice
7 almond Prunus dulcis https://en.wikipedia.org/wiki/Almond
8 amaranth Amaranthus spp. https://en.wikipedia.org/wiki/Amaranth
9 anise Pimpinella anisum https://en.wikipedia.org/wiki/Anise
10 apple Malus domestica https://en.wikipedia.org/wiki/Apple
11 apple mint Mentha suaveolens https://en.wikipedia.org/wiki/Apple_mint
12 apricot Prunus armeniaca https://en.wikipedia.org/wiki/Apricot
13 arrowroot Maranta arundinacea https://en.wikipedia.org/wiki/Maranta_arundinacea
14 artichoke Cynara cardunculus https://en.wikipedia.org/wiki/Artichoke
15 arugula Eruca sativa https://en.wikipedia.org/wiki/Arugula
16 asparagus Asparagus officinalis https://en.wikipedia.org/wiki/Asparagus
17 avocado Persea americana https://en.wikipedia.org/wiki/Avocado
18 banana Musa spp. https://en.wikipedia.org/wiki/Banana
19 barley Hordeum vulgare https://en.wikipedia.org/wiki/Barley
20 basil Ocimum basilicum https://en.wikipedia.org/wiki/Basil
21 bay Laurus nobilis https://en.wikipedia.org/wiki/Bay_Laurel
22 bean Phaseolus vulgaris https://en.wikipedia.org/wiki/Common_bean
23 beet Beta vulgaris https://en.wikipedia.org/wiki/Beet
24 bell pepper Capsicum annuum https://en.wikipedia.org/wiki/Bell_pepper
25 bitter melon Momordica charantia https://en.wikipedia.org/wiki/Bitter_melon
26 blackberry Rubus fruticosus https://en.wikipedia.org/wiki/Blackberry
27 blackcurrant Ribes spp. https://en.wikipedia.org/wiki/Ribes
28 borage Borago officinalis https://en.wikipedia.org/wiki/Borage
29 breadfruit Artocarpus altilis https://en.wikipedia.org/wiki/Breadfruit
30 broccoli Brassica oleracea https://en.wikipedia.org/wiki/Broccoli
31 Brussels sprout Brassica oleracea https://en.wikipedia.org/wiki/Brussels_sprout
32 buckwheat Fagopyrum esculentum https://en.wikipedia.org/wiki/Buckwheat
33 cabbage Brassica oleracea https://en.wikipedia.org/wiki/Cabbage
34 cape gooseberry Physalis peruviana https://en.wikipedia.org/wiki/Physalis_peruviana
35 caper Capparis spinosa https://en.wikipedia.org/wiki/Caper
36 cardoon Cynara cardunculus https://en.wikipedia.org/wiki/Cardoon
37 carrot Daucus carota https://en.wikipedia.org/wiki/Carrot
38 cassava Manihot esculenta https://en.wikipedia.org/wiki/Cassava
39 catnip Nepeta cataria https://en.wikipedia.org/wiki/Nepeta_cataria
40 cauliflower Brassica oleracea https://en.wikipedia.org/wiki/Cauliflower
41 cayenne pepper Capsicum annuum https://en.wikipedia.org/wiki/Cayenne_pepper
42 celeriac Apium graveolens var. rapaceum https://en.wikipedia.org/wiki/Celeriac
43 celery Apium graveolens https://en.wikipedia.org/wiki/Celery
44 chamomile Matricaria chamomila https://en.wikipedia.org/wiki/Matricaria_recutita
45 chaya Cnidoscolus aconitifolius https://en.wikipedia.org/wiki/Cnidoscolus_aconitifolius
46 chayote Sechium edule https://en.wikipedia.org/wiki/Chayote
47 cherry Prunus avium https://en.wikipedia.org/wiki/Cherry
48 chervil Anthriscus cerefolium https://en.wikipedia.org/wiki/Chervil
49 chestnut Castanea spp. https://en.wikipedia.org/wiki/Chestnut
50 chickpeas Cicer arietinum https://en.wikipedia.org/wiki/Chickpea
51 chickweed Stellaria https://en.wikipedia.org/wiki/Stellaria
52 chicory Cichorium intybus https://en.wikipedia.org/wiki/Chicory
53 chinese cabbage Brassica rapa (pekinensis) https://en.wikipedia.org/wiki/Chinese_cabbage
54 chives Allium schoenoprasum https://en.wikipedia.org/wiki/Chives
55 cicely Myrrhis odorata https://en.wikipedia.org/wiki/Cicely
56 citron Citrus medica https://en.wikipedia.org/wiki/Citron
57 coconut Cocos nucifera https://en.wikipedia.org/wiki/Coconut
58 collard greens Brassica oleracea (acephala) https://en.wikipedia.org/wiki/Collard_greens
59 comfrey Symphytum officinale https://en.wikipedia.org/wiki/Comfrey
60 coriander Coriandrum sativum https://en.wikipedia.org/wiki/Coriander
61 corn Zea mays https://en.wikipedia.org/wiki/Corn
62 corn salad Valerianella locusta https://en.wikipedia.org/wiki/Corn_salad
63 cress Lepidium sativum https://en.wikipedia.org/wiki/Garden_cress
64 cucumber Cucumis sativus https://en.wikipedia.org/wiki/Cucumbers
65 cumin Cuminum cyminum https://en.wikipedia.org/wiki/Cumin
66 cumquat Citrus japonica https://en.wikipedia.org/wiki/Kumquat
67 curry leaf Murraya koenigii https://en.wikipedia.org/wiki/Curry-leaf_Tree
68 curry plant Helichrysum italicum https://en.wikipedia.org/wiki/Helichrysum_italicum
69 daikon Raphanus sativus Longipinnatus group https://en.wikipedia.org/wiki/Daikon
70 dandelion Taraxacum officinale https://en.wikipedia.org/wiki/Dandelion
71 dates Phoenix dactylifera https://en.wikipedia.org/wiki/Date_%28fruit%29
72 desert lime Citrus glauca https://en.wikipedia.org/wiki/Citrus_glauca
73 dill Anethum graveolens https://en.wikipedia.org/wiki/Dill
74 dog rose Rosa canina https://en.wikipedia.org/wiki/Rosa_canina
75 durian Durio https://en.wikipedia.org/wiki/Durian
76 eggplant Solanum melongena https://en.wikipedia.org/wiki/Eggplant
77 elderberry Sambucus nigra https://en.wikipedia.org/wiki/Sambucus_nigra
78 endive Cichorium endivia https://en.wikipedia.org/wiki/Endive
79 epazote Dysphania ambrosioides https://en.wikipedia.org/wiki/Epazote
80 fava bean Vicia faba https://en.wikipedia.org/wiki/Vicia_faba
81 feijoa Acca sellowiana https://en.wikipedia.org/wiki/Acca_sellowiana
82 fennel Foeniculum vulgare https://en.wikipedia.org/wiki/Fennel
83 fenugreek Trigonella foenum-graecum https://en.wikipedia.org/wiki/Fenugreek
84 fiddlehead Pteridium aquilinum https://en.wikipedia.org/wiki/Fiddlehead
85 fig Ficus carica https://en.wikipedia.org/wiki/Common_fig
86 flax Linum usitatissimum https://en.wikipedia.org/wiki/Flax
87 garlic Allium sativum https://en.wikipedia.org/wiki/Garlic
88 garlic chives Allium tuberosum https://en.wikipedia.org/wiki/Garlic_chives
89 ginger Zingiber officinale https://en.wikipedia.org/wiki/Ginger
90 gooseberry Ribes uva-crispa https://en.wikipedia.org/wiki/Gooseberry
91 grapefruit Citrus paradisi https://en.wikipedia.org/wiki/Grapefruit
92 grapes Vitis spp. https://en.wikipedia.org/wiki/Grape
93 guava Psidium spp. https://en.wikipedia.org/wiki/Guava
94 habanero Capsicum chinense https://en.wikipedia.org/wiki/Habanero
95 hibiscus Hibiscus https://en.wikipedia.org/wiki/Hibiscus
96 horseradish Armoracia rusticana https://en.wikipedia.org/wiki/Horseradish
97 jasmine Jasminum officinale https://en.wikipedia.org/wiki/Jasmine
98 Jerusalem artichoke Helianthus tuberosus https://en.wikipedia.org/wiki/Jerusalem_artichoke
99 jicama Pachyrhizus erosus https://en.wikipedia.org/wiki/Jicama
100 juniper berry Juniperus communis https://en.wikipedia.org/wiki/Juniper_berry
101 kaffir lime Citrus x hystrix https://en.wikipedia.org/wiki/Kaffir_lime
102 kale Brassica oleracea (acephala) https://en.wikipedia.org/wiki/Kale
103 kava Piper methysticum https://en.wikipedia.org/wiki/Kava
104 kohlrabi Brassica oleracea (gongylodes) https://en.wikipedia.org/wiki/Kohlrabi
105 lavender Lavandula spp. https://en.wikipedia.org/wiki/Lavender
106 leek Allium ampeloprasum var. porrum https://en.wikipedia.org/wiki/Leeks
107 lemon Citrus limon https://en.wikipedia.org/wiki/Lemon
108 lemon balm Melissa officinalis https://en.wikipedia.org/wiki/Lemon_balm
109 lemon myrtle Backhousia citriodora https://en.wikipedia.org/wiki/Backhousia_citriodora
110 lemon verbena Aloysia citrodora https://en.wikipedia.org/wiki/Aloysia_citrodora
111 lemongrass Cymbopogon spp. https://en.wikipedia.org/wiki/Lemongrass
112 lentils Lens culinaris https://en.wikipedia.org/wiki/Lentil
113 lettuce Lactuca sativa https://en.wikipedia.org/wiki/Lettuce
114 licorice Glycyrrhiza glabra https://en.wikipedia.org/wiki/Licorice
115 lillipilli Syzygium luehmannii https://en.wikipedia.org/wiki/Syzygium_luehmannii
116 lima bean Phaseolus lunatus https://en.wikipedia.org/wiki/Phaseolus_lunatus
117 lime Citrus spp. https://en.wikipedia.org/wiki/Lime_%28fruit%29
118 lovage Levisticum officinale https://en.wikipedia.org/wiki/Lovage
119 luffa Luffa cylindrica https://en.wikipedia.org/wiki/Luffa
120 lupin bean Lupinus luteus https://en.wikipedia.org/wiki/Lupin_bean
121 macadamia Macadamia https://en.wikipedia.org/wiki/Macadamia
122 Malabar spinach Basella alba https://en.wikipedia.org/wiki/Basella_alba
123 mandarin Citrus reticulata https://en.wikipedia.org/wiki/Mandarin_orange
124 mango Mangifera spp. https://en.wikipedia.org/wiki/Mango
125 maracuja Passiflora edulis https://en.wikipedia.org/wiki/Maracuja
126 marjoram Origanum majorana https://en.wikipedia.org/wiki/Marjoram
127 marshmallow Althaea officinalis https://en.wikipedia.org/wiki/Althaea_officinalis
128 medlar Mespilus germanica https://en.wikipedia.org/wiki/Mespilus_germanica
129 melon Cucumis melo https://en.wikipedia.org/wiki/Melon
130 miner's lettuce Claytonia perfoliata https://en.wikipedia.org/wiki/Claytonia_perfoliata
131 mint Mentha spicata https://en.wikipedia.org/wiki/Mentha_spicata
132 mung bean Vigna radiata https://en.wikipedia.org/wiki/Mung_bean
133 mustard Brassica juncea https://en.wikipedia.org/wiki/Mustard_plant
134 nasturtium Tropaeloum spp. https://en.wikipedia.org/wiki/Tropaeolum
135 New Zealand spinach Tetragonia tetragonioides https://en.wikipedia.org/wiki/Tetragonia
136 nigella Nigella sativa https://en.wikipedia.org/wiki/Nigella_sativa
137 oats Avena sativa https://en.wikipedia.org/wiki/Oats
138 okra Abelmoschus esculentus https://en.wikipedia.org/wiki/Okra
139 olive Olea europaea https://en.wikipedia.org/wiki/Olive
140 onion Allium cepa https://en.wikipedia.org/wiki/Onions
141 orange Citrus sinensis https://en.wikipedia.org/wiki/Orange_%28fruit%29
142 oregano Origanum vulgare https://en.wikipedia.org/wiki/Oregano
143 parsley Petroselinum hortense https://en.wikipedia.org/wiki/Parsley
144 parsnip Pastinaca sativa https://en.wikipedia.org/wiki/Parsnip
145 passion fruit Passiflora edulis https://en.wikipedia.org/wiki/Passionfruit
146 pea Pisum sativum https://en.wikipedia.org/wiki/Pea
147 peach Prunus persica https://en.wikipedia.org/wiki/Peach
148 peach Prunus persica https://en.wikipedia.org/wiki/Peach
149 peanut Arachis hypogaea https://en.wikipedia.org/wiki/Peanut
150 pear Pyrus spp. https://en.wikipedia.org/wiki/Pear
151 pearl millet Pennisetum glaucum https://en.wikipedia.org/wiki/Pearl_millet
152 pecan Carya illinoinensis https://en.wikipedia.org/wiki/Pecan
153 peppermint Mentha x piperita https://en.wikipedia.org/wiki/Peppermint
154 Persian lime Citrus latifolia https://en.wikipedia.org/wiki/Persian_lime
155 persimmon Diospyros spp. https://en.wikipedia.org/wiki/Persimmon
156 pigeon pea Cajanus cajan https://en.wikipedia.org/wiki/Pigeon_pea
157 pigface Carpobrotus glaucescens https://en.wikipedia.org/wiki/Carpobrotus_glaucescens
158 pineapple Ananas comosus https://en.wikipedia.org/wiki/Pineapple
159 pistachio Pistacia vera https://en.wikipedia.org/wiki/Pistachio
160 plantain Musa spp. https://en.wikipedia.org/wiki/Plantain
161 plum Prunus spp. https://en.wikipedia.org/wiki/Plum
162 pomegranate Punica granatum https://en.wikipedia.org/wiki/Pomegranate
163 pomelo Citrus maxima https://en.wikipedia.org/wiki/Pomelo
164 potato Solanum tuberosum https://en.wikipedia.org/wiki/Potatoes
165 prickly pear Opuntia https://en.wikipedia.org/wiki/Opuntia
166 pumpkin Cucurbita spp. https://en.wikipedia.org/wiki/Pumpkin
167 purslane Portulaca oleracea https://en.wikipedia.org/wiki/Portulaca_oleracea
168 quandong Santalum acuminatum https://en.wikipedia.org/wiki/Santalum_acuminatum
169 quince Cydonia oblonga https://en.wikipedia.org/wiki/Quince
170 quinoa Chenopodium quinoa https://en.wikipedia.org/wiki/Quinoa
171 radicchio Cichorium intybus https://en.wikipedia.org/wiki/Radicchio
172 radish Raphanus sativus https://en.wikipedia.org/wiki/Radish
173 rapeseed Brassica napus https://en.wikipedia.org/wiki/Rapeseed
174 raspberry Rubus idaeus https://en.wikipedia.org/wiki/Rubus_idaeus
175 rhubarb Rheum rhabarbarum https://en.wikipedia.org/wiki/Rhubarb
176 rice Oryza sativa https://en.wikipedia.org/wiki/Rice
177 rice bean Vigna umbellata https://en.wikipedia.org/wiki/Ricebean
178 rose Rosa https://en.wikipedia.org/wiki/Rose
179 roselle Hibiscus sabdariffa https://en.wikipedia.org/wiki/Roselle_%28plant%29
180 rosemary Rosmarinus officinalis https://en.wikipedia.org/wiki/Rosemary
181 rue Ruta graveolens https://en.wikipedia.org/wiki/Common_Rue
182 runner bean Phaseolus coccineus https://en.wikipedia.org/wiki/Runner_bean
183 rutabaga Brassica napus Napobrassica group https://en.wikipedia.org/wiki/Rutabaga
184 rye Secale cereale https://en.wikipedia.org/wiki/Rye
185 safflower Carthamus tinctorius https://en.wikipedia.org/wiki/Safflower
186 saffron Crocus sativus https://en.wikipedia.org/wiki/Saffron
187 sage Salvia officinalis https://en.wikipedia.org/wiki/Salvia_officinalis
188 salad burnet Sanguisorba minor https://en.wikipedia.org/wiki/Salad_burnet
189 salsify Tragopogon porrifolius https://en.wikipedia.org/wiki/Salsify
190 samphire Crithmum maritimum https://en.wikipedia.org/wiki/Rock_samphire
191 sassafras Sassafras albidum https://en.wikipedia.org/wiki/Sassafras_albidum
192 sesame Sesamum indicum https://en.wikipedia.org/wiki/Sesame
193 shallot Allium cepa var. aggregatum https://en.wikipedia.org/wiki/Shallot
194 sorghum Sorghum spp. https://en.wikipedia.org/wiki/Sorghum
195 sorrel Rumex acetosa https://en.wikipedia.org/wiki/Sorrel
196 soursop Annona muricata https://en.wikipedia.org/wiki/Soursop
197 soybean Glycine max https://en.wikipedia.org/wiki/Soybean
198 spearmint Mentha spicata https://en.wikipedia.org/wiki/Mentha_spicata
199 spinach Spinacia oleracea https://en.wikipedia.org/wiki/Spinach
200 star anise Illicium verum https://en.wikipedia.org/wiki/Star_anise
201 starfruit Averrhoa carambola https://en.wikipedia.org/wiki/Starfruit
202 stevia Stevia rebaudiana https://en.wikipedia.org/wiki/Stevia
203 strawberry Fragaria ananassa https://en.wikipedia.org/wiki/Strawberry
204 summer savory Satureja hortensis https://en.wikipedia.org/wiki/Summer_savory
205 sunflowers Helianthus annuus https://en.wikipedia.org/wiki/Sunflower
206 sweet potato Ipomoea batatas https://en.wikipedia.org/wiki/Sweet_potato
207 Swiss chard Beta vulgaris var. cicla https://en.wikipedia.org/wiki/Swiss_chard
208 tamarillo Solanum betaceum https://en.wikipedia.org/wiki/Tamarillo
209 tamarind Tamarindus indica https://en.wikipedia.org/wiki/Tamarind
210 tangerine Citrus tangerina https://en.wikipedia.org/wiki/Tangerine
211 tansy Tanacetum vulgare https://en.wikipedia.org/wiki/Tansy
212 taro Colocasia esculenta https://en.wikipedia.org/wiki/Taro
213 tarragon Artemisia dracunculus https://en.wikipedia.org/wiki/Tarragon
214 thyme Thymus mongolicus https://en.wikipedia.org/wiki/Thyme
215 tomatillo Physalis philadelphica https://en.wikipedia.org/wiki/Tomatillo
216 tomato Solanum lycopersicum https://en.wikipedia.org/wiki/Tomato
217 turmeric Curcuma longa https://en.wikipedia.org/wiki/Turmeric
218 turnip Brassica rapa var. rapa https://en.wikipedia.org/wiki/Turnip
219 urad bean Vigna mungo https://en.wikipedia.org/wiki/Urad_(bean)
220 valerian Valeriana officinalis https://en.wikipedia.org/wiki/Valerian_%28plant%29
221 vanilla Vanilla planifolia https://en.wikipedia.org/wiki/Vanilla
222 walnut Juglans spp. https://en.wikipedia.org/wiki/Walnut
223 wasabi Wasabia japonica https://en.wikipedia.org/wiki/Wasabi
224 watermelon Citrullus lanatus https://en.wikipedia.org/wiki/Watermelon
225 wheat Triticum spp. https://en.wikipedia.org/wiki/Wheat
226 winter savory Satureja montana https://en.wikipedia.org/wiki/Winter_savory
227 wormwood Artemisia absinthium https://en.wikipedia.org/wiki/Artemisia_absinthium
228 yam Dioscorea spp. https://en.wikipedia.org/wiki/Yam_(vegetable)
229 yardlong bean Vigna unguiculata (sesquipedalis) https://en.wikipedia.org/wiki/Yardlong_bean
230 yarrow Achillea millefolium https://en.wikipedia.org/wiki/Achillea_millefolium
231 zucchini Cucurbita pepo. https://en.wikipedia.org/wiki/Zucchini
232 coffee Coffea https://en.wikipedia.org/wiki/Coffee
233 tea Camellia sinensis https://en.wikipedia.org/wiki/Tea

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,5 @@
require 'spec_helper'
describe ScientificName do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,36 @@
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
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

View File

@@ -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

View File

@@ -0,0 +1,37 @@
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
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

View File

@@ -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 <p>" 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