jog 0.0.2 → 0.0.3

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.md CHANGED
@@ -37,13 +37,17 @@ Time: <%= Time.now.strftime( "%-I:%M%P %Z" ) %>
37
37
  ---
38
38
  ```
39
39
 
40
- ### `.jogrc` Example
40
+ ### `.jogrc`
41
+
42
+ Example:
41
43
 
42
44
  root: ~/Dropbox/log
43
45
  editor: vim -f
44
46
  path_format: '%Y/%B/%d.txt'
45
47
 
46
- ### `.dontemplate` Example
48
+ ### `.jogtemplate`
49
+
50
+ Jog template files are processed through ERB at runtime. Example:
47
51
 
48
52
  ---
49
53
  Date: <%= Time.now.strftime( "%B %-d, %Y" ) %>
data/lib/jog/config.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'active_support/concern'
2
- require 'ostruct'
3
2
 
4
3
  module Jog
5
4
  module Config
data/lib/jog/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jog
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/jog.rb CHANGED
@@ -10,19 +10,19 @@ module Jog
10
10
  def get_or_create_file( time )
11
11
  subpath = time.strftime( Jog.config[:path_format] )
12
12
  full_path = File.expand_path( File.join( Jog.config[:root], subpath ) )
13
- path, _ = File.split( full_path )
14
13
 
15
14
  unless File.exists?( full_path )
16
- FileUtils.mkdir_p( path )
15
+ FileUtils.mkdir_p( File.dirname( full_path ) )
17
16
  if Jog.template
18
17
  File.open( full_path, 'w' ) do |file|
19
18
  text = ERB.new( Jog.template ).result
20
19
  file.write( text )
21
20
  end
22
21
  else
23
- FileUtils.touch( path )
22
+ FileUtils.touch( full_path )
24
23
  end
25
24
  end
25
+
26
26
  full_path
27
27
  end
28
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70230803245000 !ruby/object:Gem::Requirement
16
+ requirement: &70348441915280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70230803245000
24
+ version_requirements: *70348441915280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70230803244520 !ruby/object:Gem::Requirement
27
+ requirement: &70348441914800 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70230803244520
35
+ version_requirements: *70348441914800
36
36
  description: Jog is a simple command-line tool that simplifies the process of logging
37
37
  what you've worked on, storing plain-text files in a sensible file structue.
38
38
  email: