Skip to content

Commit d7eb5e0

Browse files
authored
Merge pull request #1472 from Growstuff/dev
Release 35
2 parents 6663f3a + f08d02f commit d7eb5e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+393
-430
lines changed

Gemfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ gem 'cancancan' # for checking member privileges
3232
gem 'csv_shaper' # CSV export
3333
gem 'figaro' # for handling config via ENV variables
3434
gem 'gibbon', '~>1.2.0' # for Mailchimp newsletter subscriptions
35-
gem 'leaflet-markercluster-rails'
36-
gem 'leaflet-rails', '~> 0.7.7' # Newer versions break tests - see https://travis-ci.org/CloCkWeRX/growstuff/builds/200984350
35+
36+
# Maps
37+
gem 'leaflet-rails'
38+
gem 'rails-assets-leaflet.markercluster', source: 'https://rails-assets.org'
39+
3740
gem 'pg'
3841
gem 'ruby-units' # for unit conversion
3942
gem 'unicorn' # http server
@@ -131,6 +134,7 @@ group :development, :test do
131134
gem 'coveralls', require: false # coverage analysis
132135
gem 'database_cleaner'
133136
gem 'factory_bot_rails' # for creating test data
137+
gem 'faker'
134138
gem 'haml-i18n-extractor'
135139
gem 'haml-rails' # HTML templating language
136140
gem 'haml_lint' # Checks haml files for goodness

Gemfile.lock

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
GEM
22
remote: https://rubygems.org/
3+
remote: https://rails-assets.org/
34
specs:
45
actionmailer (4.2.10)
56
actionpack (= 4.2.10)
@@ -84,7 +85,7 @@ GEM
8485
activesupport (>= 3.0.0)
8586
uniform_notifier (~> 1.10.0)
8687
byebug (9.1.0)
87-
cancancan (2.1.1)
88+
cancancan (2.1.2)
8889
capybara (2.16.1)
8990
addressable
9091
mini_mime (>= 0.1.3)
@@ -180,6 +181,8 @@ GEM
180181
factory_bot_rails (4.8.2)
181182
factory_bot (~> 4.8.2)
182183
railties (>= 3.0.0)
184+
faker (1.8.4)
185+
i18n (~> 0.5)
183186
faraday (0.12.2)
184187
multipart-post (>= 1.2, < 3)
185188
ffi (1.9.18)
@@ -191,7 +194,7 @@ GEM
191194
formatador (0.2.5)
192195
friendly_id (5.2.3)
193196
activerecord (>= 4.0.0)
194-
geocoder (1.4.4)
197+
geocoder (1.4.5)
195198
gibbon (1.2.1)
196199
httparty
197200
multi_json (>= 1.9.0)
@@ -241,7 +244,7 @@ GEM
241244
excon
242245
moneta
243246
multi_json (>= 1.9.2)
244-
highline (1.7.8)
247+
highline (1.7.10)
245248
html2haml (2.2.0)
246249
erubis (~> 2.7.0)
247250
haml (>= 4.0, < 6)
@@ -273,7 +276,7 @@ GEM
273276
thor (>= 0.14, < 2.0)
274277
jquery-ui-rails (5.0.5)
275278
railties (>= 3.2.16)
276-
js-routes (1.4.1)
279+
js-routes (1.4.2)
277280
railties (>= 3.2)
278281
sprockets-rails
279282
json (2.1.0)
@@ -295,12 +298,11 @@ GEM
295298
kaminari-core (= 1.1.1)
296299
kaminari-core (1.1.1)
297300
kgio (2.11.0)
298-
kramdown (1.15.0)
301+
kramdown (1.16.2)
299302
launchy (2.4.3)
300303
addressable (~> 2.3)
301-
leaflet-markercluster-rails (0.7.0)
302-
railties (>= 3.1)
303-
leaflet-rails (0.7.7)
304+
leaflet-rails (1.2.0)
305+
rails (>= 4.2.0)
304306
letter_opener (1.4.1)
305307
launchy (~> 2.2)
306308
listen (3.1.5)
@@ -400,6 +402,9 @@ GEM
400402
bundler (>= 1.3.0, < 2.0)
401403
railties (= 4.2.10)
402404
sprockets-rails
405+
rails-assets-leaflet (1.2.0)
406+
rails-assets-leaflet.markercluster (1.2.0)
407+
rails-assets-leaflet (>= 1.0.3)
403408
rails-deprecated_sanitizer (1.0.3)
404409
activesupport (>= 4.2.0.alpha)
405410
rails-dom-testing (1.0.8)
@@ -479,7 +484,7 @@ GEM
479484
sprockets (>= 2.8, < 4.0)
480485
sprockets-rails (>= 2.0, < 4.0)
481486
tilt (>= 1.1, < 3)
482-
selenium-webdriver (3.7.0)
487+
selenium-webdriver (3.8.0)
483488
childprocess (~> 0.5)
484489
rubyzip (~> 1.0)
485490
sexp_processor (4.10.0)
@@ -494,8 +499,8 @@ GEM
494499
json (>= 1.8, < 3)
495500
simplecov-html (~> 0.10.0)
496501
simplecov-html (0.10.2)
497-
sparkpost_rails (1.4.0)
498-
rails (>= 4.0, < 5.1)
502+
sparkpost_rails (1.5.0)
503+
rails (>= 4.0, < 5.2)
499504
sprockets (3.7.1)
500505
concurrent-ruby (~> 1.0)
501506
rack (> 1, < 3)
@@ -514,7 +519,7 @@ GEM
514519
thread_safe (0.3.6)
515520
tilt (2.0.8)
516521
timecop (0.9.1)
517-
tins (1.15.1)
522+
tins (1.16.0)
518523
trollop (1.16.2)
519524
tzinfo (1.2.4)
520525
thread_safe (~> 0.1)
@@ -575,6 +580,7 @@ DEPENDENCIES
575580
elasticsearch-model
576581
elasticsearch-rails
577582
factory_bot_rails
583+
faker
578584
figaro
579585
flickraw
580586
font-awesome-sass
@@ -596,8 +602,7 @@ DEPENDENCIES
596602
js-routes
597603
jsonapi-resources
598604
kaminari
599-
leaflet-markercluster-rails
600-
leaflet-rails (~> 0.7.7)
605+
leaflet-rails
601606
letter_opener
602607
memcachier
603608
newrelic_rpm
@@ -611,6 +616,7 @@ DEPENDENCIES
611616
pry
612617
quiet_assets
613618
rails (~> 4.2.8)
619+
rails-assets-leaflet.markercluster!
614620
rails_12factor
615621
rainbow (< 2.2.0)
616622
rake (>= 10.0.0)
@@ -635,4 +641,4 @@ RUBY VERSION
635641
ruby 2.4.1p111
636642

637643
BUNDLED WITH
638-
1.15.4
644+
1.16.0

app/assets/stylesheets/application.sass

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
@import 'bootstrap-datepicker'
33
@import 'leaflet'
44
@import 'leaflet.markercluster'
5-
@import 'leaflet.markercluster.default'
65
@import 'custom_bootstrap/custom_bootstrap'
76
@import 'overrides'
87
@import 'graphs'

app/controllers/account_types_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class AccountTypesController < ApplicationController
55

66
# GET /account_types
77
def index
8-
@account_types = AccountType.all
8+
@account_types = AccountType.all.order(:name)
99
respond_with(@account_types)
1010
end
1111

app/controllers/accounts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class AccountsController < ApplicationController
55

66
# GET /accounts
77
def index
8-
@accounts = Account.all
8+
@accounts = Account.all.order(created_at: :desc)
99
respond_with(@accounts)
1010
end
1111

app/controllers/alternate_names_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class AlternateNamesController < ApplicationController
77
# GET /alternate_names
88
# GET /alternate_names.json
99
def index
10-
@alternate_names = AlternateName.all
10+
@alternate_names = AlternateName.all.order(:name)
1111
respond_with(@alternate_names)
1212
end
1313

app/controllers/comments_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class CommentsController < ApplicationController
66
responders :flash
77

88
def index
9-
@comments = Comment.paginate(page: params[:page])
9+
@comments = Comment.order(created_at: :desc).paginate(page: params[:page])
1010
respond_with(@comments)
1111
end
1212

app/controllers/crops_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def crop_json_fields
185185
def crops
186186
q = Crop.approved.includes(:scientific_names, plantings: :photos)
187187
q = q.popular unless @sort == 'alpha'
188-
q.includes(:photos).paginate(page: params[:page])
188+
q.order("LOWER(crops.name)").includes(:photos).paginate(page: params[:page])
189189
end
190190

191191
def requested_crops

app/controllers/forums_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ForumsController < ApplicationController
55
# GET /forums
66
# GET /forums.json
77
def index
8-
@forums = Forum.all
8+
@forums = Forum.all.order(:name)
99
respond_with(@forums)
1010
end
1111

app/controllers/gardens_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ def garden_params
6868
def gardens
6969
g = @owner ? @owner.gardens : Garden.all
7070
g = g.active unless @show_all
71-
g.joins(:owner).order(:updated_at).paginate(page: params[:page])
71+
g.joins(:owner).order(:name).paginate(page: params[:page])
7272
end
7373
end

0 commit comments

Comments
 (0)