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
#!/bin/bash | |
echo "ENV loaded" | |
while IFS="=" read -r key value | |
do | |
# skip comments, empty lines | |
if [ "${key:0:1}" == "#" ] || [ "${key:0:1}" == "" ]; then | |
continue | |
fi |
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
# По стилю | |
# - компактные декларативные методы с по возможности понятными именами | |
# - предпочтительно guard`ы вместо ветвления условий | |
# - одинарные кавычки вместо двойных | |
# - длинна строки в 100 (минорно, дело вкуса) | |
# Модели | |
# - использовать базовый класс ApplicationRecord и от него наследовать модели | |
# - предпочтительно использовать методы active record вместо sql | |
# - `with_posts_published` - выглядит не совсем корректным, тут нужно уточнить структуру базы |
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
#!/bin/bash | |
# run services required for ph work | |
tab_titles=(\ | |
"ph-core" | |
"ph-admin" | |
"ph-web" | |
"sidekiq" | |
"opstool-front" | |
) |
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
<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.chestermatters.news/govt-rss-feed.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" xmlns:article="http://ogp.me/ns/article#" xmlns:book="http://ogp.me/ns/book#" xmlns:profile="http://ogp.me/ns/profile#" xmlns:video="http://ogp.me/ns/video#" xmlns:product="http://ogp.me/ns/product#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> | |
<channel> | |
<title>Government</title> | |
<link>https://www.chestermatters.news/govt-rss-feed.xml</link> | |
<description></description> | |
<language>en</language> | |
<atom:link href="https://www.chestermatters.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
Feature: Process new move | |
blurb: take from above | |
Scenario: New move arrives | |
Given a new move has arrived | |
When the new move is processed | |
Then an invite should be sent to the moves residents | |
Scenario: New move processing creates a Move | |
Given a new move has arrived |
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
Feature: Process new move | |
blurb: take from above | |
Scenario: New move arrives | |
Given a new move has arrived | |
When the new move is processed | |
Then an invite should be sent to the moves residents | |
Scenario: New move processing creates a xxx | |
Given a new move has arrived |
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 TrickyCancel | |
def initialize(submission = nil) | |
@submission = submission | |
@requester_user = User.find(1511) | |
end | |
def execute | |
@submissions = get_submissions | |
@submissions.each do |submission| | |
@submission = submission |
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
# Delete missing (deleted/draft) news_items from Budstikka internal articles | |
# Using 404 amedia response code to identify such articles | |
newspaper = Newspaper.find(4); | |
min_news_age = 5.days.ago | |
news_items_scope = NewsItem.internal.where(newspaper_id: newspaper.id).where("created_at > ?", min_news_age); | |
duplicated_titles = news_items_scope.group('title').count.select{|k,v| v > 1}; |
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
Некоторые методы для тестирования мобильного API. | |
Для корректной работы создаем окружение(я) | |
Settings - Manage Environments - и создаем переменную окружения BASE_URL с базовым доменом | |
напр: BASE_URL = http://dev.betterfeedback.com | |
или BASE_URL = http://localhost:3000 и т.д. | |
OAUTH_TOKEN - должно подтягивать в большинство запросов автоматом после выполнения запроса Oauth авторизации. | |
Коллекции импортируются через Import - Import from link |
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
/* Update response */ | |
{ | |
"deleted_items_uuids": [ | |
"action_item-7" | |
], | |
"created_items": [ | |
{ | |
"type": "action_item", | |
"uuid": "action_item-8", | |
"id": 8, |
NewerOlder