Commit Graph

1827 Commits

Author SHA1 Message Date
Francesco Turco 23e43901c8 bump copyright year 2019-06-22 22:11:33 +02:00
Peter Bhat Harkins cad643a28e need to pass this 2019-06-18 12:52:25 -05:00
Peter Bhat Harkins 37de6a2fa4 keybase instructions only on /settings 2019-06-18 09:16:33 -05:00
Peter Bhat Harkins 1b448d916e
bump rubocop (#690) 2019-06-18 06:54:27 -07:00
Jean-Baptiste Barth 1d9669491c validate SSL certs by default (#692)
Required for integrations (GitHub, Twitter, etc.) but deliberately
disabled when fetching titles.
2019-06-18 06:07:39 -07:00
Thomas Dziedzic d0d2c9b1f9 silence warning about git vs https (#689) 2019-06-18 06:00:17 -07:00
Peter Bhat Harkins ca33b67350 add bit.ly alias; early warning on content marketers 2019-06-17 00:04:11 -05:00
Peter Bhat Harkins 1989831e72 rm sqlite
We haven't attempted to maintain support for it as we've increased our custom
SQL, and it's long been best practice in Rails to use the same database system
in dev as prod.
2019-06-14 09:24:12 -05:00
Thomas Dziedzic a075903a2f use rubocop-rails
the next version of rubocop 0.72 will remove the rails cops

https://github.com/rubocop-hq/rubocop/blob/master/manual/migrate_rails_cops.md
2019-06-13 09:19:32 -05:00
Thomas Dziedzic 3a14c5f2e6 remove unrecognized cops
```
Warning: unrecognized cop Performance/Casecmp found in .rubocop.yml
Warning: unrecognized cop Performance/RedundantMatch found in .rubocop.yml
```
2019-06-13 09:07:54 -05:00
Thomas Dziedzic 6bf4a9fbba fix BelongsTo rubocop warnings
```
app/models/user.rb:22:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :invited_by_user,
  ^^^^^^^^^^
app/models/user.rb:26:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :banned_by_user,
  ^^^^^^^^^^
app/models/user.rb:30:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :disabled_invite_by_user,
  ^^^^^^^^^^
app/models/message.rb:10:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :hat,
  ^^^^^^^^^^
app/models/story.rb:3:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :merged_into_story,
  ^^^^^^^^^^
app/models/invitation.rb:3:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :new_user, class_name: 'User', inverse_of: nil, required: false
  ^^^^^^^^^^
app/models/comment.rb:9:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :parent_comment,
  ^^^^^^^^^^
app/models/comment.rb:17:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :hat,
  ^^^^^^^^^^
app/models/moderation.rb:2:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :moderator,
  ^^^^^^^^^^
app/models/moderation.rb:7:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :comment,
  ^^^^^^^^^^
app/models/moderation.rb:9:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :story,
  ^^^^^^^^^^
app/models/moderation.rb:11:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :tag,
  ^^^^^^^^^^
app/models/moderation.rb:13:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :user,
  ^^^^^^^^^^
app/models/vote.rb:2:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :user, required: false
  ^^^^^^^^^^
app/models/vote.rb:3:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :story, required: false
  ^^^^^^^^^^
app/models/vote.rb:4:3: C: Rails/BelongsTo: You specified required: false, in Rails > 5.0 the required option is deprecated and you want to use optional: true.
  belongs_to :comment, required: false
  ^^^^^^^^^^
```
2019-06-13 09:06:07 -05:00
Thomas Dziedzic c6d27f3914 fix StderrPuts rubocop warnings
```
script/parse_inbound_mail:27:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no active user with mailing list token #{parser.user_token}"
  ^^^^^^^^^^^
script/parse_inbound_mail:34:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "error parsing e-mail"
  ^^^^^^^^^^^
script/parse_inbound_mail:38:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no valid comment or story being replied to"
  ^^^^^^^^^^^
script/parse_inbound_mail:42:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "no valid text/plain body found"
  ^^^^^^^^^^^
script/parse_inbound_mail:61:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts c.errors.inspect
  ^^^^^^^^^^^
script/sync_twitter_users:29:3: C: Style/StderrPuts: Use warn instead of STDERR.puts to allow such output to be disabled.
  STDERR.puts "need to implement paging for list members"
  ^^^^^^^^^^^
```
2019-06-13 09:00:21 -05:00
Thomas Dziedzic a7f88a7d95 fix TrailingCommaInHashLiteral rubocop warning
```
spec/controllers/tags_controller_spec.rb:31:8: C: Style/TrailingCommaInHashLiteral: Avoid comma after the last item of a hash, unless items are split onto multiple lines.
      }, }
       ^
```
2019-06-13 08:58:03 -05:00
Thomas Dziedzic 9473874b80 update obsolete IndentHash -> IndentFirstHashElement
```
Error: The `Layout/IndentHash` cop has been renamed to `Layout/IndentFirstHashElement`.
(obsolete configuration found in .rubocop.yml, please update it)
```
2019-06-13 08:54:12 -05:00
Thomas Dziedzic 0289386d57 bump rubocop and rubocop-rails 2019-06-13 08:53:09 -05:00
Peter Bhat Harkins 1ecd82c1d0 keybase unlinking 2019-06-12 20:33:18 -05:00
Peter Bhat Harkins 6d9bd0f013 move alongside other integrations; doc commands 2019-06-12 16:43:20 -05:00
Peter Bhat Harkins 8e591f4931 update copy for prev 2019-06-12 12:11:25 -05:00
Peter Bhat Harkins 13807c67ce disown stories on delete; start tests 2019-06-12 12:06:16 -05:00
Peter Bhat Harkins f99b97bdf2 filter deps; can still see with --backtrace 2019-06-12 11:21:25 -05:00
Gus Caplan 4fc391e97d Add keybase integration (#661) 2019-06-12 06:08:57 -07:00
jordigh 75750213da add missing event parameter to callback (#684) 2019-06-11 18:36:30 -07:00
Preston Mueller 0d7806b629 update comment count when merged into a story
Fix #683
2019-06-11 11:08:32 -07:00
Peter Bhat Harkins 0bc2cf4fc0 fix: allow subdomains on homepage 2019-06-11 09:29:13 -05:00
Peter Bhat Harkins c6ef20b3e6 typo 2019-05-29 12:08:25 -05:00
Peter Bhat Harkins f1f1df0cec friendlier phrasing; note about sister site hosting idea 2019-05-29 09:41:57 -05:00
Peter Bhat Harkins 082ce1de70 factory for clearer tests 2019-05-29 09:13:58 -05:00
Peter Bhat Harkins a4af5a18f8 ReplyingComments: add tests, fix on deleted, less gas
Fixes showing replies for comments that were deleted or moderated.

Doesn't show replies if the parent commenter has flagged the replier in the
thread.
2019-05-29 09:04:58 -05:00
Alexander Maslov a0078521e1 Add username to exception notifications
Close #676
2019-05-22 12:56:18 +00:00
Peter Bhat Harkins 003d47ce22 fix delete anchor 2019-05-22 07:25:46 -05:00
mukund accafca671 Add mention of the karma threshold for downvoting (#677) 2019-05-15 12:37:19 +00:00
Peter Bhat Harkins d8b27bf3df user lists: only pull attributes actually used
These pages change rarely, and with 10k+ users * 23 fields this adds up to
significant memory pressure to fetch/instantiate/gc unused data.
2019-05-09 09:21:23 -05:00
Peter Bhat Harkins 8936c830f0 fix tag search 2019-05-08 20:44:53 -05:00
Peter Bhat Harkins e23227f49e search: don't fetch all records just to count them argh
Thanks, Scout. Found that in about two seconds.
2019-05-08 18:48:27 -05:00
Casey R 5288928056 add scout gem for perf study (#674)
https://lobste.rs/s/5hshvd/proposal_lobste_rs_performance_analysis

Sister sites, you probably want to just ignore/revert this commit.
2019-05-08 22:22:04 +00:00
Martin Tournoij 860d95d59b Add homepage field (#671)
Using URI.parse with IDN/non-ASCII URLs won't work, and as far as I can
find there is no stdlib way of doing it. This regexp should be good enough
and not reject any valid URLs.

Closes #669
2019-05-08 14:17:10 +00:00
Alexander Maslov 627b6c5df7 Speedup calculated_hotness
Fix #679
2019-05-08 14:02:32 +00:00
Peter Bhat Harkins fec025f872 fix rubocop config to require both of our custom cops 2019-05-08 08:49:52 -05:00
Peter Bhat Harkins af5361d02d fix slow story submit
A new story has no id, so merged_comments was finding all comments on any
story that had not been merged into another (53k and counting).
2019-05-05 08:48:27 -05:00
Peter Bhat Harkins f85d2326ba never show merged stories in list views
Fix #678
2019-05-05 07:24:14 -05:00
Alan Post dd1ac8774b typo: s/recieve/receive/ on the /stories/new slug. h/t jjuran. 2019-05-04 16:36:55 -06:00
Peter Bhat Harkins 62d4121aaf Merge branch '161-follow-story' 2019-05-04 14:04:33 -05:00
Abdallah Samman 028065f42f notify story author about comment replies
Merge #616
2019-05-04 12:31:53 -05:00
Peter Bhat Harkins 3fe90020bc Show merged stories to submitters
Merge #570
2019-05-01 09:06:24 -05:00
Peter Bhat Harkins 8146418df0 style 2019-05-01 09:03:22 -05:00
Brian Kung 6104b13500 multi-tag pages and feeds
PR #664 
Close #525 
Close #542
2019-05-01 13:59:58 +00:00
Martin Tournoij d88202c677 Lighter color on error box
Move from contrast ratio 4.04 to 14.97 by lightening bg. (#668)
2019-04-30 02:06:37 +00:00
Peter Bhat Harkins a000fbf0af bug: don't 500 when URL is not present 2019-04-29 20:51:51 -05:00
lvlts dc06ff4ce6 switch dark mode themes to openusercss 2019-04-28 22:39:26 +00:00
Peter Bhat Harkins b031ff7a0a typo 2019-04-28 10:35:15 -05:00