Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1b8d2211a |
@@ -1,2 +0,0 @@
|
||||
# Ruby version
|
||||
VARIANT=3.1.4
|
||||
@@ -1,22 +0,0 @@
|
||||
FROM mcr.microsoft.com/devcontainers/ruby:0-3.1-bullseye
|
||||
|
||||
# Install Rails
|
||||
RUN gem install rails:7.0.4 webdrivers:5.2.0
|
||||
|
||||
# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service
|
||||
# The value is a comma-separated list of allowed domains
|
||||
ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.github.dev"
|
||||
|
||||
#RUN bundle
|
||||
#RUN bundle exec rake db:create
|
||||
#RUN bundle exec rake db:migrate
|
||||
|
||||
# [Optional] Uncomment this section to install additional OS packages.
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
||||
|
||||
# [Optional] Uncomment this line to install additional gems.
|
||||
# RUN gem install <your-gem-names-here>
|
||||
|
||||
# [Optional] Uncomment this line to install global node packages.
|
||||
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
|
||||
@@ -1,2 +0,0 @@
|
||||
CREATE USER vscode CREATEDB;
|
||||
CREATE DATABASE vscode WITH OWNER vscode;
|
||||
@@ -1,30 +0,0 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres
|
||||
{
|
||||
"name": "Growstuff",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// Need something to get javascript working
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/node:1": {}
|
||||
},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// This can be used to network with other containers or the host.
|
||||
"forwardPorts": [3000, 5432, 9200],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// these don't actually work as postCreateCommands, you need to run them manually
|
||||
// for some unknown reason, Github codespaces use rbenv and rvm simultaneously
|
||||
// and you need both to be correct for it to work
|
||||
"postCreateCommand": "nice -n 19 bundle install && nice -n 19 bundle exec rake db:create && nice -n 19 bundle exec rake db:migrate && nice -n19 bundle exec rake db:seed"
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: .devcontainer/Dockerfile
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
elasticsearch:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
ELASTICSEARCH_URL: http://elasticsearch:9200/
|
||||
APP_DOMAIN_NAME: localhost:3000
|
||||
APP_PROTOCOL: http
|
||||
DEVISE_SECRET_KEY: secret
|
||||
GROWSTUFF_EMAIL: "noreply@test.growstuff.org"
|
||||
GROWSTUFF_FLICKR_KEY: secretkey
|
||||
GROWSTUFF_FLICKR_SECRET: secretsecret
|
||||
GROWSTUFF_SITE_NAME: "Growstuff (local)"
|
||||
RAILS_SECRET_TOKEN: supersecret
|
||||
volumes:
|
||||
- ../..:/workspaces:cached
|
||||
|
||||
# Overrides default command so things don't shut down after the process ends.
|
||||
command: sleep infinity
|
||||
|
||||
db:
|
||||
image: postgres:latest
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres-data:/var/lib/postgresql/data
|
||||
- ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_DB: growstuff_dev
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- "5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.4.0
|
||||
container_name: elasticsearch
|
||||
environment:
|
||||
- xpack.security.enabled=false
|
||||
- discovery.type=single-node
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
nofile:
|
||||
soft: 65536
|
||||
hard: 65536
|
||||
cap_add:
|
||||
- IPC_LOCK
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"curl http://localhost:9200 | grep tagline",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 120
|
||||
volumes:
|
||||
- esdata01:/usr/share/elasticsearch/data
|
||||
ports:
|
||||
- 9200:9200
|
||||
- 9300:9300
|
||||
|
||||
volumes:
|
||||
postgres-data:
|
||||
certs:
|
||||
driver: local
|
||||
esdata01:
|
||||
driver: local
|
||||
2
.github/dependabot.yml
vendored
@@ -5,7 +5,7 @@ updates:
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "07:00"
|
||||
open-pull-requests-limit: 20
|
||||
open-pull-requests-limit: 10
|
||||
versioning-strategy: lockfile-only
|
||||
ignore:
|
||||
- dependency-name: active_median
|
||||
|
||||
12
.github/workflows/brakeman-analysis.yml
vendored
@@ -5,6 +5,8 @@ name: Brakeman Scan
|
||||
|
||||
# This section configures the trigger for the workflow. Feel free to customize depending on your convention
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
pull_request:
|
||||
branches: [ dev ]
|
||||
|
||||
@@ -15,15 +17,17 @@ jobs:
|
||||
steps:
|
||||
# Checkout the repository to the GitHub Actions runner
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
# Customize the ruby version depending on your needs
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
uses: actions/setup-ruby@v1.1.3
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
|
||||
- name: Setup Brakeman
|
||||
env:
|
||||
BRAKEMAN_VERSION: '5.1.1' # SARIF support is provided in Brakeman version 4.10+
|
||||
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+
|
||||
run: |
|
||||
gem install brakeman --version $BRAKEMAN_VERSION
|
||||
|
||||
@@ -35,6 +39,6 @@ jobs:
|
||||
|
||||
# Upload the SARIF file generated in the previous step
|
||||
- name: Upload SARIF
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: output.sarif.json
|
||||
|
||||
8
.github/workflows/ci.yml
vendored
@@ -6,7 +6,7 @@ jobs:
|
||||
contributors:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Install ruby version specified in .ruby-version
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout this repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2.3.4
|
||||
|
||||
- name: Configure sysctl limits
|
||||
run: |
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Setup yarn cache
|
||||
uses: actions/cache@v3
|
||||
uses: actions/cache@v2.1.5
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
||||
|
||||
- name: Install NodeJS
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v2.4.0
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
inherit_from: .rubocop_todo.yml
|
||||
require:
|
||||
- rubocop-rails
|
||||
- rubocop-rspec
|
||||
require: rubocop-rails
|
||||
AllCops:
|
||||
NewCops: enable
|
||||
Exclude:
|
||||
@@ -18,11 +16,6 @@ Naming/FileName:
|
||||
- 'Gemfile'
|
||||
- 'Gemfile.lock'
|
||||
|
||||
RSpec/DescribeClass:
|
||||
Exclude:
|
||||
- 'spec/views/**/*.rb'
|
||||
- 'spec/features/**/*.rb'
|
||||
|
||||
Layout/MultilineMethodCallIndentation:
|
||||
EnforcedStyle: indented
|
||||
|
||||
|
||||
@@ -1,384 +1,21 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2022-11-07 13:39:24 UTC using RuboCop version 1.38.0.
|
||||
# `rubocop --auto-gen-config --no-offense-counts`
|
||||
# on 2019-12-16 21:01:58 +1300 using RuboCop version 0.77.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
|
||||
Layout/EmptyLineBetweenDefs:
|
||||
Lint/AmbiguousOperator:
|
||||
Exclude:
|
||||
- 'db/migrate/20171129041341_create_photographings.rb'
|
||||
- 'db/migrate/20190130090437_add_crop_to_photographings.rb'
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
|
||||
# Offense count: 10
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||
# SupportedStyles: space, no_space
|
||||
Layout/LineContinuationSpacing:
|
||||
Exclude:
|
||||
- 'app/mailers/notifier_mailer.rb'
|
||||
- 'app/models/seed.rb'
|
||||
- 'lib/tasks/growstuff.rake'
|
||||
- 'spec/features/rss/plantings_spec.rb'
|
||||
- 'spec/features/rss/posts_spec.rb'
|
||||
- 'spec/features/rss/seeds_spec.rb'
|
||||
- 'spec/models/seed_spec.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
||||
# SupportedStyles: aligned, indented
|
||||
Layout/LineEndStringConcatenationIndentation:
|
||||
Exclude:
|
||||
- 'app/mailers/notifier_mailer.rb'
|
||||
- 'app/models/seed.rb'
|
||||
- 'lib/tasks/growstuff.rake'
|
||||
- 'spec/features/rss/plantings_spec.rb'
|
||||
- 'spec/features/rss/posts_spec.rb'
|
||||
- 'spec/features/rss/seeds_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Layout/LineLength:
|
||||
Max: 304
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Lint/AmbiguousOperatorPrecedence:
|
||||
Exclude:
|
||||
- 'db/seeds.rb'
|
||||
- 'spec/helpers/gardens_helper_spec.rb'
|
||||
- 'spec/helpers/seeds_helper_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: RequireParenthesesForMethodChains.
|
||||
Lint/AmbiguousRange:
|
||||
Exclude:
|
||||
- 'app/models/concerns/search_harvests.rb'
|
||||
- 'app/models/concerns/search_plantings.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
||||
Lint/DuplicateBranch:
|
||||
Exclude:
|
||||
- 'app/models/harvest.rb'
|
||||
- 'lib/actions/oauth_signup_action.rb'
|
||||
|
||||
# Offense count: 8
|
||||
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
||||
Lint/EmptyBlock:
|
||||
Exclude:
|
||||
- 'db/migrate/20171022032108_all_the_predictions.rb'
|
||||
- 'spec/controllers/home_controller_spec.rb'
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/controllers/plant_parts_controller_spec.rb'
|
||||
- 'spec/factories/crop_companions.rb'
|
||||
- 'spec/features/crops/crop_detail_page_spec.rb'
|
||||
- 'spec/requests/authentications_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Lint/RedundantDirGlobSort:
|
||||
Exclude:
|
||||
- 'spec/rails_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: AllowComments, AllowNil.
|
||||
Lint/SuppressedException:
|
||||
Exclude:
|
||||
- 'lib/tasks/testing.rake'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: strict, consistent
|
||||
Lint/SymbolConversion:
|
||||
Exclude:
|
||||
- 'app/controllers/likes_controller.rb'
|
||||
|
||||
# Offense count: 8
|
||||
Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- 'config.rb'
|
||||
- 'config/compass.rb'
|
||||
- 'lib/actions/oauth_signup_action.rb'
|
||||
|
||||
# Offense count: 44
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
|
||||
Metrics/AbcSize:
|
||||
Max: 151
|
||||
|
||||
# Offense count: 10
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods, inherit_mode.
|
||||
# AllowedMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 61
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ClassLength:
|
||||
Max: 171
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 32
|
||||
|
||||
# Offense count: 59
|
||||
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
||||
Metrics/MethodLength:
|
||||
Max: 59
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 32
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: lowercase, uppercase
|
||||
Naming/HeredocDelimiterCase:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
|
||||
# Offense count: 3
|
||||
RSpec/AnyInstance:
|
||||
Exclude:
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/controllers/photos_controller_spec.rb'
|
||||
|
||||
# Offense count: 15
|
||||
RSpec/Capybara/SpecificMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/crops/browse_crops_spec.rb'
|
||||
- 'spec/features/footer_spec.rb'
|
||||
- 'spec/features/gardens/adding_gardens_spec.rb'
|
||||
- 'spec/features/harvests/harvesting_a_crop_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/seeds/adding_seeds_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
RSpec/Capybara/VisibilityMatcher:
|
||||
Exclude:
|
||||
- 'spec/features/shared_examples/crop_suggest.rb'
|
||||
|
||||
# Offense count: 292
|
||||
# Configuration parameters: Prefixes, AllowedPatterns.
|
||||
# Prefixes: when, with, without
|
||||
RSpec/ContextWording:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 36
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
||||
# SupportedStyles: described_class, explicit
|
||||
RSpec/DescribedClass:
|
||||
Exclude:
|
||||
- 'spec/models/like_spec.rb'
|
||||
- 'spec/models/member_spec.rb'
|
||||
- 'spec/services/timeline_service_spec.rb'
|
||||
|
||||
# Offense count: 13
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/EmptyExampleGroup:
|
||||
Exclude:
|
||||
- 'spec/controllers/authentications_controller_spec.rb'
|
||||
- 'spec/controllers/forums_controller_spec.rb'
|
||||
- 'spec/controllers/home_controller_spec.rb'
|
||||
- 'spec/controllers/likes_controller_spec.rb'
|
||||
- 'spec/controllers/plant_parts_controller_spec.rb'
|
||||
- 'spec/controllers/seeds_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_detail_page_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/requests/authentications_spec.rb'
|
||||
- 'spec/views/home/index_spec.rb'
|
||||
- 'spec/views/photos/edit.html.haml_spec.rb'
|
||||
- 'spec/views/posts/_single.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 136
|
||||
# Configuration parameters: CountAsOne.
|
||||
RSpec/ExampleLength:
|
||||
Max: 25
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/ExcessiveDocstringSpacing:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
|
||||
# Offense count: 30
|
||||
RSpec/ExpectInHook:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/features/admin/forums_spec.rb'
|
||||
- 'spec/features/crops/crop_photos_spec.rb'
|
||||
- 'spec/features/members/list_spec.rb'
|
||||
- 'spec/features/plantings/planting_a_crop_spec.rb'
|
||||
- 'spec/features/shared_examples/append_date.rb'
|
||||
|
||||
# Offense count: 1135
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/FactoryBot/SyntaxMethods:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
||||
# Include: **/*_spec*rb*, **/spec/**/*
|
||||
RSpec/FilePath:
|
||||
Exclude:
|
||||
- 'spec/controllers/member_controller_spec.rb'
|
||||
- 'spec/features/seeds/seed_photos.rb'
|
||||
- 'spec/models/garden_type.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: implicit, each, example
|
||||
RSpec/HookArgument:
|
||||
Exclude:
|
||||
- 'spec/requests/api/v1/plantings_request_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
RSpec/HooksBeforeExamples:
|
||||
Exclude:
|
||||
- 'spec/features/crops/creating_a_crop_spec.rb'
|
||||
|
||||
# Offense count: 710
|
||||
# Configuration parameters: AssignmentOnly.
|
||||
RSpec/InstanceVariable:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 40
|
||||
RSpec/LetSetup:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/MessageChain:
|
||||
Exclude:
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 23
|
||||
# Configuration parameters: .
|
||||
# SupportedStyles: have_received, receive
|
||||
RSpec/MessageSpies:
|
||||
EnforcedStyle: receive
|
||||
|
||||
# Offense count: 1
|
||||
RSpec/MultipleDescribes:
|
||||
Exclude:
|
||||
- 'spec/features/crops/crop_wranglers_spec.rb'
|
||||
|
||||
# Offense count: 149
|
||||
RSpec/MultipleExpectations:
|
||||
Max: 19
|
||||
|
||||
# Offense count: 137
|
||||
# Configuration parameters: AllowSubject.
|
||||
RSpec/MultipleMemoizedHelpers:
|
||||
Max: 14
|
||||
|
||||
# Offense count: 132
|
||||
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
||||
# SupportedStyles: always, named_only
|
||||
RSpec/NamedSubject:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 111
|
||||
# Configuration parameters: AllowedGroups.
|
||||
RSpec/NestedGroups:
|
||||
Max: 6
|
||||
|
||||
# Offense count: 407
|
||||
# Configuration parameters: AllowedPatterns.
|
||||
# AllowedPatterns: ^expect_, ^assert_
|
||||
RSpec/NoExpectationExample:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
RSpec/Rails/HaveHttpStatus:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/v1/plantings_controller_spec.rb'
|
||||
- 'spec/controllers/harvests_controller_spec.rb'
|
||||
- 'spec/requests/harvests_spec.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Inferences.
|
||||
RSpec/Rails/InferredSpecType:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
RSpec/RepeatedDescription:
|
||||
Exclude:
|
||||
- 'spec/models/like_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
RSpec/RepeatedExample:
|
||||
Exclude:
|
||||
- 'spec/controllers/photos_controller_spec.rb'
|
||||
- 'spec/features/members/following_spec.rb'
|
||||
- 'spec/models/like_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
RSpec/RepeatedExampleGroupBody:
|
||||
Exclude:
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
RSpec/ScatteredSetup:
|
||||
Exclude:
|
||||
- 'spec/features/percy/percy_spec.rb'
|
||||
- 'spec/features/plantings/prediction_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
RSpec/StubbedMock:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: constant, string
|
||||
RSpec/VerifiedDoubleReference:
|
||||
Exclude:
|
||||
- 'spec/models/member_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
||||
RSpec/VerifiedDoubles:
|
||||
Exclude:
|
||||
- 'spec/controllers/garden_types_controller_spec.rb'
|
||||
- 'spec/controllers/gardens_controller_spec.rb'
|
||||
- 'spec/views/devise/shared/_links_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/ActionControllerFlashBeforeRender:
|
||||
Exclude:
|
||||
- 'app/controllers/authentications_controller.rb'
|
||||
|
||||
# Offense count: 26
|
||||
# Configuration parameters: Database, Include.
|
||||
# SupportedDatabases: mysql, postgresql
|
||||
# Include: db/migrate/*.rb
|
||||
Rails/BulkChangeTable:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 11
|
||||
# Configuration parameters: Include.
|
||||
# Include: db/migrate/*.rb
|
||||
Rails/CreateTableWithTimestamps:
|
||||
@@ -393,14 +30,12 @@ Rails/CreateTableWithTimestamps:
|
||||
- 'db/migrate/20161201154922_add_photos_seeds_table.rb'
|
||||
- 'db/migrate/20171022032108_all_the_predictions.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: EnforcedStyle, AllowToTime.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: strict, flexible
|
||||
Rails/Date:
|
||||
Exclude:
|
||||
- 'app/mailers/notifier_mailer.rb'
|
||||
- 'app/mailers/notifier.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: slashes, arguments
|
||||
Rails/FilePath:
|
||||
@@ -410,7 +45,6 @@ Rails/FilePath:
|
||||
- 'config/environments/development.rb'
|
||||
- 'db/seeds.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/HasAndBelongsToMany:
|
||||
@@ -418,39 +52,23 @@ Rails/HasAndBelongsToMany:
|
||||
- 'app/models/member.rb'
|
||||
- 'app/models/role.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/HasManyOrHasOneDependent:
|
||||
Exclude:
|
||||
- 'app/models/member.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: Include.
|
||||
# Include: spec/**/*.rb, test/**/*.rb
|
||||
Rails/I18nLocaleAssignment:
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/InverseOf:
|
||||
Exclude:
|
||||
- 'spec/features/locale_spec.rb'
|
||||
- 'app/models/concerns/ownable.rb'
|
||||
|
||||
# Offense count: 33
|
||||
Rails/I18nLocaleTexts:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Exclude:
|
||||
- 'app/controllers/data_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
Rails/OutputSafety:
|
||||
Exclude:
|
||||
- 'app/helpers/auto_suggest_helper.rb'
|
||||
- 'app/helpers/gardens_helper.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Include.
|
||||
# Include: **/Rakefile, **/*.rake
|
||||
Rails/RakeEnvironment:
|
||||
@@ -459,53 +77,27 @@ Rails/RakeEnvironment:
|
||||
- 'lib/tasks/i18n.rake'
|
||||
- 'lib/tasks/testing.rake'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/RedundantPresenceValidationOnBelongsTo:
|
||||
Exclude:
|
||||
- 'app/models/alternate_name.rb'
|
||||
- 'app/models/like.rb'
|
||||
- 'app/models/planting.rb'
|
||||
- 'app/models/scientific_name.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# Configuration parameters: Include.
|
||||
# Include: db/**/*.rb
|
||||
# Include: db/migrate/*.rb
|
||||
Rails/ReversibleMigration:
|
||||
Exclude:
|
||||
- 'db/migrate/20130326092227_change_planted_at_to_date.rb'
|
||||
- 'db/migrate/20191119020643_upgrade_cms.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/RootPathnameMethods:
|
||||
# Configuration parameters: Blacklist, Whitelist.
|
||||
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
|
||||
Rails/SkipsModelValidations:
|
||||
Exclude:
|
||||
- 'app/controllers/crops_controller.rb'
|
||||
- 'app/helpers/icons_helper.rb'
|
||||
- 'db/migrate/20190317023129_finished_boolean.rb'
|
||||
- 'db/seeds.rb'
|
||||
- 'db/migrate/20190910022329_add_photo_source.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/UniqueValidationWithoutIndex:
|
||||
# Configuration parameters: AllowedChars.
|
||||
Style/AsciiComments:
|
||||
Exclude:
|
||||
- 'app/models/follow.rb'
|
||||
- 'app/models/garden.rb'
|
||||
- 'app/models/like.rb'
|
||||
- 'app/models/member.rb'
|
||||
- 'app/models/plant_part.rb'
|
||||
- 'app/models/role.rb'
|
||||
- 'config/initializers/comfortable_mexican_sofa.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Rails/WhereEquals:
|
||||
Exclude:
|
||||
- 'app/models/crop.rb'
|
||||
- 'app/models/harvest.rb'
|
||||
- 'app/models/planting.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||
# SupportedStyles: nested, compact
|
||||
Style/ClassAndModuleChildren:
|
||||
Exclude:
|
||||
@@ -513,133 +105,23 @@ Style/ClassAndModuleChildren:
|
||||
- 'lib/haml/filters/escaped_markdown.rb'
|
||||
- 'lib/haml/filters/growstuff_markdown.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/CommentedKeyword:
|
||||
Exclude:
|
||||
- 'db/migrate/20191119030244_cms_tags.rb'
|
||||
- 'spec/models/crop_spec.rb'
|
||||
- 'spec/models/photo_spec.rb'
|
||||
- 'spec/models/planting_spec.rb'
|
||||
|
||||
# Offense count: 42
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowedVars.
|
||||
Style/FetchEnvVar:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: always, always_true, never
|
||||
Style/FrozenStringLiteralComment:
|
||||
Exclude:
|
||||
- 'config/initializers/new_framework_defaults_6_0.rb'
|
||||
- 'db/migrate/20200801084007_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb'
|
||||
- 'db/migrate/20200815012538_remove_median_function.rb'
|
||||
- 'spec/lib/haml/filters/growstuff_markdown_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
Style/GlobalStdStream:
|
||||
Exclude:
|
||||
- 'config/environments/production.rb'
|
||||
- 'lib/tasks/openfarm.rake'
|
||||
|
||||
# Offense count: 2
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'bin/setup'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowedMethods.
|
||||
# AllowedMethods: nonzero?
|
||||
Style/IfWithBooleanLiteralBranches:
|
||||
Exclude:
|
||||
- 'app/controllers/gardens_controller.rb'
|
||||
|
||||
# Offense count: 2
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
- 'bin/setup'
|
||||
- 'bin/update'
|
||||
- 'spec/rails_helper.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
Style/NegatedIfElseCondition:
|
||||
Exclude:
|
||||
- 'app/helpers/crops_helper.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns, IgnoredMethods.
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
||||
# SupportedStyles: predicate, comparison
|
||||
Style/NumericPredicate:
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'app/helpers/harvests_helper.rb'
|
||||
- 'app/helpers/plantings_helper.rb'
|
||||
|
||||
# Offense count: 6
|
||||
Style/OpenStructUse:
|
||||
Exclude:
|
||||
- 'spec/helpers/event_helper_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: AllowedMethods.
|
||||
# AllowedMethods: respond_to_missing?
|
||||
Style/OptionalBooleanParameter:
|
||||
Exclude:
|
||||
- 'app/models/concerns/member_newsletter.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: same_as_string_literals, single_quotes, double_quotes
|
||||
Style/QuotedSymbols:
|
||||
Exclude:
|
||||
- 'app/models/seed.rb'
|
||||
- 'spec/controllers/crops_controller_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Methods.
|
||||
Style/RedundantArgument:
|
||||
Exclude:
|
||||
- 'app/helpers/application_helper.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: SafeForConstants.
|
||||
Style/RedundantFetchBlock:
|
||||
Exclude:
|
||||
- 'config/puma.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# This cop supports safe autocorrection (--autocorrect).
|
||||
# Configuration parameters: AllowModifier.
|
||||
Style/SoleNestedConditional:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/messages_controller.rb'
|
||||
- 'app/models/photo_association.rb'
|
||||
|
||||
# Offense count: 20
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: Mode.
|
||||
Style/StringConcatenation:
|
||||
Exclude:
|
||||
- 'app/controllers/messages_controller.rb'
|
||||
- 'app/helpers/buttons_helper.rb'
|
||||
- 'config/initializers/rswag_api.rb'
|
||||
- 'spec/helpers/gardens_helper_spec.rb'
|
||||
- 'spec/helpers/seeds_helper_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, IgnoredMethods, AllowComments.
|
||||
# AllowedMethods: define_method, mail, respond_to
|
||||
Style/SymbolProc:
|
||||
Exclude:
|
||||
- 'app/controllers/crops_controller.rb'
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.1.4
|
||||
2.7.2
|
||||
|
||||
@@ -1,129 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
info@growstuff.org. Any issues with a particular moderator can be reported to
|
||||
any one of the other moderators.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
@@ -92,7 +92,7 @@ submit the change with your pull request.
|
||||
- André Aubin / [lambda2](https://github.com/lambda2)
|
||||
- Martina Simicic / [simicic](https://github.com/simicic)
|
||||
- Rowan Crawford / [wombleton](https://github.com/wombleton)
|
||||
- Ítalo Pires / [italopires](https://github.com/italopires)
|
||||
- Le-jun - [lejun](https://github.com/le-jun)
|
||||
|
||||
## Bots
|
||||
|
||||
|
||||
24
Gemfile
@@ -5,17 +5,17 @@ source 'https://rubygems.org'
|
||||
# Match ruby version in .ruby-version
|
||||
ruby File.read('.ruby-version')
|
||||
|
||||
gem 'rails', '~> 7.0.4'
|
||||
gem 'rails', '6.0.3.2'
|
||||
|
||||
# Keeping old sprockets
|
||||
# https://github.com/rails/sprockets-rails/issues/444#issuecomment-637817050
|
||||
gem "sprockets", "<4"
|
||||
|
||||
gem 'bundler', '>= 2.3.10'
|
||||
gem 'bundler', '>=1.1.5'
|
||||
|
||||
gem 'coffee-rails'
|
||||
gem 'haml'
|
||||
gem 'sassc-rails'
|
||||
gem 'sass-rails'
|
||||
|
||||
# API data
|
||||
gem 'jsonapi-resources'
|
||||
@@ -24,7 +24,7 @@ gem 'rswag-api'
|
||||
gem 'rswag-ui'
|
||||
|
||||
# CSS framework
|
||||
gem "bootstrap", ">= 4.6.2"
|
||||
gem "bootstrap", ">= 4.3.1"
|
||||
gem 'material-sass', '4.1.1'
|
||||
|
||||
# Icons used by bootstrap/material-sass
|
||||
@@ -52,14 +52,14 @@ gem 'csv_shaper' # CSV export
|
||||
gem 'gibbon', '~>1.2.0' # for Mailchimp newsletter subscriptions
|
||||
|
||||
# Maps
|
||||
gem 'leaflet-rails', '>= 1.9.2'
|
||||
gem 'leaflet-rails'
|
||||
gem 'rails-assets-leaflet.markercluster', source: 'https://rails-assets.org'
|
||||
|
||||
gem 'pg'
|
||||
gem 'pg', '< 1.0.0' # Upstream bug, see https://github.com/Growstuff/growstuff/pull/1539
|
||||
gem 'ruby-units' # for unit conversion
|
||||
gem 'unicorn' # http server
|
||||
|
||||
gem "comfortable_mexican_sofa", git: "https://github.com/restarone/comfortable-mexican-sofa.git"
|
||||
gem "comfortable_mexican_sofa", "~> 2.0.0"
|
||||
|
||||
gem 'active_utils'
|
||||
gem 'sidekiq'
|
||||
@@ -90,10 +90,11 @@ gem 'geocoder'
|
||||
gem 'bootstrap-datepicker-rails'
|
||||
|
||||
# DRY-er easier bootstrap 4 forms
|
||||
gem "bootstrap_form", ">= 4.5.0"
|
||||
gem "bootstrap_form", ">= 4.2.0"
|
||||
|
||||
# For connecting to other services (eg Twitter)
|
||||
gem 'omniauth', '~> 1.3'
|
||||
gem 'omniauth-facebook'
|
||||
gem 'omniauth-flickr', '>= 0.0.15'
|
||||
gem 'omniauth-twitter'
|
||||
|
||||
@@ -118,11 +119,11 @@ gem 'xmlrpc' # fixes rake error - can be removed if not needed later
|
||||
|
||||
gem 'puma'
|
||||
|
||||
gem 'loofah', '>= 2.19.1'
|
||||
gem 'loofah', '>= 2.2.1'
|
||||
gem 'rack-protection', '>= 2.0.1'
|
||||
|
||||
# Member to member messaging system
|
||||
gem 'mailboxer', '>= 0.15.1'
|
||||
gem 'mailboxer'
|
||||
|
||||
gem 'faraday'
|
||||
gem 'faraday_middleware'
|
||||
@@ -174,6 +175,7 @@ end
|
||||
|
||||
group :test do
|
||||
gem 'codeclimate-test-reporter', require: false
|
||||
gem 'percy-capybara'
|
||||
gem 'rails-controller-testing'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'timecop'
|
||||
@@ -183,5 +185,3 @@ end
|
||||
group :travis do
|
||||
gem 'platform-api'
|
||||
end
|
||||
|
||||
gem "percy-capybara", "~> 5.0.0"
|
||||
|
||||
652
Gemfile.lock
@@ -1,72 +1,40 @@
|
||||
GIT
|
||||
remote: https://github.com/restarone/comfortable-mexican-sofa.git
|
||||
revision: ccf9415ae220453a199759b8ecbb8e9436c75c85
|
||||
specs:
|
||||
comfortable_mexican_sofa (2.0.19)
|
||||
active_link_to (>= 1.0.0)
|
||||
comfy_bootstrap_form (>= 4.0.0)
|
||||
haml-rails (>= 1.0.0)
|
||||
image_processing (>= 1.2)
|
||||
jquery-rails (>= 4.3.1)
|
||||
kramdown (>= 1.0.0)
|
||||
mimemagic (>= 0.3.2)
|
||||
mini_magick (>= 4.8.0)
|
||||
rails (>= 5.2.0)
|
||||
rails-i18n (>= 5.0.0)
|
||||
sassc-rails (>= 2.0.0)
|
||||
|
||||
GEM
|
||||
remote: https://rails-assets.org/
|
||||
specs:
|
||||
rails-assets-leaflet (1.5.1)
|
||||
rails-assets-leaflet.markercluster (1.4.1)
|
||||
rails-assets-leaflet (>= 1.3.1)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
remote: https://rails-assets.org/
|
||||
specs:
|
||||
abstract_type (0.0.7)
|
||||
actioncable (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
actioncable (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (>= 0.6.1)
|
||||
actionmailbox (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
activejob (= 7.0.4.3)
|
||||
activerecord (= 7.0.4.3)
|
||||
activestorage (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
actionmailbox (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
activejob (= 6.0.3.2)
|
||||
activerecord (= 6.0.3.2)
|
||||
activestorage (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
mail (>= 2.7.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
actionmailer (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
actionview (= 7.0.4.3)
|
||||
activejob (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
actionmailer (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
actionview (= 6.0.3.2)
|
||||
activejob (= 6.0.3.2)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (7.0.4.3)
|
||||
actionview (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
rack (~> 2.0, >= 2.2.0)
|
||||
actionpack (6.0.3.2)
|
||||
actionview (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||
actiontext (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
activerecord (= 7.0.4.3)
|
||||
activestorage (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
globalid (>= 0.6.0)
|
||||
actiontext (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
activerecord (= 6.0.3.2)
|
||||
activestorage (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
nokogiri (>= 1.8.5)
|
||||
actionview (7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
actionview (6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
@@ -78,60 +46,52 @@ GEM
|
||||
activerecord (>= 4.2)
|
||||
active_record_union (1.3.0)
|
||||
activerecord (>= 4.0)
|
||||
active_utils (3.4.1)
|
||||
active_utils (3.3.17)
|
||||
activesupport (>= 4.2)
|
||||
i18n
|
||||
activejob (7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
activejob (6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
activerecord (7.0.4.3)
|
||||
activemodel (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
activestorage (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
activejob (= 7.0.4.3)
|
||||
activerecord (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
marcel (~> 1.0)
|
||||
mini_mime (>= 1.1.0)
|
||||
activesupport (7.0.4.3)
|
||||
activemodel (6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
activerecord (6.0.3.2)
|
||||
activemodel (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
activestorage (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
activejob (= 6.0.3.2)
|
||||
activerecord (= 6.0.3.2)
|
||||
marcel (~> 0.3.1)
|
||||
activesupport (6.0.3.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 1.6, < 2)
|
||||
minitest (>= 5.1)
|
||||
tzinfo (~> 2.0)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
adamantium (0.2.0)
|
||||
ice_nine (~> 0.11.0)
|
||||
memoizable (~> 0.4.0)
|
||||
addressable (2.8.4)
|
||||
public_suffix (>= 2.0.2, < 6.0)
|
||||
anima (0.3.2)
|
||||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
anima (0.3.1)
|
||||
abstract_type (~> 0.0.7)
|
||||
adamantium (~> 0.2)
|
||||
equalizer (~> 0.0.11)
|
||||
ast (2.4.2)
|
||||
autoprefixer-rails (10.4.7.0)
|
||||
execjs (~> 2)
|
||||
bcrypt (3.1.18)
|
||||
better_errors (2.10.0)
|
||||
autoprefixer-rails (10.2.4.0)
|
||||
execjs
|
||||
bcrypt (3.1.16)
|
||||
better_errors (2.9.1)
|
||||
coderay (>= 1.0.0)
|
||||
erubi (>= 1.0.0)
|
||||
rack (>= 0.9.0)
|
||||
rouge (>= 1.0.0)
|
||||
better_html (2.0.1)
|
||||
actionview (>= 6.0)
|
||||
activesupport (>= 6.0)
|
||||
ast (~> 2.0)
|
||||
erubi (~> 1.4)
|
||||
parser (>= 2.4)
|
||||
smart_properties
|
||||
bluecloth (2.2.0)
|
||||
bonsai-elasticsearch-rails (7.0.1)
|
||||
elasticsearch-model (< 8)
|
||||
elasticsearch-rails (< 8)
|
||||
bootstrap (4.6.2)
|
||||
bootstrap (4.6.0)
|
||||
autoprefixer-rails (>= 9.1.0)
|
||||
popper_js (>= 1.16.1, < 2)
|
||||
popper_js (>= 1.14.3, < 2)
|
||||
sassc-rails (>= 2.0.0)
|
||||
bootstrap-datepicker-rails (1.9.0.1)
|
||||
railties (>= 3.0)
|
||||
@@ -139,14 +99,13 @@ GEM
|
||||
actionpack (>= 5.2)
|
||||
activemodel (>= 5.2)
|
||||
builder (3.2.4)
|
||||
bullet (7.0.7)
|
||||
bullet (6.1.4)
|
||||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.11)
|
||||
byebug (11.1.3)
|
||||
cancancan (3.5.0)
|
||||
capybara (3.39.0)
|
||||
cancancan (3.2.1)
|
||||
capybara (3.35.3)
|
||||
addressable
|
||||
matrix
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
@@ -156,7 +115,7 @@ GEM
|
||||
capybara-email (3.0.2)
|
||||
capybara (>= 2.4, < 4.0)
|
||||
mail
|
||||
capybara-screenshot (1.0.26)
|
||||
capybara-screenshot (1.0.25)
|
||||
capybara (>= 1.0, < 4)
|
||||
launchy
|
||||
carrierwave (2.1.1)
|
||||
@@ -167,9 +126,11 @@ GEM
|
||||
mimemagic (>= 0.3.0)
|
||||
mini_mime (>= 0.1.3)
|
||||
ssrf_filter (~> 1.0)
|
||||
chartkick (5.0.1)
|
||||
chartkick (4.0.4)
|
||||
childprocess (3.0.0)
|
||||
codeclimate-test-reporter (1.0.9)
|
||||
simplecov (<= 0.13)
|
||||
coderay (1.1.3)
|
||||
coffee-rails (5.0.0)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 5.2.0)
|
||||
@@ -177,37 +138,47 @@ GEM
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
comfortable_mexican_sofa (2.0.19)
|
||||
active_link_to (>= 1.0.0)
|
||||
comfy_bootstrap_form (>= 4.0.0)
|
||||
haml-rails (>= 1.0.0)
|
||||
jquery-rails (>= 4.3.1)
|
||||
kramdown (>= 1.0.0)
|
||||
mimemagic (>= 0.3.2)
|
||||
mini_magick (>= 4.8.0)
|
||||
rails (>= 5.2.0)
|
||||
rails-i18n (>= 5.0.0)
|
||||
sassc-rails (>= 2.0.0)
|
||||
comfy_bootstrap_form (4.0.9)
|
||||
rails (>= 5.0.0)
|
||||
concord (0.1.6)
|
||||
concord (0.1.5)
|
||||
adamantium (~> 0.2.0)
|
||||
equalizer (~> 0.0.9)
|
||||
concurrent-ruby (1.2.2)
|
||||
connection_pool (2.4.0)
|
||||
concurrent-ruby (1.1.8)
|
||||
connection_pool (2.2.3)
|
||||
crass (1.0.6)
|
||||
csv_shaper (1.3.2)
|
||||
activesupport (>= 3.0.0)
|
||||
dalli (3.2.4)
|
||||
database_cleaner (2.0.2)
|
||||
database_cleaner-active_record (>= 2, < 3)
|
||||
database_cleaner-active_record (2.1.0)
|
||||
dalli (2.7.11)
|
||||
database_cleaner (2.0.1)
|
||||
database_cleaner-active_record (~> 2.0.0)
|
||||
database_cleaner-active_record (2.0.0)
|
||||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
database_cleaner-core (2.0.1)
|
||||
date (3.3.3)
|
||||
devise (4.9.2)
|
||||
devise (4.8.0)
|
||||
bcrypt (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 4.1.0)
|
||||
responders
|
||||
warden (~> 1.2.3)
|
||||
diff-lcs (1.5.0)
|
||||
discard (1.2.1)
|
||||
activerecord (>= 4.2, < 8)
|
||||
diff-lcs (1.4.4)
|
||||
discard (1.2.0)
|
||||
activerecord (>= 4.2, < 7)
|
||||
docile (1.1.5)
|
||||
dotenv (2.8.1)
|
||||
dotenv-rails (2.8.1)
|
||||
dotenv (= 2.8.1)
|
||||
dotenv (2.7.6)
|
||||
dotenv-rails (2.7.6)
|
||||
dotenv (= 2.7.6)
|
||||
railties (>= 3.2)
|
||||
elasticsearch (6.8.3)
|
||||
elasticsearch-api (= 6.8.3)
|
||||
@@ -223,58 +194,52 @@ GEM
|
||||
faraday (~> 1)
|
||||
multi_json
|
||||
equalizer (0.0.11)
|
||||
erubi (1.12.0)
|
||||
erubi (1.10.0)
|
||||
erubis (2.7.0)
|
||||
excon (0.93.1)
|
||||
execjs (2.8.1)
|
||||
excon (0.78.1)
|
||||
execjs (2.7.0)
|
||||
factory_bot (6.2.0)
|
||||
activesupport (>= 5.0.0)
|
||||
factory_bot_rails (6.2.0)
|
||||
factory_bot (~> 6.2.0)
|
||||
railties (>= 5.0.0)
|
||||
faker (3.2.0)
|
||||
i18n (>= 1.8.11, < 2)
|
||||
faraday (1.10.3)
|
||||
faker (2.18.0)
|
||||
i18n (>= 1.6, < 2)
|
||||
faraday (1.5.1)
|
||||
faraday-em_http (~> 1.0)
|
||||
faraday-em_synchrony (~> 1.0)
|
||||
faraday-excon (~> 1.1)
|
||||
faraday-httpclient (~> 1.0)
|
||||
faraday-multipart (~> 1.0)
|
||||
faraday-httpclient (~> 1.0.1)
|
||||
faraday-net_http (~> 1.0)
|
||||
faraday-net_http_persistent (~> 1.0)
|
||||
faraday-net_http_persistent (~> 1.1)
|
||||
faraday-patron (~> 1.0)
|
||||
faraday-rack (~> 1.0)
|
||||
faraday-retry (~> 1.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ruby2_keywords (>= 0.0.4)
|
||||
faraday-em_http (1.0.0)
|
||||
faraday-em_synchrony (1.0.0)
|
||||
faraday-excon (1.1.0)
|
||||
faraday-httpclient (1.0.1)
|
||||
faraday-multipart (1.0.4)
|
||||
multipart-post (~> 2)
|
||||
faraday-net_http (1.0.1)
|
||||
faraday-net_http_persistent (1.2.0)
|
||||
faraday-net_http_persistent (1.1.0)
|
||||
faraday-patron (1.0.0)
|
||||
faraday-rack (1.0.0)
|
||||
faraday-retry (1.0.3)
|
||||
faraday_middleware (1.2.0)
|
||||
faraday_middleware (1.0.0)
|
||||
faraday (~> 1.0)
|
||||
ffi (1.15.5)
|
||||
ffi (1.15.0)
|
||||
flickraw (0.9.10)
|
||||
font-awesome-sass (5.15.1)
|
||||
sassc (>= 1.11)
|
||||
friendly_id (5.5.0)
|
||||
friendly_id (5.4.2)
|
||||
activerecord (>= 4.0.0)
|
||||
geocoder (1.8.1)
|
||||
geocoder (1.6.7)
|
||||
gibbon (1.2.1)
|
||||
httparty
|
||||
multi_json (>= 1.9.0)
|
||||
globalid (1.1.0)
|
||||
activesupport (>= 5.0)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
gravatar-ultimate (2.0.0)
|
||||
activesupport (>= 2.3.14)
|
||||
rack
|
||||
haml (5.2.2)
|
||||
haml (5.2.1)
|
||||
temple (>= 0.8.0)
|
||||
tilt
|
||||
haml-i18n-extractor (0.5.9)
|
||||
@@ -283,34 +248,38 @@ GEM
|
||||
highline
|
||||
tilt
|
||||
trollop (= 1.16.2)
|
||||
haml-rails (2.1.0)
|
||||
haml-rails (2.0.1)
|
||||
actionpack (>= 5.1)
|
||||
activesupport (>= 5.1)
|
||||
haml (>= 4.0.6)
|
||||
haml (>= 4.0.6, < 6.0)
|
||||
html2haml (>= 1.0.1)
|
||||
railties (>= 5.1)
|
||||
haml_lint (0.45.0)
|
||||
haml (>= 4.0, < 6.2)
|
||||
haml_lint (0.37.1)
|
||||
haml (>= 4.0, < 5.3)
|
||||
parallel (~> 1.10)
|
||||
rainbow
|
||||
rubocop (>= 0.50.0)
|
||||
sysexits (~> 1.1)
|
||||
hashie (5.0.0)
|
||||
heroics (0.1.2)
|
||||
hashie (4.1.0)
|
||||
heroics (0.1.1)
|
||||
erubis (~> 2.0)
|
||||
excon
|
||||
moneta
|
||||
multi_json (>= 1.9.2)
|
||||
webrick
|
||||
highline (2.0.3)
|
||||
httparty (0.21.0)
|
||||
mini_mime (>= 1.0.0)
|
||||
html2haml (2.2.0)
|
||||
erubis (~> 2.7.0)
|
||||
haml (>= 4.0, < 6)
|
||||
nokogiri (>= 1.6.0)
|
||||
ruby_parser (~> 3.5)
|
||||
httparty (0.18.1)
|
||||
mime-types (~> 3.0)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (1.13.0)
|
||||
i18n (1.8.10)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-tasks (1.0.12)
|
||||
i18n-tasks (0.9.34)
|
||||
activesupport (>= 4.0.2)
|
||||
ast (>= 2.1.0)
|
||||
better_html (>= 1.0, < 3.0)
|
||||
erubi
|
||||
highline (>= 2.0.0)
|
||||
i18n
|
||||
@@ -319,10 +288,10 @@ GEM
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
terminal-table (>= 1.5.1)
|
||||
ice_nine (0.11.2)
|
||||
image_processing (1.12.2)
|
||||
image_processing (1.12.1)
|
||||
mini_magick (>= 4.9.5, < 5)
|
||||
ruby-vips (>= 2.0.17, < 3)
|
||||
jquery-rails (4.5.1)
|
||||
jquery-rails (4.4.0)
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
@@ -330,126 +299,130 @@ GEM
|
||||
railties (>= 3.2.16)
|
||||
js-routes (1.4.14)
|
||||
railties (>= 4)
|
||||
json (2.6.3)
|
||||
json-schema (3.0.0)
|
||||
addressable (>= 2.8)
|
||||
jsonapi-resources (0.10.7)
|
||||
json (2.3.1)
|
||||
json-schema (2.8.1)
|
||||
addressable (>= 2.4)
|
||||
jsonapi-resources (0.10.4)
|
||||
activerecord (>= 4.1)
|
||||
concurrent-ruby
|
||||
railties (>= 4.1)
|
||||
jsonapi-swagger (0.8.1)
|
||||
kgio (2.11.4)
|
||||
kramdown (2.4.0)
|
||||
jwt (2.2.2)
|
||||
kgio (2.11.3)
|
||||
kramdown (2.3.1)
|
||||
rexml
|
||||
launchy (2.5.0)
|
||||
addressable (~> 2.7)
|
||||
leaflet-rails (1.9.3)
|
||||
leaflet-rails (1.7.0)
|
||||
rails (>= 4.2.0)
|
||||
letter_opener (1.8.1)
|
||||
launchy (>= 2.2, < 3)
|
||||
listen (3.8.0)
|
||||
letter_opener (1.7.0)
|
||||
launchy (~> 2.2)
|
||||
listen (3.5.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
loofah (2.20.0)
|
||||
loofah (2.9.1)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
mail (2.8.1)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
net-imap
|
||||
net-pop
|
||||
net-smtp
|
||||
mailboxer (0.15.1)
|
||||
carrierwave (>= 0.5.8)
|
||||
rails (>= 5.0.0)
|
||||
marcel (1.0.2)
|
||||
marcel (0.3.3)
|
||||
mimemagic (~> 0.3.2)
|
||||
material-sass (4.1.1)
|
||||
autoprefixer-rails (>= 6.0.3)
|
||||
sass (>= 3.5.2)
|
||||
material_icons (4.0.0)
|
||||
material_icons (2.2.1)
|
||||
railties (>= 3.2)
|
||||
matrix (0.4.2)
|
||||
memcachier (0.0.2)
|
||||
memoizable (0.4.2)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
method_source (1.0.0)
|
||||
mimemagic (0.4.3)
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2020.0512)
|
||||
mimemagic (0.3.10)
|
||||
nokogiri (~> 1)
|
||||
rake
|
||||
mini_magick (4.12.0)
|
||||
mini_mime (1.1.2)
|
||||
mini_portile2 (2.8.1)
|
||||
minitest (5.18.0)
|
||||
mini_magick (4.11.0)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.5.1)
|
||||
minitest (5.14.4)
|
||||
moneta (1.0.0)
|
||||
multi_json (1.15.0)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.2.3)
|
||||
net-imap (0.3.4)
|
||||
date
|
||||
net-protocol
|
||||
net-pop (0.1.2)
|
||||
net-protocol
|
||||
net-protocol (0.2.1)
|
||||
timeout
|
||||
net-smtp (0.3.3)
|
||||
net-protocol
|
||||
nio4r (2.5.9)
|
||||
nokogiri (1.14.3)
|
||||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.14.3-x86_64-linux)
|
||||
multipart-post (2.1.1)
|
||||
nio4r (2.5.7)
|
||||
nokogiri (1.11.4)
|
||||
mini_portile2 (~> 2.5.0)
|
||||
racc (~> 1.4)
|
||||
oauth (0.5.6)
|
||||
oj (3.14.3)
|
||||
omniauth (1.9.2)
|
||||
oauth2 (1.4.4)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
oj (3.12.1)
|
||||
omniauth (1.9.1)
|
||||
hashie (>= 3.4.6)
|
||||
rack (>= 1.6.2, < 3)
|
||||
omniauth-facebook (8.0.0)
|
||||
omniauth-oauth2 (~> 1.2)
|
||||
omniauth-flickr (0.0.20)
|
||||
multi_json (~> 1.12)
|
||||
omniauth-oauth (~> 1.0)
|
||||
omniauth-oauth (1.1.0)
|
||||
oauth
|
||||
omniauth (~> 1.0)
|
||||
omniauth-oauth2 (1.7.0)
|
||||
oauth2 (~> 1.4)
|
||||
omniauth (~> 1.9)
|
||||
omniauth-twitter (1.4.0)
|
||||
omniauth-oauth (~> 1.1)
|
||||
rack
|
||||
orm_adapter (0.5.0)
|
||||
parallel (1.23.0)
|
||||
parser (3.2.2.0)
|
||||
parallel (1.20.1)
|
||||
parser (2.7.2.0)
|
||||
ast (~> 2.4.1)
|
||||
percy-capybara (5.0.0)
|
||||
capybara (>= 3)
|
||||
pg (1.5.3)
|
||||
platform-api (3.5.0)
|
||||
percy-capybara (4.3.3)
|
||||
pg (0.21.0)
|
||||
platform-api (3.3.0)
|
||||
heroics (~> 0.1.1)
|
||||
moneta (~> 1.0.0)
|
||||
rate_throttle_client (~> 0.1.0)
|
||||
popper_js (1.16.1)
|
||||
public_suffix (5.0.1)
|
||||
puma (6.2.2)
|
||||
popper_js (1.16.0)
|
||||
public_suffix (4.0.6)
|
||||
puma (5.3.2)
|
||||
nio4r (~> 2.0)
|
||||
query_diet (0.7.1)
|
||||
racc (1.6.2)
|
||||
rack (2.2.7)
|
||||
rack-cors (2.0.1)
|
||||
query_diet (0.7.0)
|
||||
racc (1.5.2)
|
||||
rack (2.2.3)
|
||||
rack-cors (1.1.1)
|
||||
rack (>= 2.0.0)
|
||||
rack-protection (3.0.6)
|
||||
rack-protection (2.1.0)
|
||||
rack
|
||||
rack-test (2.1.0)
|
||||
rack (>= 1.3)
|
||||
rails (7.0.4.3)
|
||||
actioncable (= 7.0.4.3)
|
||||
actionmailbox (= 7.0.4.3)
|
||||
actionmailer (= 7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
actiontext (= 7.0.4.3)
|
||||
actionview (= 7.0.4.3)
|
||||
activejob (= 7.0.4.3)
|
||||
activemodel (= 7.0.4.3)
|
||||
activerecord (= 7.0.4.3)
|
||||
activestorage (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
bundler (>= 1.15.0)
|
||||
railties (= 7.0.4.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails (6.0.3.2)
|
||||
actioncable (= 6.0.3.2)
|
||||
actionmailbox (= 6.0.3.2)
|
||||
actionmailer (= 6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
actiontext (= 6.0.3.2)
|
||||
actionview (= 6.0.3.2)
|
||||
activejob (= 6.0.3.2)
|
||||
activemodel (= 6.0.3.2)
|
||||
activerecord (= 6.0.3.2)
|
||||
activestorage (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 6.0.3.2)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-assets-leaflet (1.5.1)
|
||||
rails-assets-leaflet.markercluster (1.4.1)
|
||||
rails-assets-leaflet (>= 1.3.1)
|
||||
rails-controller-testing (1.0.5)
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
actionview (>= 5.0.1.rc1)
|
||||
@@ -457,110 +430,107 @@ GEM
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.5.0)
|
||||
loofah (~> 2.19, >= 2.19.1)
|
||||
rails-i18n (7.0.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
rails-i18n (6.0.0)
|
||||
i18n (>= 0.7, < 2)
|
||||
railties (>= 6.0.0, < 8)
|
||||
railties (>= 6.0.0, < 7)
|
||||
rails_12factor (0.0.3)
|
||||
rails_serve_static_assets
|
||||
rails_stdout_logging
|
||||
rails_serve_static_assets (0.0.5)
|
||||
rails_stdout_logging (0.0.5)
|
||||
railties (7.0.4.3)
|
||||
actionpack (= 7.0.4.3)
|
||||
activesupport (= 7.0.4.3)
|
||||
railties (6.0.3.2)
|
||||
actionpack (= 6.0.3.2)
|
||||
activesupport (= 6.0.3.2)
|
||||
method_source
|
||||
rake (>= 12.2)
|
||||
thor (~> 1.0)
|
||||
zeitwerk (~> 2.5)
|
||||
rainbow (3.1.1)
|
||||
raindrops (0.20.0)
|
||||
rake (13.0.6)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.20.3, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.3)
|
||||
rate_throttle_client (0.1.2)
|
||||
rb-fsevent (0.11.2)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
redis-client (0.14.1)
|
||||
connection_pool
|
||||
regexp_parser (2.8.0)
|
||||
responders (3.1.0)
|
||||
actionpack (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
redis (4.2.5)
|
||||
regexp_parser (2.1.1)
|
||||
responders (3.0.1)
|
||||
actionpack (>= 5.0)
|
||||
railties (>= 5.0)
|
||||
rexml (3.2.5)
|
||||
rouge (4.1.0)
|
||||
rspec (3.11.0)
|
||||
rspec-core (~> 3.11.0)
|
||||
rspec-expectations (~> 3.11.0)
|
||||
rspec-mocks (~> 3.11.0)
|
||||
rspec (3.10.0)
|
||||
rspec-core (~> 3.10.0)
|
||||
rspec-expectations (~> 3.10.0)
|
||||
rspec-mocks (~> 3.10.0)
|
||||
rspec-activemodel-mocks (1.1.0)
|
||||
activemodel (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
rspec-mocks (>= 2.99, < 4.0)
|
||||
rspec-core (3.11.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-expectations (3.11.1)
|
||||
rspec-core (3.10.1)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-expectations (3.10.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-mocks (3.11.2)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-mocks (3.10.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.11.0)
|
||||
rspec-rails (6.0.1)
|
||||
actionpack (>= 6.1)
|
||||
activesupport (>= 6.1)
|
||||
railties (>= 6.1)
|
||||
rspec-core (~> 3.11)
|
||||
rspec-expectations (~> 3.11)
|
||||
rspec-mocks (~> 3.11)
|
||||
rspec-support (~> 3.11)
|
||||
rspec-support (3.11.1)
|
||||
rspectre (0.0.4)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-rails (5.0.1)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
rspec-core (~> 3.10)
|
||||
rspec-expectations (~> 3.10)
|
||||
rspec-mocks (~> 3.10)
|
||||
rspec-support (~> 3.10)
|
||||
rspec-support (3.10.2)
|
||||
rspectre (0.0.3)
|
||||
anima (~> 0.3)
|
||||
concord (~> 0.1)
|
||||
parser (>= 2.6)
|
||||
parser (~> 2.3)
|
||||
rspec (~> 3.0)
|
||||
rswag-api (2.9.0)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rswag-specs (2.9.0)
|
||||
activesupport (>= 3.1, < 7.1)
|
||||
json-schema (>= 2.2, < 4.0)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rspec-core (>= 2.14)
|
||||
rswag-ui (2.9.0)
|
||||
actionpack (>= 3.1, < 7.1)
|
||||
railties (>= 3.1, < 7.1)
|
||||
rubocop (1.50.2)
|
||||
json (~> 2.3)
|
||||
rswag-api (2.4.0)
|
||||
railties (>= 3.1, < 7.0)
|
||||
rswag-specs (2.4.0)
|
||||
activesupport (>= 3.1, < 7.0)
|
||||
json-schema (~> 2.2)
|
||||
railties (>= 3.1, < 7.0)
|
||||
rswag-ui (2.4.0)
|
||||
actionpack (>= 3.1, < 7.0)
|
||||
railties (>= 3.1, < 7.0)
|
||||
rubocop (0.93.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.2.0.0)
|
||||
parser (>= 2.7.1.5)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.28.0, < 2.0)
|
||||
regexp_parser (>= 1.8)
|
||||
rexml
|
||||
rubocop-ast (>= 0.6.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 3.0)
|
||||
rubocop-ast (1.28.0)
|
||||
parser (>= 3.2.1.0)
|
||||
rubocop-capybara (2.17.1)
|
||||
rubocop (~> 1.41)
|
||||
rubocop-rails (2.19.1)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-ast (1.4.1)
|
||||
parser (>= 2.7.1.5)
|
||||
rubocop-rails (2.9.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
rubocop-rspec (2.20.0)
|
||||
rubocop (~> 1.33)
|
||||
rubocop-capybara (~> 2.17)
|
||||
ruby-progressbar (1.13.0)
|
||||
ruby-units (3.0.0)
|
||||
ruby-vips (2.1.4)
|
||||
ffi (~> 1.12)
|
||||
ruby2_keywords (0.0.5)
|
||||
rubyzip (2.3.2)
|
||||
rubocop (>= 0.90.0, < 2.0)
|
||||
rubocop-rspec (1.44.1)
|
||||
rubocop (~> 0.87)
|
||||
rubocop-ast (>= 0.7.1)
|
||||
ruby-progressbar (1.11.0)
|
||||
ruby-units (2.3.2)
|
||||
ruby-vips (2.0.17)
|
||||
ffi (~> 1.9)
|
||||
ruby2_keywords (0.0.4)
|
||||
ruby_parser (3.14.2)
|
||||
sexp_processor (~> 4.9)
|
||||
rubyzip (2.3.0)
|
||||
sass (3.7.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sass-rails (6.0.0)
|
||||
sassc-rails (~> 2.1, >= 2.1.1)
|
||||
sassc (2.4.0)
|
||||
ffi (~> 1.9)
|
||||
sassc-rails (2.1.2)
|
||||
@@ -569,84 +539,79 @@ GEM
|
||||
sprockets (> 3.0)
|
||||
sprockets-rails
|
||||
tilt
|
||||
scout_apm (5.3.3)
|
||||
scout_apm (4.0.4)
|
||||
parser
|
||||
searchkick (4.6.3)
|
||||
searchkick (4.4.4)
|
||||
activemodel (>= 5)
|
||||
elasticsearch (>= 6, < 7.14)
|
||||
elasticsearch (>= 6)
|
||||
hashie
|
||||
selenium-webdriver (4.9.0)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
rubyzip (>= 1.2.2, < 3.0)
|
||||
websocket (~> 1.0)
|
||||
sidekiq (7.0.9)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.11.0)
|
||||
selenium-webdriver (3.142.7)
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
rubyzip (>= 1.2.2)
|
||||
sexp_processor (4.15.0)
|
||||
sidekiq (6.2.1)
|
||||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.2.0)
|
||||
simplecov (0.13.0)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
smart_properties (1.17.0)
|
||||
sprockets (3.7.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
rack (> 1, < 3)
|
||||
sprockets-rails (3.4.2)
|
||||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets-rails (3.2.2)
|
||||
actionpack (>= 4.0)
|
||||
activesupport (>= 4.0)
|
||||
sprockets (>= 3.0.0)
|
||||
ssrf_filter (1.0.7)
|
||||
sysexits (1.2.0)
|
||||
temple (0.10.0)
|
||||
terminal-table (3.0.2)
|
||||
unicode-display_width (>= 1.1.1, < 3)
|
||||
thor (1.2.1)
|
||||
temple (0.8.2)
|
||||
terminal-table (3.0.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thor (1.1.0)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.1.0)
|
||||
timecop (0.9.6)
|
||||
timeout (0.3.2)
|
||||
tilt (2.0.10)
|
||||
timecop (0.9.4)
|
||||
trollop (1.16.2)
|
||||
tzinfo (2.0.6)
|
||||
concurrent-ruby (~> 1.0)
|
||||
tzinfo (1.2.9)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (2.4.2)
|
||||
unicorn (6.1.0)
|
||||
unicode-display_width (1.7.0)
|
||||
unicorn (6.0.0)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
uniform_notifier (1.16.0)
|
||||
validate_url (1.0.15)
|
||||
uniform_notifier (1.14.0)
|
||||
validate_url (1.0.13)
|
||||
activemodel (>= 3.0.0)
|
||||
public_suffix
|
||||
warden (1.2.9)
|
||||
rack (>= 2.0.9)
|
||||
webdrivers (5.2.0)
|
||||
webdrivers (4.6.0)
|
||||
nokogiri (~> 1.6)
|
||||
rubyzip (>= 1.3.0)
|
||||
selenium-webdriver (~> 4.0)
|
||||
selenium-webdriver (>= 3.0, < 4.0)
|
||||
webrat (0.7.3)
|
||||
nokogiri (>= 1.2.0)
|
||||
rack (>= 1.0)
|
||||
rack-test (>= 0.5.3)
|
||||
webrick (1.7.0)
|
||||
websocket (1.2.9)
|
||||
websocket-driver (0.7.5)
|
||||
websocket-driver (0.7.3)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
will_paginate (3.3.1)
|
||||
will_paginate (3.3.0)
|
||||
will_paginate-bootstrap4 (0.2.2)
|
||||
will_paginate (~> 3.0, >= 3.0.0)
|
||||
xmlrpc (0.3.2)
|
||||
webrick
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
zeitwerk (2.6.7)
|
||||
zeitwerk (2.4.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
active_median (= 0.2.0)
|
||||
@@ -655,11 +620,11 @@ DEPENDENCIES
|
||||
better_errors
|
||||
bluecloth
|
||||
bonsai-elasticsearch-rails
|
||||
bootstrap (>= 4.6.2)
|
||||
bootstrap (>= 4.3.1)
|
||||
bootstrap-datepicker-rails
|
||||
bootstrap_form (>= 4.5.0)
|
||||
bootstrap_form (>= 4.2.0)
|
||||
bullet
|
||||
bundler (>= 2.3.10)
|
||||
bundler (>= 1.1.5)
|
||||
byebug
|
||||
cancancan
|
||||
capybara
|
||||
@@ -668,7 +633,7 @@ DEPENDENCIES
|
||||
chartkick
|
||||
codeclimate-test-reporter
|
||||
coffee-rails
|
||||
comfortable_mexican_sofa!
|
||||
comfortable_mexican_sofa (~> 2.0.0)
|
||||
csv_shaper
|
||||
dalli
|
||||
database_cleaner
|
||||
@@ -697,26 +662,27 @@ DEPENDENCIES
|
||||
js-routes
|
||||
jsonapi-resources
|
||||
jsonapi-swagger
|
||||
leaflet-rails (>= 1.9.2)
|
||||
leaflet-rails
|
||||
letter_opener
|
||||
listen
|
||||
loofah (>= 2.19.1)
|
||||
mailboxer (>= 0.15.1)
|
||||
loofah (>= 2.2.1)
|
||||
mailboxer
|
||||
material-sass (= 4.1.1)
|
||||
material_icons
|
||||
memcachier
|
||||
oj
|
||||
omniauth (~> 1.3)
|
||||
omniauth-facebook
|
||||
omniauth-flickr (>= 0.0.15)
|
||||
omniauth-twitter
|
||||
percy-capybara (~> 5.0.0)
|
||||
pg
|
||||
percy-capybara
|
||||
pg (< 1.0.0)
|
||||
platform-api
|
||||
puma
|
||||
query_diet
|
||||
rack-cors
|
||||
rack-protection (>= 2.0.1)
|
||||
rails (~> 7.0.4)
|
||||
rails (= 6.0.3.2)
|
||||
rails-assets-leaflet.markercluster!
|
||||
rails-controller-testing
|
||||
rails_12factor
|
||||
@@ -732,7 +698,7 @@ DEPENDENCIES
|
||||
rubocop-rails
|
||||
rubocop-rspec
|
||||
ruby-units
|
||||
sassc-rails
|
||||
sass-rails
|
||||
scout_apm
|
||||
searchkick
|
||||
selenium-webdriver
|
||||
@@ -749,7 +715,7 @@ DEPENDENCIES
|
||||
xmlrpc
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.1.4p223
|
||||
ruby 2.7.2p137
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.11
|
||||
1.17.3
|
||||
|
||||
@@ -20,7 +20,7 @@ encourage participation from people of all backgrounds and skill levels.
|
||||
* [Issues](https://github.com/orgs/Growstuff/projects/1) (features we're
|
||||
working on, known bugs, etc)
|
||||
* [](https://gitter.im/Growstuff/growstuff?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
* [Wiki](https://github.com/Growstuff/growstuff/wiki) (general documentation, etc.)
|
||||
* [Wiki](https://github.com/Growstuff/growstuff/wiki) (general documentation, etc. Help by migrating from the [old wiki](https://web.archive.org/web/*/wiki.growstuff.org))
|
||||
|
||||
## For coders
|
||||
|
||||
@@ -29,6 +29,7 @@ frontend features. We welcome contributions -- see
|
||||
[CONTRIBUTING](CONTRIBUTING.md) for details.
|
||||
|
||||
* To set up your development environment, see [Getting started](https://github.com/Growstuff/growstuff/wiki/New-contributor-guide).
|
||||
* We encourage [pair programming](http://wiki.growstuff.org/index.php/Pairing), especially for newer developers.
|
||||
* You may also be interested in our [API](https://github.com/Growstuff/growstuff/wiki/API).
|
||||
|
||||
## For designers, writers, researchers, data wranglers, and other contributors
|
||||
|
||||
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 58 KiB |
1
app/assets/images/pearLogo.svg
Normal file
|
After Width: | Height: | Size: 221 KiB |
@@ -1,6 +1,10 @@
|
||||
function showCropMap(cropmap) {
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
|
||||
var mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
|
||||
var mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
|
||||
|
||||
L.tileLayer(mapbox_base_url, {
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery © <a href="https://mapbox.com">Mapbox</a>',
|
||||
maxZoom: 18
|
||||
}).addTo(cropmap);
|
||||
var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20 });
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
if (document.getElementById("membermap") !== null) {
|
||||
var mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
|
||||
var mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
|
||||
var mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
|
||||
|
||||
L.Icon.Default.imagePath = '/assets'
|
||||
|
||||
L.Icon.Default.imagePath = '/assets';
|
||||
|
||||
var default_marker_icon = L.icon({
|
||||
@@ -12,8 +18,8 @@ if (document.getElementById("membermap") !== null) {
|
||||
if (member.latitude && member.longitude) {
|
||||
var membermap = L.map('membermap').setView([member.latitude, member.longitude], 4);
|
||||
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
L.tileLayer(mapbox_base_url, {
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery © <a href="https://mapbox.com">Mapbox</a>',
|
||||
maxZoom: 18
|
||||
}).addTo(membermap);
|
||||
var marker = new L.Marker(new L.LatLng(member.latitude, member.longitude),
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
if (document.getElementById("placesmap") !== null) {
|
||||
var places_base_path = "/places";
|
||||
var mapbox_map_id = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_map_id %>";
|
||||
var mapbox_access_token = "<%= Rails.env == 'test' ? 0 : Rails.application.config.mapbox_access_token %>";
|
||||
var mapbox_base_url = "https://a.tiles.mapbox.com/v4/" + mapbox_map_id + "/{z}/{x}/{y}.png?access_token=" + mapbox_access_token;
|
||||
var nominatim_base_url = 'https://nominatim.openstreetmap.org/search/';
|
||||
var nominatim_user_agent_email = "<%= Rails.env == 'test' ? 0 : Rails.application.config.user_agent_email %>";
|
||||
|
||||
@@ -28,8 +31,8 @@ if (document.getElementById("placesmap") !== null) {
|
||||
}
|
||||
|
||||
function showMap(placesmap) {
|
||||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
L.tileLayer(mapbox_base_url, {
|
||||
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors under <a href="https://www.openstreetmap.org/copyright">ODbL</a> | Map imagery © <a href="https://mapbox.com">Mapbox</a>',
|
||||
maxZoom: 18
|
||||
}).addTo(placesmap);
|
||||
|
||||
@@ -58,7 +61,6 @@ function showMap(placesmap) {
|
||||
});
|
||||
|
||||
function fetchCropsForMap(url) {
|
||||
var n = 0;
|
||||
$.getJSON(url, function(crop_data) {
|
||||
$.each(crop_data['data'], function(i, p) {
|
||||
if (p.attributes.latitude && p.attributes.longitude) {
|
||||
@@ -79,8 +81,7 @@ function showMap(placesmap) {
|
||||
markers.addLayer(marker);
|
||||
}
|
||||
});
|
||||
// We fetch pages of 10 at a time. Stop after 200 crops; so we are showing only 'active' plantings.
|
||||
if (crop_data['links']['next'] && n++ < 20) {
|
||||
if (crop_data['links']['next']) {
|
||||
fetchCropsForMap(crop_data['links']['next'])
|
||||
}
|
||||
return crop_data;
|
||||
|
||||
@@ -13,6 +13,12 @@ module Admin
|
||||
@members = @members.order(:login_name).paginate(page: params[:page])
|
||||
end
|
||||
|
||||
def destroy
|
||||
@member = Member.find_by!(slug: params[:slug])
|
||||
@member.discard
|
||||
redirect_to admin_members_path
|
||||
end
|
||||
|
||||
def edit
|
||||
@member = Member.find_by!(slug: params[:slug])
|
||||
end
|
||||
@@ -24,12 +30,6 @@ module Admin
|
||||
respond_with @member, location: admin_members_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
@member = Member.find_by!(slug: params[:slug])
|
||||
@member.discard
|
||||
redirect_to admin_members_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def search_term
|
||||
|
||||
@@ -14,14 +14,14 @@ class AuthenticationsController < ApplicationController
|
||||
|
||||
@authentication = current_member.authentications
|
||||
.create_with(
|
||||
name:,
|
||||
name: name,
|
||||
token: auth['credentials']['token'],
|
||||
secret: auth['credentials']['secret']
|
||||
)
|
||||
.find_or_create_by(
|
||||
provider: auth['provider'],
|
||||
uid: auth['uid'],
|
||||
name:
|
||||
name: name
|
||||
)
|
||||
|
||||
flash[:notice] = "Authentication successful."
|
||||
|
||||
@@ -71,7 +71,7 @@ class ConversationsController < ApplicationController
|
||||
@conversation = Mailboxer::Conversation.find_by(id: params[:id])
|
||||
return unless @conversation.nil? || !@conversation.is_participant?(current_member)
|
||||
|
||||
redirect_to conversations_path(box:)
|
||||
redirect_to conversations_path(box: box)
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -57,7 +57,7 @@ class CropsController < ApplicationController
|
||||
@crops = CropSearchService.search(@term,
|
||||
page: params[:page],
|
||||
per_page: Crop.per_page,
|
||||
current_member:)
|
||||
current_member: current_member)
|
||||
respond_with @crops
|
||||
end
|
||||
|
||||
@@ -191,7 +191,7 @@ class CropsController < ApplicationController
|
||||
end
|
||||
|
||||
def filename
|
||||
"Growstuff-Crops-#{Time.zone.now.to_fs(:number)}.csv"
|
||||
"Growstuff-Crops-#{Time.zone.now.to_s(:number)}.csv"
|
||||
end
|
||||
|
||||
def crop_json_fields
|
||||
|
||||
@@ -5,10 +5,6 @@ class FollowsController < ApplicationController
|
||||
load_and_authorize_resource
|
||||
skip_load_resource only: :create
|
||||
|
||||
def index
|
||||
@follows = @member.followed.paginate(page: params[:page])
|
||||
end
|
||||
|
||||
def create
|
||||
@follow = current_member.follows.build(followed: Member.find(params[:followed]))
|
||||
|
||||
@@ -29,6 +25,10 @@ class FollowsController < ApplicationController
|
||||
redirect_to @unfollowed
|
||||
end
|
||||
|
||||
def index
|
||||
@follows = @member.followed.paginate(page: params[:page])
|
||||
end
|
||||
|
||||
def followers
|
||||
@followers = @member.followers.paginate(page: params[:page])
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ class HarvestsController < DataController
|
||||
where['planting_id'] = @planting.id
|
||||
end
|
||||
|
||||
@harvests = Harvest.search('*', where:,
|
||||
@harvests = Harvest.search('*', where: where,
|
||||
limit: 100,
|
||||
page: params[:page],
|
||||
load: false,
|
||||
@@ -92,7 +92,7 @@ class HarvestsController < DataController
|
||||
elsif @crop
|
||||
"#{@crop.to_param}-"
|
||||
end
|
||||
"Growstuff-#{specifics}Harvests-#{Time.zone.now.to_fs(:number)}.csv"
|
||||
"Growstuff-#{specifics}Harvests-#{Time.zone.now.to_s(:number)}.csv"
|
||||
end
|
||||
|
||||
def update_crop_medians
|
||||
|
||||
@@ -39,7 +39,7 @@ class LikesController < ApplicationController
|
||||
{
|
||||
id: like.likeable.id,
|
||||
like_count: like.likeable.likes.count,
|
||||
liked_by_member:,
|
||||
liked_by_member: liked_by_member,
|
||||
description: ActionController::Base.helpers.pluralize(like.likeable.likes.count, "like")
|
||||
}
|
||||
end
|
||||
@@ -50,7 +50,7 @@ class LikesController < ApplicationController
|
||||
format.json do
|
||||
render(json: render_json(
|
||||
like,
|
||||
liked_by_member:
|
||||
liked_by_member: liked_by_member
|
||||
), status: status_code)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,6 +18,7 @@ class MembersController < ApplicationController
|
||||
@member = Member.confirmed.kept.find_by!(slug: params[:slug])
|
||||
@twitter_auth = @member.auth('twitter')
|
||||
@flickr_auth = @member.auth('flickr')
|
||||
@facebook_auth = @member.auth('facebook')
|
||||
@posts = @member.posts
|
||||
|
||||
@activity = TimelineService.member_query(@member).limit(30)
|
||||
|
||||
@@ -9,6 +9,10 @@ require './lib/actions/oauth_signup_action'
|
||||
# Heavily overlaps with Authentications controller
|
||||
#
|
||||
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
def facebook
|
||||
create
|
||||
end
|
||||
|
||||
def failure
|
||||
flash[:alert] = "Authentication failed."
|
||||
redirect_to request.env['omniauth.origin'] || "/"
|
||||
@@ -28,7 +32,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
@authentication = action.establish_authentication(auth, member)
|
||||
|
||||
if action.member_created?
|
||||
raise "Invalid provider" unless %w(twitter flickr).index(auth['provider'].to_s)
|
||||
raise "Invalid provider" unless %w(facebook twitter flickr).index(auth['provider'].to_s)
|
||||
|
||||
session["devise.#{auth['provider']}_data"] = request.env["omniauth.auth"]
|
||||
sign_in member
|
||||
|
||||
@@ -8,6 +8,11 @@ class PhotosController < ApplicationController
|
||||
respond_to :html, :json
|
||||
responders :flash
|
||||
|
||||
def show
|
||||
@crops = Crop.distinct.joins(:photo_associations).where(photo_associations: { photo: @photo })
|
||||
respond_with(@photo)
|
||||
end
|
||||
|
||||
def index
|
||||
@photos = Photo.search(
|
||||
load: false,
|
||||
@@ -19,11 +24,6 @@ class PhotosController < ApplicationController
|
||||
respond_with(@photos)
|
||||
end
|
||||
|
||||
def show
|
||||
@crops = Crop.distinct.joins(:photo_associations).where(photo_associations: { photo: @photo })
|
||||
respond_with(@photo)
|
||||
end
|
||||
|
||||
def new
|
||||
@photo = Photo.new
|
||||
@item = item_to_link_to
|
||||
|
||||
@@ -12,7 +12,7 @@ class PlantingsController < DataController
|
||||
|
||||
if params[:member_slug]
|
||||
@owner = Member.find_by(slug: params[:member_slug])
|
||||
where['owner_id'] = @owner.id unless @owner.nil?
|
||||
where['owner_id'] = @owner.id
|
||||
end
|
||||
|
||||
if params[:crop_slug]
|
||||
@@ -21,14 +21,14 @@ class PlantingsController < DataController
|
||||
end
|
||||
|
||||
@plantings = Planting.search(
|
||||
where:,
|
||||
where: where,
|
||||
page: params[:page],
|
||||
limit: 30,
|
||||
boost_by: [:created_at],
|
||||
load: false
|
||||
)
|
||||
|
||||
@filename = "Growstuff-#{specifics}Plantings-#{Time.zone.now.to_fs(:number)}.csv"
|
||||
@filename = "Growstuff-#{specifics}Plantings-#{Time.zone.now.to_s(:number)}.csv"
|
||||
|
||||
respond_with(@plantings)
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ class RegistrationsController < Devise::RegistrationsController
|
||||
def edit
|
||||
@twitter_auth = current_member.auth('twitter')
|
||||
@flickr_auth = current_member.auth('flickr')
|
||||
@facebook_auth = current_member.auth('facebook')
|
||||
render "edit"
|
||||
end
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class SeedsController < DataController
|
||||
|
||||
@filename = csv_filename
|
||||
@seeds = Seed.search(
|
||||
where:,
|
||||
where: where,
|
||||
page: params[:page],
|
||||
limit: 30,
|
||||
boost_by: [:created_at],
|
||||
@@ -89,9 +89,9 @@ class SeedsController < DataController
|
||||
|
||||
def csv_filename
|
||||
if @owner
|
||||
"Growstuff-#{@owner.to_param}-Seeds-#{Time.zone.now.to_fs(:number)}.csv"
|
||||
"Growstuff-#{@owner.to_param}-Seeds-#{Time.zone.now.to_s(:number)}.csv"
|
||||
else
|
||||
"Growstuff-Seeds-#{Time.zone.now.to_fs(:number)}.csv"
|
||||
"Growstuff-Seeds-#{Time.zone.now.to_s(:number)}.csv"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -24,7 +24,7 @@ module ApplicationHelper
|
||||
# Produces a cache key for uniquely identifying cached fragments.
|
||||
def cache_key_for(klass, identifier = "all")
|
||||
count = klass.count
|
||||
max_updated_at = klass.maximum(:updated_at).try(:utc).try(:to_fs, :number)
|
||||
max_updated_at = klass.maximum(:updated_at).try(:utc).try(:to_s, :number)
|
||||
"#{klass.name.downcase.pluralize}/#{identifier}-#{count}-#{max_updated_at}"
|
||||
end
|
||||
|
||||
@@ -55,7 +55,7 @@ module ApplicationHelper
|
||||
return uri.to_s
|
||||
end
|
||||
|
||||
Gravatar.new(member.email).image_url(size:,
|
||||
Gravatar.new(member.email).image_url(size: size,
|
||||
default: :identicon,
|
||||
ssl: true)
|
||||
end
|
||||
@@ -70,11 +70,11 @@ module ApplicationHelper
|
||||
all = show_all ? '' : 1
|
||||
|
||||
if owner.present?
|
||||
public_send("member_#{type}_path", owner, all:)
|
||||
public_send("member_#{type}_path", owner, all: all)
|
||||
elsif crop.present?
|
||||
public_send("crop_#{type}_path", crop, all:)
|
||||
public_send("crop_#{type}_path", crop, all: all)
|
||||
else
|
||||
public_send("#{type}_path", all:)
|
||||
public_send("#{type}_path", all: all)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -44,19 +44,19 @@ module ButtonsHelper
|
||||
end
|
||||
|
||||
def seed_edit_button(seed, classes: "btn btn-raised btn-info")
|
||||
edit_button(edit_seed_path(seed), classes:)
|
||||
edit_button(edit_seed_path(seed), classes: classes)
|
||||
end
|
||||
|
||||
def harvest_edit_button(harvest, classes: "btn btn-raised btn-info")
|
||||
edit_button(edit_harvest_path(harvest), classes:)
|
||||
edit_button(edit_harvest_path(harvest), classes: classes)
|
||||
end
|
||||
|
||||
def garden_edit_button(garden, classes: "btn btn-raised btn-info")
|
||||
edit_button(edit_garden_path(garden), classes:)
|
||||
edit_button(edit_garden_path(garden), classes: classes)
|
||||
end
|
||||
|
||||
def planting_edit_button(planting, classes: "btn btn-raised btn-info")
|
||||
edit_button(edit_planting_path(planting), classes:)
|
||||
edit_button(edit_planting_path(planting), classes: classes)
|
||||
end
|
||||
|
||||
def planting_finish_button(planting, classes: 'btn btn-default btn-secondary')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
module CropsHelper
|
||||
def display_seed_availability(member, crop)
|
||||
seeds = member.seeds.where(crop:)
|
||||
seeds = member.seeds.where(crop: crop)
|
||||
total_quantity = seeds.where.not(quantity: nil).sum(:quantity)
|
||||
|
||||
return "You don't have any seeds of this crop." if seeds.none?
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
module EditableFormHelper
|
||||
def editable(field_type, model, field, display_field:, collection: [])
|
||||
render 'shared/editable/form', field_type:,
|
||||
model:, field:, display_field:, collection:
|
||||
render 'shared/editable/form', field_type: field_type,
|
||||
model: model, field: field, display_field: display_field, collection: collection
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
module PostsHelper
|
||||
def display_post_truncated(post, length: 300)
|
||||
truncate(strip_tags(post.body), length:,
|
||||
truncate(strip_tags(post.body), length: length,
|
||||
separator: ' ', omission: '... ') { link_to "Read more", post_path(post) }
|
||||
end
|
||||
|
||||
def post_stripped_tags(post, length: 300)
|
||||
truncate(strip_tags(post.body), length:)
|
||||
truncate(strip_tags(post.body), length: length)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -70,7 +70,7 @@ class Ability
|
||||
can :create, Notification do |n|
|
||||
n.recipient_id != member.id
|
||||
end
|
||||
# NOTE: we don't support update for notifications
|
||||
# note we don't support update for notifications
|
||||
|
||||
# only crop wranglers can create/edit/destroy crops
|
||||
if member.role? :crop_wrangler
|
||||
|
||||
@@ -15,7 +15,7 @@ class Comment < ApplicationRecord
|
||||
recipient_id: recipient,
|
||||
sender_id: sender,
|
||||
subject: "#{author} commented on #{post.subject}",
|
||||
body:,
|
||||
body: body,
|
||||
post_id: post.id
|
||||
)
|
||||
end
|
||||
|
||||
@@ -32,8 +32,8 @@ module MemberNewsletter
|
||||
|
||||
gibbon.lists.subscribe(
|
||||
id: Rails.application.config.newsletter_list_id,
|
||||
email: { email: },
|
||||
merge_vars: { login_name: },
|
||||
email: { email: email },
|
||||
merge_vars: { login_name: login_name },
|
||||
double_optin: false # they already confirmed their email with us
|
||||
)
|
||||
end
|
||||
@@ -42,7 +42,7 @@ module MemberNewsletter
|
||||
return true if Rails.env.test? && !testing
|
||||
|
||||
gibbon.lists.unsubscribe(id: Rails.application.config.newsletter_list_id,
|
||||
email: { email: })
|
||||
email: { email: email })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ module PredictHarvest
|
||||
days_to_first_harvest = (first_harvest_date - planted_at).to_i
|
||||
days_to_last_harvest = (last_harvest_date - planted_at).to_i if finished?
|
||||
end
|
||||
update(days_to_first_harvest:, days_to_last_harvest:)
|
||||
update(days_to_first_harvest: days_to_first_harvest, days_to_last_harvest: days_to_last_harvest)
|
||||
end
|
||||
|
||||
# status
|
||||
|
||||
@@ -29,19 +29,19 @@ module SearchCrops
|
||||
|
||||
def search_data
|
||||
{
|
||||
name:,
|
||||
description:,
|
||||
slug:,
|
||||
name: name,
|
||||
description: description,
|
||||
slug: slug,
|
||||
alternate_names: alternate_names.pluck(:name),
|
||||
scientific_names: scientific_names.pluck(:name),
|
||||
photos_count: photo_associations_count,
|
||||
# boost the crops that are planted the most
|
||||
plantings_count:,
|
||||
harvests_count:,
|
||||
plantings_count: plantings_count,
|
||||
harvests_count: harvests_count,
|
||||
# boost this crop for these members
|
||||
planters_ids: plantings.pluck(:owner_id),
|
||||
has_photos: photos.size.positive?,
|
||||
thumbnail_url:,
|
||||
thumbnail_url: thumbnail_url,
|
||||
scientific_name: default_scientific_name&.name,
|
||||
created_at: created_at.to_i
|
||||
}
|
||||
|
||||
@@ -17,22 +17,22 @@ module SearchHarvests
|
||||
|
||||
def search_data
|
||||
{
|
||||
slug:,
|
||||
quantity:,
|
||||
slug: slug,
|
||||
quantity: quantity,
|
||||
|
||||
# crop
|
||||
crop_id:,
|
||||
crop_name:,
|
||||
crop_id: crop_id,
|
||||
crop_name: crop_name,
|
||||
crop_slug: crop.slug,
|
||||
|
||||
# owner
|
||||
owner_id:,
|
||||
owner_login_name:,
|
||||
owner_slug:,
|
||||
owner_id: owner_id,
|
||||
owner_login_name: owner_login_name,
|
||||
owner_slug: owner_slug,
|
||||
plant_part_name: plant_part&.name,
|
||||
|
||||
# planting
|
||||
planting_id:,
|
||||
planting_id: planting_id,
|
||||
planting_slug: planting&.slug,
|
||||
|
||||
# photo
|
||||
@@ -43,7 +43,7 @@ module SearchHarvests
|
||||
photos_count: photos.count,
|
||||
|
||||
# timestamps
|
||||
harvested_at:,
|
||||
harvested_at: harvested_at,
|
||||
created_at: created_at.to_i
|
||||
}
|
||||
end
|
||||
@@ -58,7 +58,7 @@ module SearchHarvests
|
||||
}
|
||||
one_record = search('*',
|
||||
limit: 1,
|
||||
where:,
|
||||
where: where,
|
||||
boost_by: [:created_at],
|
||||
load: false).first
|
||||
return records if one_record.nil?
|
||||
|
||||
@@ -15,20 +15,20 @@ module SearchPhotos
|
||||
|
||||
def search_data
|
||||
{
|
||||
id:,
|
||||
title:,
|
||||
thumbnail_url:,
|
||||
fullsize_url:,
|
||||
id: id,
|
||||
title: title,
|
||||
thumbnail_url: thumbnail_url,
|
||||
fullsize_url: fullsize_url,
|
||||
# crops
|
||||
crops: crops.pluck(:id),
|
||||
# likes
|
||||
liked_by_members_names:,
|
||||
liked_by_members_names: liked_by_members_names,
|
||||
# owner
|
||||
owner_id:,
|
||||
owner_login_name:,
|
||||
owner_slug:,
|
||||
owner_id: owner_id,
|
||||
owner_login_name: owner_login_name,
|
||||
owner_slug: owner_slug,
|
||||
# counts
|
||||
likes_count:,
|
||||
likes_count: likes_count,
|
||||
|
||||
created_at: created_at.to_i
|
||||
}
|
||||
|
||||
@@ -18,39 +18,39 @@ module SearchPlantings
|
||||
|
||||
def search_data
|
||||
{
|
||||
slug:,
|
||||
active:,
|
||||
slug: slug,
|
||||
active: active,
|
||||
finished: finished?,
|
||||
has_photos: photos.size.positive?,
|
||||
location:,
|
||||
location: location,
|
||||
percentage_grown: percentage_grown.to_i,
|
||||
planted_at:,
|
||||
planted_from:,
|
||||
planted_at: planted_at,
|
||||
planted_from: planted_from,
|
||||
planted_year: planted_at&.year,
|
||||
quantity:,
|
||||
sunniness:,
|
||||
garden_id:,
|
||||
quantity: quantity,
|
||||
sunniness: sunniness,
|
||||
garden_id: garden_id,
|
||||
|
||||
first_harvest_predicted_at:,
|
||||
finish_predicted_at:,
|
||||
first_harvest_predicted_at: first_harvest_predicted_at,
|
||||
finish_predicted_at: finish_predicted_at,
|
||||
|
||||
# crops
|
||||
crop_id:,
|
||||
crop_name:,
|
||||
crop_slug:,
|
||||
crop_perennial:,
|
||||
crop_id: crop_id,
|
||||
crop_name: crop_name,
|
||||
crop_slug: crop_slug,
|
||||
crop_perennial: crop_perennial,
|
||||
|
||||
# owner
|
||||
owner_id:,
|
||||
owner_location:,
|
||||
owner_login_name:,
|
||||
owner_slug:,
|
||||
owner_id: owner_id,
|
||||
owner_location: owner_location,
|
||||
owner_login_name: owner_login_name,
|
||||
owner_slug: owner_slug,
|
||||
|
||||
# photos
|
||||
thumbnail_url: default_photo&.thumbnail_url || crop.default_photo&.thumbnail_url,
|
||||
# counts
|
||||
photos_count: photos.size,
|
||||
harvests_count:,
|
||||
harvests_count: harvests_count,
|
||||
|
||||
# timestamps
|
||||
created_at: created_at.to_i
|
||||
@@ -67,7 +67,7 @@ module SearchPlantings
|
||||
}
|
||||
one_record = search('*',
|
||||
limit: 1,
|
||||
where:,
|
||||
where: where,
|
||||
boost_by: [:created_at],
|
||||
load: false).first
|
||||
return records if one_record.nil?
|
||||
|
||||
@@ -18,31 +18,31 @@ module SearchSeeds
|
||||
|
||||
def search_data
|
||||
{
|
||||
slug:,
|
||||
slug: slug,
|
||||
finished: finished?,
|
||||
gmo:,
|
||||
active:,
|
||||
heirloom:,
|
||||
gmo: gmo,
|
||||
active: active,
|
||||
heirloom: heirloom,
|
||||
location: owner.location,
|
||||
organic:,
|
||||
quantity:,
|
||||
plant_before: plant_before&.to_fs(:ymd),
|
||||
tradable_to:,
|
||||
tradable:,
|
||||
organic: organic,
|
||||
quantity: quantity,
|
||||
plant_before: plant_before&.to_s(:ymd),
|
||||
tradable_to: tradable_to,
|
||||
tradable: tradable,
|
||||
|
||||
# crop
|
||||
crop_id:,
|
||||
crop_id: crop_id,
|
||||
crop_name: crop.name,
|
||||
crop_slug: crop.slug,
|
||||
|
||||
# owner
|
||||
owner_id:,
|
||||
owner_location:,
|
||||
owner_login_name:,
|
||||
owner_slug:,
|
||||
owner_id: owner_id,
|
||||
owner_location: owner_location,
|
||||
owner_login_name: owner_login_name,
|
||||
owner_slug: owner_slug,
|
||||
|
||||
# planting
|
||||
parent_planting:,
|
||||
parent_planting: parent_planting,
|
||||
|
||||
# counts
|
||||
photos_count: photos.size,
|
||||
@@ -56,7 +56,7 @@ module SearchSeeds
|
||||
end
|
||||
|
||||
def self.homepage_records(limit)
|
||||
search('*', limit:,
|
||||
search('*', limit: limit,
|
||||
where: {
|
||||
finished: false,
|
||||
tradable: true
|
||||
|
||||
@@ -54,7 +54,6 @@ class Crop < ApplicationRecord
|
||||
message: 'is not a valid English Wikipedia URL'
|
||||
},
|
||||
if: :approved?
|
||||
validates :name, uniqueness: { scope: :approval_status }, if: :pending?
|
||||
|
||||
def to_s
|
||||
name
|
||||
|
||||
@@ -10,9 +10,9 @@ class CsvImporter
|
||||
def import_crop(row)
|
||||
name, en_wikipedia_url, parent_name, scientific_names, alternate_names = row
|
||||
|
||||
@crop = Crop.find_or_create_by(name:)
|
||||
@crop = Crop.find_or_create_by(name: name)
|
||||
@crop.update(
|
||||
en_wikipedia_url:,
|
||||
en_wikipedia_url: en_wikipedia_url,
|
||||
creator_id: cropbot.id
|
||||
)
|
||||
|
||||
@@ -47,8 +47,8 @@ class CsvImporter
|
||||
return if names_to_add.empty?
|
||||
|
||||
names_to_add.each do |name|
|
||||
sciname = ScientificName.find_by(name:, crop: @crop)
|
||||
sciname ||= ScientificName.create!(name:, crop: @crop, creator: cropbot)
|
||||
sciname = ScientificName.find_by(name: name, crop: @crop)
|
||||
sciname ||= ScientificName.create!(name: name, crop: @crop, creator: cropbot)
|
||||
@crop.scientific_names << sciname
|
||||
end
|
||||
end
|
||||
@@ -58,7 +58,7 @@ class CsvImporter
|
||||
return if alternate_names.blank?
|
||||
|
||||
alternate_names.split(/,\s*/).each do |name|
|
||||
altname = AlternateName.find_by(name:, crop: @crop)
|
||||
altname = AlternateName.find_by(name: name, crop: @crop)
|
||||
altname ||= AlternateName.create! name: name, crop: @crop, creator: cropbot
|
||||
@crop.alternate_names << altname
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ class Member < ApplicationRecord
|
||||
has_many :harvests, foreign_key: 'owner_id', dependent: :destroy, inverse_of: :owner
|
||||
has_and_belongs_to_many :roles
|
||||
has_many :notifications, foreign_key: 'recipient_id', inverse_of: :recipient
|
||||
has_many :sent_notifications, foreign_key: 'sender_id', inverse_of: :sender, class_name: "Notification"
|
||||
has_many :sent_notifications, foreign_key: 'sender_id', inverse_of: :sender
|
||||
has_many :authentications, dependent: :destroy
|
||||
has_many :photos, inverse_of: :owner
|
||||
has_many :likes, dependent: :destroy
|
||||
@@ -127,7 +127,7 @@ class Member < ApplicationRecord
|
||||
end
|
||||
|
||||
def auth(provider)
|
||||
authentications.find_by(provider:)
|
||||
authentications.find_by(provider: provider)
|
||||
end
|
||||
|
||||
def unread_count
|
||||
|
||||
@@ -27,7 +27,7 @@ class Photo < ApplicationRecord
|
||||
source_type: type
|
||||
end
|
||||
|
||||
scope :by_crop, ->(crop) { joins(:photo_associations).where(photo_associations: { crop: }) }
|
||||
scope :by_crop, ->(crop) { joins(:photo_associations).where(photo_associations: { crop: crop }) }
|
||||
scope :by_model, lambda { |model_name|
|
||||
joins(:photo_associations).where(photo_associations: { photographable_type: model_name.to_s })
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ class PhotoAssociation < ApplicationRecord
|
||||
end
|
||||
|
||||
def crop_present
|
||||
return unless %w(Planting Seed Harvest).include?(photographable_type)
|
||||
|
||||
errors.add(:crop_id, "failed to calculate crop") if crop_id.blank?
|
||||
if %w(Planting Seed Harvest).include?(photographable_type)
|
||||
errors.add(:crop_id, "failed to calculate crop") if crop_id.blank?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -89,7 +89,7 @@ class Planting < ApplicationRecord
|
||||
|
||||
# stringify as "beet in Skud's backyard" or similar
|
||||
def to_s
|
||||
I18n.t('plantings.string', crop: crop.name, garden: garden.name, owner:)
|
||||
I18n.t('plantings.string', crop: crop.name, garden: garden.name, owner: owner)
|
||||
end
|
||||
|
||||
def finished?
|
||||
@@ -109,7 +109,7 @@ class Planting < ApplicationRecord
|
||||
|
||||
# latitude, longitude = Geocoder.coordinates(location, params: { limit: 1 })
|
||||
Planting.joins(:garden)
|
||||
.where(crop:)
|
||||
.where(crop: crop)
|
||||
.located
|
||||
.where('gardens.latitude < ? AND gardens.latitude > ?',
|
||||
latitude + 10, latitude - 10)
|
||||
|
||||
@@ -90,10 +90,10 @@ class Post < ApplicationRecord
|
||||
next unless recipient_id != sender
|
||||
|
||||
Notification.create(
|
||||
recipient_id:,
|
||||
recipient_id: recipient_id,
|
||||
sender_id: sender,
|
||||
subject: "#{author} mentioned you in their post #{subject}",
|
||||
body:
|
||||
body: body
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ class Role < ApplicationRecord
|
||||
%i(crop_wranglers admins).each do |method|
|
||||
define_method method do
|
||||
slug = method.to_s.singularize.dasherize
|
||||
Role.where(slug:).try(:first).try(:members)
|
||||
Role.where(slug: slug).try(:first).try(:members)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,6 +69,6 @@ class Seed < ApplicationRecord
|
||||
end
|
||||
|
||||
def to_s
|
||||
I18n.t('seeds.string', crop: crop.name, owner:)
|
||||
I18n.t('seeds.string', crop: crop.name, owner: owner)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,10 +5,10 @@ module Api
|
||||
class MemberResource < BaseResource
|
||||
immutable
|
||||
|
||||
has_many :gardens, foreign_key: 'owner_id'
|
||||
has_many :plantings, foreign_key: 'owner_id'
|
||||
has_many :harvests, foreign_key: 'owner_id'
|
||||
has_many :seeds, foreign_key: 'owner_id'
|
||||
has_many :gardens
|
||||
has_many :plantings
|
||||
has_many :harvests
|
||||
has_many :seeds
|
||||
|
||||
has_many :photos
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ module Api
|
||||
filter :planted_from
|
||||
filter :garden
|
||||
filter :owner
|
||||
filter :owner_id
|
||||
filter :finished
|
||||
|
||||
attribute :percentage_grown
|
||||
|
||||
@@ -4,8 +4,8 @@ class CropSearchService
|
||||
# Crop.search(string)
|
||||
def self.search(query, page: 1, per_page: 12, current_member: nil)
|
||||
search_params = {
|
||||
page:,
|
||||
per_page:,
|
||||
page: page,
|
||||
per_page: per_page,
|
||||
fields: %i(name^5 alternate_names scientific_names),
|
||||
match: :word_start,
|
||||
boost_by: [:plantings_count],
|
||||
@@ -16,28 +16,28 @@ class CropSearchService
|
||||
# prioritise crops the member has planted
|
||||
search_params[:boost_where] = { planters_ids: current_member.id } if current_member
|
||||
|
||||
Crop.search(query, **search_params)
|
||||
Crop.search(query, search_params)
|
||||
end
|
||||
|
||||
def self.random_with_photos(limit)
|
||||
body = {
|
||||
query: {
|
||||
function_score: {
|
||||
query: { query_string: { query: 'has_photos:true' } },
|
||||
random_score: { seed: DateTime.now.to_i }
|
||||
"query": {
|
||||
"function_score": {
|
||||
"query": { "query_string": { "query": 'has_photos:true' } },
|
||||
"random_score": { "seed": DateTime.now.to_i }
|
||||
}
|
||||
}
|
||||
}
|
||||
Crop.search(
|
||||
limit:,
|
||||
limit: limit,
|
||||
load: false,
|
||||
body:
|
||||
body: body
|
||||
)
|
||||
end
|
||||
|
||||
def self.recent(limit)
|
||||
Crop.search(
|
||||
limit:,
|
||||
limit: limit,
|
||||
load: false,
|
||||
boost_by: { created_at: { factor: 100 } } # default factor is 1
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ class OpenfarmService
|
||||
|
||||
def import!
|
||||
Crop.all.order(updated_at: :desc).each do |crop|
|
||||
Rails.logger.debug { "#{crop.id}, #{crop.name}" }
|
||||
Rails.logger.debug("#{crop.id}, #{crop.name}")
|
||||
update_crop(crop) if crop.valid?
|
||||
end
|
||||
end
|
||||
@@ -64,9 +64,9 @@ class OpenfarmService
|
||||
if photo.valid?
|
||||
Photo.transaction do
|
||||
photo.save
|
||||
PhotoAssociation.find_or_create_by! photo:, photographable: crop
|
||||
PhotoAssociation.find_or_create_by! photo: photo, photographable: crop
|
||||
end
|
||||
Rails.logger.debug { "\t saved photo #{photo.id} #{photo.source_id}" }
|
||||
Rails.logger.debug "\t saved photo #{photo.id} #{photo.source_id}"
|
||||
else
|
||||
Rails.logger.warn "Photo not valid"
|
||||
end
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
class ApprovedValidator < ActiveModel::EachValidator
|
||||
def validate_each(record, attribute, _value)
|
||||
record.errors.add(attribute, options[:message] || 'must be approved') unless record.crop.try(:approved?)
|
||||
record.errors[attribute] << (options[:message] || 'must be approved') unless record.crop.try(:approved?)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
:escaped_markdown
|
||||
#{ strip_tags comment.body }
|
||||
|
||||
%pubdate= comment.created_at.to_fs(:rfc822)
|
||||
%pubdate= comment.created_at.to_s(:rfc822)
|
||||
%link= post_url(comment.post)
|
||||
%guid= comment_url(comment)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
%p
|
||||
%span.help-block
|
||||
For detailed crop wrangling guidelines, please consult the
|
||||
= link_to "crop wrangling guide", "https://github.com/Growstuff/growstuff/wiki/Crop-Wrangling"
|
||||
= link_to "crop wrangling guide", "http://wiki.growstuff.org/index.php/Crop_wrangling"
|
||||
on the Growstuff wiki.
|
||||
|
||||
-# Everyone (wranglers and requesters) sees the basic info section
|
||||
|
||||
@@ -107,8 +107,8 @@ csv.headers *all_headers
|
||||
|
||||
csv.cell :added_by_member_id, c.creator.id
|
||||
csv.cell :added_by_member_name, c.creator.to_s
|
||||
csv.cell :date_added, c.created_at.to_fs(:db)
|
||||
csv.cell :last_modified, c.updated_at.to_fs(:db)
|
||||
csv.cell :date_added, c.created_at.to_s(:db)
|
||||
csv.cell :last_modified, c.updated_at.to_s(:db)
|
||||
|
||||
csv.cell :license, "CC-BY-SA Growstuff http://growstuff.org/"
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
- @crops.each do |crop|
|
||||
%item
|
||||
%title= crop.name
|
||||
%pubdate= crop.created_at.to_fs(:rfc822)
|
||||
%pubdate= crop.created_at.to_s(:rfc822)
|
||||
%link= crop_url(crop)
|
||||
%guid= crop_url(crop)
|
||||
|
||||
@@ -28,3 +28,17 @@
|
||||
method: :delete, class: "remove btn btn-danger"
|
||||
- else
|
||||
= link_to 'Connect to Flickr', '/members/auth/flickr', class: 'btn'
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
%p
|
||||
= image_tag "facebook_32.png", size: "32x32", alt: 'Facebook logo'
|
||||
- if @facebook_auth
|
||||
You are connected to Facebook as
|
||||
= succeed "." do
|
||||
= link_to @facebook_auth.name, "https://facebook.com/profile/#{@facebook_auth.uid}"
|
||||
= link_to "Disconnect", @facebook_auth,
|
||||
confirm: "Are you sure you want to remove this connection?",
|
||||
method: :delete, class: "remove btn btn-danger"
|
||||
- else
|
||||
= link_to 'Connect to Facebook', '/members/auth/facebook', class: 'btn'
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
- else
|
||||
= link_to "Change your location.", edit_member_registration_path
|
||||
.row
|
||||
.col-md-5.col-12= f.number_field :area, class: 'input-small', step: "any"
|
||||
.col-md-5.col-12= f.number_field :area, class: 'input-small'
|
||||
.col-md-7.col-12= f.select(:area_unit, Garden::AREA_UNITS_VALUES, { include_blank: false })
|
||||
.col-12= f.select(:garden_type_id, GardenType.all.order(:name).pluck(:name, :id),
|
||||
selected: @garden.garden_type_id, include_blank: true)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
= link_to "Request new crops.", new_crop_path
|
||||
|
||||
.col-md-4
|
||||
= f.text_field :harvested_at, value: @harvest.harvested_at ? @harvest.harvested_at.to_fs(:ymd) : '',
|
||||
= f.text_field :harvested_at, value: @harvest.harvested_at ? @harvest.harvested_at.to_s(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When?'
|
||||
.col-12
|
||||
= f.form_group :plant_part_id, label: { text: "Harvested Plant Part" } do
|
||||
|
||||
@@ -34,12 +34,12 @@ csv.headers :id,
|
||||
|
||||
csv.cells :quantity, :unit, :weight_quantity, :weight_unit, :si_weight
|
||||
|
||||
csv.cell :date_harvested, h.created_at.to_fs(:db)
|
||||
csv.cell :date_harvested, h.created_at.to_s(:db)
|
||||
|
||||
csv.cell :description
|
||||
|
||||
csv.cell :date_added, h.created_at.to_fs(:db)
|
||||
csv.cell :last_modified, h.updated_at.to_fs(:db)
|
||||
csv.cell :date_added, h.created_at.to_s(:db)
|
||||
csv.cell :last_modified, h.updated_at.to_s(:db)
|
||||
|
||||
csv.cell :license, "CC-BY-SA Growstuff http://growstuff.org/"
|
||||
|
||||
|
||||
@@ -30,6 +30,6 @@
|
||||
= csrf_meta_tags
|
||||
= stylesheet_link_tag "application", media: "all"
|
||||
|
||||
%link{ href: path_to_image("growstuff-apple-touch-icon-precomposed.png"), rel: "apple-touch-icon-precomposed" }
|
||||
%link{ href: "/growstuff-apple-touch-icon-precomposed.png", rel: "apple-touch-icon-precomposed" }
|
||||
%link{ href: "https://fonts.googleapis.com/css?family=Modak|Raleway&display=swap", rel: "stylesheet" }
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
- if signed_in?
|
||||
%li.nav-item
|
||||
= link_to timeline_index_path, method: :get, class: 'nav-link text-white' do
|
||||
= image_tag 'icons/notification.svg', class: 'img img-icon'
|
||||
= image_tag 'icons/notification.svg', alt: 'Timeline', class: 'img img-icon'
|
||||
%li.nav-item
|
||||
= link_to member_gardens_path(current_member), class: 'nav-link text-white' do
|
||||
= image_icon 'gardens'
|
||||
= image_icon 'gardens', alt: 'My gardens'
|
||||
%li.nav-item.dropdown
|
||||
%a.nav-link.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-toggle" => "dropdown", href: "#", role: "button"}
|
||||
= image_tag "icons/gardener.svg", class: 'img img-icon'
|
||||
= image_tag "icons/gardener.svg", alt: 'New record', class: 'img img-icon'
|
||||
= t('.record')
|
||||
.dropdown-menu
|
||||
= link_to new_planting_path, class: 'dropdown-item' do
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
- if twitter_auth || flickr_auth || member.show_email
|
||||
- if twitter_auth || flickr_auth || facebook_auth || member.show_email
|
||||
%h4 Contact
|
||||
|
||||
- if twitter_auth
|
||||
@@ -11,6 +11,11 @@
|
||||
= image_tag "flickr_32.png", size: "32x32", alt: 'Flickr logo'
|
||||
= link_to flickr_auth.name, "https://flickr.com/photos/#{flickr_auth.uid}"
|
||||
|
||||
- if facebook_auth
|
||||
%p
|
||||
= image_tag "facebook_32.png", size: "32x32", alt: 'Facebook logo'
|
||||
= link_to facebook_auth.name, "https://facebook.com/profile/#{facebook_auth.uid}"
|
||||
|
||||
- if member.show_email
|
||||
%p
|
||||
Email:
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
- cache member do
|
||||
.card.card-double
|
||||
.card-body
|
||||
%h4.login-name= link_to member, member
|
||||
%div
|
||||
= render "members/avatar", member: member
|
||||
%div
|
||||
= link_to "view all #{member}'s gardens", member_gardens_path(member)
|
||||
%p
|
||||
%small
|
||||
Joined
|
||||
= distance_of_time_in_words(member.created_at, Time.zone.now)
|
||||
ago.
|
||||
- if member.location.present?
|
||||
= link_to member.location, place_path(member.location)
|
||||
.row
|
||||
.col-12.col-md-6
|
||||
= render "members/avatar", member: member
|
||||
.col-12.col-md-6
|
||||
%h4.login-name= link_to member, member
|
||||
= link_to "view all #{member}'s gardens", member_gardens_path(member)
|
||||
%p
|
||||
%small
|
||||
Joined
|
||||
= distance_of_time_in_words(member.created_at, Time.zone.now)
|
||||
ago.
|
||||
- if member.location.present?
|
||||
= link_to member.location, place_path(member.location)
|
||||
.card-footer
|
||||
%ul.nav.nav-justified.small
|
||||
%li.nav-item.border-right
|
||||
|
||||
@@ -2,39 +2,39 @@
|
||||
%h3 Activity
|
||||
%ul.list-group.list-group-flush
|
||||
%li.list-group-item
|
||||
- if member.gardens.present?
|
||||
- if !member.gardens.empty?
|
||||
= link_to localize_plural(member.gardens, Garden), member_gardens_path(member)
|
||||
- else
|
||||
0 gardens
|
||||
%li.list-group-item
|
||||
- if member.plantings.present?
|
||||
- if !member.plantings.empty?
|
||||
= link_to localize_plural(member.plantings, Planting), member_plantings_path(member)
|
||||
- else
|
||||
0 plantings
|
||||
%li.list-group-item
|
||||
- if member.harvests.present?
|
||||
- if !member.harvests.empty?
|
||||
= link_to localize_plural(member.harvests, Harvest), member_harvests_path(member)
|
||||
- else
|
||||
0 harvests
|
||||
%li.list-group-item
|
||||
- if member.seeds.present?
|
||||
- if !member.seeds.empty?
|
||||
= link_to localize_plural(member.seeds, Seed), member_seeds_path(member)
|
||||
- else
|
||||
0 seeds
|
||||
%li.list-group-item
|
||||
- if member.posts.present?
|
||||
- if !member.posts.empty?
|
||||
= link_to localize_plural(member.posts, Post), member_posts_path(member)
|
||||
- else
|
||||
0 posts
|
||||
|
||||
%li.list-group-item
|
||||
- if member.followed.present?
|
||||
- if !member.followed.empty?
|
||||
= link_to localize_plural(member.followed, Follow), member_follows_path(member)
|
||||
- else
|
||||
0 following
|
||||
|
||||
%li.list-group-item
|
||||
- if member.followers.present?
|
||||
- if !member.followers.empty?
|
||||
= link_to pluralize(member.followers.size, "follower"), member_followers_path(member)
|
||||
- else
|
||||
0 followers
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
= truncate(@member.location, length: 25, separator: ' ', omission: '... ')
|
||||
%p
|
||||
%strong Member since
|
||||
= @member.created_at.to_fs(:date)
|
||||
= @member.created_at.to_s(:date)
|
||||
%p
|
||||
%strong Last Login
|
||||
= @member.last_sign_in_at
|
||||
@@ -57,7 +57,8 @@
|
||||
= render "stats", member: @member
|
||||
.card-footer
|
||||
= render "contact", member: @member, twitter_auth: @twitter_auth,
|
||||
flickr_auth: @flickr_auth
|
||||
flickr_auth: @flickr_auth,
|
||||
facebook_auth: @facebook_auth
|
||||
|
||||
.col-md-10
|
||||
%section= render "map", member: @member
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- @member.posts.each do |post|
|
||||
%item
|
||||
%title #{post.subject} by #{post.author.login_name}
|
||||
%pubdate= post.created_at.to_fs(:rfc822)
|
||||
%pubdate= post.created_at.to_s(:rfc822)
|
||||
%link= post_url(post)
|
||||
%guid= post_url(post)
|
||||
%description
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%form.form-inline{ action: search_places_path, method: :get, role: 'form' }
|
||||
.form-group
|
||||
= label_tag :new_place, "Change location:", class: 'sr-only'
|
||||
= text_field_tag :new_place, '', class: 'form-control', placeholder: "Search for city, suburb or state..."
|
||||
= text_field_tag :new_place, '', class: 'form-control', placeholder: "New location..."
|
||||
= submit_tag "Search", class: 'btn btn-primary', id: "search_button"
|
||||
%br/
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
= link_to "Add a garden.", new_garden_path
|
||||
.col-md-4
|
||||
= f.text_field :planted_at,
|
||||
value: @planting.planted_at ? @planting.planted_at.to_fs(:ymd) : '',
|
||||
value: @planting.planted_at ? @planting.planted_at.to_s(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When?'
|
||||
|
||||
.row
|
||||
@@ -52,7 +52,7 @@
|
||||
%span.help-block= t('.finish_helper')
|
||||
.col-md-6
|
||||
= f.text_field :finished_at,
|
||||
value: @planting.finished_at ? @planting.finished_at.to_fs(:ymd) : '',
|
||||
value: @planting.finished_at ? @planting.finished_at.to_s(:ymd) : '',
|
||||
class: 'add-datepicker',
|
||||
label: 'Finished date',
|
||||
placeholder: 'optional'
|
||||
|
||||
@@ -34,15 +34,15 @@ csv.headers :id,
|
||||
|
||||
csv.cells :quantity, :planted_from, :sunniness
|
||||
|
||||
csv.cell :date_planted, p.planted_at ? p.planted_at.to_fs(:db) : ''
|
||||
csv.cell :date_planted, p.planted_at ? p.planted_at.to_s(:db) : ''
|
||||
|
||||
csv.cell :finished
|
||||
csv.cell :date_finished, p.finished_at ? p.finished_at.to_fs(:db) : ''
|
||||
csv.cell :date_finished, p.finished_at ? p.finished_at.to_s(:db) : ''
|
||||
|
||||
csv.cell :description
|
||||
|
||||
csv.cell :date_added, p.created_at.to_fs(:db)
|
||||
csv.cell :last_modified, p.updated_at.to_fs(:db)
|
||||
csv.cell :date_added, p.created_at.to_s(:db)
|
||||
csv.cell :last_modified, p.updated_at.to_s(:db)
|
||||
|
||||
csv.cell :license, "CC-BY-SA Growstuff http://growstuff.org/"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- @plantings.each do |planting|
|
||||
%item
|
||||
%title #{planting['crop_name']} in #{planting['location']}
|
||||
%pubdate= planting['created_at'].to_fs(:rfc822)
|
||||
%pubdate= planting['created_at'].to_s(:rfc822)
|
||||
%description
|
||||
:escaped
|
||||
<p>Quantity: #{planting['quantity'] ? planting['quantity'] : 'unknown' }</p>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
- unless posts.empty?
|
||||
%table.table.table-striped
|
||||
%tr
|
||||
%th.col-6 Subject
|
||||
%th.col-2.hidden-xs Posted by
|
||||
%th.col-2 Most recent activity
|
||||
%th.col-2.hidden-xs Comments
|
||||
%th Subject
|
||||
%th.hidden-xs Posted by
|
||||
%th Most recent activity
|
||||
%th.hidden-xs Comments
|
||||
|
||||
- posts.recently_active[0..howmany - 1].each do |post|
|
||||
- cache post do
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
%description
|
||||
:escaped_markdown
|
||||
#{ strip_tags post.body }
|
||||
%pubdate= post.created_at.to_fs(:rfc822)
|
||||
%pubdate= post.created_at.to_s(:rfc822)
|
||||
%link= post_url(post)
|
||||
%guid= post_url(post)
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
:escaped_markdown
|
||||
#{ strip_tags comment.body }
|
||||
|
||||
%pubdate= comment.created_at.to_fs(:rfc822)
|
||||
%pubdate= comment.created_at.to_s(:rfc822)
|
||||
%link= post_url(@post)
|
||||
%guid= comment_url(comment)
|
||||
|
||||
@@ -30,18 +30,18 @@
|
||||
.row
|
||||
.col-12.col-md-4
|
||||
= f.text_field :saved_at,
|
||||
value: @seed.saved_at ? @seed.saved_at.to_fs(:ymd) : '',
|
||||
value: @seed.saved_at ? @seed.saved_at.to_s(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When were the seeds harvested/saved?'
|
||||
.col-12.col-md-4= f.number_field :quantity, label: 'Quantity'
|
||||
.col-12.col-md-4
|
||||
= f.text_field :plant_before, class: 'add-datepicker',
|
||||
value: @seed.plant_before ? @seed.plant_before.to_fs(:ymd) : ''
|
||||
value: @seed.plant_before ? @seed.plant_before.to_s(:ymd) : ''
|
||||
|
||||
.row
|
||||
.col-12.col-md-4
|
||||
= f.check_box :finished, label: 'Mark as finished'
|
||||
.col-12.col-md-4
|
||||
= f.text_field :finished_at, class: 'add-datepicker', value: @seed.finished_at ? @seed.finished_at.to_fs(:ymd) : ''
|
||||
= f.text_field :finished_at, class: 'add-datepicker', value: @seed.finished_at ? @seed.finished_at.to_s(:ymd) : ''
|
||||
.col-12.col-md-4
|
||||
%span.help-inline= t('.finish_helper')
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ csv.headers :id,
|
||||
csv.cell :gmo
|
||||
csv.cell :heirloom
|
||||
|
||||
csv.cell :date_added, s.created_at.to_fs(:db)
|
||||
csv.cell :last_modified, s.updated_at.to_fs(:db)
|
||||
csv.cell :date_added, s.created_at.to_s(:db)
|
||||
csv.cell :last_modified, s.updated_at.to_s(:db)
|
||||
|
||||
csv.cell :license, "CC-BY-SA Growstuff http://growstuff.org/"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- @seeds.each do |seed|
|
||||
%item
|
||||
%title #{seed.owner_login_name}'s #{seed.crop_name} seeds
|
||||
%pubdate= seed.created_at.to_fs(:rfc822)
|
||||
%pubdate= seed.created_at.to_s(:rfc822)
|
||||
%description
|
||||
:escaped
|
||||
<p>Quantity: #{seed.quantity ||= 'unknown' }</p>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
.hide{id: "date--#{model.id}-#{field.to_s}"}
|
||||
= bootstrap_form_for(model) do |f|
|
||||
= f.text_field field,
|
||||
value: model.send(field) ? model.send(field).to_fs(:ymd) : '',
|
||||
value: model.send(field) ? model.send(field).to_s(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When?'
|
||||
= f.submit :save
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
= f.select field, collection
|
||||
- elsif field_type == :date
|
||||
= f.text_field field,
|
||||
value: model.send(field) ? model.send(field).to_fs(:ymd) : '',
|
||||
value: model.send(field) ? model.send(field).to_s(:ymd) : '',
|
||||
class: 'add-datepicker', label: 'When?'
|
||||
= f.submit :save
|
||||
|
||||
@@ -12,19 +12,15 @@ Bundler.require(*Rails.groups)
|
||||
module Growstuff
|
||||
class Application < Rails::Application
|
||||
# Initialize configuration defaults for originally generated Rails version.
|
||||
config.load_defaults 7.0
|
||||
config.load_defaults 6.0
|
||||
|
||||
I18n.config.enforce_available_locales = true
|
||||
|
||||
config.active_record.legacy_connection_handling = false
|
||||
|
||||
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
config.time_zone = 'UTC'
|
||||
config.active_record.default_timezone = :local
|
||||
|
||||
config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time, ActiveSupport::TimeWithZone, ActiveSupport::TimeZone]
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}')]
|
||||
I18n.default_locale = :en
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
development:
|
||||
adapter: postgresql
|
||||
database: growstuff_dev
|
||||
user: postgres
|
||||
password: postgres
|
||||
host: db
|
||||
|
||||
test:
|
||||
adapter: postgresql
|
||||
database: growstuff_test
|
||||
user: postgres
|
||||
password: postgres
|
||||
host: db
|
||||
|
||||
production:
|
||||
adapter: postgresql
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
development: &default
|
||||
host: 'http://es01:9200'
|
||||
log: true
|
||||
test:
|
||||
host: 'http://es01:9200'
|
||||
@@ -67,9 +67,13 @@ Rails.application.configure do
|
||||
config.action_mailer.delivery_method = :letter_opener
|
||||
|
||||
config.host = 'localhost:3000'
|
||||
config.hosts << ".preview.app.github.dev"
|
||||
config.analytics_code = ''
|
||||
|
||||
# this config variable cannot be put in application.yml as it is needed
|
||||
# by the assets pipeline, which doesn't have access to ENV.
|
||||
config.mapbox_map_id = 'growstuff.i3n2il6a'
|
||||
config.mapbox_access_token = 'pk.eyJ1IjoiZ3Jvd3N0dWZmIiwiYSI6IkdxMkx4alUifQ.n0igaBsw97s14zMa0lwKCA'
|
||||
|
||||
config.action_controller.action_on_unpermitted_parameters = :raise
|
||||
|
||||
config.active_job.queue_adapter = :sidekiq
|
||||
|
||||
@@ -83,7 +83,7 @@ Rails.application.configure do
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||
config.log_formatter = Logger::Formatter.new
|
||||
config.log_formatter = ::Logger::Formatter.new
|
||||
|
||||
# Do not dump schema after migrations.
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
@@ -92,10 +92,10 @@ Rails.application.configure do
|
||||
config.action_mailer.default_url_options = { host: ENV['HOST'] }
|
||||
|
||||
config.action_mailer.smtp_settings = {
|
||||
user_name: ENV['MAILGUN_SMTP_LOGIN'],
|
||||
password: ENV['MAILGUN_SMTP_PASSWORD'],
|
||||
user_name: ENV['SENDGRID_USERNAME'],
|
||||
password: ENV['SENDGRID_PASSWORD'],
|
||||
domain: ENV['GROWSTUFF_EMAIL_DOMAIN'],
|
||||
address: ENV['MAILGUN_SMTP_SERVER'],
|
||||
address: 'smtp.sendgrid.net',
|
||||
port: 587,
|
||||
authentication: :plain,
|
||||
enable_starttls_auto: true
|
||||
@@ -103,11 +103,16 @@ Rails.application.configure do
|
||||
ActionMailer::Base.delivery_method = :smtp
|
||||
|
||||
config.host = ENV['HOST']
|
||||
config.analytics_code = <<-GET_CLICKY_SCRIPT
|
||||
config.analytics_code = <<-eos
|
||||
<script src="//static.getclicky.com/js" type="text/javascript"></script>
|
||||
<script type="text/javascript">try{ clicky.init(100594260); }catch(e){}</script>
|
||||
<noscript><p><img alt="Clicky" width="1" height="1" src="//in.getclicky.com/100594260ns.gif" /></p></noscript>
|
||||
GET_CLICKY_SCRIPT
|
||||
eos
|
||||
|
||||
# this config variable cannot be put in application.yml as it is needed
|
||||
# by the assets pipeline, which doesn't have access to ENV.
|
||||
config.mapbox_map_id = ENV['GROWSTUFF_MAPBOX_MAP_ID']
|
||||
config.mapbox_access_token = ENV['GROWSTUFF_MAPBOX_ACCESS_TOKEN']
|
||||
|
||||
config.active_job.queue_adapter = :sidekiq
|
||||
# Use a different logger for distributed setups.
|
||||
|
||||
@@ -104,3 +104,16 @@ Capybara.configure do |config|
|
||||
end
|
||||
|
||||
OmniAuth.config.test_mode = true
|
||||
# Fake the omniauth
|
||||
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new(provider: 'facebook',
|
||||
uid: '123545',
|
||||
info: {
|
||||
name: "John Testerson",
|
||||
nickname: 'JohnnyT',
|
||||
email: 'example.oauth.facebook@example.com',
|
||||
image: 'http://findicons.com/files/icons/1072/face_avatars/300/i04.png'
|
||||
},
|
||||
credentials: {
|
||||
token: "token",
|
||||
secret: "donttell"
|
||||
})
|
||||
|
||||
@@ -86,7 +86,7 @@ Devise.setup do |config|
|
||||
config.stretches = Rails.env.test? ? 1 : 10
|
||||
|
||||
# Setup a pepper to generate the encrypted password.
|
||||
# config.pepper = "..."
|
||||
# config.pepper = "dd24b97208cc11ebae765edd19bee764aacafa99b3711440f08fe92e8f790d0b4ab60ebb6bc3bcc2c526438eefa50326eddf4d3e429a2431f8a646d8a7d7bd1f"
|
||||
|
||||
# ==> Configuration for :confirmable
|
||||
# A period that the user is allowed to access the website even without
|
||||
@@ -233,4 +233,7 @@ Devise.setup do |config|
|
||||
# When using omniauth, Devise cannot automatically set Omniauth path,
|
||||
# so you need to do it manually. For the users scope, it would be:
|
||||
# config.omniauth_path_prefix = "/my_engine/users/auth"
|
||||
|
||||
# Later we may wish to ask for user_photos,user_location, however this means we need to be reviewed by facebook
|
||||
config.omniauth :facebook, ENV['GROWSTUFF_FACEBOOK_KEY'], ENV['GROWSTUFF_FACEBOOK_SECRET'], scope: 'email,public_profile', display: 'page', info_fields: 'email,name,first_name,last_name,id'
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
if ENV['MY_RUBY_HOME']&.include?('rvm')
|
||||
begin
|
||||
require 'rvm'
|
||||
RVM.use_from_path! File.dirname(__FILE__, 2)
|
||||
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
|
||||
rescue LoadError
|
||||
# RVM is unavailable at this point.
|
||||
raise "RVM ruby lib is currently unavailable."
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateCms < ActiveRecord::Migration[4.2]
|
||||
def self.up # rubocop:disable Metrics/MethodLength
|
||||
def self.up # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
||||
text_limit = case ActiveRecord::Base.connection.adapter_name
|
||||
when 'PostgreSQL'
|
||||
{}
|
||||
else
|
||||
{ limit: 16_777_215 }
|
||||
end
|
||||
|
||||
# -- Sites --------------------------------------------------------------
|
||||
create_table :comfy_cms_sites do |t|
|
||||
t.string :label, null: false
|
||||
@@ -21,9 +28,9 @@ class CreateCms < ActiveRecord::Migration[4.2]
|
||||
t.string :app_layout
|
||||
t.string :label, null: false
|
||||
t.string :identifier, null: false
|
||||
t.text :content
|
||||
t.text :css
|
||||
t.text :js
|
||||
t.text :content, text_limit
|
||||
t.text :css, text_limit
|
||||
t.text :js, text_limit
|
||||
t.integer :position, null: false, default: 0
|
||||
t.boolean :is_shared, null: false, default: false
|
||||
t.timestamps null: true
|
||||
@@ -39,8 +46,8 @@ class CreateCms < ActiveRecord::Migration[4.2]
|
||||
t.integer :target_page_id
|
||||
t.string :label, null: false
|
||||
t.string :slug
|
||||
t.string :full_path, null: false
|
||||
t.text :content_cache
|
||||
t.string :full_path, null: false
|
||||
t.text :content_cache, text_limit
|
||||
t.integer :position, null: false, default: 0
|
||||
t.integer :children_count, null: false, default: 0
|
||||
t.boolean :is_published, null: false, default: true
|
||||
@@ -52,8 +59,8 @@ class CreateCms < ActiveRecord::Migration[4.2]
|
||||
|
||||
# -- Page Blocks --------------------------------------------------------
|
||||
create_table :comfy_cms_blocks do |t|
|
||||
t.string :identifier, null: false
|
||||
t.text :content
|
||||
t.string :identifier, null: false
|
||||
t.text :content, text_limit
|
||||
t.references :blockable, polymorphic: true
|
||||
t.timestamps null: true
|
||||
end
|
||||
@@ -65,7 +72,7 @@ class CreateCms < ActiveRecord::Migration[4.2]
|
||||
t.integer :site_id, null: false
|
||||
t.string :label, null: false
|
||||
t.string :identifier, null: false
|
||||
t.text :content
|
||||
t.text :content, text_limit
|
||||
t.integer :position, null: false, default: 0
|
||||
t.boolean :is_shared, null: false, default: false
|
||||
t.timestamps null: true
|
||||
@@ -94,7 +101,7 @@ class CreateCms < ActiveRecord::Migration[4.2]
|
||||
create_table :comfy_cms_revisions, force: true do |t|
|
||||
t.string :record_type, null: false
|
||||
t.integer :record_id, null: false
|
||||
t.text :data
|
||||
t.text :data, text_limit
|
||||
t.datetime :created_at
|
||||
end
|
||||
add_index :comfy_cms_revisions, %i(record_type record_id created_at),
|
||||
|
||||