source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140724144830_create_user.rb
Ruby
bsd-3-clause
92
master
369
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateUser < ActiveRecord::Migration def change create_table :users do |t| t....
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140717125907_fix_missing_schemes.rb
Ruby
bsd-3-clause
92
master
388
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class FixMissingSchemes < ActiveRecord::Migration def change execute %Q( UPDATE act...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140916143308_add_floor_to_beacons.rb
Ruby
bsd-3-clause
92
master
340
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddFloorToBeacons < ActiveRecord::Migration def change add_column :beacons, :floor,...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140324140107_add_owner_to_application.rb
Ruby
bsd-3-clause
92
master
505
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddOwnerToApplication < ActiveRecord::Migration def change add_column :oauth_applic...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20141002122854_create_beacons_zones.rb
Ruby
bsd-3-clause
92
master
486
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateBeaconsZones < ActiveRecord::Migration def change create_table :beacons_zones...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140801082534_create_coupon_images.rb
Ruby
bsd-3-clause
92
master
460
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateCouponImages < ActiveRecord::Migration def change create_table :coupon_images...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140721125813_create_coupons.rb
Ruby
bsd-3-clause
92
master
580
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateCoupons < ActiveRecord::Migration def change create_table :coupons do |t| ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20150519092520_add_color_to_zones.rb
Ruby
bsd-3-clause
92
master
335
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddColorToZones < ActiveRecord::Migration def change add_column :zones, :color, :st...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20150518085027_remove_beacon_and_zone_id_from_triggers.rb
Ruby
bsd-3-clause
92
master
604
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class RemoveBeaconAndZoneIdFromTriggers < ActiveRecord::Migration def up Trigger.all.each...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140324140315_create_applications.rb
Ruby
bsd-3-clause
92
master
437
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateApplications < ActiveRecord::Migration def change create_table :applications ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140415113816_add_admin_id_to_beacon.rb
Ruby
bsd-3-clause
92
master
563
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddAdminIdToBeacon < ActiveRecord::Migration class Admin < ActiveRecord::Base end ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140319171243_create_triggers.rb
Ruby
bsd-3-clause
92
master
430
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateTriggers < ActiveRecord::Migration def change create_table :triggers do |t| ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140801083012_remove_coupon_images.rb
Ruby
bsd-3-clause
92
master
464
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class RemoveCouponImages < ActiveRecord::Migration def up remove_column :coupons, :image ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20141006144639_add_zone_to_triggers.rb
Ruby
bsd-3-clause
92
master
346
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddZoneToTriggers < ActiveRecord::Migration def change add_reference :triggers, :zo...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20141013123157_create_applications_beacons.rb
Ruby
bsd-3-clause
92
master
534
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateApplicationsBeacons < ActiveRecord::Migration def change create_table :applic...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20141020113558_change_zone_to_belongs_to_zone.rb
Ruby
bsd-3-clause
92
master
1,151
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class Beacon < ActiveRecord::Base belongs_to :zone end class Zone < ActiveRecord::Base end ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140711123617_add_scheme_to_activities.rb
Ruby
bsd-3-clause
92
master
347
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddSchemeToActivities < ActiveRecord::Migration def change add_column :activities, ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20141013122934_create_applications_zones.rb
Ruby
bsd-3-clause
92
master
522
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateApplicationsZones < ActiveRecord::Migration def change create_table :applicat...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140826145615_add_button_fields_to_coupons.rb
Ruby
bsd-3-clause
92
master
512
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddButtonFieldsToCoupons < ActiveRecord::Migration def change add_column :coupons, ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20150126122743_add_application_id_to_rpush_apps.rb
Ruby
bsd-3-clause
92
master
412
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddApplicationIdToRpushApps < ActiveRecord::Migration def change add_reference :rpu...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140806163044_create_accounts_event_extensions.rb
Ruby
bsd-3-clause
92
master
623
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateAccountsEventExtensions < ActiveRecord::Migration def change create_table :ac...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20151202091632_change_proximity_id_to_proximity_uuid_in_beacons.rb
Ruby
bsd-3-clause
92
master
314
class ChangeProximityIdToProximityUuidInBeacons < ActiveRecord::Migration def change remove_index :beacons, [:proximity_id, :account_id] remove_column :beacons, :proximity_id add_column :beacons, :proximity_uuid, :string add_index :beacons, [:proximity_uuid, :account_id], unique: true end end
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20140319144148_create_beacons.rb
Ruby
bsd-3-clause
92
master
469
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CreateBeacons < ActiveRecord::Migration def change create_table :beacons do |t| ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
db/migrate/20150702113036_add_location_to_beacons.rb
Ruby
bsd-3-clause
92
master
345
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AddLocationToBeacons < ActiveRecord::Migration def change add_column :beacons, :loc...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/app_status.rb
Ruby
bsd-3-clause
92
master
1,869
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### require 'active_record' class AppStatus def self.logger @logger ||= Rails.logger end ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/string.rb
Ruby
bsd-3-clause
92
master
328
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class String def red; "\033[31m#{self}\033[0m" end def green; "\033[32m#{self}\033[0m" ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/application_config.rb
Ruby
bsd-3-clause
92
master
1,392
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### require 'ostruct' class ApplicationConfig MissingRequiredConfiguration = Class.new(StandardEr...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/uuid_format.rb
Ruby
bsd-3-clause
92
master
322
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module UuidFormat REGEX = %r([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}) en...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/s2s_api_responder.rb
Ruby
bsd-3-clause
92
master
594
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class S2sApiResponder < ActionController::Responder def json_resource_errors { errors: re...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/tasks/notifications.rake
Ruby
bsd-3-clause
92
master
272
namespace :notifications do task :start => :environment do system "bundle exec rpush stop -e #{ Rails.env }" system "bundle exec rpush start -e #{ Rails.env }" end task :stop => :environment do system "bundle exec rpush stop -e #{ Rails.env }" end end
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/tasks/setup.rake
Ruby
bsd-3-clause
92
master
4,318
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### require "string" namespace :setup do desc "Run all setup tasks" task :all do Rake::Tas...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/generators/beacon_control/setup_generator.rb
Ruby
bsd-3-clause
92
master
3,049
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### require 'rails/generators' module BeaconControl class SetupGenerator < Rails::Generators::Na...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
lib/extensions/registry.rb
Ruby
bsd-3-clause
92
master
4,480
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Extensions # # Keeps track of all added extensions, allows managing list of active ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp.rb
Ruby
bsd-3-clause
92
master
209
module Mailchimp extend ::ActiveSupport::Autoload class << self def client client = Gibbon::Request.new(api_key: AppConfig.mailchimp_key) client.timeout = 10 client end end end
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp/mixin.rb
Ruby
bsd-3-clause
92
master
3,071
module Mailchimp module Mixin extend ::ActiveSupport::Concern included do def update client = self.class.client = build_request(self.class.resource_path, id) client.update(body: dump_attributes) end def dump_attributes(attrs=attributes) hash = {} attrs.each_...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp/contact.rb
Ruby
bsd-3-clause
92
master
296
module Mailchimp class Contact include Virtus.model include Mixin attribute :company, String attribute :address1, String attribute :address2, String attribute :city, String attribute :zip, String attribute :country, String attribute :phone, String end end
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp/list.rb
Ruby
bsd-3-clause
92
master
732
module Mailchimp class List include Virtus.model include Mixin attribute :id, String attribute :name, String attribute :contact, Contact attribute :permission_reminder, String attribute :use_archive_bar, Boolean attribute :campaign_defaults, Hash attribute :notify_on_subscribe, St...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp/collection.rb
Ruby
bsd-3-clause
92
master
357
module Mailchimp class Collection < Array attr_accessor :parent_ids def initialize(owner_class) @owner_class = owner_class super() end def create(params, ids=[]) ids = (parent_ids || ids) || [] @owner_class.create params, ids end def build(params, ids=[]) @owne...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/resources/mailchimp/stats.rb
Ruby
bsd-3-clause
92
master
724
module Mailchimp class Stats include Virtus.model include Mixin attribute :member_count, Fixnum attribute :unsubscribe_count, Fixnum attribute :cleaned_count, Fixnum attribute :member_count_since_send, Fixnum attribute :unsubscribe_count_since_send, Fixnum attribute :cleaned_count_sin...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/wrapped_beacon.rb
Ruby
bsd-3-clause
92
master
419
class WrappedBeacon < SimpleDelegator def initialize(beacon, admin) super(beacon) @beacon = beacon @admin = admin end def beacon_status end def beacon_firmware end def uuid end def device end def battery_level end def config end def cloud? end def master end def...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/kontakt_io_beacon.rb
Ruby
bsd-3-clause
92
master
1,557
class KontaktIoBeacon < WrappedBeacon def beacon_status @beacon_status ||= api.device_status(uuid) rescue KontaktIo::Error::NotFound @beacon_status = ::KontaktIo::Resource::Status.new( battery_level: 'Unknown', last_event_timestamp: 0, avg_event_interval: 0, master: '' ) end ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/admin_decorator.rb
Ruby
bsd-3-clause
92
master
518
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AdminDecorator < Draper::Decorator delegate_all def beacons_to_select object.bea...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/coupon_decorator.rb
Ruby
bsd-3-clause
92
master
573
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CouponDecorator < Draper::Decorator delegate_all def templates_list templates.ma...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/activity_decorator.rb
Ruby
bsd-3-clause
92
master
1,053
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ActivityDecorator < Draper::Decorator delegate_all decorates_association :coupon ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/application_decorator.rb
Ruby
bsd-3-clause
92
master
509
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ApplicationDecorator < Draper::Decorator delegate_all def created_at object.crea...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/beacon_decorator.rb
Ruby
bsd-3-clause
92
master
832
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class BeaconDecorator < Draper::Decorator delegate_all def self.available_floors Beaco...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/decorators/extension_decorator.rb
Ruby
bsd-3-clause
92
master
402
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ExtensionDecorator < Draper::Decorator delegate_all def assignment extension_ass...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/view_objects/custom_radio_button.rb
Ruby
bsd-3-clause
92
master
1,487
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### # # Wraps <tt>input type=radio</tt> into custom HTML which will look like a button. # class Cus...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/jobs/event_job.rb
Ruby
bsd-3-clause
92
master
536
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class EventJob < BeaconControl::BaseJob queue_as :event def perform(message) ep_messa...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/mailers/custom_devise_mailer.rb
Ruby
bsd-3-clause
92
master
582
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class CustomDeviseMailer < Devise::Mailer include Devise::Controllers::UrlHelpers default t...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/params/activity_params.rb
Ruby
bsd-3-clause
92
master
2,057
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ActivityParams attr_accessor :params, :raw_params def initialize(params) self.ra...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/inputs/beacon_boolean_input.rb
Ruby
bsd-3-clause
92
master
918
class BeaconBooleanInput < SimpleForm::Inputs::BooleanInput def input(wrapper_options = nil) if SimpleForm.boolean_style == :beacon build_beacon_checkbox(wrapper_options) else super(wrapper_options) end end def build_beacon_checkbox(wrapper_options) options = input_options.fetch(:inpu...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/inputs/old_value_tooltip_input.rb
Ruby
bsd-3-clause
92
master
1,261
class OldValueTooltipInput < SimpleForm::Inputs::StringInput def label(_ = nil) @builder.label(attribute_name, t("beacons.form.#{ attribute_name }").html_safe + tooltip.html_safe, {}) end def imported? object.is_a?(::Beacon) ? object.imported? : false end def tooltip return '<span style="display...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/validators/beacon_identity_validator.rb
Ruby
bsd-3-clause
92
master
1,837
class BeaconIdentityValidator < ActiveModel::Validator attr_reader :chain def initialize(*) super # @type [Lambda[]] @chain = [ ->(r){ validate_proximity_id!(r) }, ->(r){ validate_i_beacon(r) }, ->(r){ validate_eddystone(r) } ] end def validate(record) chain.each do |step| ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/mobile_helper.rb
Ruby
bsd-3-clause
92
master
333
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module MobileHelper def with_host(url) "#{request.protocol}#{request.host_with_port}#{url...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/extension_gem_helper.rb
Ruby
bsd-3-clause
92
master
1,606
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module ExtensionGemHelper # # Creates HTML for exntension link in left sidebar. # # ==...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/icons_helper.rb
Ruby
bsd-3-clause
92
master
553
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module IconsHelper def bos_icon(icon, title = nil) [ (content_tag :span, '', class:...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/activities_helper.rb
Ruby
bsd-3-clause
92
master
366
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module ActivitiesHelper def custom_radio_button(button_obj, options = {}) CustomRadioButt...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/beacons_helper.rb
Ruby
bsd-3-clause
92
master
1,173
module BeaconsHelper # @param [Array<Zone>] coll # @return [Array] def select_zone_collection_from(coll) coll.map do |zone| [ truncate(zone.name, length: 40), zone.id, { class: %W[with-border], style: %W(border-color: #{zone.hex_color}), data: { ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/zones_helper.rb
Ruby
bsd-3-clause
92
master
378
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module ZonesHelper def beacon_select_options(beacons) beacons.map do |b| [b.name, b...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/application_helper.rb
Ruby
bsd-3-clause
92
master
3,572
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module ApplicationHelper # # Pick the correct arguments for form_for when shallow routes a...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/helpers/modal_helper.rb
Ruby
bsd-3-clause
92
master
432
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module ModalHelper def prompt_modal(title, body, partial='shared/delete_modal') render pa...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/push_notification_dispatcher.rb
Ruby
bsd-3-clause
92
master
426
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class PushNotificationDispatcher def initialize(device, notification) self.device =...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/authenticator/admin.rb
Ruby
bsd-3-clause
92
master
1,294
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Authenticator # # Authorization for Doorkeeper secured endpoints with 'admin' +scop...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/authenticator/base.rb
Ruby
bsd-3-clause
92
master
1,071
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Authenticator # # Provides authorization functionality to run against +Doorkeeper::...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/authenticator/mobile_user.rb
Ruby
bsd-3-clause
92
master
1,615
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Authenticator # # Authorization for Doorkeeper secured endpoints with 'user' +scope...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/push_notification_dispatcher/gcm.rb
Ruby
bsd-3-clause
92
master
225
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ###
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/services/push_notification_dispatcher/apns.rb
Ruby
bsd-3-clause
92
master
475
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class PushNotificationDispatcher class Apns def initialize(device_token, notification) ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/attributes/proximity_id.rb
Ruby
bsd-3-clause
92
master
2,785
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### # # Serialization of Beacon proximity to store and rebuild from database string. # class Proxim...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/rpush_apps_application_controller.rb
Ruby
bsd-3-clause
92
master
511
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class RpushAppsApplicationController < AdminController def destroy app = application.rpus...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/zones_controller.rb
Ruby
bsd-3-clause
92
master
1,361
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ZonesController < AdminController inherit_resources load_and_authorize_resource ac...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/root_controller.rb
Ruby
bsd-3-clause
92
master
572
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class RootController < ApplicationController protect_from_forgery with: :exception before_...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/beacons_controller.rb
Ruby
bsd-3-clause
92
master
2,825
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class BeaconsController < AdminController inherit_resources load_and_authorize_resource c...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/application_controller.rb
Ruby
bsd-3-clause
92
master
767
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ApplicationController < ActionController::Base force_ssl if: -> { AppConfig.force_ssl } ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/beacons_search_controller.rb
Ruby
bsd-3-clause
92
master
728
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class BeaconsSearchController < AdminController before_filter :authenticate_admin! has_sco...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/extension_assignments_controller.rb
Ruby
bsd-3-clause
92
master
704
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ExtensionAssignmentsController < ApplicationController def show @extension_assignme...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admin_controller.rb
Ruby
bsd-3-clause
92
master
532
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AdminController < ApplicationController protect_from_forgery with: :exception # noin...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/extensions_marketplace_controller.rb
Ruby
bsd-3-clause
92
master
2,084
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ExtensionsMarketplaceController < AdminController inherit_resources before_action :fi...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/applications_beacons_controller.rb
Ruby
bsd-3-clause
92
master
696
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ApplicationsBeaconsController < AdminController def create ab = ApplicationsBeacon....
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admins_controller.rb
Ruby
bsd-3-clause
92
master
1,525
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class AdminsController < AdminController inherit_resources load_and_authorize_resource r...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/profiles_controller.rb
Ruby
bsd-3-clause
92
master
627
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ProfilesController < AdminController def update current_admin.update_attributes(per...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/static_pages_controller.rb
Ruby
bsd-3-clause
92
master
455
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class StaticPagesController < AdminController def walkthrough end def introduction end...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/applications_controller.rb
Ruby
bsd-3-clause
92
master
2,680
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ApplicationsController < AdminController inherit_resources load_and_authorize_resourc...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/applications_zones_controller.rb
Ruby
bsd-3-clause
92
master
679
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ApplicationsZonesController < AdminController def create az = ApplicationsZone.crea...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/dashboard_controller.rb
Ruby
bsd-3-clause
92
master
591
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class DashboardController < AdminController skip_before_filter :authenticate_admin!, only: [:...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/maps_controller.rb
Ruby
bsd-3-clause
92
master
402
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class MapsController < ApplicationController before_filter :authenticate_admin! def show ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/activities_controller.rb
Ruby
bsd-3-clause
92
master
1,560
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ActivitiesController < AdminController helper_method Activity::SCHEMES helper_method...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/extensions_controller.rb
Ruby
bsd-3-clause
92
master
930
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class ExtensionsController < AdminController inherit_resources helper_method :application,...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/api/v1/events_controller.rb
Ruby
bsd-3-clause
92
master
1,919
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Api module V1 class EventsController < BaseController rescue_from JSON::Par...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/api/v1/configurations_controller.rb
Ruby
bsd-3-clause
92
master
2,629
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Api module V1 class ConfigurationsController < BaseController # # Ret...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/api/v1/base_controller.rb
Ruby
bsd-3-clause
92
master
675
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Api module V1 class BaseController < ApplicationController before_action -> ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/concerns/beacon_allowed_params.rb
Ruby
bsd-3-clause
92
master
1,473
module BeaconAllowedParams extend ActiveSupport::Concern included do rescue_from ActiveModel::ForbiddenAttributesError do |error| render json: { error: error.message, stack: error.backtrace }, status: 500 end if Rails.env.development? end def search_params params.permit(:name, :s...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/mobile/base_controller.rb
Ruby
bsd-3-clause
92
master
296
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Mobile class BaseController < ApplicationController end end
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/mobile/coupons_controller.rb
Ruby
bsd-3-clause
92
master
545
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module Mobile class CouponsController < BaseController layout 'mobile' def show ...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admin/passwords_controller.rb
Ruby
bsd-3-clause
92
master
1,195
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class Admin::PasswordsController < Devise::PasswordsController respond_to :json # PUT /r...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admin/registrations_controller.rb
Ruby
bsd-3-clause
92
master
1,912
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class Admin::RegistrationsController < Devise::RegistrationsController include ApplicationCont...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admin/confirmations_controller.rb
Ruby
bsd-3-clause
92
master
1,592
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class Admin::ConfirmationsController < Devise::ConfirmationsController before_action :find_b...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/admin/sessions_controller.rb
Ruby
bsd-3-clause
92
master
1,003
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### class Admin::SessionsController < Devise::SessionsController respond_to :json # POST /re...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/s2s_api/v1/application_settings_controller.rb
Ruby
bsd-3-clause
92
master
1,133
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module S2sApi module V1 class ApplicationSettingsController < BaseController def i...
github
upnext/BeaconControl
https://github.com/upnext/BeaconControl
app/controllers/s2s_api/v1/zone_colors_controller.rb
Ruby
bsd-3-clause
92
master
420
### # Copyright (c) 2015, Upnext Technologies Sp. z o.o. # All rights reserved. # # This source code is licensed under the BSD 3-Clause License found in the # LICENSE.txt file in the root directory of this source tree. ### module S2sApi module V1 class ZoneColorsController < BaseController self.responder ...