rubyfocus 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de422e59acb9621c98a7d22857f724261d3265c5
4
- data.tar.gz: 9a47d0e985e3fc60b40811021d888bafc3e00b72
3
+ metadata.gz: 2e695cc8f092d4f4fd24f1f65f3aa3bcfe808051
4
+ data.tar.gz: 72c4ce4e2a8c2faca9d59f1a1e3dde2874bf4de8
5
5
  SHA512:
6
- metadata.gz: ec929d7e0f54bb5c5ddae2be7166ea4ffde03cfd452f0ef0390868cc1db40fcf4bbb7b0fe81b26e2f545eaa713bdef40ea6807e989a1d0f1cd4e0f4e4f11abcd
7
- data.tar.gz: 4f39da21389954a53a31262fa5cc93df43950e0b51f210e58c6c849a47abc3ce0f2ed85b721d253bf51577c23ea26445568e40ff847bcd0df292b34d0060a009
6
+ metadata.gz: 11b5d85f415b2ad27d384e8ab78ff1aebb35983484368d561d6b8cb08398b7491c2b5f9d5041366404a5e97bc6c2673d709f6beb0464cce8b258780187341462
7
+ data.tar.gz: 49dbdd242c1fc944d5a99b19d8737bd587e5425ef99dc44fc80400ae48ec3a826063e8d1a1f98312a3dfd96b881f509daa91900af4e73b3941712a9863aad3af
data/HISTORY.md ADDED
@@ -0,0 +1,63 @@
1
+ # History
2
+
3
+ ## 0.5.6 // 2016-09-01
4
+
5
+ * [New] Added `Time.safely_parse`, which will not choke on empty strings or nil values
6
+ * [Fixed] `conditional_set` will no longer choke on empty string for times
7
+
8
+ ## 0.5.5 // 2016-05-18
9
+
10
+ * [Fixed] If there are no patches, `Fetcher#head`s will return the ID of the base file.
11
+ * [Fixed] `Fetcher#head` will now return the ID of the most recent patch, not the patch itself.
12
+ * [New] `Searchable` objects will now respond to `find_all`, which is an alias of `select`.
13
+ * [Fixed] `RankedItem#contained_within?` will now check against all objects matching a block or hash, rather than just the first one that the document can find.
14
+
15
+ ## 0.5.4 // 2016-02-08
16
+
17
+ * [Fixed] `LocalFetcher` will now try the default App Store location if it can't find anything at the normal location.
18
+
19
+ ## 0.5.3 // 2016-02-04
20
+
21
+ * [Fixed] Re-did the code determining whether a task was blocked. Now tasks are considered blocked if their immediate container is blocked.
22
+ * [Fixed] Caching some task filters on the `Task` class was causing issues. Removed caching, which shouldn't hit performance much.
23
+
24
+ ## 0.5.2 // 2016-02-04
25
+
26
+ * [Fixed] Whoops! Did I leave HTTParty out of the gem install list? My bad!
27
+
28
+ ## 0.5.1 // 2016-02-03
29
+
30
+ * [Fixed] `Task#next_available_task` should no longer cause errors when a project has no tasks.
31
+
32
+ ## 0.5.0 // 2016-01-20
33
+
34
+ Now work out how close to (or far from) the head of your document you are!
35
+
36
+ * [New] `Fetcher#head` returns the most recent patch.
37
+ * [New] `Fetcher#can_reach_head_from?(id)` will inform you if you can get to the head from a given ID.
38
+
39
+ ## 0.4.0 // 2016-01-01
40
+
41
+ * Happy new year!
42
+ * [Modified] Container IDRef is now located on RankedItem, rather than having several on each RankedItem subclass.
43
+ * [New] RankedItems can look at their ancestry much more easily, using RankedItem#ancestry and RankedItem#contained_within?
44
+ * [New] Documents now forbid elements with duplicate IDs unless Document#allow_duplicate_ids is set to true.
45
+ * [New] Patchers now treate CREATE nodes on elements whose IDs already exist in the database as UPDATE nodes
46
+ * [Fixed] Patchers will now interpret missing parameters as "default values" e.g. project update without `status` parameter assumed to be active.
47
+
48
+ ## 0.3.1 // 2015-12-31
49
+
50
+ * [Bugfix] IDRefs will now return `nil` if the relevant ID is not set.
51
+
52
+ ## 0.3.0 // 2015-10-17
53
+
54
+ * [New] Now supports remote syncing with the Omni Sync Server!
55
+
56
+ ## 0.2.0 // 2015-10-11
57
+
58
+ * [Bugfix] Will now turn tasks into projects and projects into tasks if the user has done this in OmniFocus.
59
+ * [Bugfix] Rubyfocus::Patch now does patch application, rather than delegating to the Fetcher.
60
+
61
+ ## 0.1.0 // 2015-10-10
62
+
63
+ * Hello, world!
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Version: 0.5.0
1
+ # Version: 0.5.6
2
2
 
3
3
  Rubyfocus is a one-way (read-only) ruby bridge to OmniFocus. Analyse, store, inspect, or play with your projects and tasks in OmniFocus from the comfort and flexibility of ruby!
4
4
 
@@ -22,7 +22,7 @@ Now build and install it!
22
22
 
23
23
  ```
24
24
  gem build rubyfocus.gemspec
25
- gem install rubyfocus-0.3.0.gem
25
+ gem install rubyfocus-0.5.6.gem
26
26
  ```
27
27
 
28
28
  # Usage
@@ -0,0 +1,11 @@
1
+ class Time
2
+ # Will return nil if +val+ is nil or a blank string.
3
+ # Otherwise, will parse as normal using Time.parse
4
+ def self.safely_parse(val)
5
+ if val.nil? || val == ""
6
+ nil
7
+ else
8
+ parse(val)
9
+ end
10
+ end
11
+ end
@@ -28,8 +28,8 @@ class Rubyfocus::Item
28
28
 
29
29
  def apply_xml(n)
30
30
  self.id ||= n["id"] # This should not change once set!
31
- conditional_set(:added, n.at_xpath("xmlns:added")) { |e| Time.parse(e) }
32
- conditional_set(:modified, n.at_xpath("xmlns:modified")) { |e| Time.parse(e) }
31
+ conditional_set(:added, n.at_xpath("xmlns:added")) { |e| Time.safely_parse(e) }
32
+ conditional_set(:modified, n.at_xpath("xmlns:modified")) { |e| Time.safely_parse(e) }
33
33
  end
34
34
  alias_method :<<, :apply_xml
35
35
 
@@ -41,7 +41,7 @@ class Rubyfocus::Project < Rubyfocus::Task
41
41
  p = n.at_xpath("xmlns:project")
42
42
  conditional_set(:singleton, p.at_xpath("xmlns:singleton")) { |e| e.inner_html == "true" }
43
43
  conditional_set(:review_interval, p.at_xpath("xmlns:review-interval") ) { |e| Rubyfocus::ReviewPeriod.from_string(e.inner_html) }
44
- conditional_set(:last_review, p.at_xpath("xmlns:last-review")) { |e| Time.parse e.inner_html }
44
+ conditional_set(:last_review, p.at_xpath("xmlns:last-review")) { |e| Time.safely_parse e.inner_html }
45
45
  conditional_set(:status, p.at_xpath("xmlns:status")) { |e| e.inner_html.to_sym }
46
46
  end
47
47
 
@@ -31,9 +31,9 @@ class Rubyfocus::Task < Rubyfocus::RankedItem
31
31
  conditional_set(:note, n.at_xpath("xmlns:note")) { |e| e.inner_html.strip }
32
32
  conditional_set(:order, n.at_xpath("xmlns:order")) { |e| e.inner_html.to_sym }
33
33
  conditional_set(:flagged, n.at_xpath("xmlns:flagged")) { |e| e.inner_html == "true" }
34
- conditional_set(:start, n.at_xpath("xmlns:start")) { |e| Time.parse(e.inner_html) }
35
- conditional_set(:due, n.at_xpath("xmlns:due")) { |e| Time.parse(e.inner_html) }
36
- conditional_set(:completed, n.at_xpath("xmlns:completed")){ |e| Time.parse(e.inner_html) }
34
+ conditional_set(:start, n.at_xpath("xmlns:start")) { |e| Time.safely_parse(e.inner_html) }
35
+ conditional_set(:due, n.at_xpath("xmlns:due")) { |e| Time.safely_parse(e.inner_html) }
36
+ conditional_set(:completed, n.at_xpath("xmlns:completed")){ |e| Time.safely_parse(e.inner_html) }
37
37
  end
38
38
 
39
39
  # Convenience methods
data/version.txt CHANGED
@@ -1 +1 @@
1
- 0.5.5
1
+ 0.5.6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyfocus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan-Yves Ruzicka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -78,11 +78,10 @@ extensions: []
78
78
  extra_rdoc_files:
79
79
  - README.md
80
80
  files:
81
- - ".gitignore"
82
- - ".rspec"
83
- - Manifest
81
+ - HISTORY.md
84
82
  - README.md
85
83
  - lib/rubyfocus.rb
84
+ - lib/rubyfocus/core_ext.rb
86
85
  - lib/rubyfocus/document.rb
87
86
  - lib/rubyfocus/errors.rb
88
87
  - lib/rubyfocus/fetchers/fetcher.rb
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- .rarity
2
- pkg
3
- stage_ofocus.rb
4
- spec/files/ofocus_staging
data/.rspec DELETED
@@ -1 +0,0 @@
1
- -c
data/Manifest DELETED
@@ -1,37 +0,0 @@
1
- # INCLUDE bin/**/*
2
- # INCLUDE lib/**/*
3
- # INCLUDE *
4
- # EXCLUDE **/.DS_Store
5
- # EXCLUDE .*
6
- # EXCLUDE Manifest
7
- # EXCLUDE stage_ofocus.rb
8
- # EXCLUDE spec/files/ofocus_staging
9
-
10
- .gitignore
11
- .rspec
12
- lib/rubyfocus.rb
13
- lib/rubyfocus/document.rb
14
- lib/rubyfocus/errors.rb
15
- lib/rubyfocus/fetchers/fetcher.rb
16
- lib/rubyfocus/fetchers/local_fetcher.rb
17
- lib/rubyfocus/fetchers/oss_fetcher.rb
18
- lib/rubyfocus/includes/conditional_exec.rb
19
- lib/rubyfocus/includes/idref.rb
20
- lib/rubyfocus/includes/parser.rb
21
- lib/rubyfocus/includes/searchable.rb
22
- lib/rubyfocus/items/context.rb
23
- lib/rubyfocus/items/folder.rb
24
- lib/rubyfocus/items/item.rb
25
- lib/rubyfocus/items/named_item.rb
26
- lib/rubyfocus/items/project.rb
27
- lib/rubyfocus/items/ranked_item.rb
28
- lib/rubyfocus/items/setting.rb
29
- lib/rubyfocus/items/task.rb
30
- lib/rubyfocus/location.rb
31
- lib/rubyfocus/patch.rb
32
- lib/rubyfocus/review_period.rb
33
- lib/rubyfocus/xml_translator.rb
34
- Manifest
35
- README.md
36
- rubyfocus.gemspec
37
- version.txt