about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-02-03 17:02:48 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-02-03 17:02:48 +0100
commit4d40685850ea211ecc0d0d0735b5a4c084333858 (patch)
treeaf497c9118243be3b7208cee60afca6de9b5b68a /lib
parent7632255115a7f6e6f9f8047f0d0d1b90d7ee9315 (diff)
parent4e933924bdea3392ebeaeaa7c341593eb200512c (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'lib')
-rw-r--r--lib/json_ld/identity.rb1
-rw-r--r--lib/json_ld/security.rb1
-rw-r--r--lib/mastodon/accounts_cli.rb2
-rw-r--r--lib/mastodon/email_domain_blocks_cli.rb2
-rw-r--r--lib/paperclip/color_extractor.rb4
5 files changed, 4 insertions, 6 deletions
diff --git a/lib/json_ld/identity.rb b/lib/json_ld/identity.rb
index 4fb3f8e9d..f41899150 100644
--- a/lib/json_ld/identity.rb
+++ b/lib/json_ld/identity.rb
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
 # frozen_string_literal: true
 # This file generated automatically from http://w3id.org/identity/v1
 require 'json/ld'
diff --git a/lib/json_ld/security.rb b/lib/json_ld/security.rb
index a6fbce95f..ef5391340 100644
--- a/lib/json_ld/security.rb
+++ b/lib/json_ld/security.rb
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
 # frozen_string_literal: true
 # This file generated automatically from http://w3id.org/security/v1
 require 'json/ld'
diff --git a/lib/mastodon/accounts_cli.rb b/lib/mastodon/accounts_cli.rb
index 653bfca30..74162256f 100644
--- a/lib/mastodon/accounts_cli.rb
+++ b/lib/mastodon/accounts_cli.rb
@@ -402,7 +402,7 @@ module Mastodon
         exit(1)
       end
 
-      parallelize_with_progress(target_account.followers.local) do |account|
+      processed, = parallelize_with_progress(target_account.followers.local) do |account|
         UnfollowService.new.call(account, target_account)
       end
 
diff --git a/lib/mastodon/email_domain_blocks_cli.rb b/lib/mastodon/email_domain_blocks_cli.rb
index 55a637d68..f79df302a 100644
--- a/lib/mastodon/email_domain_blocks_cli.rb
+++ b/lib/mastodon/email_domain_blocks_cli.rb
@@ -113,7 +113,7 @@ module Mastodon
         result = entry.destroy
 
         if result
-          processed += 1 + children_count
+          processed += children_count + 1
         else
           say("#{domain} could not be unblocked.", :red)
           failed += 1
diff --git a/lib/paperclip/color_extractor.rb b/lib/paperclip/color_extractor.rb
index a70a3d21f..d3b8e1022 100644
--- a/lib/paperclip/color_extractor.rb
+++ b/lib/paperclip/color_extractor.rb
@@ -55,7 +55,7 @@ module Paperclip
       # If we don't have enough colors for accent and foreground, generate
       # new ones by manipulating the background color
       (2 - foreground_colors.size).times do |i|
-        foreground_colors << lighten_or_darken(background_color, 35 + (15 * i))
+        foreground_colors << lighten_or_darken(background_color, 35 + (i * 15))
       end
 
       # We want the color with the highest contrast to background to be the foreground one,
@@ -147,7 +147,7 @@ module Paperclip
         g = l.to_f
         b = l.to_f # achromatic
       else
-        q = l < 0.5 ? l * (1 + s) : l + s - l * s
+        q = l < 0.5 ? l * (s + 1) : l + s - l * s
         p = 2 * l - q
         r = hue_to_rgb(p, q, h + 1 / 3.0)
         g = hue_to_rgb(p, q, h)