Скрипты для сравнения состояния OpenStack-облака Селектела, записей DNSimple и соответствующих файлов состояния терраформа.
- Добавить в корень этот проекта файл
secret.yml
:
resource "openstack_blockstorage_volume_v1" "disk-for-box01" { | |
name = "disk-for-box01" | |
region = "ru-1" | |
size = 10 | |
image_id = "${var.image_list["ubuntu-x64-1604"]}" | |
volume_type = "basic.ru-1a" | |
} | |
resource "openstack_compute_instance_v2" "box01" { | |
name = "box01" |
require "rubygems" | |
require "active_record" | |
ActiveRecord::Base.establish_connection "postgres://localhost/geo" | |
ActiveRecord::Base.connection.create_table("planets") do |t| | |
t.string :name | |
end | |
ActiveRecord::Base.connection.create_table("countries") do |t| |
diff --git a/index.html b/index.html | |
index fa2c39f..efdddcd 100644 | |
--- a/index.html | |
+++ b/index.html | |
@@ -2,10 +2,16 @@ | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
- <title>Генератор вкусных рецептов</title> | |
+ <title>Генератор вкусных рецептов - 2</title> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Генератор вкусных рецептов - 2</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'> | |
<script src='http://fb.me/react-0.12.1.js'></script> | |
<script src='http://fb.me/JSXTransformer-0.12.0.js'></script> | |
<script src='https://code.jquery.com/jquery-1.11.1.min.js'></script> |
<li> | |
{{text}} | |
{{^empty}}<ul>{{/empty}} | |
{{#children}} | |
{{> comment}} | |
{{/children}} | |
{{^empty}}</ul>{{/empty}} | |
</li> |
<div class="comments"> | |
<ul> | |
{{#comments}} | |
{{> comment}} | |
{{/comments}} | |
</ul> | |
</div> |
class Role < ActiveRecord::Base | |
belongs_to :user | |
end |
class AbilityRules | |
class AccessDenied < Exception | |
end | |
def self.allowed(user, subject) | |
rules = [] | |
railse [user, subject].inspect # <--- this exception was rescued by six rescue block (of course it need only in development for debug :) | |
return rules unless user |