Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rubyを使った開発環境構築の自動化

 Rubyを使った開発環境構築の自動化

TokyuRuby会議09 LT #tqrk09

Takashi Kokubun

August 29, 2015
Tweet

More Decks by Takashi Kokubun

Other Decks in Programming

Transcript

  1. ଞͷਓͷίϚϯυҰൃsetup • mathyasbynens/dotfiles ˒12335 • ֮͑ΒΕΔΘ͚ͳ͍ • ίϐϖͷͨΊʹϒϥ΢β։͘ͷ͕໘౗ $ cd;

    curl -#L https://github.com/mathiasbynens/ dotfiles/tarball/master | tar -xzv --strip- components 1 -- exclude={README.md,bootstrap.sh,LICENSE-MIT.txt}
  2. ೚ҙͷεΫϦϓτΛ࣮ߦ͢Δྫ execute "gem install rebuild" do not_if "gem list |

    grep -q rebuild" end - type: command script: gem install rebuild check_script: "gem list | grep -q rebulid" • itamae • serverkit if gem list | grep -q rebuild; then gem install rebuild fi • γΣϧεΫϦϓτ
  3. ͜͏͍͏XMLΛ <?xml version="1.0"?> <root> <item> <name>Application shortcuts</name> <identifier>remap.application_shortcuts</identifier> <autogen>__KeyToKey__ KeyCode::O,

    VK_CONTROL, KeyCode::VK_OPEN_URL_APP_YoruFukurou</autogen> <autogen>__KeyToKey__ KeyCode::U, VK_CONTROL, KeyCode::VK_OPEN_URL_APP_Google_Chrome</autogen> <autogen>__KeyToKey__ KeyCode::H, VK_CONTROL, KeyCode::VK_OPEN_URL_APP_iTerm</autogen> </item> <vkopenurldef> <name>KeyCode::VK_OPEN_URL_APP_YoruFukurou</name> <url type="file">/Applications/YoruFukurou.app</url> </vkopenurldef> <vkopenurldef> <name>KeyCode::VK_OPEN_URL_APP_Google_Chrome</name> <url type="file">/Applications/Google Chrome.app</url> </vkopenurldef> <vkopenurldef> <name>KeyCode::VK_OPEN_URL_APP_iTerm</name> <url type="file">/Applications/iTerm.app</url> </vkopenurldef> </root>
  4. ͜ͷDSL͔Βੜ੒Մೳ item "Application shortcuts" do remap "C-o", to: invoke("YoruFukurou") remap

    "C-u", to: invoke("Google Chrome") remap "C-h", to: invoke("iTerm") end
  5. 3Ґ: Command+LΛԡ͢ͱCapsLock͞ΕΔ • ϒϥ΢βͰΞυϨεόʔʹϑΥʔΧε͠Α͏ͱ ͢Δͱͳ͔ͥCapsLock͞ΕΔ item "CapsLock ON", config_not: "notsave.private_capslock_on"

    do remap "Cmd-L", to: ɹɹ ["capslock","VK_CONFIG_FORCE_ON_notsave_private_capslock_on"] end item "CapsLock OFF", config_only: "notsave.private_capslock_on" do remap "Cmd-L", to: ["capslock", "VK_CONFIG_FORCE_OFF_notsave_private_capslock_on"] end
  6. 2Ґ: Control+OͰHipChatཱ͕ ্͕ͪΔ • vimͰҎલͷΧʔιϧҐஔʹ໭Ζ͏ͱ͢Δͱͳ ͔ͥHipChat͕ݱΕΔ item "Application shortcuts" do

    if ENV['WORK_PC'] == 'true' remap "C-o", to: invoke("HipChat") else yorufukurou = system('ls /Applications | grep -q YoruFukurou') ? 'YoruFukurou' : 'Night Owl' remap "C-o", to: invoke(yorufukurou) end end