diff options
author | Starfall <root@starfall.blue> | 2020-02-04 17:44:29 -0600 |
---|---|---|
committer | Starfall <root@starfall.blue> | 2020-02-04 17:44:29 -0600 |
commit | 6d24d3bcb84abd04f31da95f97f6d60ef0afdc00 (patch) | |
tree | e7c38251a9e92bdf3a464b4aa7f1880aa5139bf0 /lib | |
parent | c0c9529df269816f52915a9802e5e30fbce9576b (diff) | |
parent | 885e9227c6e8e1ce5e4a5625d5126ba76dce2c00 (diff) |
Merge branch 'glitch'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cli.rb | 2 | ||||
-rw-r--r-- | lib/mastodon/emoji_cli.rb | 9 | ||||
-rw-r--r-- | lib/mastodon/version.rb | 6 | ||||
-rw-r--r-- | lib/paperclip/blurhash_transcoder.rb | 2 | ||||
-rw-r--r-- | lib/tasks/auto_annotate_models.rake | 1 |
5 files changed, 15 insertions, 5 deletions
diff --git a/lib/cli.rb b/lib/cli.rb index fbdf49fc3..19cc5d6b5 100644 --- a/lib/cli.rb +++ b/lib/cli.rb @@ -96,6 +96,8 @@ module Mastodon prompt.warn('Do NOT interrupt this process...') + Setting.registrations_mode = 'none' + Account.local.without_suspended.find_each do |account| payload = ActiveModelSerializers::SerializableResource.new( account, diff --git a/lib/mastodon/emoji_cli.rb b/lib/mastodon/emoji_cli.rb index beac1b1fd..dbaf12018 100644 --- a/lib/mastodon/emoji_cli.rb +++ b/lib/mastodon/emoji_cli.rb @@ -72,9 +72,16 @@ module Mastodon say("Imported #{imported}, skipped #{skipped}, failed to import #{failed}", color(imported, skipped, failed)) end + option :remote_only, type: :boolean desc 'purge', 'Remove all custom emoji' + long_desc <<-LONG_DESC + Removes all custom emoji. + + With the --remote-only option, only remote emoji will be deleted. + LONG_DESC def purge - CustomEmoji.in_batches.destroy_all + scope = options[:remote_only] ? CustomEmoji.remote : CustomEmoji + scope.in_batches.destroy_all say('OK', :green) end diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index a8e5f0b79..4a56470d0 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -9,15 +9,15 @@ module Mastodon end def minor - 0 + 1 end def patch - 1 + 0 end def flags - '' + 'rc2' end def suffix diff --git a/lib/paperclip/blurhash_transcoder.rb b/lib/paperclip/blurhash_transcoder.rb index 08925a6dd..5c33c98b0 100644 --- a/lib/paperclip/blurhash_transcoder.rb +++ b/lib/paperclip/blurhash_transcoder.rb @@ -8,7 +8,7 @@ module Paperclip pixels = convert(':source RGB:-', source: File.expand_path(@file.path)).unpack('C*') geometry = options.fetch(:file_geometry_parser).from_file(@file) - attachment.instance.blurhash = Blurhash.encode(geometry.width, geometry.height, pixels, options[:blurhash] || {}) + attachment.instance.blurhash = Blurhash.encode(geometry.width, geometry.height, pixels, **(options[:blurhash] || {})) @file end diff --git a/lib/tasks/auto_annotate_models.rake b/lib/tasks/auto_annotate_models.rake index fb9c89aa4..a374e33ad 100644 --- a/lib/tasks/auto_annotate_models.rake +++ b/lib/tasks/auto_annotate_models.rake @@ -4,6 +4,7 @@ if Rails.env.development? task :set_annotation_options do Annotate.set_defaults( 'routes' => 'false', + 'models' => 'true', 'position_in_routes' => 'before', 'position_in_class' => 'before', 'position_in_test' => 'before', |