ReinH-track 0.0.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc ADDED
@@ -0,0 +1,5 @@
1
+ == track
2
+
3
+ A gem that provides an awesome command line interface for time tracking that is awesome.
4
+
5
+ +track+ without arguments for usage instructions.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
7
  GEM = "track"
8
- GEM_VERSION = "1.0.0"
8
+ GEM_VERSION = "1.0.1"
9
9
  AUTHOR = "Rein Henrichs"
10
10
  EMAIL = "reinh@reinh.com"
11
11
  HOMEPAGE = "http://github.com/ReinH/track"
data/bin/track CHANGED
@@ -19,11 +19,9 @@ BANNER
19
19
  if ARGV.empty?
20
20
  puts banner
21
21
  exit 0
22
- elsif not File.exists?(config_file)
23
- STDERR.puts "Create a #{home}/.track.yml file please."
24
- exit 1
25
22
  else
26
- options = YAML.load_file(config_file)
23
+ options = nil
24
+ options = YAML.load_file(config_file) if File.size?(config_file)
27
25
  options ||= {}
28
26
  Track.new(options).run(ARGV)
29
27
  end
data/lib/track.rb CHANGED
@@ -33,7 +33,7 @@ class Track
33
33
  end
34
34
 
35
35
  def write_line(project, description)
36
- line = "* [#{time_string} - #{placeholder}] "
36
+ line = "[#{time_string} - #{placeholder}] "
37
37
  line << project if project
38
38
  line << ":\t" << description unless description.empty?
39
39
  File.open(log_filename, 'a') do |file|
@@ -49,7 +49,7 @@ class Track
49
49
  str = options['filename'] || 'track'
50
50
  str += '-'
51
51
  str += Date.today.to_s
52
- str += '.textile'
52
+ str += '.txt'
53
53
  return str
54
54
  end
55
55
 
data/spec/track_spec.rb CHANGED
@@ -86,8 +86,8 @@ describe Track do
86
86
  end
87
87
 
88
88
  describe "with project \"Project\" and description \"Description\"" do
89
- it "looks like \"* [<time> - --:--] Project: Description\"" do
90
- last_line.should == "* [#{@time_string} - --:--] Project:\tDescription"
89
+ it "looks like \"[<time> - --:--] Project: Description\"" do
90
+ last_line.should == "[#{@time_string} - --:--] Project:\tDescription"
91
91
  end
92
92
  end
93
93
  end
@@ -124,8 +124,8 @@ describe Track do
124
124
  @track.send(:log_filename).should include(Date.today.to_s)
125
125
  end
126
126
 
127
- it "is a textile file" do
128
- @track.send(:log_filename).should match(/\.textile$/)
127
+ it "is a text file" do
128
+ @track.send(:log_filename).should match(/\.txt$/)
129
129
  end
130
130
 
131
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ReinH-track
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rein Henrichs
@@ -20,12 +20,12 @@ executables:
20
20
  extensions: []
21
21
 
22
22
  extra_rdoc_files:
23
- - README
23
+ - README.rdoc
24
24
  - LICENSE
25
25
  - TODO
26
26
  files:
27
27
  - LICENSE
28
- - README
28
+ - README.rdoc
29
29
  - Rakefile
30
30
  - TODO
31
31
  - bin/track