Skip to content

Commit

Permalink
Merge branch 'communities-events' into communities-rsvp
Browse files Browse the repository at this point in the history
  • Loading branch information
openbrian committed Nov 2, 2022
2 parents f082189 + 7b71e80 commit e5785dc
Show file tree
Hide file tree
Showing 44 changed files with 933 additions and 690 deletions.
65 changes: 38 additions & 27 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2022-02-23 19:11:04 UTC using RuboCop version 1.25.1.
# on 2022-11-01 18:20:38 UTC using RuboCop version 1.38.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
Expand All @@ -14,14 +14,14 @@ require:
- rubocop-rails
- rubocop-rake

# Offense count: 550
# Cop supports --auto-correct.
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Offense count: 555
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 270
Max: 248

# Offense count: 34
# Offense count: 29
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Exclude:
Expand All @@ -41,14 +41,14 @@ Lint/AssignmentInCondition:
- 'lib/osm.rb'
- 'script/deliver-message'

# Offense count: 665
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
# Offense count: 676
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 189

# Offense count: 73
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# IgnoredMethods: refine
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 71

Expand All @@ -63,12 +63,12 @@ Metrics/ClassLength:
Max: 316

# Offense count: 58
# Configuration parameters: IgnoredMethods.
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 25

# Offense count: 742
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# Offense count: 751
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/MethodLength:
Max: 179

Expand All @@ -77,21 +77,21 @@ Metrics/MethodLength:
Metrics/ParameterLists:
Max: 6

# Offense count: 59
# Configuration parameters: IgnoredMethods.
# Offense count: 57
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 26

# Offense count: 550
# Offense count: 2495
# This cop supports safe autocorrection (--autocorrect).
Minitest/EmptyLineBeforeAssertionMethods:
Enabled: false

# Offense count: 560
Minitest/MultipleAssertions:
Max: 52

# Offense count: 1
Naming/AccessorMethodName:
Exclude:
- 'app/helpers/title_helper.rb'

# Offense count: 8
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
# NamePrefix: is_, has_, have_
# ForbiddenPrefixes: is_, has_, have_
Expand All @@ -101,6 +101,17 @@ Naming/PredicateName:
Exclude:
- 'app/models/user.rb'

# Offense count: 8
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/ActionControllerFlashBeforeRender:
Exclude:
- 'app/controllers/confirmations_controller.rb'
- 'app/controllers/friendships_controller.rb'
- 'app/controllers/oauth_controller.rb'
- 'app/controllers/traces_controller.rb'
- 'app/controllers/user_blocks_controller.rb'
- 'app/controllers/users_controller.rb'

# Offense count: 5
# Configuration parameters: Database, Include.
# SupportedDatabases: mysql, postgresql
Expand Down Expand Up @@ -141,7 +152,7 @@ Rails/InverseOf:

# Offense count: 2
# Configuration parameters: Include.
# Include: app/controllers/**/*.rb
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
Rails/LexicallyScopedActionFilter:
Exclude:
- 'app/controllers/oauth2_applications_controller.rb'
Expand All @@ -168,23 +179,23 @@ Rails/OutputSafety:
- 'test/helpers/application_helper_test.rb'

# Offense count: 6
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
Rake/Desc:
Exclude:
- 'lib/tasks/auto_annotate_models.rake'
- 'lib/tasks/eslint.rake'
- 'lib/tasks/subscribe_diary_authors.rake'
- 'lib/tasks/subscribe_old_changesets.rake'

# Offense count: 617
# Cop supports --auto-correct.
# Offense count: 625
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, always_true, never
Style/FrozenStringLiteralComment:
Enabled: false

# Offense count: 72
# Cop supports --auto-correct.
# Configuration parameters: Strict, AllowedNumbers.
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
Style/NumericLiterals:
MinDigits: 15
51 changes: 38 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ so with any new functionality which is written. Tests are also useful
in giving others confidence in the code you've written, and can
greatly speed up the process of merging in new code.

When hacking, you should:
When contributing, you should:

* Write new tests to cover the new functionality you've added.
* Where appropriate, modify existing tests to reflect new or changed
Expand Down Expand Up @@ -56,9 +56,9 @@ more importantly, **why** it does that. Good comments help your fellow
developers to read the code and satisfy themselves that it's doing the
right thing.

When hacking, you should:
When contributing, you should:

* Comment your code - don't go overboard, but explain the bits which
* Comment your code where necessary - explain the bits which
might be difficult to understand what the code does, why it does it
and why it should be the way it is.
* Check existing comments to ensure that they are not misleading.
Expand All @@ -81,14 +81,14 @@ to the descriptive texts are welcome.

## Committing

When you submit patches, the project maintainer has to read them and
When you submit your changes, the project maintainers have to read them and
understand them. This is difficult enough at the best of times, and
misunderstanding patches can lead to them being more difficult to
merge. To help with this, when submitting you should:
misunderstanding commits can lead to them being more difficult to
merge. To help with this, when committing you should:

* Split up large patches into smaller units of functionality.
* Split up large commits into smaller units of functionality.
* Keep your commit messages relevant to the changes in each individual
unit.
commit.

When writing commit messages please try and stick to the same style as
other commits, namely:
Expand All @@ -100,12 +100,37 @@ other commits, namely:
For simple commits the one line summary is often enough and the body
of the commit message can be left out.

## Sending the patches
## Pull Requests

If you have forked on GitHub then the best way to submit your patches is to
push your changes back to GitHub and then send a "pull request" on GitHub.

Otherwise you should either push your changes to a publicly visible git repository
and send the details to the [rails-dev](https://lists.openstreetmap.org/listinfo/rails-dev)
list or generate patches with `git format-patch` and send them to the
[rails-dev](https://lists.openstreetmap.org/listinfo/rails-dev) list.
If your pull request is small, for example one or two commits each containing
only a few lines of code, then it is easy for the maintainers to review.

If you are creating a larger pull request, then please help the maintainers
with making the reviews as straightforward as possible:

* The smaller the PR, the easier it is to review. In particular if a PR is too
large to review in one sitting, or if changes are requested, then the
maintainer needs to repeatedly re-read code that has already been considered.
* The commit history is important. This is a large codebase, developed over many
years by many developers. We frequently need to read the commit history (e.g.
using `git blame`) to figure out what is going on. So small, understandable,
and relevant commits are important for other developers looking back at your
work in future.

If you are creating a large pull request then please:

* Consider splitting your pull request into multiple PRs. If part of your work
can be considered standalone, or is a foundation for the rest of your work,
please submit it separately first.
* Avoid including "fixup" commits. If you have added a fixup commit (for example
to fix a rubocop warning, or because you changed your own new code) please
combine the fixup commit into the commit that introduced the problem.
`git rebase -i` is very useful for this.
* Avoid including "merge" commits. If your PR can no longer be merged cleanly
(for example, an unrelated change to Gemfile.lock on master now conflicts with
your PR) then please rebase your PR onto the latest master. This allows you to
fix the conflicts, while keeping the PR a straightforward list of commits. If
there are no conflicts, then there is no need to rebase anything.
44 changes: 22 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,24 @@ GEM
annotate (3.2.0)
activerecord (>= 3.2, < 8.0)
rake (>= 10.4, < 14.0)
argon2 (2.1.1)
argon2 (2.1.2)
ffi (~> 1.14)
ffi-compiler (~> 1.0)
ast (2.4.2)
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.646.0)
aws-sdk-core (3.160.0)
aws-partitions (1.654.0)
aws-sdk-core (3.166.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.58.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (1.59.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.114.0)
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-s3 (1.117.1)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
Expand Down Expand Up @@ -153,7 +153,7 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
dalli (3.2.2)
dalli (3.2.3)
debug_inspector (1.1.0)
deep_merge (1.2.2)
delayed_job (4.1.11)
Expand All @@ -180,7 +180,7 @@ GEM
concurrent-ruby (~> 1.0)
dry-core (~> 0.9, >= 0.9)
zeitwerk (~> 2.6)
dry-schema (1.11.2)
dry-schema (1.11.3)
concurrent-ruby (~> 1.0)
dry-configurable (~> 0.16, >= 0.16)
dry-core (~> 0.9, >= 0.9)
Expand All @@ -202,7 +202,7 @@ GEM
dry-initializer (~> 3.0)
dry-schema (~> 1.11, >= 1.11.0)
zeitwerk (~> 2.6)
erb_lint (0.2.0)
erb_lint (0.3.0)
activesupport
better_html (>= 2.0.1)
parser (>= 2.7.1.4)
Expand Down Expand Up @@ -270,7 +270,7 @@ GEM
kgio (2.11.4)
kramdown (2.4.0)
rexml
libxml-ruby (3.2.3)
libxml-ruby (3.2.4)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand Down Expand Up @@ -299,7 +299,7 @@ GEM
net-protocol
net-protocol (0.1.3)
timeout
net-smtp (0.3.2)
net-smtp (0.3.3)
net-protocol
nio4r (2.5.8)
nokogiri (1.13.9)
Expand Down Expand Up @@ -418,24 +418,24 @@ GEM
rexml (3.2.5)
rinku (2.0.6)
rotp (6.2.0)
rubocop (1.36.0)
rubocop (1.38.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.23.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.22.0)
rubocop-ast (1.23.0)
parser (>= 3.1.1.0)
rubocop-minitest (0.22.2)
rubocop-minitest (0.23.0)
rubocop (>= 0.90, < 2.0)
rubocop-performance (1.15.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.16.1)
rubocop-rails (2.17.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand All @@ -458,7 +458,7 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
secure_headers (6.4.0)
secure_headers (6.5.0)
selenium-webdriver (4.5.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -485,7 +485,7 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
strong_migrations (1.3.2)
strong_migrations (1.4.0)
activerecord (>= 5.2)
terser (1.1.12)
execjs (>= 0.3.0, < 3)
Expand All @@ -512,7 +512,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.1)
zeitwerk (2.6.3)

PLATFORMS
ruby
Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,4 +406,8 @@ $(document).ready(function () {
e.preventDefault();
}
});

$(document).on("click", "#sidebar_content .btn-close", function () {
OSM.router.route("/" + OSM.formatHash(map));
});
});
1 change: 1 addition & 0 deletions app/assets/javascripts/index/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ OSM.initializeBrowse = function (map) {
.text(I18n.t("browse.start_rjs.load_data")),
$("<div>").append(
$("<button type='button' class='btn-close'>")
.attr("aria-label", I18n.t("javascripts.close"))
.click(cancel))),
$("<p class='alert alert-warning'>")
.text(I18n.t("browse.start_rjs.feature_warning", { num_features: count, max_features: limit })),
Expand Down
3 changes: 2 additions & 1 deletion app/assets/javascripts/index/directions.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ OSM.Directions = function (map) {
}

var turnByTurnTable = $("<table class='mb-3'>");
var directionsCloseButton = $("<button type='button' class='btn-close'>");
var directionsCloseButton = $("<button type='button' class='btn-close'>")
.attr("aria-label", I18n.t("javascripts.close"));

$("#sidebar_content")
.empty()
Expand Down
Loading

0 comments on commit e5785dc

Please sign in to comment.