todotxt-rb 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72716ff424f3e97ee205e0cc692e5da0f3c8df50
4
- data.tar.gz: 5189a5be23790642e1276a66be0e223a83b2e2cb
3
+ metadata.gz: 9a0d907d0e4e868c9e7e155cf3a74a8190377ca5
4
+ data.tar.gz: dc7190e175b50d25cf643a826d1d0cd8e810c02d
5
5
  SHA512:
6
- metadata.gz: 9a16cd68a969f742b8bea412fdde7e6c5b9eacbf00e0ee79aab585371f9475a4be0a696788d5e02430edd9252d8e1a2193b860830177c3eac172383dbb4eaf37
7
- data.tar.gz: 5489ea407ec23af9add543f4344ad5c70ac2c8173c41bc9999379227a358243e5f58d71b292323922544d2baed6deb247c83712b3836032838eef9be256b9a01
6
+ metadata.gz: f97392dbc9e0ac28b35787d25bfeafc00a68bd10071f6bc15b314123ed32bd7d6bda5ba0510a8f9564e650bb3a58d0c3560c19cbd976cadf72f5505793233383
7
+ data.tar.gz: 82720b97789766ec1388911b9df297261ee18317f2a2d851e0c9e2be5ed36f3a032bfde49d49cd2caec61c98e93585462c8e0fb52be4edad712120a8ec2741c4
@@ -9,7 +9,7 @@ module TodoTxt
9
9
  include Enumerable
10
10
  extend Forwardable
11
11
 
12
- def_delegators :tasks, *(Array.instance_methods)
12
+ def_delegators :tasks, *(Array.instance_methods - Object.instance_methods)
13
13
 
14
14
  # Parses a Todo.txt formatted file
15
15
  # @param [IO] file an IO input
@@ -1,9 +1,12 @@
1
1
  class Relation < Struct
2
2
  def initialize(hash = {})
3
- diff = (members | hash.keys) - members
4
- unless diff.empty?
5
- raise ArgumentError, "Unknown attributes #{diff}"
6
- end
7
3
  super *(hash.values_at(*members))
4
+ rescue ArgumentError => error
5
+ diff = hash.keys - members
6
+ raise error, "Unknown attributes #{diff}"
7
+ end
8
+
9
+ def members
10
+ @members ||= super
8
11
  end
9
12
  end
@@ -40,11 +40,13 @@ module TodoTxt
40
40
  # Completes a task and sets the required dependencies
41
41
  def complete!
42
42
  self.completed_at ||= Time.now
43
+ self
43
44
  end
44
45
 
45
46
  # Marks a completed task as not complete and sets the required dependencies
46
47
  def revive!
47
48
  self.completed_at = nil
49
+ self
48
50
  end
49
51
 
50
52
  def contexts
@@ -1,3 +1,3 @@
1
1
  module TodoTxt
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -4,14 +4,15 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'todotxt/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "todotxt-rb"
8
- spec.version = TodoTxt::VERSION
9
- spec.authors = ["Tyler Dooling"]
10
- spec.email = ["me@tylerdooling.com"]
11
- spec.summary = %q{A ruby library for interacting with Todo.txt formatted files.}
12
- spec.description = %q{TodoTxt is a ruby library for interacting with Todo.txt formatted files. It provides a simple ruby object interface for creating addons or writing new Todo.txt compatible applications. }
13
- spec.homepage = "https://github.com/tylerdooling/todotxt-rb"
14
- spec.license = "MIT"
7
+ spec.name = "todotxt-rb"
8
+ spec.version = TodoTxt::VERSION
9
+ spec.authors = ["Tyler Dooling"]
10
+ spec.email = ["me@tylerdooling.com"]
11
+ spec.summary = %q{A ruby library for interacting with Todo.txt formatted files.}
12
+ spec.description = %q{TodoTxt is a ruby library for interacting with Todo.txt formatted files. It provides a simple ruby object interface for creating addons or writing new Todo.txt compatible applications. }
13
+ spec.homepage = "https://github.com/tylerdooling/todotxt-rb"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = '>= 1.9.3'
15
16
 
16
17
  spec.files = `git ls-files -z`.split("\x0")
17
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: todotxt-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Dooling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2014-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: '0'
92
+ version: 1.9.3
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - ">="