Class: CitizenCodeScripts::TodayI
- Inherits:
-
Base
- Object
- Base
- CitizenCodeScripts::TodayI
show all
- Defined in:
- lib/citizen_code_scripts/todayi.rb
Constant Summary
Constants included
from Colorize
Colorize::COLOR_CODES
Instance Attribute Summary
Attributes inherited from Base
#argv
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#app_names, #app_root, inherited, #initialize, load_scripts_deferred, name, run, script_classes, script_names, scripts, #staging_app_name, #step, #system!
Methods included from Colorize
#colorize, included
Class Method Details
.description ⇒ Object
10
11
12
|
# File 'lib/citizen_code_scripts/todayi.rb', line 10
def self.description
"Prints a list of commit msgs from today"
end
|
.help ⇒ Object
2
3
4
5
6
7
8
|
# File 'lib/citizen_code_scripts/todayi.rb', line 2
def self.help
<<-EOF
citizen today-i
Prints out a list of commit message names that you worked on today.
EOF
end
|
Instance Method Details
#run ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/citizen_code_scripts/todayi.rb', line 14
def run
date_string = Time.now.to_s.split(' ')[0]
lines = %x{
git log \
--date=local \
--oneline \
--after="#{date_string} 00:00" \
--before="#{date_string} 23:59"
}
lines.each_line do |line|
puts line.split(" ", 2)[1]
end
end
|