Skip to content

Instantly share code, notes, and snippets.

@jonathandixon
jonathandixon / assign_enity_workflow_permissions.rb
Created December 21, 2017 14:30
Hyrax: Assigning Sipity::EntitySpecificResponsibiilty
module Bison
module Workflow
class AssignEntityWorkflowPermissions
def self.call(target:, **)
entity = PowerConverter.convert(target, to: :sipity_entity)
users = User.where(email: target.edit_users)
user_agents = find_or_create_user_agents(users)
group_agents = find_or_create_group_agents(target.edit_groups.select { |g| g =~ /curator$/ })
# Remove permission for agents that no longer have access.
@jonathandixon
jonathandixon / Grunt-Cordova-CLI.md
Last active January 5, 2021 22:00
Using Grunt with a Cordova 3 project.

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.

Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?

@jonathandixon
jonathandixon / .gitignore
Last active January 5, 2021 22:01
Cordova CLI project .gitignore and helper script. Useful when you don't want to commit the platforms and plugins directories to version control. http://stackoverflow.com/q/17911204/417568
platforms/
plugins/