This file contains hidden or 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
<receiver android:name=".widget.LockWidgetProvider"> | |
<intent-filter> | |
<action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> | |
</intent-filter> | |
<meta-data android:name="android.appwidget.provider" | |
android:resource="@xml/appwidget_info"/> | |
</receiver> |
This file contains hidden or 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
module Slack | |
class MessageReceivedEventHandler | |
attr_reader :message | |
def initialize(message) | |
@message = message | |
end | |
def handle | |
if message_implicate_that_doors_were_just_opened? | |
Doors.open! |
This file contains hidden or 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
module Firebase | |
class PushToAndroid | |
SERVER_KEY = ENV.fetch('FIREBASE_APP_SERVER_KEY') | |
def call | |
registration_ids = User.all.map(&:registration_id) | |
options = { data: { state: Doors.last_event.attributes }, collapse_key: 'updated_score' } | |
fcm = FCM.new(SERVER_KEY) | |
fcm.send(registration_ids, options) | |
end | |
end |
This file contains hidden or 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 DoorsStateController < ApplicationController | |
def toggle | |
event = Doors.toggle | |
render json: { | |
status: 'success', | |
body: event | |
} | |
end | |
def read |
This file contains hidden or 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 Doors | |
def self.close! | |
DoorsEvent.create(state: DoorsEvent.states[:closed]) | |
end | |
def self.open! | |
DoorsEvent.create(state: DoorsEvent.states[:open]) | |
end | |
def self.toggle! |
This file contains hidden or 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
# not expected | |
it 'updates postal code of the customer' do | |
customer = build(:hiltes_kunde) | |
customer.anschrift.Plz = '1500' | |
customer.save | |
params = ActionController::Parameters.new( | |
postal_code: '1501', hiltes_mandant: 1, hiltes_firmengruppe: 1, hiltes_nr: customer.Nr | |
) | |
service = described_class.new |
This file contains hidden or 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
➜ myshoppy git:(run-tests-before-deploy-on-master-capistrano) ✗ bundle exec cap production doctor | |
rvm 1.29.2 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/] | |
ruby-2.4.1 | |
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] | |
Environment | |
Ruby ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] | |
Rubygems 2.6.11 | |
Bundler 1.16.0 |
This file contains hidden or 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
require "capistrano/setup" | |
require "capistrano/deploy" | |
require "capistrano/scm/git" | |
install_plugin Capistrano::SCM::Git | |
require "capistrano/rvm" | |
require "capistrano/bundler" | |
require "capistrano/rails/migrations" | |
require "capistrano/linuxpl" | |
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } |
This file contains hidden or 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
************************************************************* | |
Amazon kindlegen(Linux) V2.9 build 1028-0897292 | |
A command line e-book compiler | |
Copyright Amazon.com and its Affiliates 2014 | |
************************************************************* | |
Info(prcgen):I1047: Added metadata dc:Title "test 4" | |
Info(prcgen):I1047: Added metadata dc:Creator "webook" | |
Info(prcgen):I1047: Added metadata dc:Publisher "webook" | |
Info(prcgen):I1002: Parsing files 0000002 |
This file contains hidden or 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
ProblemType: Crash | |
Architecture: amd64 | |
Date: Thu Jun 1 08:24:10 2017 | |
DistroRelease: Ubuntu 17.04 | |
ExecutablePath: /var/www/webook_disk/kindlegen | |
ExecutableTimestamp: 1496222745 | |
ProcCmdline: ./kindlegen /var/www/webook_disk/books_drafts/1234/book.opf -o 1234.mobi | |
ProcCwd: /var/www/webook_disk | |
ProcEnviron: | |
LC_TIME=pl_PL.UTF-8 |