Sha256: ba3423803cb6c34f333141795f40910a7dc397808bfc3ef4c4a26438f12328c6

Contents?: true

Size: 1011 Bytes

Versions: 9

Compression:

Stored size: 1011 Bytes

Contents

# coding: UTF-8

require 'rake'

namespace :dad do
  
  desc '本日用の日記を準備します。'
  task :diary do
    today = Date.today.strftime('%Y-%m-%d')

    system("rake dad:cucumber:install")

    today = Date.today.strftime('%Y-%m-%d')

    feature = "features/開発日記/#{today}.feature"
    if File.exist?(feature)
      puts "すでに #{feature} が存在します。上書きはしません。"
    else
      system("echo '# language: ja'            >  #{feature}")
      system("echo                             >> #{feature}")
      system("echo '機能:'                         >> #{feature}")
      system("echo                             >> #{feature}")
    end

    step = "features/step_definitions/開発日記/#{today}.rb"
    if File.exist?(step)
      puts "すでに #{step} が存在します。上書きはしません。"
    else
      system("echo '# coding: UTF-8'            >  #{step}")
      system("echo                              >> #{step}")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
daddy-0.0.21 lib/tasks/diary.rake
daddy-0.0.20 lib/tasks/diary.rake
daddy-0.0.19 lib/tasks/diary.rake
daddy-0.0.18 lib/tasks/diary.rake
daddy-0.0.17 lib/tasks/diary.rake
daddy-0.0.16 lib/tasks/diary.rake
daddy-0.0.15 lib/tasks/diary.rake
daddy-0.0.14 lib/tasks/diary.rake
daddy-0.0.13 lib/tasks/diary.rake