-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused methods #1730
Remove unused methods #1730
Conversation
Might any of these be used in the future though? |
I'd generally prefer to not have unused code lying around ... it's easy enough to write code if we need it, and the git history is always there if we remember that we used to have something and want to see what it was. In this case specifically, I'd like input into whether The |
3ad162a
to
f78c6e0
Compare
I am not sure if The counters are deprecated though, you are correct. |
Thanks for clarification. I'll add ui/rake usage for `admins` and triadic and update this to just remove the unused ones.
…Sent from my iPhone
On Apr 14, 2017, at 07:25, Eugen ***@***.***> wrote:
I am not sure if User.admins is truly unused, but Account.triadic_closures is something I'd rather not remove because it took a while to figure out the correct SQL query. If we wanna re-add follow suggestions at some point, that's the method to power it.
The counters are deprecated though, you are correct.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
5343218
to
83ac7d2
Compare
PR description and commits updated to reflect methods which are staying vs going. |
a68ab1f
to
dd618cc
Compare
dd618cc
to
1b49943
Compare
* cache blockings for reducing queries. * Improved Japanese translation in devise.ja.yml (mastodon#1969) * Fix minor typo in Japanese translation "保村" -> "保存" (mastodon#1968) * reduce unneed query when post without attachements. (mastodon#1907) * reduce unneed query when post without attachements. This commit reduce following query: ``` MediaAttachment Load (0.9ms) SELECT "media_attachments".* FROM "media_attachments" WHERE "media_attachments"."status _id" IS NULL AND 1=0 ORDER BY id asc ``` * fixed for more simple changes. * Improve streaming server with cluster (mastodon#1970) * Assign user locale on signup (mastodon#1982) * Fix tiny typo (mastodon#1956) * Fix tiny typo, and added link to terms and conditions in confirmation email for Japanese. (mastodon#1975) (mastodon#1975) * Improved Japanese translation in ja.yml (mastodon#1981) * Add function color remaining text (mastodon#1980) * Add human locales for zh-tw (mastodon#1984) * Rubocop instructions (mastodon#1973) * Rubocop link for Sublime Text * Fix rubocop links * Link to gh issues page from contributing doc * Optimize user setting page for mobile browser (mastodon#1924) * Remove overflow because it blocks scrolling on mobile safari. * Add “-webkit-overflow-scrolling: touch;” to enable smooth scroll on mobile safari and other webkit browsers. * Use radio buttons in user setting page. Because select tags with long text are not fit in the width of mobile devices. * Add flex property to fit labels to devise width. * Change font size of select. It causes auto zooming on mobile safari. * Create hr.jsx (mastodon#1945) * Create hr.jsx Start of Croatian translation * Update settings_helper.rb * Update application.rb * Update application.rb * Update index.jsx * Add Brazilian Portuguese and fix European Portuguese (mastodon#1966) * update portuguese translation added the missing fields and improved the translation * pt translations fix * improve last translation commit * fix damn quotes * add pt_br to index.jsx * add pt-BR to import index.jsx * add pt-BR to mastodon.jsx * add pt-BR to settings_helper.rb * add pt-BR to application.rb * order alphabetically pt.jsx * create pt-BR.jsx * Create devise.pt-BR.yml * language improvements to devise.pt.yml * created doorkeeper.pt-BR.yml * fixes to doorkeeper.pt.yml * create pt-BR.yml * improvements to pt.yml * Create simple_form.pt-BR.yml * Improvements to simple_form.pt.yml * improvements to pt.yml * Added missing `rake secret` command (mastodon#1894) * Add mask-icon.svg (mastodon#1572) (mastodon#1585) * Add mask-icon (mastodon#1572) * use updated svg logo for mask-icon * NFS for shared folder requires a private_network (mastodon#1263) * Allow using an SMTP server without authentication (mastodon#1597) * Allow using an SMTP server without authentication (e.g Postfix relay on the same host) by setting SMTP_LOGIN and SMTP_AUTH_METHOD to 'none' * Add note in .env.production.sample about SMTP settings for servers where no auth is required * Assume that SMTP_LOGIN and SMTP_PASSWORD will be blank if we set SMTP_AUTH_METHOD to none * Add documentation of SMTP_DOMAIN (mastodon#1738) Without setting it, exim will reject the mail with a message like: rejected EHLO from [10.20.0.1]: syntactically invalid argument(s): {} * Add gif auto-play/pause preference This introduces a new per-user preference called "Auto-play animated GIFs", which is enabled by default. When a user disables this setting, gifs in toots become click-to-play. Previews of animated gifs were changed to display the video play button so that users can distinguish them from regular images. This setting also affects account avatars in the detailed account view, which was changed to use the same hover-to-play mechanism that is used for animated avatars in timelines. Fixes mastodon#1652 * Open sidekiq and pghero admin pages in new browser tabs (mastodon#1596) * Open sidekiq and pghero admin pages in new tabs * Add missing comma * Make contents of boost confirmation dialog scroll (mastodon#1710) This is necessary for boosting long posts on small screens - see this post for video: https://slime.global/@masklayer/102308 * Update fr.jsx "clear" (Nettoyer peut-être ambigu) (mastodon#1987) Un utiliser mal expérimenté pourrait comprendre "retirer les erreurs". Ici il s'agit d'une suppression pure et simple, pas une épuration/nettoyage. clear would be translated "remove" instead of "cleaning" Cleaning can be unterstood "keep but clean" * Update Japanese translation (mastodon#1993) Sync text for toot form * Required foreign keys (mastodon#2003) * Add `required: true` option to foreign column * Fixes NoMethodError ``` > Favourite.new.valid? NoMethodError: undefined method `reblog?' for nil:NilClass ``` * Fix nil query_username (mastodon#2013) * Improve handling of HTTP_ACCEPT for webfinger (mastodon#2008) This change includes: - Improve the spec coverage for incoming request to the webfinger action - For requests without an accept header (ie, what a browser might look like), return a JSON response. - For requests with an explicit format of xml or json, return that format. - For requests using an accept header, return that format. Also adds failing spec showing webfinger does not return xml, which covers the issue described in: mastodon#1983 * Fix mastodon#1897 - Return reblogged: false on unreblog (was wrongly named variable) (mastodon#1989) * Fix mastodon#1972, fix mastodon#1870 - Fix special characters in XML, add tests (mastodon#1988) Also improve efficiency of the mastodon:maintenance:add_static_avatars task * Media controller specs (mastodon#2022) * Add spec for media controller * Add MediaAttachment.attached scope * Simplify methods in media controller * Remove i18n_spec file (mastodon#2014) These were being skipped with `xit`, but we also just added the `unused` task to the CI server, and it will be caught there. That seems good enough for this, instead of requiring a full keys check on every local spec suite run. * French i18n-tasks missing fr (mastodon#2018) * Return early from submit if no text. (mastodon#1962) * Fix import pt_br locale in mastodon.jsx (mastodon#2011) * README tidy up (mastodon#2026) * Remove docker guide and put it in docs repo * Move tasks to docs repo * Move requirements to contributing doc * Move advice about tagged releases to docs repo * Move local domain and host config to docs repo * Link to related tech * optimized logo (mastodon#2020) - adjusted elements to fit the pixel grid for better scaling - optimized the PNG asset and the SVG asset * Use .presence instead of ternary on site description for og: content (mastodon#2033) * Updated, improved and fixed Dutch language strings (mastodon#2030) * Fixed some words * Improved and more consistent * Fixes and a bit less 'je' * Improved and more consistent * Another round of improvements and consistency * More improvements and less 'je' * Update * Updated with admin strings * More improvements and additions - not complete yet, but most is there * This is what we call in Dutch 'the English disease' :-) * fix comma * admin.reportsi * not needed * hopefully now fixed * Instance helper to replace site title helper (mastodon#2038) * Move site title helper to instance helper (name change only) * Remove newline in <title> tag * Add site_hostname helper method to wrap up local_domain value * Use site_hostname helper in places that need local_domain value * Add simplified Chinese js translation (mastodon#2044) This single-file commit, heavily based on the zh-hk version as of ec9999c, fixes the missing js locale. Intentional, significant departures from current zh-cn yml localizations have been marked with rationales given. * Add FR locales to the onboarding modal (mastodon#1976) * Add FR locale for the onboarding modal component * Slightly increase the max-width and max-height of the onboarding modal This is done so it doesn't break with locales whose strings would be too long * Update FR locales for onboarding upon PR comments * Ignore /vendor/bundle (mastodon#1880) * Add forgotten AtomSerializer spec (mastodon#2047) * Rename cache key to exclude_account_ids_for:id, adjust formatting * Remove unused methods (mastodon#1730) * Remove unused method #set_counters_maps from api controller * Remove unused method #set_account_counters_maps from api controller * Remove unused method Account#followers_domains * Remove unused User.prolific scope * Add mastodon:users:admins task to list all admin emails * Use interpolated query style in Account.triadic_closures * Coverage for Account.triadic_closures * Adjust visuals of non-autoplaying GIFV * Add hasMore field to account timeline (mastodon#2066) * Update Russian translation (mastodon#1967) * Add Russian translation (ru) * Fix a missing comma * Fix the wording for better consistency * Update Russian translation * Arrange Russian setting alphabetically * Fix syntax error * Update Russian translation * Fix formatting error * Update Russian translation * Update Russian translation * Update ru.jsx * Fix syntax error * Remove two_factor_auth.warning (appears obsolete) * Add missing strings in ru.yml A lot of new strings translated, especially for the newly added admin section * Fix translation consistency * Add Occitan (oc) translation (mastodon#2077) * Added oc.yml * Added `config/locales/oc.yml`. Translated in General Occitan (Quent-in). * Added oc.jsx (Occitan translation) * Written in General Occitan (lengadocian) * Added `app/assets/javascripts/components/locales/oc.js` * Added doorkeeper.oc.yml * Added `config/locales/doorkeeper.oc.yml` (Quent-in) * Added simple_form.oc.yml * Added `config/locales/simple_form.oc.yml` (Quent-in). * Merge en.yml changes into oc.yml Added new strings for translations * Fix typo in oc.yml * Update javascript locale support (oc) * Update ruby locale list (oc) * Fix oc.yml * Remove obsoleted translations * Moved old translation of `reports` to `admin.reports` * French translation update (mastodon#2063) fixes * Fix header icons in navigation bar (mastodon#2081) * Avoid dynamic methods due to processing speed (mastodon#2080) * Fix streaming server worker count (mastodon#2082) * Make sure we start at least one streaming worker, even if there's only one CPU and we're in production mode. * Oops, let's make sure we're counting cpus right too. * Translate onboarding dialog to japanese (mastodon#2062) * translate onboarding modal to japanese * fixed translation by feedback * Add "Mastodon" to user agent (mastodon#2073) Remove non-const version string Freeze option is unnecessary * Update storybook file autoload (mastodon#2057) * Simplify renders in views (mastodon#2084) * Simplify render in mailer views * Simplify render in about/more view * Simplify render in accounts follow views * Simplify render in recovery code views * Simplify render in stream entry embed * Simplify render in stream entries status partial * Simplify render in authorize follow new view * Moving aria-label to div.column (mastodon#1769) * Use landmark regions on columns Closes mastodon#1720 * Moving aria-label to div.column * fix admin input display (mastodon#1633) * Disable toot button when above 500 characters (mastodon#2088) * Disable toot button when above 500 characters * Consider multibyte characters * Consider spoiler_text * Admin reports with accounts (mastodon#2092) * Add a ReportFilter class * Add reports and targeted_reports relationships to Account * Use ReportFilter from admin/reports controller * Link to admin/reports filtered views from admin account show view * Add indexes to reports.account_id and reports.target_account_id * Instances list in admin (mastodon#2095) * Add admin/instances index action * Add link to instances admin page * View lists instances * Instances, grouped by domain, ordered by count * Use Account.remote scope * Extract method: Account.by_domain_accounts * Polish zh-cn js translation (mastodon#2090) * Polish zh-cn js translation * fixes for problems pointed out by gumblex in mastodon#2044 * more effectively differentiate between following/follower * Fix missing period (zh-cn js) Maybe squash this commit? * Fix duplicate word (zh-cn js) * Remove API authentication for public statuses (after review) (mastodon#1919) * Language detection refactor (mastodon#2099) * Extract detect_language to separate class * Use default locale, not just en * Add spec to confirm that whatlanguage cant identify empty string * Allow account locale to override default in language detector * PostStatusService supplies an account to detect language * Add rate limits for logins and sign-ups by IP (5 in 5 minutes) (mastodon#2079) * Add rate limits for logins and sign-ups by IP (5 in 5 minutes) Should be enough for normal attempts * Add rate limit for forgotten password form as well * missing translate ja.yml (mastodon#2100) * Add more tests for AtomSerializer (mastodon#2096) * Fix mastodon#1642, fix mastodon#1912 - Dictate content-type file extension (mastodon#2078) * Fix mastodon#1642, fix mastodon#1912 - Previous change (mastodon#1718) did not modify how original file was saved on upload * Fix for when file is missing * Remove unused fonts (mastodon#2103) * Fix wording on admin instances view, fix typos in language detector spec (mastodon#2106) * Update fr.yml (mastodon#2107) Just updated some values. Best regards, cyweo * update ja.yml (follow for mastodon#2106) (mastodon#2109) * update simple_form.ja.yml (follow for mastodon#1991) (mastodon#2113) * Update ja.yml (follow for mastodon#2118) (mastodon#2137) * Update ja.yml (follow for mastodon#2118) * typo fix * Restful refactor of accounts/ routes (mastodon#2133) * Add routing specs for accounts followers and following actions * Use more restful route naming for public account follow pages Moves two actions: - accounts#followers to accounts/follower_accounts#index - accounts#following to accounts/following_accounts#index Adds routing spec to ensure prior URLs are preserved. * Change to switch signature version for Amazon S3 (mastodon#2124) * Update title text for "reply all" button (mastodon#2118) * Make configuarable s3_permissions for paperclip (mastodon#2139) * Improve visibility of mute, block, report menu in Japanese (mastodon#2131) * Moves from hamburger icon to asterisk. (mastodon#2116) * Do not show link preview card if toot has a spoiler (mastodon#1617) * Do not show link preview card if toot has a spoiler * == to === * capistrano: link robots.txt (mastodon#1576) Related to mastodon#1533. * Install Yarn dependencies during setup (mastodon#1169) Previously the `bin/setup` script only installed the Ruby dependencies via Bundler. This is not sufficient to get the test suite to pass. We also need the JavaScript dependencies. This commit installs the JavaScript dependencies as part of the `bin/setup` script via Yarn. This allows for a successful bin/setup && bundle exec rake on a fresh clone of the repo. * enable to scroll the setting's page sidebar (mastodon#1347) * enable to scroll the setting's page sidebar add scroll:auto and use margin instead of padding for the bottom * Update admin.scss * Update admin.scss * Update admin.scss * Fix html escape characters in the URL (mastodon#2138) * fix character escaping in URL * add tests * put a comma after the last item * add HTML escape test * Remove unnecessary word from Japanese locale (mastodon#2143) * Replace User.count -> User.confirmed.count (mastodon#2127) * Attachment list for uncached attachments (mastodon#2110) * For undownloaded attachments, set type :unknown, display them as a list in the web UI * Fix case when attachment type is set explicitly * Simplify render in controllers (mastodon#2144) * Automatically change the size of textarea (mastodon#2128) * fix search text 'zero' (mastodon#2150) * Completed Italian translation (mastodon#2151) * Added it.jsx * Update index.jsx * Update mastodon.jsx * fix Japanese search result translation (mastodon#2149) add 'result' mean, '件' only mean count unit. * Add meta tags for OGP to following & follow page (mastodon#2052) * Add meta tags for OGP to following & follow page * simplify render helper * Follow up mastodon#2133 * og:type is only accounts/show * revert accounts/{following,followers} * Remove unused view files in accounts/ (mastodon#2153) * Fix possibility of unrightful webfinger redirect (mastodon#2147) * Fix possibility of unrightful webfinger redirect * Add more tests for FollowRemoteAccountService * Fix double-escaping of display names in <title> (mastodon#2155) * fix broken style when follower has long description (mastodon#2159) * Fix css for toot button when uploading images (mastodon#2161) * Fixed hungarian translation (mastodon#2158) * Dutch language strings: a few important fixes (mastodon#2163) * Extract error messages to locale file (mastodon#2162) * Add some Spanish translatoins (mastodon#2170) * Updated note about 'none' SMTP authentication method in .env.production.sample (mastodon#2167) * Fix mastodon#2108 - Fix gif uploads (mastodon#2171) * Fix mastodon#2108 - Fix gif uploads Add specs for media attachment gifv conversion * Add ffmpeg to travis * Make travis install ffmpeg, not libav * Switch travis to trusty
Remove unused methods:
set_counters_maps
andset_accounts_counters_maps
Account#followers_domains
User.prolific
Also:
Account.triadic_closures