Contribute to Open Source. Search issue labels to find the right project for you!

Add a new Vendor resource

rubyforgood/diaper

Summary

When creating Purchases, Diaperbanks need to be able to specify the vendor from whom they purchased it. This issue is to spike out a resource (modeled similarly to DiaperDriveParticipant or DonationSite), that is then made available to Purchases via a drop-down list.

This is low-priority until 2019 Q2 (Vendor integration is our next push)

Acceptance Criteria

  • [ ] Create a new Vendor model, with CRUD, scoped to an organization (crib heavily from DiaperDriveParticipant or DonationSite)
  • [ ] In Purchase, make the vendor selection be a drop-down list populated by that organizations Vendors; include an “Not Listed” option
  • [ ] When “Not Listed” is chosen, prompt the user with a modal to create a new Vendor, then select that Vendor on completion
  • [ ] Specs covering the basic CRUD functionality (like other resources)
  • [ ] 1 spec covering the “not listed” prompt feature
Updated 16/02/2019 21:20

Initial inventory seeding should be cast as an `Adjustment` instead of a `Donation`

rubyforgood/diaper

Summary

@pdxdiaperbank mentioned this issue previously in #682

When a new diaperbank is created, their initial inventory is uploaded via the CSV, and we’re entering it as a Donation. This throws off their numbers for the first year. We should be entering this in as an Adjustment instead, with the comment “Starting Inventory”

We may also need to adjust existing Diaperbank’s initial donations (they should be substantial in size) to be initial adjustments instead. This isn’t a trivial task (it would likely involve creating a new adjustment, replicating line_items from one to the other, and then saving the new one and deleting the old one), but it should be relatively straightforward. Since this is one-time work, it could either be done manually in console, or better yet, as a one-time rake task.

Reference

  • /app/models/storage_location.rb#import_inventory
  • /app/models/adjustment.rb

Acceptance Criteria

  • [ ] Replace the usage of Donation with Adjustment in #import_inventory
  • [ ] Create a spec in /spec/models/storage_location_spec.rb to cover this, and confirm that it does not change the number of Donations
  • [ ] Verify this manually
  • [ ] Complete the work of migrating the existing initial donations to adjustments
Updated 17/02/2019 00:57 1 Comments

Improve content of Partner Invitation email

rubyforgood/partner

@pdxdiaperbank sez:

…the email itself: This is the view from the inbox. Can we remove: “This is a preheader text. Some clients will show this as a preview…” and change it to be something else? Maybe the first sentence in the body of the email?

There is some placeholder (preheader) text that is showing up in the e-mail preview: 2

@pdxdiaperbank sez:

This is the body of the email. I circled a couple spelling errors. The yellow highlighted portion is my question: Can the partner organization ALREADY submit their diaper requests through PartnerBase? If not, maybe it shouldn’t state this yet?

3

The text in both cases is found in: * /app/views/mailer/invitation_instructions.html.erb * /app/views/mailer/invitation_instructions.text.erb

Criteria for Completion

  • [ ] Preview text either removed or changed to a short notice about the contents of the email
  • [ ] Spelling errors corrected
Updated 16/02/2019 19:57

Provide better UI context about side effects when adding new Partners

rubyforgood/diaper

Summary

@pdxdiaperbank sez:

After you hit “save”, the new partner agency AUTOMATICALLY receives an email invite to create PartnerBase account in order to complete an on-boarding questionnaire. My thoughts: There should be a warning to the user, or some kind of checkbox/confirmation asking whether the diaper bank wants to send the new partner agency the PartnerBase questionnaire right away. I had NO idea it was happening. Maybe TWO buttons? A “SAVE” button, as well as a “SAVE & SEND INVITATION TO PARTNER AGENCY” button? There are plenty of reasons why the user might want to create the account, but not send them the invite until a later time.

1

We shouldn’t surprise the user with side effects, such as e-mails being fired off. For this issue, change the button text to read “Send Inviitation”, instead of “Save”.

Reference: - /app/helpers/ui_helper.rb

Bonus

Identify any other pages that send e-mails and check that the buttons are similarly named.

Acceptance Criteria

  • [ ] The button text has been changed, using the UiHelper to render it
Updated 17/02/2019 00:58 3 Comments

NoMethodError when PlagiabotImporter query does not return results

WikiEducationFoundation/WikiEduDashboard

https://sentry2.wikiedu.org/wikiedu/p-e-dashboard/issues/2602/

NoMethodError: undefined method `each' for nil:NilClass
  lib/importers/plagiabot_importer.rb:24:in `find_recent_plagiarism'
    suspected_diffs.each do |rev|
  lib/data_cycle/constant_update.rb:62:in `update_revisions_and_articles'
    PlagiabotImporter.find_recent_plagiarism
  lib/data_cycle/constant_update.rb:37:in `run_update'
    update_revisions_and_articles
  lib/data_cycle/batch_update_logging.rb:30:in `run_update_with_pid_files'
    run_update # implemented by each update class
  lib/data_cycle/constant_update.rb:30:in `initialize'
    run_update_with_pid_files(:constant)
...
(36 additional frame(s) were not displayed)

NoMethodError: undefined method `each' for nil:NilClass
Updated 15/02/2019 20:57

Show changelog for formulae and casks

Homebrew/brew

See homebrew-changelog

@MikeMcQuaid @jbergstroem @shamrin @telemachus

A detailed description of the proposed feature

Following on from https://github.com/Homebrew/brew/issues/3399#issuecomment-340488771, this is an effort to introduce a changelog stanza into Homebrew and cask.

For this to be a thing it would need to be built like brew desc was: a community would need to amass these URLs for every (relevant) package in Homebrew in an external command in a third party tap and we’d consider merging it into Homebrew proper after that process is complete.

Hopefully this will follow the process of the description stanza, and so I am hoping to raise awareness of this external command I have implemented in this tap: ~~~ sh brew tap danielbayley/changelog brew changelog #formula brew cask changelog #cask ~~~

Contributions for changelog URLs are very welcome, and extremely easy to add; just a line of YAML in either brew.yml, or cask.yml.

Related to https://github.com/Homebrew/legacy-homebrew/pull/39911.

The motivation for the feature

Ability to quickly and easily view changelogs after formula/Cask updates.

How the feature would be relevant to at least 90% of Homebrew users

This feature would be very useful for anyone wanting to do the same, and has been requested a few times already. See https://github.com/Homebrew/brew/issues/2935 and https://github.com/Homebrew/brew/issues/3399.

What alternatives to the feature have been considered

The end goal is to eventually replace this external command with a changelog stanza.

Updated 17/02/2019 12:00 2 Comments

Request: Helm chart

octobox/octobox

💥 Proposal

What feature you’d like to see

A Helm chart for installing octobox in a Kubernetes cluster.

Motivation

The installation guide is awesome and offers a decent amount of ways of getting Octobox self-hosted. It would be awesome if a Helm chart existed to make running octobox in a K8s cluster a breeze.

Pitch

Elevator pitch: helm install --name octobox stable/octobox

Updated 15/02/2019 13:55 2 Comments

Add extra search results for related terms

publiclab/plots2

There might be multiple ways to do this, and there are a few goals:

  1. return search results for non-hyphenated terms when entering hyphenated terms, like purpleair when searching for purple-air (see https://github.com/publiclab/plots2/issues/3677#issuecomment-432246848)
  2. the reverse; returning results for hyphenated terms when entering non-hyphenated ones, so adding purple-air results when searching for purpleair (harder because there is no simple algorithmic way to add hyphens in, like maneatingcabbage => man-eating-cabbage or maneating-cabbage)
  3. we could also simply add in search results from associated terms based on a key-value listing, so when searching for discussion lists we could return mailing lists if we make a list of these term pairings. This could address the challenge of (2) above, but not sure what the implementation looks like.

Could be related to stemming/lemmatizing as in https://github.com/publiclab/plots2/issues/3666 and solution https://github.com/publiclab/plots2/pull/4533 by @shubhscoder.

Lemmatizer uses these dictionaries: https://github.com/yohasebe/lemmatizer/tree/master/lib/dict and I’ve opened an issue to ask about supplying custom dictionaries (this may also be helpful for different languages): https://github.com/yohasebe/lemmatizer/issues/5

However we may not want to “reduce” a word to a common core, rather, we may want to add additional search terms – so for example, we could simply supply a YAML file of pairs like:

purple-air: purpleair
purpleair: purple-air
h2s: hydrogen-sulfide

maybe in /config/initializers/matchwords.yml? - and we could match search terms against this in the transform() function here, adding them in:

https://github.com/publiclab/plots2/blob/e3cf2112469c8be284e541579d2bc02b62d39e7a/app/services/search_criteria.rb#L44-L48

So that a search for h2s would become a search for the query h2s hydrogen-sulfide

@shubhscoder this seems like it wouldn’t be too difficult. Do you have any interest in implementing this?

Updated 16/02/2019 19:21 5 Comments

SMS authentication

CodeForPortland/portlandconsul

How is the SMS code generated through a person’s interaction with their personal account?

Consul is using Devise for authentication. So now we’re looking at how to connect a user account with SMS through Devise.

This is Devise: https://github.com/plataformatec/devise

Devise Wiki with answers to frequently asked questions: https://github.com/plataformatec/devise/wiki

To use Devise in Rails for authentication: https://launchschool.com/blog/how-to-use-devise-in-rails-for-authentication

Rex Beatie is a member of Code for PDX and works with Twilio, a company specialized in authentication: https://www.twilio.com/docs/sms/tutorials/two-factor-authentication-ruby-rails

Then we’ll be testing the SMS authentication code sent to the mobile phone number provided, putting that code into the personal account on the site, and figuring out how to verify that each person only votes once per proposal as sketched out in the Help with resident voting:

After your identity has been authenticated, a one-time code will be sent by text. Enter that into “My code” on your personal account.

This process verifies that each account corresponds to an individual resident. Each person uses their actual first and last name. Your information is compared with the municipal register and after confirming you live in Portland, then a secure personal code to verify your account is sent through SMS to your mobile phone number. People are known here by their real names to maintain an online public forum where participants are accountable to each other.

Updated 17/02/2019 02:35

Integrate new autocompletion code from PublicLab.Editor

publiclab/plots2

This code is now out of date:

https://github.com/publiclab/plots2/blob/fe50428f4c56f12fcea92ae76343346d0421da70/app/views/editor/rich.html.erb#L326-L327

We have a great new autocompletion system in the Editor project, and are working on documenting/refining it here: https://github.com/publiclab/PublicLab.Editor/issues/55

This should allow autocompletion of @usernames, #tags, and :emoji: using the At.js library. A few more steps to complete the integration but this will be great! Any help appreciated both completing https://github.com/publiclab/PublicLab.Editor/issues/55 and here once that is complete.

Updated 13/02/2019 21:43 1 Comments

Cleanup ARGV usage

Homebrew/brew

Now we have a proper argument parser (thanks @GauthamGoli!) we should replace all uses of ARGV in the Homebrew/brew codebase with calls to Homebrew.args instead.

extend/ARGV.rb should be moved into https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cli_parser.rb where needed or removed where not. This may warrant changes to formulae and odeprecated.

Updated 16/02/2019 19:22 2 Comments

Automatically create pull requests based on Homebrew/livecheck/Repology

Homebrew/brew

Homebrew/livecheck provides various automated ways of detecting formulae updates.

Repology provides an API that provides details on whether a Homebrew package is outdated e.g. https://repology.org/metapackage/boost/versions

A separate application should be built to make use of these checks, verify that the results seem correct and open a pull request with relevant metadata on Homebrew/homebrew-core.

Updated 15/02/2019 08:55 4 Comments

Implement New Issue Report Flow in Database

CaravanTransit/Transit-Talk

Building off of the UI implementation work being done in #75, this issue seeks to rearchitect our database somewhat to reflect the most recent flow of the issue report form.

Detailed Description

Currently, our database architecture reflects the fields present in the live prototype of the application deployed on Heroku. However, the issue report form has changed significantly since then (see the Marvel prototype here: https://marvelapp.com/g49gbf9/screen/52878563), and schema will need to be changed to accommodate information that’s present in the latest version of the form.

Possible Implementation

This issue is interlocked with #75 somewhat, so whoever tackles it should be in close collaboration with anybody working on #75. This new database architecture can be implemented before the UI is built out, but the UI buildout won’t function properly until the database architecture is finished.

Updated 13/02/2019 14:27

Integrate `brew cask install` into `brew install`

Homebrew/brew

I did a quick search but didn’t find such discussions. Sorry for the noise if it has already been discussed somewhere.

A detailed description of the proposed feature

Make brew install be able to also install casks. (Assuming there doesn’t exist such cask whose name is also a brew package)

The motivation for the feature

Currently there is inconsistency and confusion for me when installing cask apps: - We can only use brew search <name> to search available casks (instead of brew cask search which is deprecated and integrated into brew search). - We can only use brew cask install <name> to install cask (instead of brew install which comes naturally after the search).

How the feature would be relevant to at least 90% of Homebrew users

Many users use brew cask have to use different commands for cask search and install.

What alternatives to the feature have been considered

To maintain consistency, we can also keep brew cask search as an alias to brew search --casks.

Related: https://github.com/Homebrew/brew/issues/4254

Updated 13/02/2019 13:06 2 Comments

Make schemas quack like procs/lambdas

dry-rb/dry-schema

At the moment you use schemas like:

    ClientRequest = Dry::Schema.Params do
      required(:request_id) { filled? > str? }
      required(:client_logid).filled(:string)
      required(:name).filled(:string)
      required(:currency).filled(:string)
    end

  ClientRequest.call(client_logid: 'foo', name: 'Foo', currency: 'EUR')

if you were to mix in something like this into Dry::Schema.Params:

module Functional
  def method_call
    method(:call)
  end

  delegate :>>, :<<, to: :method_call

  alias_method :as_proc, :method_call

  def [] *args, &block
    call(*args, &block)
  end
end

you would get full inter-operability with the “ruby lambda ecosystem”, ie:

  1. use the same short syntax for calling schemas like you do with lambdas ClientRequest[client_logid: 'foo', name: 'Foo', currency: 'EUR']
  2. you would get compatibility with rxruby and similar functional libraries
  3. you would be able to use Ruby 2.6 function composition ie: (UserValidator >> ApiValidator >> SomeProcOrMethodDoingValidating)[request]

I have been using “functional” mixins with “single public method classes” in my code for years now, I have only good things to say about it and the flexibility it allows you to play with and mix components :+1:

Updated 16/02/2019 18:49 1 Comments

"Did-you-mean" support

kbsecret/kbsecret

It would be nice for the kbsecret CLI to provide “did-you-mean” suggestions for misspelled record labels.

For example, the current behavior of kbsecret login:

$ kbsecret login foobarbar
Fatal: No such record(s).

With “did-you-mean”:

$ kbsecret login foobarbar
Fatal: No such record(s).
Did you mean: foobarbaz?

Open to suggestions on how to implement this.

Updated 09/02/2019 04:21

how to force a stub to raise an exception?

k1LoW/awspec

I’m trying to fix an issue with Awspec::Type::SnsTopic: when there is no SNS Topic with the given ARN, an exception Aws::SNS::Errors::NotFound is raised by the AWS::SNS::Client.

In some tests this generates some inconsistences: in some cases the exception Awspec::NoExistingResource is raised, sometimes the Aws::SNS::Errors::NotFound.

I already have #444 to fix that (evaluated through a real connection with AWS), but now I’m struggling to make the stub generate an exception. The fact is, different from other classes that may return an empty response, AWS::SNS::Client raises the exception, so I can’t just add an empty response.

I was able to find this official documentation but I wasn’t able to far to figure out how to manipulate the SNS client creation and provide the parameters as described by the documentation.

Updated 11/02/2019 16:34

Clean up the uploader

zwagoth/e621ng

The code for the uploader seems to be very complex for the tasks that it is undertaking. It may benefit from being refactored and simplified. For example, the use of the preprocessor seems extraneous from the limited digging that I did.

Updated 08/02/2019 03:01

Limit file upload size

publiclab/mapknitter

We currently allow users to upload files of size greater than 10 mb despite the fact that Image Upload tab carries note - “10mb max” for file size.

I uploaded the image of size 16.2 MB here- https://mapknitter.org/maps/lireille and no error was thrown.

The goal of this issue is to throw the error if file size if greater than 10mb.

Relevant issues: https://github.com/publiclab/mapknitter/issues/105 https://github.com/publiclab/mapknitter/issues/203

Thanks!

Updated 07/02/2019 23:26 2 Comments

Improving documentation

gdgnewdelhi/commudle

Here’s the steps you can follow:

  1. Setup and run the code on your system.
  2. While following the steps if there’s any bugs, places you get stuck (some obvious things you think need to be added), add them to the comments here to be verified by the admin
  3. Once verified, create a PR to update the documentation
Updated 09/02/2019 17:46 8 Comments

non-unique id in comment form - possibly related to comment bugs

publiclab/plots2

Noticed this error when loading a note page:

[DOM] Found 2 elements with non-unique id #comment-form: (More info: https://goo.gl/9p2vKq) <form class=​"comment-form bound-success bound-beforeSend bound-error bound-keypress" id=​"comment-form" data-remote=​"true" action=​"/​comment/​create/​18114" method=​"post">​…​</form>​

image

I think this could be responsible for some bugs - first:

  1. Propose Title is not working - nothing happens when i click it, in the comment form (see below)
  2. could it potentially be related to #4617, image upload in comments?

image

Updated 06/02/2019 21:00 1 Comments

Display comments in per-tag stats graphs

publiclab/plots2

Related to https://github.com/publiclab/plots2/issues/4541, I think it would be great to be able to see how many comments have been made on all posts which bear a given tag, sort of to see how much “chatter” there’s been in a topic area. We could stack this over the existing graphs in #4693, which is where this would be especially useful!

@cesswairimu what do you think?

Updated 10/02/2019 11:46 1 Comments

Support multiple profiles

k1LoW/awsecrets

We’re using awspec to test our resources and one of the things we’re testing is dns delegation between accounts. In TF you just create an additional aws provider and give it a different profile/credentials. Then specify that for a given resource. However testing that is difficult. I was thinking if we could either do an Awsecrets.load and give it a block (the given test/block of tests) It would use different credentials for that.

Our current workaround is to have 2 separate spec files and reset the ~/.aws credentials between those two. Maybe a better option is a setup/teardown for a test loading different yamls?

Updated 17/02/2019 07:58 3 Comments

Sets

zwagoth/e621ng

Sets have been renamed to Favorite Groups, and they are a subset of the features that exist on e621.

Need to unify favorite groups and bring them back up to speed with the feature set that exists on e621.

Need to investigate if removing favorite groups, and writing sets from scratch is a good option, or if renaming them, adding missing features, and updating the UI is the easier route.

Updated 06/02/2019 00:56

Remove reliance on Amazon SQS for microservices

zwagoth/e621ng

Ideally this should be a configurable drop in that supports both through an interface class, but a simpler replacement with a Redis/AMPQ based queue can be enough if time constrained.

Investigation of which queue systems might best support the needs of the site is required for this.

If anyone has any suggestions for a readily accessible gem that does reliable queues, that would be helpful.

Updated 06/02/2019 00:51

Yay! We're live!

gdgnewdelhi/commudle

Just announcing this, as I am really excited that this code is finally live. Let’s talk more about the different verticals we can grow this platform towards.

And yes, here’s the link: https://www.gdgnd.org

Updated 09/02/2019 18:56 2 Comments

Expandable graphs

publiclab/plots2

The new graph on stats page is quite awesome ref1 But it only covers 52 weeks from the start date and we now have zoom buttons. If you zoom out of the 52 weeks the graph does not expand ref2 It should be able to have a expand beyond the 52 weeks

https://github.com/publiclab/plots2/blob/75f2b453935476d24194c05c4dc55db0c27508cf/app/controllers/stats_controller.rb#L54-L56

Or restructure the graph_making method on models e.g https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L190-#L210

Updated 05/02/2019 19:04 1 Comments

ability to go directly to `/subscribe/multiple/tag/tag1,tag2` and correctly enter and login

publiclab/plots2

Follow-up to #4739, we should make sure you can go directly to /subscribe/multiple/tag/tag1,tag2 and correctly enter and login, and get subscribed to those two tags.

It should be working:

https://github.com/publiclab/plots2/blob/5cde763bbdc3bfb9b91c26d68389285050b5ba8c/app/controllers/subscription_controller.rb#L178-L179

https://github.com/publiclab/plots2/blob/5cde763bbdc3bfb9b91c26d68389285050b5ba8c/app/controllers/user_sessions_controller.rb#L142

but it isn’t on unstable. Let’s debug this, potentially with an integration test?

Updated 05/02/2019 00:49

Detect subscriptions in signup `return_to` param and correctly subscribe new users in one step

publiclab/plots2

Currently, people can be directed to the signup form with the following format:

https://stable.publiclab.org/signup?return_to=/subscribe/multiple/tag/arduino,games (for example)

That means they should get signed up in that form (and it works the same in the modal signup), and then upon making an account, get redirected to /subscribe/multiple/tag/arduino,games, which will subscribe them to the 2 tags arduino and games and then AGAIN redirect them to /subscriptions.

But this doesn’t happen - you just get directed to the /dashboard page and you see the standard welcome page, though you do get shown an option (in the long welcome alert) to “pick up where you left off” with a link:

https://github.com/publiclab/plots2/blob/a3918357e87f01149aaf35251adc6899e0ee2c84/app/controllers/users_controller.rb#L28-L32

Let’s think about how we want people to be signed up. New users shouldn’t be dropped off on the subscriptions page; that makes sense.

Maybe we should… detect the return_to=/subscribe/multiple/tag/arduino,games format, or the params[:return_to] and parse it to see if there are subscriptions in there?

Could we match /subscribe/multiple/tag/arduino,games and actually parse out the tagnames to subscribe them automatically?

Other ideas? What’s best here?

Updated 05/02/2019 00:47

Paypal updating identity API

jonhue/omniauth-paypal-oauth2

Is your feature request related to a problem? Please describe. Yes, my company notice that paypal is updating their identity api - “PayPal will make a change to the Identity API … Depending upon how your integration consumes the API, you may need to make changes by March 4, 2019”. Looking at the docs they linked us to (https://developer.paypal.com/docs/api/identity/v1/#userinfo) it looks like the route to /userinfo has changed from /v1/identity/openidconnect/userinfo to /v1/identity/oauth2/userinfo

Describe the solution you’d like The load_identity method needs to reference the new api endpoint and consume the updated raw_info

Describe alternatives you’ve considered N/A

Additional context N/A

Updated 05/02/2019 07:39

Internal Server Error when used with checklists plugin and redmine 4.0.1

akiko-pusu/redmine_issue_templates

I’ve upgraded to Redmine 4.0.1 and I’m using redmine_issue_templates besides redmine_checklists. After the update and using the latest version of both plugins I was unable to open project settings: ``` Processing by ProjectsController#settings as HTML Parameters: {“id”=>“”} Current user: (id=8) Rendering projects/settings.html.erb within layouts/base Rendered projects/settings.html.erb within layouts/base (60.9ms) Completed 500 Internal Server Error in 71ms (ActiveRecord: 2.3ms)

ActionView::Template::Error (super: no superclass method `project_settings_tabs' for #<#<Class:0x0055ea476c26b8>:0x0055ea44c63688> Did you mean? project_settings_tabs_with_checklists): 1: <h2><%=l(:label_settings)%></h2> 2: 3: <%= render_tabs project_settings_tabs %> 4: 5: <% html_title(l(:label_settings)) -%>

plugins/redmine_issue_templates/lib/issue_templates/projects_helper_patch.rb:6:in project_settings_tabs' plugins/redmine_checklists/lib/redmine_checklists/patches/projects_helper_patch.rb:37:inproject_settings_tabs_with_checklists' plugins/redmine_issue_templates/lib/issue_templates/projects_helper_patch.rb:6:in project_settings_tabs' app/views/projects/settings.html.erb:3:in_app_views_projects_settings_html_erb__2052146827629815602_47232358820880' lib/redmine/sudo_mode.rb:63:in `sudo_mode' ```

After reading about similar problems, I stumbled across this line: https://github.com/akiko-pusu/redmine_issue_templates/blob/3a29bdd8078ba144e5dc27a0dc000b12a0a05dbf/lib/issue_templates/projects_helper_patch.rb#L18 after changing this to ProjectsController.send :helper, IssueTemplates::ProjectsHelperPatch it looks like everything is working fine again.

I’m by no means familiar with redmine development, so I’m not sure if this is really the way to solve this. Maybe someone can have a look and properly fix this.

Updated 12/02/2019 00:23 2 Comments

DB name should be escaped during migration

huginn/huginn

When running the db migration, a dash in the database name causes a syntax error:

-- execute("ALTER DATABASE leda-db CHARACTER SET utf8 COLLATE utf8_unicode_ci") causes Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-db CHARACTER SET utf8 COLLATE utf8_unicode_ci' at line 1

I can reproduce this in a mysql console. I can also see that running

ALTER DATABASE `leda-db` CHARACTER SET utf8 COLLATE utf8_unicode_ci" (escaping the database name) succeeds.

Mysql 5.7, and I am using the huginn/huginn-single-process docker image.

Updated 04/02/2019 09:59 1 Comments

Redesign schools view

YACS-RCOS/yacs

Is your feature request related to a problem? Please describe. The Schools view (the Yacs homepage) works fine, but with the updates we have made to the other views it is looking a little dated.

Describe the solution you’d like Open to any ideas! The new design should be consistent with the other recent design changes, but exactly how it should look is up for discussion!

Describe alternatives you’ve considered We could certainly re-use the “card” style we use for listings now, but this is not a requirement, and I’m not sure how good it would look. We also aren’t limited to the small amount of information that is currently on there. Perhaps it would be nice to show the number of listings available in each subject, for example.

Additional context What it looks like now: image

Updated 15/02/2019 20:04 2 Comments

Altering selections should not cause the sidebar to reload

YACS-RCOS/yacs

Describe the bug Whenever the user selects or deselects a listing or section, the sidebar is completely reloaded and redrawn, causing any listings that were expanded to collapse. This is very jarring and unpleasant, especially if you are selecting or deselecting from the sidebar itself.

To Reproduce Steps to reproduce the behavior: 1. Select a listing 2. Expand the sidebar 3. Expand the listing in the sidebar 4. Select or deselect a section from that listing OR select another listing 5. Observe the sidebar updates to reflect the selection change, BUT the listing collapses in the sidebar

Expected behavior The sidebar should update to reflect any selection changes, without reloading the entire component or otherwise causing expanded listings to collapse.

Screenshots N/A

Desktop (please complete the following information): - OS: any - Browser any - Version any

Smartphone (please complete the following information): - Device: any - OS: any - Browser any - Version any

Additional context N/A

Updated 11/02/2019 02:11

WebUI: A web interface for Lich scripts

elanthia-online/scripts

I created a proof-of-concept version of ;webui but would like to pick it up again in the future. Moving some notes here and closing out the PR.

Summary

Basic proof of concept of web app for presenting a configuration UI and info display from lich scripts. The server spawns in a separate thread and renders a server-rendered UI for editing Lich variables and WebUI server settings. I started to separate some concerns to create the beginnings of a framework that other scripts could use as well, but wanted to get some feedback before I committed to any direction.

Here are some screenshots:

webui_lichvars webui_settings

Design Overview

An explicit goal of this script was to only use gems available in the Ruby standard library. I generally avoid WEBrick in production because it is single-threaded, but I felt like it worked well enough for this purpose. I implemented a server-side UI built around HTML forms using ERB as a templating engine.

I considered using JS to render the UI on the front end and providing a RESTful API, but adding another layer on top of Ruby and HTML/ERB felt like a lot of languages for one lich script. I do think there would be advantages to that approach like real time updates (e.g. health/mana/etc) and advanced browser features like notifications, but I think that can be explored outside of this script which is focused on the server.

The framework provides a container servlet (this is a WEBrick concept) that handles shared server tasks and accepts a list of apps that are rendered as separate pages in the UI. Each app can define the paths it responds to declaratively using a super simple router, associating each path with an Action, which is kind of like a very dumbed down controller/method object for responding to the request.

The Lich variables are an example of a script-specific page, but the goal of the Settings page is to provide a generic subapp that can be reused in other scripts.

Some Known Issues

Values are all stringly-typed

All input comes into the server as strings and it doesn’t try to coerce the values to any other type before updating them. It can display other types of values, but updating something like a boolean or Hash will overwrite it with a String.

I think Boolean and Fixnum values are fairly straightforward to address, but Hashes are a little more complicated. While we could accept a full hash and coerce it in the server, we would need to use Ripper to avoid RCE and it wouldn’t be a great UI for people editing values. I think it makes more sense to create a UI that it aware of nested Hashes as a common variable/setting type and supports editing/adding entries inside of the hash. Interested in other opinions on this though.

General Settings UI

I have the template for WebUI settings basically hardcoded right now, but would like to provide a way for the app to generate UI based on either the existing settings or preferably by passing some kind of schema declaration to WebUI::Settings. I started creating a SettingsSchema class to define name/type/defaults for settings, but punted on it for now to explore at a later date in the future.

Port Selection / Multiple Servers

Right now this is kind of annoying to use with multiple characters because it requires each server to listen on a different port. While I did create a setting for it, the server could also support a method for attempting to find an available port to listen on and reporting this to the user. I think this problem would become more annoying if multiple scripts had separate WebUI servers running and it might make more sense to have other scripts register their pages with the main web server instead of spawning their own.

Updated 01/02/2019 03:49 1 Comments

ssm parameters does not work when ssm parameters are paginated

k1LoW/awspec

When you have ssm parameters > 50 in your aws account, then parameters “on the second page” are not found

I had a similar issue with the AWS Cli where results are paginated to 50 results per “page”.

https://docs.aws.amazon.com/cli/latest/reference/ssm/get-parameters-by-path.html https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html

Updated 14/02/2019 23:25 3 Comments

http_get: failure to connect to the server halts the whole suite

jantman/serverspec-extended-types

While provisioning a new machine, I have noticed that I use http_get and the server is not yet available (e.g. nginx not installed), instead of just failing this group of test, it will cause the whole ServerSpec suite to crash.

I presume this is because some connection occurs at initialize time.

Not a huge problem but I thought I’d report it, still!

Updated 31/01/2019 21:00 1 Comments

Yacs-Web should be a PWA

YACS-RCOS/yacs

Is your feature request related to a problem? Please describe. We often get requests from users and developers to create a mobile app. We have had plans for a while to make the site mobile-friendly, and we’ve done that. We now need to package yacs-web as an app.

Describe the solution you’d like As a first step in this direction, we should make yacs-web a PWA. This is fairly simple, and provides much of the benefits of a “real” app (at least according to Steve Jobs in 2007).

Describe alternatives you’ve considered We ultimately want to package the yacs-web in Apache Cordova, but that is a little more work and a PWA is very easy.

Additional context There are a few other things to fix on the mobile view before we should advertise this, but its pretty much there.

Updated 02/02/2019 23:36

Show section status if available, and only show seat information if available

YACS-RCOS/yacs

As per #398 a new field status will be available on sections. We want to display this if it is available (if it is not null), either alongside or in place of the seats and seats_taken fields.

Additionally, if either seats or seats_taken are null, that information should not be displayed, and only the status should be displayed.

If status, seats, and seats_taken are all null, then neither of them should be displayed.

Before implementing this (or during), please post a screenshot or mockup of what it will look like in all four cases.

This issue will require editing the section template, and possibly the section controller.

This issue was migrated from https://github.com/YACS-RCOS/yacs-web/issues/48

Updated 02/02/2019 23:36

Ruby version update

publiclab/mapknitter

Hi, we are using very old ruby version 2.1.2 which is troubling with the installation.

Errors I faced: 1. Error running ‘__rvm_make -j8’ while installing ruby 2.1.2

Solved by rvm get head After completing installation of ruby version, I switched to it.

  1. I ran bundle install and got below error
ZenTest-4.11.1 requires rubygems version < 3.0, which is incompatible with the
current version, 3.0.2

I deleted the Gemfile.lock and ran bundle install again.

  1. After that I got this error in bundle install
Gem::RuntimeRequirementNotMetError: nokogiri requires Ruby version >= 2.3.0. The
current ruby version is 2.1.2.95.
An error occurred while installing nokogiri (1.10.1), and Bundler
cannot continue.
Make sure that `gem install nokogiri -v '1.10.1' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  aws-sdk was resolved to 1.5.8, which depends on
    nokogiri

Many new user would be going through the same situation if they try to switch from plots2 to mapknitter and without using too because our dependencies are old and conflicting.

@jywarren should we update ruby version and important gems first to make installation easier for contributors? Thanks!

Updated 30/01/2019 22:15 3 Comments

Dynamically determine helpers require path.

googleapis/gapic-generator-ruby

What

In client/_helpers.erb#L5 the require path for the client helpers should be dynamically determined. The path of the helpers should be based on the namespace of the service.

Data

The data for the namespace can be access through the Google::Gapic::Schema::Service#address attribute. This address will return a list of strings in which the last string is the name of the service.

For speech this would look like: rb service.address # => ["google", "cloud", "speech", "v1", "Speech"]

How

To generate this require path, simply join the service address on “/” without the final string.

Updated 30/01/2019 18:44

Client Documentation

googleapis/gapic-generator-ruby

What

In client.erb#22, the documentation for the client is not being generated. This documentation should be the documentation of the service from the protos as well as the public attributes of the client.

Data

The data for the client documentation can be accessed through the Google::Gapic::Schema::Service#docs method. This method returns a Google::Protobuf::SourceCodeInfo::Location type in which you can access the leading, trailing, and leading detached comments.

How

Grab the comments from the docs method and format them as comments.

Updated 30/01/2019 18:44

Automatic redirect

enriclluelles/route_translator

Is there a config option that will automatically redirect requests that don’t match the localized path for the current locale? For example,

If someone on the :es/Spanish locale were to visit (dog_path or dog_en_path): https://es.my-site.com/dog

The desired behavior would be to redirect them to (dog_es_path): https://es.my-site.com/perro

This was previously requested in #66 but rejected.

Updated 30/01/2019 14:58 1 Comments

Email digest follow-up changes list

publiclab/plots2

Our daily email digest is now working! Now we have a few follow ups to do.

  • [ ] Images seem broken
  • [ ] dates on posts don’t seem right
  • [ ] are we sure the same posts aren’t being sent out multiple times?
  • [ ] daily digest is labeled weekly
  • [ ] looks like maybe updated wiki pages are included? If so we should present them a bit differently
  • [ ] some page width oddities on a smartphone

Overall this is very exciting!

Updated 14/02/2019 19:04 36 Comments

Dangerbot not leaving comments on PR (broken?)

publiclab/plots2

I noticed recently Dangerbot seems not to be leaving messages on PRs, or maybe just not on all PRs? Is it erroring out? Let’s look for some failure point – see for example #4511 and this Travis run:

https://travis-ci.org/publiclab/plots2/builds/485926486

Here’s our current .travis.yml:

https://github.com/publiclab/plots2/blob/master/.travis.yml#L27-L34

Noting also the setup notes here: https://danger.systems/guides/getting_started.html#setting-up-danger-to-run-on-your-ci

Updated 06/02/2019 15:50 3 Comments

Mute/hide pinned search results from Inbox

octobox/octobox

💥 Proposal

What feature you’d like to see

It would be nice to be able to hide certain notifications by default. For this pinned searches could be used with a flag to filter out those notifications out that match the critera out or the results.

Pitch

Having this feature would allow to better priorities notifications that really need attention. Using pinned searches for this would make it possible to filter based on organisations and down to certain repositories. It would/should not use GitHubs Mute setting on repositories, but simple hide them for as long as the flag is enabled for a pinned search.

Updated 30/01/2019 12:13 2 Comments

its(:propagating_vgws) Syntax

k1LoW/awspec

Under the describe route_table resource, I’m wanting to use its(:propagating_vgws) argument. When I try to use this, I get the following error:

:in `block (3 levels) in <top (required)>'

I think my syntax is wrong in how I’m including the vgw_id.

its(:propagating_vgws) { should include "#{vgw_id}" }

Please advise.

Updated 31/01/2019 13:52 1 Comments

[Welcoming] Suggest new changes & Report Bugs

publiclab/mapknitter

(Work in progress! Please help!)

As part of our ongoing work to welcome newcomers, we need people to tell about bugs and suggestion, and troubleshoot the issues they encounter. This will help newcomers get started in a codebase they may not be familiar with!

### Find a bug or a suggestion Whether it is on publiclab.org main website, or in it’s editor or any other repository create an issue for it in the respective repository. The issues can be related to

  • Testing
  • Coding bugs
  • Outreach
  • Suggest a design
  • Suggest a new feature
  • Documentation suggestions
  • Documentation errors

### Find suitable code links and add them Add code links to the issues/suggestions if possible See #311 for more detailed stuff.

Updated 30/01/2019 18:56

Login Project

publiclab/mapknitter

Following problems observed: * No proper login/signup for the website. Relies on pl.org for activity * Improper usernames are not entertained with flash messages * User who has given access to mapknitter once has to give it whenever they login * Sign up mapknitter basic+alternative flow missing * OAuth missing * email does not work instead of username * Clicking No option on pl.org enables the user to be logged in * error while user is not logged in at pl.org and tries to login to the mapknitter * if we are using third party(pl.org here) authentication at mapknitter it should redirect to the same page * also, opening up of pl.org should be in a new tab

Refer #300. What do you suggest @jywarren?

Updated 10/02/2019 12:13 8 Comments

Support bins: option in value_counts

mrkn/enumerable-statistics

bins: should be an integer or an array of integers.

If an integer bins is given, the values are grouped into half-open bins.

If an array of integers is given as bins, the array elements represent the lower limits of each bin. The array must increase monotonically.

Example

>> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: 4)
{ (1.0 ... 2.25) => 5,
  (2.25 ... 3.5) => 1,
  (3.5 ... 4.75) => 2,
  (4.75 ... 6.005) => 2 }

>> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: [1, 2, 3, 4, 5, 6], dropna: false)
{ (1 ... 2) => 3,
  (2 ... 3) => 2,
  (3 ... 4) => 1,
  (4 ... 5) => 2,
  (5 ... 6) => 1,
  nil => 1 }

>> [1, 2, 1, 1, 3, 4, 4, 5, 2, 6].value_counts(bins: [1, 3, 5, 7])
{ (1 ... 3) => 5,
  (3 ... 5) => 3,
  (5 ... 7) => 2 }
Updated 03/02/2019 04:48

截至目前 2019.1.24 文件总大小已达到 1.10 GB

komeiji-satori/Dress

tim 20190124145950

似乎已经达到 Github 仓库的最大限制。

We recommend repositories be kept under 1GB each. This limit is easy to stay within if large files are kept out of the repository. If your repository exceeds 1GB, you might receive a polite email from GitHub Support requesting that you reduce the size of the repository to bring it back down.

In addition, we place a strict limit of files exceeding 100 MB in size. For more information, see “Working with large files.”

Updated 02/02/2019 15:38 19 Comments

HTTP requests to arbitrary path

abonas/kubeclient

A few use cases have come up over time for making arbitrary HTTP requests to the server, that probably don’t justify builtin methods in kubeclient. Generally, users wish the library covered 100% of their needs, but it’s not always reasonable to inflate API surface (especially for k8s derivative-specific stuff like openshift), nor to force users to wait until their use case is added to the library.

Use cases

  • 170 /healthz (k8s), /healthz/ping, /healthz/ready (possibly openshift specific?).

  • 309 /version (k8s), /version/openshift.

  • 245 unclear what exactly desired but compared to kubectl cluster-info which hits many URLs.

  • 388 querying /apis and /apis/SOMEGROUP ? Maybe deserves native support.

Non-goals, until proven otherwise

  • Arbitrary headers? Only case I remember is patch formats #268 but that’s for an existing method and we decided to add native support #357.
  • Arbitrary methods?
    • 353 needs POST but also WebSocket and lots of low-level stuff, not “simple escape hatch” material!

Shouldn’t expose underlying client

I think adding a generic “custom request to this path” is a good escape hatch, IFF we can cover it with a small API.

Technically, you can already do arbitrary requests via kclient.create_rest_client(path).get.body but that’s deliberately undocumented, we’d like to switch away from RestClient (#237, more pressing as RestClient is presently unmaintained). Even if we switch, by same logic, kubeclient shouldn’t tie its API to specific client.

Proposed minimal viable API

kclient.http_get(path, as: :ros)

Performs GET request.
path is relative to api server “root” (cf. #318), not this Client’s apis/group/version.
Does kubeclient-typical error handling and parsing (use as: :raw to get unparsed string).

Updated 31/01/2019 13:25 1 Comments

JS code generation gets faster?

effective-spa/jsrb

(known issue provided by author)


JavaScript code generation performance depends on ExecJS+escodegen

jsrb currently generates JavaScript code from AST via ExecJS and escodegen (javascript library) because of development’s easiness. It’s not potentially required for the code generator to be processed by JavaScript engine. And could be improved with rewriting in Ruby.

This affects its performance in the long run. Needs investigation.

Updated 23/01/2019 00:33

Deploy images from the Amazon AWS ECR registry?

puppetlabs/puppetlabs-docker

I would like to deploy docker images stored in the AWS ECR “Elastic Container Registry”.

The login process is described at https://docs.aws.amazon.com/AmazonECR/latest/userguide/docker-basics.html#use-ecr. Basically, you need to execute the command aws ecr get-login --no-include-email from their CLI tool. This will print the docker login command with a password/token that is valid for 12 hours.

They also have a “credentials helper” available at https://github.com/awslabs/amazon-ecr-credential-helper. This seems to be a wrapper that docker will execute when it needs to login, and it will run the above command in turn.

So, my question is: Has anybody managed to use this module with the AWS ECR? What steps are necessary? What tweaks to this module would be needed to make it work?

Updated 25/01/2019 00:02 3 Comments

OD1 BAG file details to aid in processing a migration

OregonDigital/hyrax-migrator
  • [ ] {oregon digital PID}_RELS-EXT.xml : has the Fedora model (use this as a crosswalk/lookup to find the OD2 model), although it may be best to use the descMetadata.nt
  • [ ] {oregon digital PID}_descMetadata.nt : has the full n-triples metadata
  • [ ] {oregon digital PID}_content.* : The original file
  • [ ] {oregon digital PID}_rightsMetadata.xml : One thing pulled out of here to aid in collection? association. @wickr?
Updated 22/01/2019 18:29

本家v2.7.0追従へのハッシュタグタイムラインの改修方法

imas/mastodon

@fvh-P @takayamaki お疲れ様です。 v2.7.0 マージPRを作っていて困ったことになりましたので相談させてください。

今回のverupで、Add joining several hashtags in a single column #8904 の改修が入っていて、 これが既に実装済みのハッシュタグタイムライン周りとコンフリクトとしてます。

アイマストドン v2.7.0
7e2afb48269033bc ede1da97087fece0

お手数ですが方針をご検討頂けないでしょうか。 よろしくお願い致します。 (一旦、本家の状態にタイムラインに未収載を含めるかどうかの分岐だけ マージした状態でリリースして、後ほど必要な機能を復活させていくのがベターですかね)

<details> <summary>ちなみに今コンフリクト起きてるdiffです(5ファイル)</summary>

diff --cc app/javascript/mastodon/actions/streaming.js
index 68279c4b3,cd319709d..000000000
--- a/app/javascript/mastodon/actions/streaming.js
+++ b/app/javascript/mastodon/actions/streaming.js
@@@ -51,6 -51,6 +51,6 @@@ const refreshHomeTimelineAndNotificatio
  export const connectUserStream      = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);
  export const connectCommunityStream = ({ onlyMedia } = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);
  export const connectPublicStream    = ({ onlyMedia } = {}) => connectTimelineStream(`public${onlyMedia ? ':media' : ''}`, `public${onlyMedia ? ':media' : ''}`);
- export const connectHashtagStream   = (tag, isLocal) => connectTimelineStream(`hashtag:${tag}`, `hashtag${ isLocal ? ':local' : '' }&tag=${tag}`);
 -export const connectHashtagStream   = (id, tag, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag&tag=${tag}`, null, accept);
++export const connectHashtagStream   = (id, tag, isLocal, accept) => connectTimelineStream(`hashtag:${id}`, `hashtag${ isLocal ? ':local' : '' }&tag=${tag}`, null, accept);
  export const connectDirectStream    = () => connectTimelineStream('direct', 'direct');
  export const connectListStream      = id => connectTimelineStream(`list:${id}`, `list&list=${id}`);
diff --cc app/javascript/mastodon/actions/timelines.js
index a693f4ca7,6e7bd027c..000000000
--- a/app/javascript/mastodon/actions/timelines.js
+++ b/app/javascript/mastodon/actions/timelines.js
@@@ -79,10 -96,17 +96,21 @@@ export const expandCommunityTimelin
  export const expandAccountTimeline         = (accountId, { maxId, withReplies } = {}) => expandTimeline(`account:${accountId}${withReplies ? ':with_replies' : ''}`, `/api/v1/accounts/${accountId}/statuses`, { exclude_replies: !withReplies, max_id: maxId });
  export const expandAccountFeaturedTimeline = accountId => expandTimeline(`account:${accountId}:pinned`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true });
  export const expandAccountMediaTimeline    = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true });
++<<<<<<< HEAD
 +export const expandHashtagTimeline         = (hashtag, { maxId, isLocal } = {}, done = noOp) => expandTimeline(`hashtag:${hashtag}`, `/api/v1/timelines/tag/${hashtag}${isLocal ? '?local=true' : ''}`, { max_id: maxId }, done);
++=======
++>>>>>>> v2.7.0
  export const expandListTimeline            = (id, { maxId } = {}, done = noOp) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId }, done);
+ export const expandHashtagTimeline         = (hashtag, { maxId, tags } = {}, done = noOp) => {
+   return expandTimeline(`hashtag:${hashtag}`, `/api/v1/timelines/tag/${hashtag}`, {
+     max_id: maxId,
+     any:    parseTags(tags, 'any'),
+     all:    parseTags(tags, 'all'),
+     none:   parseTags(tags, 'none'),
+   }, done);
+ };

- export function expandTimelineRequest(timeline) {
+ export function expandTimelineRequest(timeline, isLoadingMore) {
    return {
      type: TIMELINE_EXPAND_REQUEST,
      timeline,
diff --cc app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js
index f844a52f4,9c9f62d82..000000000
--- a/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js
@@@ -1,93 -1,100 +1,190 @@@
  import React from 'react';
  import PropTypes from 'prop-types';
  import ImmutablePropTypes from 'react-immutable-proptypes';
++<<<<<<< HEAD
 +import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
 +import Button from '../../../components/button';
 +import SettingToggle from '../components/setting_toggle';
 +import SettingText from '../components/setting_text';
 +import { Map as ImmutableMap } from 'immutable';
 +
 +const messages = defineMessages({
 +  filter_regex: { id: 'tag.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },
 +  show_local_only: { id: 'tag.column_settings.show_local_only', defaultMessage: 'Show local only' },
 +  settings: { id: 'tag.settings', defaultMessage: 'Column settings' },
 +  add_favourite_tags_public: { id: 'tag.add_favourite.public', defaultMessage: 'add in the favourite tags (Public)' },
 +  add_favourite_tags_unlisted: { id: 'tag.add_favourite.unlisted', defaultMessage: 'add in the favourite tags (Unlisted)' },
 +  remove_favourite_tags: { id: 'tag.remove_favourite', defaultMessage: 'Remove from the favourite tags' },
 +});
 +
 +@injectIntl
 +export default class ColumnSettings extends React.PureComponent {
 +
 +  static propTypes = {
 +    tag: PropTypes.string.isRequired,
 +    settings: ImmutablePropTypes.map.isRequired,
 +    onChange: PropTypes.func.isRequired,
 +    addFavouriteTags: PropTypes.func.isRequired,
 +    removeFavouriteTags: PropTypes.func.isRequired,
 +    isRegistered: PropTypes.bool.isRequired,
 +    intl: PropTypes.object.isRequired,
 +  };
 +
 +  addFavouriteTags = (visibility) => {
 +    this.props.addFavouriteTags(this.props.tag, visibility);
 +  };
 +
 +  addPublic = () => {
 +    this.addFavouriteTags('public');
 +  };
 +
 +  addUnlisted = () => {
 +    this.addFavouriteTags('unlisted');
 +  };
 +
 +  removeFavouriteTags = () => {
 +    this.props.removeFavouriteTags(this.props.tag);
 +  };
 +
 +  render () {
 +    const { tag, settings, onChange, intl, isRegistered } = this.props;
 +    const initialSettings = ImmutableMap({
 +      shows: ImmutableMap({
 +        local: false,
 +      }),
 +
 +      regex: ImmutableMap({
 +        body: '',
 +      }),
 +    });
 +
 +    const favouriteTagButton = (isRegistered) => {
 +      if(isRegistered) {
 +        return (
 +          <div className='column-settings__row'>
 +            <Button className='favourite-tags__remove-button-in-column' text={intl.formatMessage(messages.remove_favourite_tags)} onClick={this.removeFavouriteTags} block />
 +          </div>
 +        );
 +      } else {
 +        return (
 +          <div className='column-settings__row'>
 +            <Button className='favourite-tags__add-button-in-column' text={intl.formatMessage(messages.add_favourite_tags_public)} onClick={this.addPublic} block />
 +            <Button className='favourite-tags__add-button-in-column' text={intl.formatMessage(messages.add_favourite_tags_unlisted)} onClick={this.addUnlisted} block />
 +          </div>
 +        );
 +      }
 +    };
 +
 +    return (
 +      <div>
 +        {favouriteTagButton(isRegistered)}
 +        <span className='column-settings__section'><FormattedMessage id='tag.column_settings.basic' defaultMessage='Basic' /></span>
 +
 +        <div className='column-settings__row'>
 +          <SettingToggle tag={tag} prefix='hashtag_timeline' settings={settings.get(`${tag}`, initialSettings)} settingKey={['shows', 'local']} onChange={onChange} label={intl.formatMessage(messages.show_local_only)} />
 +        </div>
 +
 +        <span className='column-settings__section'><FormattedMessage id='tag.column_settings.advanced' defaultMessage='Advanced' /></span>
 +
 +        <div className='column-settings__row'>
 +          <SettingText tag={tag} prefix='hashtag_timeline' settings={settings.get(`${tag}`, initialSettings)} settingKey={['regex', 'body']} onChange={onChange} label={intl.formatMessage(messages.filter_regex)} />
 +        </div>
++=======
+ import { injectIntl, FormattedMessage } from 'react-intl';
+ import Toggle from 'react-toggle';
+ import AsyncSelect from 'react-select/lib/Async';
+ 
+ export default @injectIntl
+ class ColumnSettings extends React.PureComponent {
+ 
+   static propTypes = {
+     settings: ImmutablePropTypes.map.isRequired,
+     onChange: PropTypes.func.isRequired,
+     onLoad: PropTypes.func.isRequired,
+     intl: PropTypes.object.isRequired,
+   };
+ 
+   state = {
+     open: this.hasTags(),
+   };
+ 
+   hasTags () {
+     return ['all', 'any', 'none'].map(mode => this.tags(mode).length > 0).includes(true);
+   }
+ 
+   tags (mode) {
+     let tags = this.props.settings.getIn(['tags', mode]) || [];
+     if (tags.toJSON) {
+       return tags.toJSON();
+     } else {
+       return tags;
+     }
+   };
+ 
+   onSelect = (mode) => {
+     return (value) => {
+       this.props.onChange(['tags', mode], value);
+     };
+   };
+ 
+   onToggle = () => {
+     if (this.state.open && this.hasTags()) {
+       this.props.onChange('tags', {});
+     }
+     this.setState({ open: !this.state.open });
+   };
+ 
+   modeSelect (mode) {
+     return (
+       <div className='column-settings__section'>
+         {this.modeLabel(mode)}
+         <AsyncSelect
+           isMulti
+           autoFocus
+           value={this.tags(mode)}
+           settings={this.props.settings}
+           settingPath={['tags', mode]}
+           onChange={this.onSelect(mode)}
+           loadOptions={this.props.onLoad}
+           classNamePrefix='column-settings__hashtag-select'
+           name='tags'
+         />
+       </div>
+     );
+   }
+ 
+   modeLabel (mode) {
+     switch(mode) {
+     case 'any':  return <FormattedMessage id='hashtag.column_settings.tag_mode.any' defaultMessage='Any of these' />;
+     case 'all':  return <FormattedMessage id='hashtag.column_settings.tag_mode.all' defaultMessage='All of these' />;
+     case 'none': return <FormattedMessage id='hashtag.column_settings.tag_mode.none' defaultMessage='None of these' />;
+     }
+     return '';
+   };
+ 
+   render () {
+     return (
+       <div>
+         <div className='column-settings__row'>
+           <div className='setting-toggle'>
+             <Toggle
+               id='hashtag.column_settings.tag_toggle'
+               onChange={this.onToggle}
+               checked={this.state.open}
+             />
+             <span className='setting-toggle__label'>
+               <FormattedMessage id='hashtag.column_settings.tag_toggle' defaultMessage='Include additional tags in this column' />
+             </span>
+           </div>
+         </div>
+         {this.state.open &&
+           <div className='column-settings__hashtags'>
+             {this.modeSelect('any')}
+             {this.modeSelect('all')}
+             {this.modeSelect('none')}
+           </div>
+         }
++>>>>>>> v2.7.0
        </div>
      );
    }
diff --cc app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
index f1aca44dd,c5098052c..000000000
--- a/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/containers/column_settings_container.js
@@@ -1,31 -1,31 +1,60 @@@
  import { connect } from 'react-redux';
  import ColumnSettings from '../components/column_settings';
++<<<<<<< HEAD
 +import { changeSetting, saveSettings } from '../../../actions/settings';
 +import { addFavouriteTags, removeFavouriteTags } from '../../../actions/favourite_tags';
 +
 +const mapStateToProps = (state, { tag }) => ({
 +  settings: state.getIn(['settings', 'tag']),
 +  isRegistered: state.getIn(['favourite_tags', 'tags']).some(t => t.get('name') === tag),
 +});
 +
 +const mapDispatchToProps = dispatch => ({
 +
 +  onChange (tag, key, checked) {
 +    dispatch(changeSetting(['tag', `${tag}`, ...key], checked));
 +  },
 +
 +  onSave () {
 +    dispatch(saveSettings());
 +  },
 +
 +  addFavouriteTags (tag, visibility) {
 +    dispatch(addFavouriteTags(tag, visibility));
 +  },
 +
 +  removeFavouriteTags (tag) {
 +    dispatch(removeFavouriteTags(tag));
 +  },
 +
++=======
+ import { changeColumnParams } from '../../../actions/columns';
+ import api from '../../../api';
+ 
+ const mapStateToProps = (state, { columnId }) => {
+   const columns = state.getIn(['settings', 'columns']);
+   const index   = columns.findIndex(c => c.get('uuid') === columnId);
+ 
+   if (!(columnId && index >= 0)) {
+     return {};
+   }
+ 
+   return { settings: columns.get(index).get('params') };
+ };
+ 
+ const mapDispatchToProps = (dispatch, { columnId }) => ({
+   onChange (key, value) {
+     dispatch(changeColumnParams(columnId, key, value));
+   },
+ 
+   onLoad (value) {
+     return api().get('/api/v2/search', { params: { q: value } }).then(response => {
+       return (response.data.hashtags || []).map((tag) => {
+         return { value: tag.name, label: `#${tag.name}` };
+       });
+     });
+   },
++>>>>>>> v2.7.0
  });

  export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
diff --cc app/javascript/mastodon/features/hashtag_timeline/index.js
index b877f6700,c2e026d13..000000000
--- a/app/javascript/mastodon/features/hashtag_timeline/index.js
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.js
@@@ -5,7 -5,7 +5,11 @@@ import StatusListContainer from './cont
  import Column from '../../components/column';
  import ColumnHeader from '../../components/column_header';
  import ColumnSettingsContainer from './containers/column_settings_container';
++<<<<<<< HEAD
 +import { expandHashtagTimeline } from '../../actions/timelines';
++=======
+ import { expandHashtagTimeline, clearTimeline } from '../../actions/timelines';
++>>>>>>> v2.7.0
  import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
  import { FormattedMessage } from 'react-intl';
  import { connectHashtagStream } from '../../actions/streaming';
@@@ -47,8 -72,18 +78,23 @@@ class HashtagTimeline extends React.Pur
      this.column.scrollTop();
    }

++<<<<<<< HEAD
 +  _subscribe (dispatch, id, isLocal) {
 +    this.disconnect = dispatch(connectHashtagStream(id, isLocal));
++=======
+   _subscribe (dispatch, id, tags = {}) {
+     let any  = (tags.any || []).map(tag => tag.value);
+     let all  = (tags.all || []).map(tag => tag.value);
+     let none = (tags.none || []).map(tag => tag.value);
+ 
+     [id, ...any].map((tag) => {
+       this.disconnects.push(dispatch(connectHashtagStream(id, tag, (status) => {
+         let tags = status.tags.map(tag => tag.name);
+         return all.filter(tag => tags.includes(tag)).length === all.length &&
+                none.filter(tag => tags.includes(tag)).length === 0;
+       })));
+     });
++>>>>>>> v2.7.0
    }

    _unsubscribe () {
@@@ -59,18 -92,20 +103,35 @@@
    }

    componentDidMount () {
++<<<<<<< HEAD
 +    const { dispatch, isLocal } = this.props;
 +    const { id } = this.props.params;
 +
 +    dispatch(expandHashtagTimeline(id, isLocal));
 +    this._subscribe(dispatch, id, isLocal);
 +  }
 +
 +  componentWillReceiveProps (nextProps) {
 +    if (nextProps.params.id !== this.props.params.id || nextProps.isLocal !== this.props.isLocal) {
 +      this.props.dispatch(expandHashtagTimeline(nextProps.params.id, nextProps.isLocal));
 +      this._unsubscribe();
 +      this._subscribe(this.props.dispatch, nextProps.params.id, nextProps.isLocal);
++=======
+     const { dispatch } = this.props;
+     const { id, tags } = this.props.params;
+ 
+     dispatch(expandHashtagTimeline(id, { tags }));
+   }
+ 
+   componentWillReceiveProps (nextProps) {
+     const { dispatch, params } = this.props;
+     const { id, tags } = nextProps.params;
+     if (id !== params.id || !isEqual(tags, params.tags)) {
+       this._unsubscribe();
+       this._subscribe(dispatch, id, tags);
+       this.props.dispatch(clearTimeline(`hashtag:${id}`));
+       this.props.dispatch(expandHashtagTimeline(id, { tags }));
++>>>>>>> v2.7.0
      }
    }

@@@ -83,7 -118,8 +144,12 @@@
    }

    handleLoadMore = maxId => {
++<<<<<<< HEAD
 +    this.props.dispatch(expandHashtagTimeline(this.props.params.id, { maxId, isLocal: this.props.isLocal }));
++=======
+     const { id, tags } = this.props.params;
+     this.props.dispatch(expandHashtagTimeline(id, { maxId, tags }));
++>>>>>>> v2.7.0
    }

    render () {
@@@ -104,9 -140,7 +170,13 @@@
            multiColumn={multiColumn}
            showBackButton
          >
++<<<<<<< HEAD
 +          <ColumnSettingsContainer
 +            tag={id}
 +          />
++=======
+           {columnId && <ColumnSettingsContainer columnId={columnId} />}
++>>>>>>> v2.7.0
          </ColumnHeader>

          <StatusListContainer

</details>

Updated 23/01/2019 05:27 1 Comments

Refactor alerts for Login flow

publiclab/plots2

At time of login via OAuth the notices are wrongly shown and sometimes delayed too. See this for reference - https://drive.google.com/open?id=1w9tc4kIkoLJ5tvceoyQ1-kO_yug2pMDR

The link to file which requires help with notice - https://github.com/publiclab/plots2/blob/master/app/controllers/user_sessions_controller.rb#L58

Also, this issue - #4522 can be referenced where details/progress about resolving the Login issue is recorded.

Thanks!

Updated 29/01/2019 03:48 1 Comments

header wrapping issues at some window sizes (recurring issue)

publiclab/plots2

We keep seeing issues with the header wrapping to 2 lines as items are added or removed from the header, and I’d like to think about how to address this - both the current issue and how to prevent this in the future.

Right now I believe the new icons added have increased the width beyond the breakpoints in CSS. Read more about the issue here:

https://github.com/publiclab/plots2/issues/4502

One open PR is being blocked by this issue as well.

https://github.com/publiclab/plots2/pull/4461

Which is discouraging for the author, I’m sure!

Let’s solve the immediate issue by removing the icons until we can fix the wrapping, and let’s brainstorm a plan to either block edits to this code or to have a more flexible layout which can survive some changes without breaking.

Thanks everyone for your patience, this is a delicate section of code and we appreciate your help!!

Updated 27/01/2019 17:14 4 Comments

Fix disabled transaction sets

irobayna/stupidedi

In #164, I have disabled several transaction sets that were once in Contrib::*::Guides, because they would cause an exception when required. These are:

  • [ ] Contrib::TwoThousandOne::Guides::FA997
  • [ ] Contrib::ThirtyForty::Guides::WA142
  • [ ] Contrib::ThirtyTen::Guides::PO850
  • [ ] Contrib::ThirtyTen::Guides::PC860
  • [ ] Contrib::ThirtyTen::Guides::PS830
  • [ ] Contrib::FortyTen::Guides::AR943
  • [ ] Contrib::FortyTen::Guides::Ow940
  • [ ] Contrib::FortyTen::Guides::PO850
  • [ ] Contrib::FortyTen::Guides::PS830
  • [ ] Contrib::FortyTen::Guides::RE944
  • [ ] Contrib::FortyTen::Guides::SH856
  • [ ] Contrib::FortyTen::Guides::SM204
  • [ ] Contrib::FortyTen::Guides::SQ866
  • [ ] Contrib::FortyTen::Guides::SW945

These now live in Stupidedi::TransactionSets::*::Implementations, but their autoload statement is commented-out.

Pull requests are welcome, once #164 is merged. The specs in spec/lib/stupidedi/transaction_sets_spec.rb will cover these definitions.

Updated 25/01/2019 07:40

Implement profiles

vinistock/sail

Context

Eventually, it can be useful to save the entire state of the configuration for an application. For instance, if testing the effects of combinations of numerous settings, switching each individual setting can be a time consuming manual task.

Profiles will allow saving the current state of all settings. Switching between profiles will also be available. This can also benefit automated test suites to explore different scenarios by saving profiles with many different setting combinations.

Target version is 3.0.0 (will require extra migrations and therefore will include breaking changes).

Feature

By clicking a cog button in the dashboard, I want a menu to show up allowing me to save, delete, edit and switch between profiles easily.

As a test engineer, I want be able to switch profiles via JSON API.

Feedback and suggestions

Please feel free to provide feedback or suggestions as these are very helpful when designing new features (thumbs up or down included).

Updated 21/01/2019 18:45

Warnings are regarded as uncommitted files and prevent my gem from being released.

bundler/bundler

I got an error when trying to release my gem. bash $ rake release rake aborted! There are files that need to be committed first.

I traced and found that the error message came from here: https://github.com/bundler/bundler/blob/88ea68f800d463f09622b9ef6c4331f704a6bd98/lib/bundler/gem_helper.rb#L148

It seems that the warnings from git diff command will be regarded as some files are changed and are not committed.

$ git diff --exit-code
warning: LF will be replaced by CRLF in .travis.yml.
The file will have its original line endings in your working directory

I have no idea how to get rid of this. I think it is a kind of bug of bundler which regard warnings as uncommitted files.

$ git add .
$ git diff --exit-code
$ rake release
rake aborted!
There are files that need to be committed first.
$ git diff --exit-code
warning: LF will be replaced by CRLF in .travis.yml.
The file will have its original line endings in your working directory
Updated 17/02/2019 06:00 1 Comments

Slow API requests for /api/srch/profiles?query=

publiclab/plots2

References #3147. Hinders # 239. I think this should be a top priority issue, since gradually more users will be added and with time, the API will be used more than ever, both can prove fatal to the response time.

Note: This only happens for /api/srch/profiles?query= (7.8s) as of now, but can happen with other queries too, such as /api/srch/tags?query=(2.26s) when they grow in number in near future.

api

We can consider implementing better Data Structures and algorithms for storing and searching the data.

Updated 08/02/2019 15:17 12 Comments

Fork me on GitHub