- 宮下 剛輔, 第10回 日本OSS奨励賞, 昨今要求が高まっているシステム配備の自動化の実現に欠かすことができないサーバの状態を自動的にテストするツールServerspecを開発し、インフラ分野における業務の効率化に貢献, 2015年10月
- 宮下 剛輔, Black Duck Open Source Rookies of the Year 2013, 2013年に始まったオープンソースプロジェクトの中で優れたもの10種の中にServerspecが選出, 2014年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
| func compare(t *testing.T, actual, expected interface{}) error { | |
| if actual == nil { | |
| return fmt.Errorf("Expected response should include %#v, but actually %#v", expected, actual) | |
| } | |
| a := actual.(map[string]interface{}) | |
| for k, v := range expected.(map[string]interface{}) { | |
| switch p := v.(type) { | |
| case int: | |
| v = float64(p) |
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
| package main | |
| import ( | |
| "encoding/asn1" | |
| "fmt" | |
| ) | |
| type attr struct { | |
| Type int | |
| Version int |
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
| #!/usr/bin/env ruby | |
| require 'json' | |
| tfstate_file = ARGV[0] | |
| tfstate = '' | |
| File.open(tfstate_file, 'r') do |f| | |
| tfstate = JSON.load(f) | |
| 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
| extern crate dbus; | |
| use dbus::{Connection, BusType, Message, Path}; | |
| use dbus::arg; | |
| fn main() { | |
| // Get object path by service name | |
| let c = Connection::get_private(BusType::System).unwrap(); | |
| let m = Message::new_method_call("org.freedesktop.systemd1", | |
| "/org/freedesktop/systemd1", |
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
| dbus-send --system \ | |
| --dest=org.freedesktop.systemd1 \ | |
| --type=method_call \ | |
| --print-reply \ | |
| /org/freedesktop/systemd1 \ | |
| org.freedesktop.systemd1.Manager.ListUnits | |
| dbus-send --system \ | |
| --dest=org.freedesktop.systemd1 \ |
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
| #include "mruby.h" | |
| #include <stdlib.h> | |
| static mrb_value mrb_rand(mrb_state *mrb, mrb_value recv) | |
| { | |
| int n = rand(); | |
| return mrb_fixnum_value(n); | |
| } | |
| static mrb_value mrb_srand(mrb_state *mrb, mrb_value recv) |
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
| cmd = %q{DEBIAN_FRONTEND='noninteractive' apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install mysql-community-server} | |
| Open3.popen3(cmd) do |i, o, e, w| | |
| i.close_write | |
| e.each {|line| puts line } | |
| 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
| pipeline: | |
| - name: | |
| type: command | |
| command: echo "hello, world" | |
| - name: command_stage_2 | |
| type: command | |
| command: echo "hello, world, command_stage_2" | |
| - name: command_stage_3 | |
| type: command | |
| command: echo "hello, world, command_stage_3" |