Array indentation fixed

This commit is contained in:
Brenda Wallace
2016-11-26 11:49:51 +13:00
parent 4cf0f85ee8
commit bbc19a5436
12 changed files with 64 additions and 71 deletions

View File

@@ -1122,13 +1122,6 @@ Style/IfUnlessModifier:
- 'config/initializers/geocoder.rb'
- 'lib/tasks/growstuff.rake'
# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
EnforcedStyle: consistent
# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.

View File

@@ -17,8 +17,8 @@ class MembersController < ApplicationController
format.html # index.html.haml
format.json {
render json: @members.to_json(only: [
:id, :login_name, :slug, :bio, :created_at, :location, :latitude, :longitude
])
:id, :login_name, :slug, :bio, :created_at, :location, :latitude, :longitude
])
}
end
end
@@ -38,8 +38,8 @@ class MembersController < ApplicationController
format.html # show.html.haml
format.json {
render json: @member.to_json(only: [
:id, :login_name, :bio, :created_at, :slug, :location, :latitude, :longitude
])
:id, :login_name, :bio, :created_at, :slug, :location, :latitude, :longitude
])
}
format.rss { render(
layout: false,

View File

@@ -7,8 +7,8 @@ class PlacesController < ApplicationController
# json response is whatever we want to map here
format.json do
render json: Member.located.to_json(only: [
:id, :login_name, :slug, :location, :latitude, :longitude
])
:id, :login_name, :slug, :location, :latitude, :longitude
])
end
end
end
@@ -22,8 +22,8 @@ class PlacesController < ApplicationController
format.html # show.html.haml
format.json do
render json: @nearby_members.to_json(only: [
:id, :login_name, :slug, :location, :latitude, :longitude
])
:id, :login_name, :slug, :location, :latitude, :longitude
])
end
end
end

View File

@@ -5,9 +5,9 @@ require 'coveralls'
# output coverage locally AND send it to coveralls
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
])
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter
])
# fail if there's a significant test coverage drop
SimpleCov.maximum_coverage_drop 1

View File

@@ -24,9 +24,9 @@ describe "comments/index" do
total_entries = 2
comments = WillPaginate::Collection.create(page, per_page, total_entries) do |pager|
pager.replace([
FactoryGirl.create(:comment),
FactoryGirl.create(:comment, body: 'ROFL')
])
FactoryGirl.create(:comment),
FactoryGirl.create(:comment, body: 'ROFL')
])
end
assign(:comments, comments)
render

View File

@@ -22,9 +22,9 @@ describe 'comments/index.rss.haml' do
@author = FactoryGirl.create(:member)
@post = FactoryGirl.create(:post)
assign(:comments, [
FactoryGirl.create(:comment, author: @author, post: @post),
FactoryGirl.create(:comment, author: @author, post: @post)
])
FactoryGirl.create(:comment, author: @author, post: @post),
FactoryGirl.create(:comment, author: @author, post: @post)
])
render
end

View File

@@ -28,16 +28,16 @@ describe "harvests/index" do
total_entries = 2
harvests = WillPaginate::Collection.create(page, per_page, total_entries) do |pager|
pager.replace([
FactoryGirl.create(:harvest,
crop: @tomato,
owner: @member
),
FactoryGirl.create(:harvest,
crop: @maize,
plant_part: @pp,
owner: @member
)
])
FactoryGirl.create(:harvest,
crop: @tomato,
owner: @member
),
FactoryGirl.create(:harvest,
crop: @maize,
plant_part: @pp,
owner: @member
)
])
end
assign(:harvests, harvests)
render

View File

@@ -23,9 +23,9 @@ describe "photos/index" do
total_entries = 2
photos = WillPaginate::Collection.create(page, per_page, total_entries) do |pager|
pager.replace([
FactoryGirl.create(:photo),
FactoryGirl.create(:photo)
])
FactoryGirl.create(:photo),
FactoryGirl.create(:photo)
])
end
assign(:photos, photos)
end

View File

@@ -28,25 +28,25 @@ describe "plantings/index" do
total_entries = 3
plantings = WillPaginate::Collection.create(page, per_page, total_entries) do |pager|
pager.replace([
FactoryGirl.create(:planting,
garden: @garden,
crop: @tomato,
owner: @member
),
FactoryGirl.create(:planting,
garden: @garden,
crop: @maize,
description: '',
planted_at: Time.local(2013, 1, 13)
),
FactoryGirl.create(:planting,
garden: @garden,
crop: @tomato,
planted_at: Time.local(2013, 1, 13),
finished_at: Time.local(2013, 1, 20),
finished: true
)
])
FactoryGirl.create(:planting,
garden: @garden,
crop: @tomato,
owner: @member
),
FactoryGirl.create(:planting,
garden: @garden,
crop: @maize,
description: '',
planted_at: Time.local(2013, 1, 13)
),
FactoryGirl.create(:planting,
garden: @garden,
crop: @tomato,
planted_at: Time.local(2013, 1, 13),
finished_at: Time.local(2013, 1, 20),
finished: true
)
])
end
assign(:plantings, plantings)
render

View File

@@ -25,9 +25,9 @@ describe "posts/index" do
total_entries = 2
posts = WillPaginate::Collection.create(page, per_page, total_entries) do |pager|
pager.replace([
FactoryGirl.create(:post, author: @author),
FactoryGirl.create(:post, author: @author)
])
FactoryGirl.create(:post, author: @author),
FactoryGirl.create(:post, author: @author)
])
end
assign(:posts, posts)
render

View File

@@ -20,15 +20,15 @@ describe "roles/index" do
before(:each) do
controller.stub(:current_user) { nil }
assign(:roles, [
stub_model(Role,
name: "Name",
description: "MyText"
),
stub_model(Role,
name: "Name",
description: "MyText"
)
])
stub_model(Role,
name: "Name",
description: "MyText"
),
stub_model(Role,
name: "Name",
description: "MyText"
)
])
end
it "renders a list of roles" do

View File

@@ -20,9 +20,9 @@ describe "scientific_names/index" do
before(:each) do
controller.stub(:current_user) { nil }
assign(:scientific_names, [
FactoryGirl.create(:zea_mays),
FactoryGirl.create(:solanum_lycopersicum)
])
FactoryGirl.create(:zea_mays),
FactoryGirl.create(:solanum_lycopersicum)
])
end
it "renders a list of scientific_names" do