doneski 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a858ea60fb47065cb99aa0fd73e7fc052d3cbf6a
4
- data.tar.gz: 6211f14f1d13da51e5a617ebf6457f0273492b11
3
+ metadata.gz: cf1daa4aa97cc103803bd4b52dc3cd01132e70e3
4
+ data.tar.gz: 045cd581cb9ff6317d6cf99a3d6c9f38af26bd3a
5
5
  SHA512:
6
- metadata.gz: b7647fc6324d1a4fd13d924bba0c9bb70193ec13f9322e95c842c29081385cdd0f6065ecc70132ece4fbc54ec64198a9eb2590688f28b214d525dc2911500463
7
- data.tar.gz: 8a4774f368208d8206f8c88b8dd540984c6f71dd8fc603850fcfc65dd1e447bfb4aec9550f4551274dcb902e0233e20eb74e993cfb20a307ef0f8ee6f0f3c624
6
+ metadata.gz: a43791664ab9c0cda71523ddb19d451842b39d058accbd35a9b7d5f178884c8c2d7181ecefbd8f5f50ad76fb1ec4e2f033f23b08547ec2887e6747d222152e20
7
+ data.tar.gz: 69a0bc8d62ef65064272656b4b5fb5edabac2d41ba31e3429d01ccac85ee2ae5c9292f8d6c49c756744c33ba8416a34e1afc61db7aa9a2bafc6d647b454f6c35
@@ -5,9 +5,12 @@ class TasksCollection
5
5
  @@location = File.expand_path '~/.task.store'
6
6
 
7
7
  def initialize
8
- `touch #{@@location}`
9
- @yaml = YAML.load_file(@@location)
10
- @tasks = @yaml ? @yaml['tasks'] : []
8
+ if File.exists? @@location
9
+ @yaml = YAML.load_file(@@location)
10
+ @tasks = @yaml ? @yaml['tasks'] : []
11
+ else
12
+ File.open(@@location, 'w+'){|f| f.puts "---\ntasks:"}
13
+ end
11
14
  end
12
15
 
13
16
  def all
@@ -1,3 +1,3 @@
1
1
  module Doneski
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doneski
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad McKenna