Geocoder | Geokit-Rails | |
---|---|---|
Stars | 4802 | 1286 |
Issues | 38 | 58 |
Open pull requests | 19 | 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api_key = Stormpath::ApiKey.new(ENV['test_api_key_id'], ENV['test_api_key_secret']) | |
client = Stormpath::Client.new( | |
api_key: api_key, | |
cache: { | |
store: Stormpath::Cache::RedisStore, | |
store_opts: { | |
host: 'localhost', | |
port: 7777 | |
}, | |
regions: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
include Stormpath::Rails::Controller | |
include Timeoutable | |
protect_from_forgery with: :exception | |
def show | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div id="specification-value-name" class="col-md-12 with-tip", data-original-title="<%= t('admin.tooltips.specification_value') %>" > | |
<div class="form-group"> | |
<%= f.label :value %> | |
<%= f.hidden_field :value, value: f.object.value, class: "js-specification-value-picker" %> | |
<%= hidden_field_tag :specification_key_id, product_specification.specification_key_id %> | |
</div> | |
</div> | |
</div> | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /api/v1/jobs | |
request body | |
``` | |
{ | |
"data": { | |
"type": "jobs", | |
"attributes": { | |
"address": "14642 Americo Mountain, Waylonfurt Republic of Korea", | |
"latitude": 40.735216, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns2="http://www.opentravel.org/OTA/2003/05"> | |
<SOAP-ENV:Header> | |
<ns1:Security>true</ns1:Security> | |
</SOAP-ENV:Header> | |
<SOAP-ENV:Body> | |
<ns2:OTA_HotelAvailNotifRS TimeStamp="2017-07-20T10:47:34+00:00"> | |
<ns2:Errors> | |
<ns2:Error Code="1" ShortText="Invalid Room Code : ROOM2410" Type="3"/> | |
</ns2:Errors> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JsonApiDeserializer | |
MEDIA_TYPE = 'application/vnd.api+json'.freeze | |
def initialize(request) | |
@request = request | |
end | |
def params | |
deserialized_params if valid? | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BranchLinkAdapter | |
BRANCH_IO_API_URL = 'https://api.branch.io/v1/url'.freeze | |
def initialize(token, desktop_url) | |
@token = token | |
@key = Rails.application.secrets.branchio_key | |
@desktop_url = desktop_url | |
end | |
def fetch | |
JSON.parse(fetch_url.body)['url'] if fetch_url.code == 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module RuboCop | |
module Cop | |
module Rails | |
# This cop looks for `attribute` class methods that don't | |
# specify a `:default` option inside a block. | |
# | |
# @example | |
# # bad |