Skip to content

Instantly share code, notes, and snippets.

View katienreed's full-sized avatar

Katie N. Reed katienreed

View GitHub Profile
@katienreed
katienreed / .md
Created May 22, 2017 14:34
Okta/Namely SCIM Configuration Guide

Configuration Steps

Configure your Provisioning settings for the Namely/Okta SCIM Integration as follows:

  1. Check the enable provisioning features box.

  2. In the SubDomain field: enter your Namely subdomain. For example, if you log into https://acme.namely.com, enter: acme. For the current steps, I will use my own sandbox as an example with reed-sandbox. Image

  3. API Authentication

module Queries
class EventsFilter
FILTER_METHOD_MAP = {
"type" => :filter_type,
}
def self.filtered_relation(filters, events)
relation = events.includes(:mentions, :related)
return relation unless filters.is_a?(Hash)
filters.inject(relation) do |r, (filter, value)|
require 'spec_helper'
describe Queries::EventsFilter do
describe '.filtered_relation' do
let!(:company) { create(:company,
use_at_mentions: true, enable_at_mentions_in_feed: true,
use_appreciations: true, enable_appreciations_in_feed: true)
}
let!(:user) { create(:user, :with_profile, :as_super, company: company) }
let!(:profile) { create(:profile, user: user, company: company) }
{
"profiles": [
{
"schema": "[urn:ietf:params:scim:schemas:core:2.0:User]",
"id": "afdb3344-84dd-409a-a013-834269be1312",
"userName": "ed1@namely.com",
"name": {
"formatted": "Edward Burnett",
"familyName": "Burnett",
"givenName": "Edward",
#app/controllers/my_controller.rb
module UnitCheck
def unit_check(number, time)
if number = 1
number + time.chop!
else
number + time
end
end
end
# app/views/data.html.erb
# if @number = 1
Requested time off: <%= unit_check(@number, @time) %> # => 1 day
# app/views/data.html.erb
Requested time off: <%= unit_check(@number, @time) %> # => 1 day
# app/helpers/unit_check_helper.rb
module UnitCheck
def unit_check(@number, @time)
if @number = 1
@time.chop!
else if
@time
end
end
swagger: '2.0'
info:
title: Namely API
description: Move your app forward with the Namely API
version: "1.0"
host: <<company>>.namely.com
schemes:
- https
basePath: /api/v1
paths: