Merge pull request #1059 from Br3nda/bw/trailing-whitespace-begone

Removed all trailing white space
This commit is contained in:
Daniel O'Connor
2016-11-16 14:34:49 +10:30
committed by GitHub
231 changed files with 1163 additions and 1402 deletions

View File

@@ -2446,44 +2446,6 @@ Style/TernaryParentheses:
Exclude:
- 'app/helpers/plantings_helper.rb'
# Offense count: 31
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: final_newline, final_blank_line
Style/TrailingBlankLines:
Exclude:
- 'app/controllers/omniauth_callbacks_controller.rb'
- 'app/controllers/passwords_controller.rb'
- 'app/helpers/application_helper.rb'
- 'app/helpers/seeds_helper.rb'
- 'config.rb'
- 'config/application.rb'
- 'config/environments/test.rb'
- 'config/initializers/geocoder.rb'
- 'config/initializers/sidekiq.rb'
- 'db/migrate/20140928044231_add_crops_posts_table.rb'
- 'db/migrate/20150201052245_create_cms.rb'
- 'lib/actions/oauth_signup_action.rb'
- 'script/check_contributors_md'
- 'spec/features/cms_spec.rb'
- 'spec/features/comments/commenting_a_comment_spec.rb'
- 'spec/features/crops/creating_a_crop_spec.rb'
- 'spec/features/members_list_spec.rb'
- 'spec/features/notifications_spec.rb'
- 'spec/features/photos/show_photo_spec.rb'
- 'spec/features/places/searching_a_place_spec.rb'
- 'spec/features/plantings/planting_a_crop_spec.rb'
- 'spec/features/shared_examples/append_date.rb'
- 'spec/features/unsubscribing_spec.rb'
- 'spec/helpers/plantings_helper_spec.rb'
- 'spec/lib/actions/oauth_signup_action_spec.rb'
- 'spec/models/follow_spec.rb'
- 'spec/support/database_cleaner.rb'
- 'spec/support/feature_helpers.rb'
- 'spec/views/devise/mailer/unlock_instructions_spec.rb'
- 'spec/views/plant_parts/show.html.haml_spec.rb'
- 'spec/views/plantings/_form.html.haml_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
@@ -2505,186 +2467,6 @@ Style/TrailingCommaInLiteral:
- 'config/environments/test.rb'
- 'spec/rails_helper.rb'
# Offense count: 977
# Cop supports --auto-correct.
Style/TrailingWhitespace:
Exclude:
- 'app/controllers/account_types_controller.rb'
- 'app/controllers/accounts_controller.rb'
- 'app/controllers/comments_controller.rb'
- 'app/controllers/crops_controller.rb'
- 'app/controllers/harvests_controller.rb'
- 'app/controllers/members_controller.rb'
- 'app/controllers/notifications_controller.rb'
- 'app/controllers/photos_controller.rb'
- 'app/controllers/roles_controller.rb'
- 'app/helpers/seeds_helper.rb'
- 'app/mailers/notifier.rb'
- 'app/models/ability.rb'
- 'app/models/account.rb'
- 'app/models/harvest.rb'
- 'app/models/member.rb'
- 'app/models/order.rb'
- 'app/models/planting.rb'
- 'app/models/post.rb'
- 'config/environments/development.rb'
- 'config/environments/staging.rb'
- 'config/environments/test.rb'
- 'db/migrate/20130326092227_change_planted_at_to_date.rb'
- 'db/migrate/20150201052245_create_cms.rb'
- 'db/seeds.rb'
- 'lib/actions/oauth_signup_action.rb'
- 'lib/tasks/growstuff.rake'
- 'spec/controllers/account_types_controller_spec.rb'
- 'spec/controllers/accounts_controller_spec.rb'
- 'spec/controllers/admin/orders_controller_spec.rb'
- 'spec/controllers/admin_controller_spec.rb'
- 'spec/controllers/authentications_controller_spec.rb'
- 'spec/controllers/comments_controller_spec.rb'
- 'spec/controllers/crops_controller_spec.rb'
- 'spec/controllers/forums_controller_spec.rb'
- 'spec/controllers/gardens_controller_spec.rb'
- 'spec/controllers/harvests_controller_spec.rb'
- 'spec/controllers/home_controller_spec.rb'
- 'spec/controllers/member_controller_spec.rb'
- 'spec/controllers/notifications_controller_spec.rb'
- 'spec/controllers/order_items_controller_spec.rb'
- 'spec/controllers/orders_controller_spec.rb'
- 'spec/controllers/photos_controller_spec.rb'
- 'spec/controllers/places_controller_spec.rb'
- 'spec/controllers/plant_parts_controller_spec.rb'
- 'spec/controllers/plantings_controller_spec.rb'
- 'spec/controllers/posts_controller_spec.rb'
- 'spec/controllers/products_controller_spec.rb'
- 'spec/controllers/registrations_controller_spec.rb'
- 'spec/controllers/roles_controller_spec.rb'
- 'spec/controllers/scientific_names_controller_spec.rb'
- 'spec/controllers/seeds_controller_spec.rb'
- 'spec/controllers/shop_controller_spec.rb'
- 'spec/factories/crop.rb'
- 'spec/factories/follows.rb'
- 'spec/features/admin/forums_spec.rb'
- 'spec/features/admin/products_spec.rb'
- 'spec/features/crops/crop_detail_page_spec.rb'
- 'spec/features/planting_reminder_spec.rb'
- 'spec/features/plantings/planting_a_crop_spec.rb'
- 'spec/features/signin_spec.rb'
- 'spec/features/signup_spec.rb'
- 'spec/helpers/crops_helper_spec.rb'
- 'spec/helpers/notifications_helper_spec.rb'
- 'spec/lib/actions/oauth_signup_action_spec.rb'
- 'spec/models/ability_spec.rb'
- 'spec/models/comment_spec.rb'
- 'spec/models/crop_spec.rb'
- 'spec/models/follow_spec.rb'
- 'spec/models/garden_spec.rb'
- 'spec/models/harvest_spec.rb'
- 'spec/models/member_spec.rb'
- 'spec/models/order_spec.rb'
- 'spec/models/planting_spec.rb'
- 'spec/models/post_spec.rb'
- 'spec/support/controller_macros.rb'
- 'spec/views/account_types/edit.html.haml_spec.rb'
- 'spec/views/account_types/index.html.haml_spec.rb'
- 'spec/views/account_types/new.html.haml_spec.rb'
- 'spec/views/account_types/show.html.haml_spec.rb'
- 'spec/views/accounts/edit.html.haml_spec.rb'
- 'spec/views/accounts/index.html.haml_spec.rb'
- 'spec/views/accounts/new.html.haml_spec.rb'
- 'spec/views/accounts/show.html.haml_spec.rb'
- 'spec/views/admin/index_spec.rb'
- 'spec/views/admin/newsletter_spec.rb'
- 'spec/views/admin/orders/index_spec.rb'
- 'spec/views/comments/edit.html.haml_spec.rb'
- 'spec/views/comments/index.html.haml_spec.rb'
- 'spec/views/comments/index.rss.haml_spec.rb'
- 'spec/views/comments/new.html.haml_spec.rb'
- 'spec/views/comments/show.html.haml_spec.rb'
- 'spec/views/crops/_grown_for.html.haml_spec.rb'
- 'spec/views/crops/_planting_advice.html.haml_spec.rb'
- 'spec/views/crops/_popover.html.haml_spec.rb'
- 'spec/views/crops/edit.html.haml_spec.rb'
- 'spec/views/crops/hierarchy.html.haml_spec.rb'
- 'spec/views/crops/index.html.haml_spec.rb'
- 'spec/views/crops/index.rss.haml_spec.rb'
- 'spec/views/crops/new.html.haml_spec.rb'
- 'spec/views/crops/wrangle.html.haml_spec.rb'
- 'spec/views/devise/mailer/confirmation_instructions_spec.rb'
- 'spec/views/devise/mailer/reset_password_instructions_spec.rb'
- 'spec/views/devise/mailer/unlock_instructions_spec.rb'
- 'spec/views/devise/registrations/edit_spec.rb'
- 'spec/views/devise/registrations/new_spec.rb'
- 'spec/views/devise/sessions/new_spec.rb'
- 'spec/views/devise/unlocks/new_spec.rb'
- 'spec/views/forums/edit.html.haml_spec.rb'
- 'spec/views/forums/index.html.haml_spec.rb'
- 'spec/views/forums/new.html.haml_spec.rb'
- 'spec/views/forums/show.html.haml_spec.rb'
- 'spec/views/gardens/edit.html.haml_spec.rb'
- 'spec/views/gardens/new.html.haml_spec.rb'
- 'spec/views/gardens/show.html.haml_spec.rb'
- 'spec/views/harvests/edit.html.haml_spec.rb'
- 'spec/views/harvests/index.html.haml_spec.rb'
- 'spec/views/harvests/new.html.haml_spec.rb'
- 'spec/views/harvests/show.html.haml_spec.rb'
- 'spec/views/home/_blurb.html.haml_spec.rb'
- 'spec/views/home/_crops.html.haml_spec.rb'
- 'spec/views/home/_members.html.haml_spec.rb'
- 'spec/views/home/_seeds.html.haml_spec.rb'
- 'spec/views/home/_stats.html.haml_spec.rb'
- 'spec/views/home/index_spec.rb'
- 'spec/views/layouts/_meta_spec.rb'
- 'spec/views/layouts/application_spec.rb'
- 'spec/views/members/_location.html.haml_spec.rb'
- 'spec/views/members/show.rss.haml_spec.rb'
- 'spec/views/notifications/index.html.haml_spec.rb'
- 'spec/views/notifications/new.html.haml_spec.rb'
- 'spec/views/notifications/show.html.haml_spec.rb'
- 'spec/views/notifier/notify.html.haml_spec.rb'
- 'spec/views/orders/index.html.haml_spec.rb'
- 'spec/views/orders/show.html.haml_spec.rb'
- 'spec/views/photos/edit.html.haml_spec.rb'
- 'spec/views/photos/index.html.haml_spec.rb'
- 'spec/views/photos/new.html.haml_spec.rb'
- 'spec/views/photos/show.html.haml_spec.rb'
- 'spec/views/places/_map_attribution.html.haml_spec.rb'
- 'spec/views/places/index.html.haml_spec.rb'
- 'spec/views/places/show.html.haml_spec.rb'
- 'spec/views/plant_parts/edit.html.haml_spec.rb'
- 'spec/views/plant_parts/index.html.haml_spec.rb'
- 'spec/views/plant_parts/new.html.haml_spec.rb'
- 'spec/views/plant_parts/show.html.haml_spec.rb'
- 'spec/views/plantings/_form.html.haml_spec.rb'
- 'spec/views/plantings/edit.html.haml_spec.rb'
- 'spec/views/plantings/index.html.haml_spec.rb'
- 'spec/views/plantings/index.rss.haml_spec.rb'
- 'spec/views/plantings/new.html.haml_spec.rb'
- 'spec/views/plantings/show.html.haml_spec.rb'
- 'spec/views/posts/_single.html.haml_spec.rb'
- 'spec/views/posts/edit.html.haml_spec.rb'
- 'spec/views/posts/index.html.haml_spec.rb'
- 'spec/views/posts/index.rss.haml_spec.rb'
- 'spec/views/posts/new.html.haml_spec.rb'
- 'spec/views/posts/show.html.haml_spec.rb'
- 'spec/views/posts/show.rss.haml_spec.rb'
- 'spec/views/products/edit.html.haml_spec.rb'
- 'spec/views/products/index.html.haml_spec.rb'
- 'spec/views/products/new.html.haml_spec.rb'
- 'spec/views/products/show.html.haml_spec.rb'
- 'spec/views/roles/edit.html.haml_spec.rb'
- 'spec/views/roles/index.html.haml_spec.rb'
- 'spec/views/roles/new.html.haml_spec.rb'
- 'spec/views/roles/show.html.haml_spec.rb'
- 'spec/views/scientific_names/edit.html.haml_spec.rb'
- 'spec/views/scientific_names/index.html.haml_spec.rb'
- 'spec/views/scientific_names/new.html.haml_spec.rb'
- 'spec/views/scientific_names/show.html.haml_spec.rb'
- 'spec/views/seeds/edit.html.haml_spec.rb'
- 'spec/views/seeds/index.rss.haml_spec.rb'
- 'spec/views/seeds/new.html.haml_spec.rb'
- 'spec/views/seeds/show.html.haml_spec.rb'
- 'spec/views/shop/index_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/UnlessElse:

View File

@@ -5,7 +5,7 @@
jQuery ->
el = $('.append-date')
el.datepicker({'format': 'yyyy-mm-dd'})
el.click (e) ->

View File

@@ -42,4 +42,3 @@ $ ->
element = document.getElementById(tmp)
console.log("%s",tmp)
element.remove()

View File

@@ -2,7 +2,7 @@
@import "bootstrap"
@import "custom_bootstrap/variables"
// this padding needs to be done before the responsive stuff is imported
body
body
// modifying this for our promotional banner. can be replaced after if
// needed.
// padding-top: $navbar-height + 15px
@@ -19,14 +19,14 @@ body
//@import "bootstrap/glyphicons"
.list-inline > li.first
.list-inline > li.first
padding-left: 0px
h2
h2
font-size: 150%
//#subtitle
//#subtitle
// color: lighten($brown, 30%)
// font-style: italic
// font-weight: normal
@@ -34,10 +34,10 @@ h2
// padding-left: 1em
// padding-top: 0px
h3
h3
font-size: 120%
.main
.main
padding-right: 1em
.navbar .navbar-form
@@ -59,24 +59,24 @@ h3
padding-left: 1em
// this is used for eg. crops and members index pages
.six-across:nth-child(6n+1)
.six-across:nth-child(6n+1)
margin-left: 0px
.three-across:nth-child(3n+1)
.three-across:nth-child(3n+1)
margin-left: 0px
clear: both
// let's condense the hero unit a little
.jumbotron
.jumbotron
padding-top: 30px
padding-bottom: 30px
// info under the main heading on homepage
.jumbotron .info
.jumbotron .info
padding-top: 15px
// signup widget on homepage
.jumbotron .signup
.jumbotron .signup
background-color: lighten($green, 40%)
border: 1px solid lighten($green, 20%)
border-radius: 6px
@@ -85,19 +85,19 @@ h3
text-align: center
// stats shown on homepage. eg. "999 members..."
p.stats
p.stats
font-weight: bold
.member-cards
.member-cards
display: flex
flex: none
flex-wrap: wrap
justify-content: space-between
.member-thumbnail
.member-thumbnail
padding: .25em
div
div
width: 5em
display: inline-block
vertical-align: top
@@ -116,7 +116,7 @@ p.stats
margin-left: auto
@media (min-width: $screen-md-min)
.planting-thumbnail
.planting-thumbnail
dl.planting-attributes
font-size: 85%
width: 100%
@@ -132,10 +132,10 @@ p.stats
width: 250px
#placesmap, #cropmap
#placesmap, #cropmap
height: 500px
#membermap
#membermap
height: 250px
.location-not-set
@@ -145,23 +145,23 @@ p.stats
background-repeat: no-repeat
background-position: center
.member-location
.member-location
font-size: small
font-style: italic
.member-location a
.member-location a
color: $brown
.photo-thumbnail
.photo-thumbnail
padding: 0
position: relative
img
width: 100%
.text
.text
display: none
color: #000
position: absolute
@@ -169,100 +169,100 @@ p.stats
background: rgba(0, 0, 0, 0.8)
width: 100%
margin: 0
p
p
padding: 5px
margin: 0
color: #fff
&:hover
.text
&:hover
.text
display: block
.thumbnail
.thumbnail
border: none
text-align: center
margin-bottom: 1.5em
.member-thumbnail
.member-thumbnail
text-align: left
img
img
height: 85px
width: 85px
max-width: 85px
.crop-thumbnail
.crop-thumbnail
height: 220px
.cropinfo
.cropinfo
display: inline-block
max-width: 100%
white-space: nowrap
line-height: 1em
padding-bottom: 2px
.cropname
.cropname
overflow: hidden
text-overflow: ellipsis
.scientificname
.scientificname
font-size: small
font-style: italic
overflow: hidden
text-overflow: ellipsis
.plantingcount
.plantingcount
font-size: small
.crop-name a
.crop-name a
padding-top: 2px
.scientific-name small
.scientific-name small
margin-bottom: -2px
li.crop-hierarchy
li.crop-hierarchy
list-style-type: disc
.navbar-brand
.navbar-brand
margin: 0px
padding: 0px
.navbar-bottom
.navbar-bottom
margin: 40px 0px 0px 0px !important
// footer
footer
#footer1, #footer2, #footer3
footer
#footer1, #footer2, #footer3
text-align: left
padding-top: 1em
padding-bottom: 2em
ul
ul
list-style-type: none
list-style-position: outside
padding-left: 0px
margin-left: 0px
a
a
color: $navbar-default-link-color
text-decoration: none
a:hover
a:hover
color: $navbar-default-link-hover-color
a:active
a:active
color: $navbar-default-link-active-color
.navbar-bottom.navbar
.navbar-bottom.navbar
border-radius: 0
// ensure footer is pushed to bottom of browser window
#maincontainer
#maincontainer
min-height: 80%
html, body
html, body
height: 100%
.crop-image, .member-image
.crop-image, .member-image
width: 100%
height: 100%
@@ -272,22 +272,22 @@ html, body
background: white
z-index: $zindex-tooltip
.alert
a
.alert
a
font-weight: 800
// Overrides applying only to mobile view. This must be at the end of the overrides file.
@media only screen and (max-width: 767px)
.sidebar
@media only screen and (max-width: 767px)
.sidebar
margin-left: 0
border-left: none
padding-left: 0
#map
#map
height: 300px
.navbar .nav > li
.navbar .nav > li
display: block
.navbar .navbar-form
@@ -305,7 +305,7 @@ $state-info-bg: lighten($green, 50%)
$state-success-text: darken($green, 10%)
$state-success-bg: lighten($green, 50%)
.hide
.hide
display: none
#add-sci_name-row, #remove-sci_name-row, #add-alt_name-row, #remove-alt_name-row
@@ -322,14 +322,14 @@ $state-success-bg: lighten($green, 50%)
#gardens_panel_body
height: 20em
.form-group.required .control-label:before
.form-group.required .control-label:before
content: "* "
color: red
.margin-bottom
.margin-bottom
margin-bottom: 1em
.red
.red
color: red
.truncate

View File

@@ -1,7 +1,7 @@
class AccountTypesController < ApplicationController
before_filter :authenticate_member!
load_and_authorize_resource
# GET /account_types
def index
@account_types = AccountType.all
@@ -70,7 +70,7 @@ class AccountTypesController < ApplicationController
end
end
private
private
def account_type_params
params.require(:account_type).permit(:is_paid, :is_permanent_paid, :name)

View File

@@ -1,7 +1,7 @@
class AccountsController < ApplicationController
before_filter :authenticate_member!
load_and_authorize_resource
# GET /accounts
def index
@accounts = Account.all

View File

@@ -89,7 +89,7 @@ class CommentsController < ApplicationController
end
end
private
private
def comment_params
params.require(:comment).permit(:author_id, :body, :post_id)

View File

@@ -86,7 +86,7 @@ class CropsController < ApplicationController
# TODO RABL or similar one day to avoid presentation logic here
owner_structure = {
owner: {
only: [:id, :login_name, :location, :latitude, :longitude]
only: [:id, :login_name, :location, :latitude, :longitude]
}
}
render json: @crop.to_json(include: {
@@ -184,7 +184,7 @@ class CropsController < ApplicationController
sci_name = @crop.scientific_names.create(scientific_name: value, creator_id: current_member.id)
end
end
if previous_status == "pending"
requester = @crop.requester
new_status = @crop.approval_status

View File

@@ -1,7 +1,6 @@
class HarvestsController < ApplicationController
before_filter :authenticate_member!, except: [:index, :show]
load_and_authorize_resource
# GET /harvests
# GET /harvests.json

View File

@@ -29,7 +29,7 @@ class MembersController < ApplicationController
# it requires a garden to be passed in @garden.
# The new garden is not persisted unless Garden#save is called.
@garden = Garden.new
respond_to do |format|
format.html # show.html.haml
format.json { render json: @member.to_json(only: [:id, :login_name, :bio, :created_at, :slug, :location, :latitude, :longitude]) }
@@ -71,7 +71,7 @@ class MembersController < ApplicationController
end
end
def finish_signup
def finish_signup
@member = current_member
if request.patch? && params[:member]
if @member.update(member_params)

View File

@@ -46,7 +46,6 @@ class NotificationsController < ApplicationController
@subject = @sender_notification.subject =~ /^Re: / ?
@sender_notification.subject :
"Re: " + @sender_notification.subject
respond_to do |format|
format.html # reply.html.haml

View File

@@ -48,4 +48,4 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
finish_signup_path(resource)
end
end
end
end

View File

@@ -4,4 +4,4 @@ protected
def after_resetting_password_path_for(resource)
root_path
end
end
end

View File

@@ -108,7 +108,7 @@ class PhotosController < ApplicationController
@photo = Photo.find(params[:id])
@photo.destroy
flash[:alert] = "Photo successfully deleted."
respond_to do |format|
format.html { redirect_to photos_url }
format.json { head :no_content }

View File

@@ -1,7 +1,7 @@
class RolesController < ApplicationController
before_filter :authenticate_member!
load_and_authorize_resource
# GET /roles
def index
@roles = Role.all

View File

@@ -86,4 +86,3 @@ module ApplicationHelper
"#{size} #{model_name}"
end
end

View File

@@ -7,5 +7,4 @@ module SeedsHelper
truncate(seed.description, length: 130, separator: ' ', omission: '... ') { link_to "Read more", seed_path(seed) }
end
end
end
end

View File

@@ -12,7 +12,7 @@ class Notifier < ActionMailer::Base
@notification = notification
@reply_link = reply_link(@notification)
# Encrypting
# Encrypting
@signed_message = verifier.generate ({ member_id: @notification.recipient.id, type: :send_notification_email })
mail(to: @notification.recipient.email,
@@ -25,7 +25,7 @@ class Notifier < ActionMailer::Base
@plantings = @member.plantings.first(5)
@harvests = @member.harvests.first(5)
# Encrypting
# Encrypting
@signed_message = verifier.generate ({ member_id: @member.id, type: :send_planting_reminder })
if @member.send_planting_reminder
@@ -36,7 +36,7 @@ class Notifier < ActionMailer::Base
def new_crop_request(member, request)
@member, @request = member, request
mail(to: @member.email, subject: "#{@request.requester.login_name} has requested #{@request.name} as a new crop")
mail(to: @member.email, subject: "#{@request.requester.login_name} has requested #{@request.name} as a new crop")
end
def crop_request_approved(member, crop)

View File

@@ -22,7 +22,7 @@ class Ability
cannot :read, AccountType
# nobody should be able to view unapproved crops unless they
# are wranglers or admins
# are wranglers or admins
cannot :read, Crop
can :read, Crop, approval_status: "approved"
# scientific names should only be viewable if associated crop is approved

View File

@@ -8,7 +8,7 @@ class Account < ActiveRecord::Base
before_create do |account|
unless account.account_type
account.account_type = AccountType.find_or_create_by(name:
account.account_type = AccountType.find_or_create_by(name:
Growstuff::Application.config.default_account_type
)
end

View File

@@ -67,7 +67,7 @@ class Harvest < ActiveRecord::Base
before_save :set_si_weight
# we're storing the harvest weight in kilograms in the db too
# we're storing the harvest weight in kilograms in the db too
# to make data manipulation easier
def set_si_weight
if self.weight_unit != nil

View File

@@ -183,7 +183,7 @@ class Member < ActiveRecord::Base
# Returns a hash of Flickr photosets' ids and titles
def flickr_sets
sets = Hash.new
sets = Hash.new
flickr.photosets.getList.each do |p|
sets[p.title] = p.id
end

View File

@@ -17,7 +17,7 @@ class Order < ActiveRecord::Base
sum = 0
for i in order_items do
subtotal = i.price * i.quantity
sum += subtotal
sum += subtotal
end
return sum
end

View File

@@ -104,7 +104,7 @@ class Planting < ActiveRecord::Base
if differences.compact.empty?
nil
else
else
differences.compact.sum/differences.compact.size
end
end

View File

@@ -77,7 +77,7 @@ class Post < ActiveRecord::Base
# find crop case-insensitively
crop = Crop.where('lower(name) = ?', $1.downcase).first
# create association
self.crops << crop if crop && !self.crops.include?(crop)
self.crops << crop if crop && !self.crops.include?(crop)
end
end
end

View File

@@ -21,7 +21,7 @@
= f.label :name, :class => 'control-label col-md-2'
.col-md-8
= f.text_field :name, :class => 'form-control'
.form-group
.form-actions.col-md-offset-2.col-md-8
= f.submit 'Save', :class => 'btn btn-primary'

View File

@@ -1,6 +1,6 @@
= content_for :title, @comment.post.subject
- content_for :opengraph do
= tag("meta", property: "og:image", content: avatar_uri(@comment.post.author, 200))
= tag("meta", property: "og:image", content: avatar_uri(@comment.post.author, 200))
= tag("meta", property: "og:image:user_generated", content: "true")
= tag("meta", property: "og:title", content: @comment.post.subject)
= tag("meta", property: "og:description", content: strip_tags(@comment.post.body).split(' ')[0..20].join(' '))

View File

@@ -48,7 +48,7 @@
Scientific names
= button_tag "+", :id => "add-sci_name-row", :type => "button"
= button_tag "-", :id => "remove-sci_name-row", :type => "button"
.form-group#scientific_names
- @crop.scientific_names.each.with_index do |sci, index|
.template.col-md-12{ :id => "sci_template[#{index+1}]" }
@@ -64,7 +64,7 @@
= button_tag "+", :id => "add-alt_name-row", :type => "button"
= button_tag "-", :id => "remove-alt_name-row", :type => "button"
.form-group#alternate_names
.form-group#alternate_names
- @crop.alternate_names.each.with_index do |alt, index|
.template.col-md-12{ :id => "alt_template[#{index+1}]" }
.col-md-2

View File

@@ -1,7 +1,7 @@
- content_for :title, (can?(:wrangle, @crop) ? "New crop" : "Suggest a crop")
- content_for :title, (can?(:wrangle, @crop) ? "New crop" : "Suggest a crop")
- unless can? :wrangler, @crop
%p Thanks for taking the time to suggest a crop! Our crop database is managed by volunteers, and we appreciate your help. Here are some things to consider when suggesting a new crop:
%ul

View File

@@ -2,7 +2,7 @@
- content_for :subtitle, @crop.default_scientific_name
- content_for :opengraph do
- @crop.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:title", content: @crop.name)
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
@@ -92,9 +92,9 @@
%h4 Learn more about #{ @crop.name.pluralize }
%ul
%li= link_to 'Wikipedia (English)', @crop.en_wikipedia_url, target: "_blank", rel: "noopener noreferrer"
%li
%li
= link_to "OpenFarm - Growing guide", "https://openfarm.cc/en/crops/#{URI.escape @crop.name}", target: "_blank", rel: "noopener noreferrer"
%li
%li
= link_to "Gardenate - Planting reminders", "http://www.gardenate.com/plant/#{URI.escape @crop.name}", target: "_blank", rel: "noopener noreferrer"
- if current_member && current_member.location
%li

View File

@@ -24,7 +24,7 @@
%li{:class => @approval_status == "rejected" ? 'active' : ''}
= link_to "Rejected", wrangle_crops_path(:approval_status => "rejected")
%h2
%h2
- if @approval_status == "pending"
Requested Crops
- elsif @approval_status == "rejected"

View File

@@ -1,4 +1,4 @@
- content_for :title, t('.title')
- content_for :title, t('.title')
- if can? :create, Forum
%p

View File

@@ -11,17 +11,17 @@
= link_to image_tag((garden.default_photo ? garden.default_photo.thumbnail_url : 'placeholder_150.png'), :alt => garden.name, :class => 'img'), garden
.col-md-8
%dl.dl-horizontal
%dt Name :
%dt Name :
%dd= link_to garden.name, garden
%dt Location :
%dt Location :
%dd
- if garden.location.blank?
not specified
- else
= link_to garden.location, place_path(garden.location, anchor: "gardens")
%dt Area :
%dt Area :
%dd= garden.area.nil? ? "not specified" : pluralize(garden.area, garden.area_unit)
%dt Active? :
%dt Active? :
%dd= garden.active ? "Yes" : "No"
.col-md-12
%b

View File

@@ -40,8 +40,8 @@
%p No description available yet.
- if can? :edit, @garden
%p
Why not
%p
Why not
= link_to 'tell us more.', edit_garden_path(@garden)
- if @garden.photos.size > 0 or (can? :edit, @garden and can? :create, Photo)

View File

@@ -11,13 +11,13 @@
= link_to image_tag((harvest.default_photo ? harvest.default_photo.thumbnail_url : 'placeholder_150.png'), :alt => harvest.crop.name, :class => 'img'), harvest.crop
.col-md-8
%dl.dl-horizontal
%dt Crop :
%dt Crop :
%dd= link_to harvest.crop.name, harvest.crop
%dt Plant part :
%dt Plant part :
%dd= link_to harvest.plant_part, harvest.plant_part
%dt Quantity :
%dt Quantity :
%dd= display_quantity(harvest)
%dt Harvest date :
%dt Harvest date :
%dd= harvest.harvested_at
.panel-footer
%dt Description

View File

@@ -1,7 +1,7 @@
=content_for :title, "#{@harvest.crop} harvested by #{@harvest.owner}"
- content_for :opengraph do
- @harvest.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:image:user_generated", content: "true")
= tag("meta", property: "og:title", content: "#{@harvest.crop} harvested by #{@harvest.owner}")
= tag("meta", property: "og:type", content: "website")
@@ -17,8 +17,8 @@
= link_to "view all #{@harvest.owner}'s harvests", harvests_by_owner_path(:owner => @harvest.owner.slug)
%p
%b Plant part:
- if @harvest.plant_part
= link_to @harvest.plant_part, @harvest.plant_part
- if @harvest.plant_part
= link_to @harvest.plant_part, @harvest.plant_part
- else
not specified
%p

View File

@@ -2,7 +2,7 @@
%p.stats
= t('.message_html', { member: link_to(t('.member_linktext', count: Member.confirmed.size.to_i), members_path),
number_crops: link_to(t('.number_crops_linktext', count: Crop.count.to_i), crops_path),
number_plantings: link_to(t('.number_plantings_linktext', count: Planting.count.to_i), plantings_path),
number_plantings: link_to(t('.number_plantings_linktext', count: Planting.count.to_i), plantings_path),
number_gardens: link_to(t('.number_gardens_linktext', count: Garden.count.to_i), gardens_path) })

View File

@@ -7,7 +7,7 @@
- first_garden = false
= link_to g.name, "#garden#{g.id}", 'data-toggle' => 'tab'
- if current_member == member
%li.navbar-right
%li.navbar-right
= link_to new_garden_path, class: 'btn' do
Add New Garden
.tab-content{style: "padding-top: 1em"}
@@ -25,8 +25,8 @@
%p No description available yet.
- if can? :edit, g
%p
Why not
%p
Why not
= link_to 'tell us more.', edit_garden_path(g)

View File

@@ -1,9 +1,9 @@
- content_for :title, @member.login_name
- content_for :subtitle, @member.location
- content_for :opengraph do
= tag("meta", property: "og:image", content: avatar_uri(@member, 200))
= tag("meta", property: "og:image:user_generated", content: "true")
= tag("meta", property: "og:title", content: @member.login_name)
= tag("meta", property: "og:image", content: avatar_uri(@member, 200))
= tag("meta", property: "og:image:user_generated", content: "true")
= tag("meta", property: "og:title", content: @member.login_name)
= tag("meta", property: "og:type", content: "profile")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])

View File

@@ -7,10 +7,10 @@
.row
.col-md-12
- @followers.each do |f|
.col-md-4.three-across
.thumbnail
.col-md-4.three-across
.thumbnail
= render :partial => "members/thumbnail", :locals => { :member => f }
%div.pagination
= page_entries_info @followers
= will_paginate @followers

View File

@@ -7,8 +7,8 @@
.row
.col-md-12
- @follows.each do |f|
.col-md-4.three-across
.thumbnail
.col-md-4.three-across
.thumbnail
= render :partial => "members/thumbnail", :locals => { :member => f }
%div.pagination

View File

@@ -2,7 +2,7 @@
%p Hello #{@member.login_name},
%p
%p
#{@request.requester.login_name} has requested a new crop on #{site_name}.
%ul

View File

@@ -1,6 +1,6 @@
-content_for :title, "#{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}"
- content_for :opengraph do
= tag("meta", property: "og:title", content: "#{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}")
= tag("meta", property: "og:title", content: "#{ENV['GROWSTUFF_SITE_NAME']} community near #{@place}")
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
@@ -34,7 +34,7 @@
#plantings
%h3= "Recent plantings near #{@place}"
- plantings = []
- @nearby_members.first(10).each do |member|

View File

@@ -1,6 +1,6 @@
- content_for :title, @plant_part.name.titlecase
- content_for :opengraph do
= tag("meta", property: "og:title", content: @plant_part.name.titlecase)
= tag("meta", property: "og:title", content: @plant_part.name.titlecase)
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])

View File

@@ -13,7 +13,7 @@
%dd= link_to planting.garden.name, planting.garden
%dt Planted on:
%dd= planting.planted_at
%dt Quantity:
%dt Quantity:
%dd= "#{display_planting_quantity(planting)}"
%dt Finished on:
%dd= "#{display_finished(planting)}"

View File

@@ -1,4 +1,4 @@
- content_for :title, @owner ? t('.title.owner_plantings', owner: @owner) : @crop ? t('.title.crop_plantings', crop: @crop.name) : t('.title.default')
- content_for :title, @owner ? t('.title.owner_plantings', owner: @owner) : @crop ? t('.title.crop_plantings', crop: @crop.name) : t('.title.default')
- if @owner
= link_to "View #{@owner}'s profile >>", member_path(@owner)

View File

@@ -1,10 +1,10 @@
=content_for :title, "#{@planting.crop} in #{@planting.location}"
- content_for :opengraph do
- @planting.crop.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:title", content: "#{@planting.crop} in #{@planting.location}")
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:title", content: "#{@planting.crop} in #{@planting.location}")
- if @planting.description
= tag("meta", property: "og:description", content: @planting.description)
= tag("meta", property: "og:description", content: @planting.description)
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
@@ -31,11 +31,11 @@
%dt Quantity:
%dd
="#{display_planting_quantity(@planting)}"
- if !@planting.planted_from.blank?
%dt Planted from:
%dd= "#{display_planted_from(@planting)}"
%dt Sun or shade?
%dd
- sunniness = @planting.sunniness.blank? ? "not specified" : @planting.sunniness

View File

@@ -1,8 +1,8 @@
= content_for :title, @post.subject
- content_for :opengraph do
= tag("meta", property: "og:image", content: avatar_uri(@post.author, 200))
= tag("meta", property: "og:description", content: "#{strip_tags(@post.body).split(' ')[0..20].join(' ')}...")
= tag("meta", property: "og:title", content: @post.subject)
= tag("meta", property: "og:image", content: avatar_uri(@post.author, 200))
= tag("meta", property: "og:description", content: "#{strip_tags(@post.body).split(' ')[0..20].join(' ')}...")
= tag("meta", property: "og:title", content: @post.subject)
= tag("meta", property: "og:type", content: "article")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])
@@ -18,7 +18,7 @@
= link_to 'hundreds of different crops', crops_url
and a community from all around the world.
= render :partial => "shared/signin_signup",
= render :partial => "shared/signin_signup",
:locals => { :to => "or to start using #{ENV["GROWSTUFF_SITE_NAME"]} to track what you're planting and harvesting" }
= render :partial => "single", :locals => { :post => @post, :subject => false, :hide_comments => true }

View File

@@ -2,7 +2,7 @@
- @scientific_name.crop.photos.each do |photo|
= tag("meta", property: "og:image", content: photo.fullsize_url)
= tag("meta", property: "og:title", content: @scientific_name.scientific_name)
= tag("meta", property: "og:title", content: @scientific_name.scientific_name)
= tag("meta", property: "og:type", content: "website")
= tag("meta", property: "og:url", content: request.original_url)
= tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME'])

View File

@@ -11,15 +11,15 @@
= link_to image_tag((seed.crop.default_photo ? seed.crop.default_photo.thumbnail_url : 'placeholder_150.png'), :alt => seed.crop.name, :class => 'img'), seed.crop
.col-md-8
%dl.dl-horizontal
%dt Crop :
%dt Crop :
%dd= link_to seed.crop.name, seed.crop
%dt Plant before :
%dt Plant before :
%dd= seed.plant_before
%dt Quantity :
%dt Quantity :
%dd= seed.quantity
%dt Will trade to :
%dt Will trade to :
%dd= seed.tradable_to
%dt From location :
%dt From location :
%dd= seed.owner.location
%dt Owner :
%dd= link_to seed.owner.login_name, seed.owner

View File

@@ -73,5 +73,5 @@
= link_to @seed.owner.location, place_path(@seed.owner.location, anchor: "seeds")
%p
%small
Or
Or
= link_to "purchase seeds via Ebay", "http://rover.ebay.com/rover/1/705-53470-19255-0/1?icep_ff3=9&pub=5575213277&toolid=10001&campid=5337940151&customid=&icep_uq=#{URI.escape @seed.crop.name}&icep_sellerId=&icep_ex_kw=&icep_sortBy=12&icep_catId=181003&icep_minPrice=&icep_maxPrice=&ipn=psmain&icep_vectorid=229515&kwid=902099&mtid=824&kw=lg", target: "_blank", rel: "noopener noreferrer"

View File

@@ -81,5 +81,3 @@
or
=link_to "sign up", new_member_registration_path
to purchase.

View File

@@ -22,4 +22,3 @@ images_dir = "app/assets/images"
preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass

View File

@@ -108,4 +108,4 @@ module Growstuff
config.active_record.raise_in_transactional_callbacks = true
end
end
end

View File

@@ -31,7 +31,7 @@ Growstuff::Application.configure do
# Expands the lines which load the assets
config.assets.debug = true
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true

View File

@@ -2,7 +2,7 @@ Growstuff::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
config.action_controller.action_on_unpermitted_parameters = :raise
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.

View File

@@ -38,7 +38,7 @@ Growstuff::Application.configure do
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# Growstuff config
config.action_mailer.default_url_options = { host: 'localhost:8080' }
@@ -122,4 +122,4 @@ OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
token: "token",
secret: "donttell"
}
})
})

View File

@@ -13,4 +13,4 @@ Geocoder.configure(
# Reported as https://github.com/alexreisner/geocoder/issues/509
if Geocoder.config.lookup != :test
Geocoder.configure(lookup: :nominatim)
end
end

View File

@@ -6,4 +6,4 @@ end
Sidekiq.configure_client do |config|
config.redis = { url: 'redis://localhost:6379/0', namespace: "app3_sidekiq_#{Rails.env}" }
end
end

View File

@@ -49,7 +49,7 @@ en:
seeds:
index:
title:
title:
default: "Everyone's seeds"
crop_seeds: "Everyone's %{crop} seeds"
owner_seeds: "%{owner} seeds"
@@ -62,7 +62,7 @@ en:
plantings:
index:
title:
title:
default: "Everyone's plantings"
crop_plantings: "Everyone's %{crop} plantings"
owner_plantings: "%{owner} plantings"
@@ -82,22 +82,22 @@ en:
owner_harvests: "%{owner} harvests"
places:
index:
title: "%{site_name} Community Map"
index:
title: "%{site_name} Community Map"
members:
index:
title: "%{site_name} members"
index:
title: "%{site_name} members"
posts:
index:
index:
title:
default: "Everyone's posts"
default: "Everyone's posts"
author_posts: "%{author} posts"
shop:
index:
title: "Shop"
title: "Shop"
forums:
index:

View File

@@ -1,5 +1,4 @@
ja:
home:
blurb:
blurb:
intro: "%{site_name}はガーデナーのコミュニティです。"

View File

@@ -6,7 +6,7 @@ common: &default_settings
# account. This key binds your Agent's data to your account in the
# New Relic service.
license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
# Agent Enabled (Rails Only)
# Use this setting to force the agent to run or not run.
# Default is 'auto' which means the agent will install and run only
@@ -16,7 +16,7 @@ common: &default_settings
# Valid values are true, false and auto.
#
# agent_enabled: auto
# Application Name Set this to be the name of your application as
# you'd like it show up in New Relic. The service will then auto-map
# instances of your application into an "application" on your
@@ -31,12 +31,12 @@ common: &default_settings
# app_name:
# - Ajax Service
# - All Services
#
#
app_name: <%= ENV["NEW_RELIC_APP_NAME"] %>
# When "true", the agent collects performance data about your
# application and reports this data to the New Relic service at
# newrelic.com. This global switch is normally overridden for each
# When "true", the agent collects performance data about your
# application and reports this data to the New Relic service at
# newrelic.com. This global switch is normally overridden for each
# environment below. (formerly called 'enabled')
monitor_mode: true
@@ -54,7 +54,7 @@ common: &default_settings
# '/var/log/') The agent will attempt to create this directory if it
# does not exist.
# log_file_path: 'log'
# Optionally set the name of the log file, defaults to 'newrelic_agent.log'
# log_file_name: 'newrelic_agent.log'
@@ -77,28 +77,28 @@ common: &default_settings
# use a non-blocking lookup, so in a worst case, if you have DNS
# problems, your app may block indefinitely.
# verify_certificate: true
# Set your application's Apdex threshold value with the 'apdex_t'
# setting, in seconds. The apdex_t value determines the buckets used
# to compute your overall Apdex score.
# to compute your overall Apdex score.
# Requests that take less than apdex_t seconds to process will be
# classified as Satisfying transactions; more than apdex_t seconds
# as Tolerating transactions; and more than four times the apdex_t
# value as Frustrating transactions.
# value as Frustrating transactions.
# For more about the Apdex standard, see
# http://newrelic.com/docs/general/apdex
apdex_t: 0.5
#============================== Browser Monitoring ===============================
# New Relic Real User Monitoring gives you insight into the performance real users are
# experiencing with your website. This is accomplished by measuring the time it takes for
# your users' browsers to download and render your web pages by injecting a small amount
# of JavaScript code into the header and footer of each page.
# of JavaScript code into the header and footer of each page.
browser_monitoring:
# By default the agent automatically injects the monitoring JavaScript
# into web pages. Set this attribute to false to turn off this behavior.
auto_instrument: true
# By default the agent automatically injects the monitoring JavaScript
# into web pages. Set this attribute to false to turn off this behavior.
auto_instrument: true
# Proxy settings for connecting to the service.
#
@@ -110,14 +110,14 @@ common: &default_settings
# proxy_user:
# proxy_pass:
# Tells transaction tracer and error collector (when enabled)
# whether or not to capture HTTP params. When true, frameworks can
# exclude HTTP parameters from being captured.
# Rails: the RoR filter_parameter_logging excludes parameters
# Java: create a config setting called "ignored_params" and set it to
# a comma separated list of HTTP parameter names.
# ex: ignored_params: credit_card, ssn, password
# ex: ignored_params: credit_card, ssn, password
capture_params: false
@@ -126,12 +126,12 @@ common: &default_settings
# minute. Included in the transaction is the exact call sequence of
# the transactions including any SQL statements issued.
transaction_tracer:
# Transaction tracer is enabled by default. Set this to false to
# turn it off. This feature is only available at the Professional
# and above product levels.
enabled: true
# Threshold in seconds for when to collect a transaction
# trace. When the response time of a controller action exceeds
# this threshold, a transaction trace will be recorded and sent to
@@ -139,13 +139,13 @@ common: &default_settings
# "apdex_f", which will use the threshold for an dissatisfying
# Apdex controller action - four times the Apdex T value.
transaction_threshold: apdex_f
# When transaction tracer is on, SQL statements can optionally be
# recorded. The recorder has three modes, "off" which sends no
# SQL, "raw" which sends the SQL statement in its original form,
# and "obfuscated", which strips out numeric and string literals
record_sql: obfuscated
# Threshold in seconds for when to collect stack trace for a SQL
# call. In other words, when SQL statements exceed this threshold,
# then capture and send the current stack trace. This is
@@ -157,24 +157,24 @@ common: &default_settings
# set to false when using other adapters.
# explain_enabled: true
# Threshold for query execution time below which query plans will not
# Threshold for query execution time below which query plans will not
# not be captured. Relevant only when `explain_enabled` is true.
# explain_threshold: 0.5
# Error collector captures information about uncaught exceptions and
# sends them to the service for viewing
error_collector:
# Error collector is enabled by default. Set this to false to turn
# it off. This feature is only available at the Professional and above
# product levels
enabled: true
# Rails Only - tells error collector whether or not to capture a
# source snippet around the place of the error when errors are View
# Rails Only - tells error collector whether or not to capture a
# source snippet around the place of the error when errors are View
# related.
capture_source: true
capture_source: true
# To stop specific errors from reporting to New Relic, set this property
# to comma separated values. Default is to ignore routing errors
# which are how 404's get triggered.
@@ -185,7 +185,7 @@ common: &default_settings
# won't run. Useful when you are using the agent to monitor an
# external resource
# disable_samplers: true
# If you aren't interested in visibility in these areas, you can
# disable the instrumentation to reduce overhead.
#
@@ -199,8 +199,8 @@ common: &default_settings
# overhead slightly on every memcached call, and can have security
# implications if your memcached keys are sensitive
# capture_memcache_keys: true
# Certain types of instrumentation such as GC stats will not work if
# Certain types of instrumentation such as GC stats will not work if
# you are running multi-threaded. Please let us know.
# multi_threaded = false
@@ -216,19 +216,19 @@ common: &default_settings
development:
<<: *default_settings
# Turn off communication to New Relic service in development mode (also
# Turn off communication to New Relic service in development mode (also
# 'enabled').
# NOTE: for initial evaluation purposes, you may want to temporarily
# NOTE: for initial evaluation purposes, you may want to temporarily
# turn the agent on in development mode.
monitor_mode: false
# Rails Only - when running in Developer Mode, the New Relic Agent will
# Rails Only - when running in Developer Mode, the New Relic Agent will
# present performance information on the last 100 transactions you have
# executed since starting the mongrel.
# NOTE: There is substantial overhead when running in developer mode.
# Do not use for production or load testing.
# Do not use for production or load testing.
developer_mode: true
# Enable textmate links
# textmate: true

View File

@@ -1,5 +1,5 @@
class ChangePlantedAtToDate < ActiveRecord::Migration
def change
change_column :plantings, :planted_at, :date
end
end
end

View File

@@ -7,4 +7,4 @@ class AddCropsPostsTable < ActiveRecord::Migration
add_index :crops_posts, [:crop_id, :post_id]
add_index :crops_posts, :crop_id
end
end
end

View File

@@ -1,14 +1,12 @@
class CreateCms < ActiveRecord::Migration
def self.up
text_limit = case ActiveRecord::Base.connection.adapter_name
when 'PostgreSQL'
{ }
else
{ limit: 16777215 }
end
# -- Sites --------------------------------------------------------------
create_table :comfy_cms_sites do |t|
t.string :label, null: false
@@ -20,7 +18,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_sites, :hostname
add_index :comfy_cms_sites, :is_mirrored
# -- Layouts ------------------------------------------------------------
create_table :comfy_cms_layouts do |t|
t.integer :site_id, null: false
@@ -37,7 +35,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_layouts, [:parent_id, :position]
add_index :comfy_cms_layouts, [:site_id, :identifier], unique: true
# -- Pages --------------------------------------------------------------
create_table :comfy_cms_pages do |t|
t.integer :site_id, null: false
@@ -56,7 +54,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_pages, [:site_id, :full_path]
add_index :comfy_cms_pages, [:parent_id, :position]
# -- Page Blocks --------------------------------------------------------
create_table :comfy_cms_blocks do |t|
t.string :identifier, null: false
@@ -66,7 +64,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_blocks, [:identifier]
add_index :comfy_cms_blocks, [:blockable_id, :blockable_type]
# -- Snippets -----------------------------------------------------------
create_table :comfy_cms_snippets do |t|
t.integer :site_id, null: false
@@ -79,7 +77,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_snippets, [:site_id, :identifier], unique: true
add_index :comfy_cms_snippets, [:site_id, :position]
# -- Files --------------------------------------------------------------
create_table :comfy_cms_files do |t|
t.integer :site_id, null: false
@@ -96,7 +94,7 @@ class CreateCms < ActiveRecord::Migration
add_index :comfy_cms_files, [:site_id, :file_file_name]
add_index :comfy_cms_files, [:site_id, :position]
add_index :comfy_cms_files, [:site_id, :block_id]
# -- Revisions -----------------------------------------------------------
create_table :comfy_cms_revisions, force: true do |t|
t.string :record_type, null: false
@@ -106,7 +104,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_revisions, [:record_type, :record_id, :created_at],
name: 'index_cms_revisions_on_rtype_and_rid_and_created_at'
# -- Categories ---------------------------------------------------------
create_table :comfy_cms_categories, force: true do |t|
t.integer :site_id, null: false
@@ -115,7 +113,7 @@ class CreateCms < ActiveRecord::Migration
end
add_index :comfy_cms_categories, [:site_id, :categorized_type, :label], unique: true,
name: 'index_cms_categories_on_site_id_and_cat_type_and_label'
create_table :comfy_cms_categorizations, force: true do |t|
t.integer :category_id, null: false
t.string :categorized_type, null: false
@@ -124,7 +122,7 @@ class CreateCms < ActiveRecord::Migration
add_index :comfy_cms_categorizations, [:category_id, :categorized_type, :categorized_id], unique: true,
name: 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id'
end
def self.down
drop_table :comfy_cms_sites
drop_table :comfy_cms_layouts
@@ -137,4 +135,3 @@ class CreateCms < ActiveRecord::Migration
drop_table :comfy_cms_categorizations
end
end

View File

@@ -89,7 +89,7 @@ def load_test_users
row = CSV.parse(suburb_file.readline)
suburb,country,state,latitude,longitude = row[0]
# Using 'update_column' method instead of 'update' so that
# Using 'update_column' method instead of 'update' so that
# it avoids accessing Geocoding service for faster processing
@user.gardens.first.update_columns(location: suburb, latitude: latitude, longitude: longitude)
@user.update_columns(location: suburb, latitude: latitude, longitude: longitude)

View File

@@ -205,7 +205,7 @@ summer savory,https://en.wikipedia.org/wiki/Summer_savory,,Satureja hortensis
sunflowers,https://en.wikipedia.org/wiki/Sunflower,,Helianthus annuus
sweet potato,https://en.wikipedia.org/wiki/Sweet_potato,,Ipomoea batatas
Swiss chard,https://en.wikipedia.org/wiki/Swiss_chard,,Beta vulgaris var. cicla
tamarillo,https://en.wikipedia.org/wiki/Tamarillo,,Solanum betaceum
tamarillo,https://en.wikipedia.org/wiki/Tamarillo,,Solanum betaceum
tamarind,https://en.wikipedia.org/wiki/Tamarind,,Tamarindus indica
tangerine,https://en.wikipedia.org/wiki/Tangerine,,Citrus tangerina
tansy,https://en.wikipedia.org/wiki/Tansy,,Tanacetum vulgare
1 achiote https://en.wikipedia.org/wiki/Bixa_orellana Bixa orellana
205 sunflowers https://en.wikipedia.org/wiki/Sunflower Helianthus annuus
206 sweet potato https://en.wikipedia.org/wiki/Sweet_potato Ipomoea batatas
207 Swiss chard https://en.wikipedia.org/wiki/Swiss_chard Beta vulgaris var. cicla
208 tamarillo https://en.wikipedia.org/wiki/Tamarillo Solanum betaceum Solanum betaceum
209 tamarind https://en.wikipedia.org/wiki/Tamarind Tamarindus indica
210 tangerine https://en.wikipedia.org/wiki/Tangerine Citrus tangerina
211 tansy https://en.wikipedia.org/wiki/Tansy Tanacetum vulgare

View File

@@ -2,7 +2,7 @@ class Growstuff::OauthSignupAction
#
# Inspects the omniauth information
# and determines if we have an existing member
# and determines if we have an existing member
# (to add authentication to)
# or if this is a new signup
#
@@ -27,7 +27,7 @@ class Growstuff::OauthSignupAction
end
member.save!
member
end
@@ -73,4 +73,4 @@ class Growstuff::OauthSignupAction
name
end
end
end

View File

@@ -103,31 +103,31 @@ namespace :growstuff do
is_paid: false,
is_permanent_paid: false
)
@paid_account = AccountType.find_or_create_by(
@paid_account = AccountType.find_or_create_by(
name: "Paid",
is_paid: true,
is_permanent_paid: false
)
@seed_account = AccountType.find_or_create_by(
@seed_account = AccountType.find_or_create_by(
name: "Seed",
is_paid: true,
is_permanent_paid: true
)
@staff_account = AccountType.find_or_create_by(
@staff_account = AccountType.find_or_create_by(
name: "Staff",
is_paid: true,
is_permanent_paid: true
)
puts "Adding products..."
Product.find_or_create_by(
Product.find_or_create_by(
name: "Annual subscription",
description: "An annual subscription gives you access to paid account features for one year. Does not auto-renew.",
min_price: 3000,
account_type_id: @paid_account.id,
paid_months: 12
)
Product.find_or_create_by(
Product.find_or_create_by(
name: "Seed account",
description: "A seed account helps Growstuff grow in its early days. It gives you all the features of a paid account, in perpetuity. This account type never expires.",
min_price: 15000,

View File

@@ -35,4 +35,3 @@ Please add your name and GitHub handle to the file CONTRIBUTORS.md,
commit it, and update your PR.
}
end

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.
@@ -36,7 +36,7 @@ describe HarvestsController do
@maize = FactoryGirl.create(:maize)
@harvest1 = FactoryGirl.create(:harvest, owner_id: @member1.id, crop_id: @tomato.id)
@harvest2 = FactoryGirl.create(:harvest, owner_id: @member2.id, crop_id: @maize.id)
end
end
it "assigns all harvests as @harvests" do
get :index, {}

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.
@@ -32,11 +32,11 @@ describe PlantingsController do
@member1 = FactoryGirl.create(:member)
@member2 = FactoryGirl.create(:member)
@tomato = FactoryGirl.create(:tomato)
@maize = FactoryGirl.create(:maize)
@maize = FactoryGirl.create(:maize)
@planting1 = FactoryGirl.create(:planting, crop: @tomato, owner: @member1)
@planting2 = FactoryGirl.create(:planting, crop: @maize, owner: @member2)
end
it "assigns all plantings as @plantings" do
get :index, {}
assigns(:plantings).should =~ [@planting1, @planting2]
@@ -51,7 +51,7 @@ describe PlantingsController do
it "picks up crop from params and shows the plantings for the crop only" do
get :index, {crop: @maize.name}
assigns(:crop).should eq @maize
assigns(:plantings).should eq [@planting2]
assigns(:plantings).should eq [@planting2]
end
end

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -1,13 +1,13 @@
## DEPRECATION NOTICE: Do not add new tests to this file!
##
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
## View and controller tests are deprecated in the Growstuff project.
## We no longer write new view and controller tests, but instead write
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
## These test the full stack, behaving as a browser, and require less complicated setup
## to run. Please feel free to delete old view/controller tests as they are reimplemented
## in feature tests.
##
## If you submit a pull request containing new view or controller tests, it will not be
## If you submit a pull request containing new view or controller tests, it will not be
## merged.

View File

@@ -54,7 +54,7 @@ FactoryGirl.define do
factory :uppercasecrop do
name "Swiss chard"
end
factory :autoloaded_crop do
creator "cropbot"
end

View File

@@ -1,6 +1,6 @@
FactoryGirl.define do
factory :follow do
follower
follower
followed
end

View File

@@ -4,7 +4,7 @@ feature "forums", js: true do
context "as an admin user" do
let(:member) { create :admin_member }
let(:forum) { create :forum }
background do
login_as member
end

View File

@@ -4,7 +4,7 @@ feature "products" do
context "admin user" do
let(:member) { create :admin_member }
let(:product) { create :product }
background do
login_as member
end

Some files were not shown because too many files have changed in this diff Show More