rubyfocus 0.5.15 → 0.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +8 -1
- data/README.md +1 -1
- data/lib/rubyfocus/fetchers/local_fetcher.rb +61 -8
- data/rubyfocus.gemspec +2 -2
- data/version.txt +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a5d202cfe72692a61bbc8a64095b20bff39a7bf9ce1925e8cfa9cb868c06c0ba
|
4
|
+
data.tar.gz: 4a476d1c8acbe3ea05435ec43151c063b4c3b3f7417464fb8f18deaf08b92adc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a9e39b6683470c437d020f7f4cd054e4331f74408c097161ac6fa6ab7d536dfc6f0916362b8fca8d7a19f4fe39918da0b2196ec5fea4d80c3a47dd55a098a64
|
7
|
+
data.tar.gz: 44c688ddf537a88e6fec2bb5d0d40f9c13f113e830d7f8d69dd9e3edfc136ee1d8a6b70f082f5cf2bda743501ffb5692724dd37b0de0d8a49a04eac88cf3ab6d
|
data/CHANGELOG.md
CHANGED
@@ -2,9 +2,16 @@
|
|
2
2
|
|
3
3
|
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.5.16] - 2019-04-05
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
* Updated OmniFocus locations code, to deal with current and future versions of OmniFocus
|
10
|
+
* Updated gem dependencies, to address security issues.
|
11
|
+
|
5
12
|
## [0.5.15]
|
6
13
|
|
7
|
-
|
14
|
+
### Changed
|
8
15
|
|
9
16
|
* Fixed further bugs related to Rubyfocus' not being able to pick the base file from OmniFocus' local file store.
|
10
17
|
|
data/README.md
CHANGED
@@ -65,18 +65,71 @@ class Rubyfocus::LocalFetcher < Rubyfocus::Fetcher
|
|
65
65
|
#---------------------------------------
|
66
66
|
# Location file setters and getters
|
67
67
|
|
68
|
-
#
|
68
|
+
# Where do we expect OS X to store containers?
|
69
|
+
def container_location
|
70
|
+
@container_location ||= File.join(ENV["HOME"], "Library/Containers/")
|
71
|
+
end
|
72
|
+
|
73
|
+
attr_writer :container_location
|
74
|
+
|
75
|
+
# Default (non app-store) file location. Will look for "com.omnigroup.Omnifocus###"
|
76
|
+
# (where ### is a number) and pick the most recent.
|
77
|
+
#
|
78
|
+
# If it cannot find any directories matching this pattern, will return ""
|
79
|
+
# (empty string). Note that File.exists?("") returns `false`.
|
69
80
|
def default_location
|
70
|
-
@default_location
|
71
|
-
|
72
|
-
|
81
|
+
if @default_location.nil?
|
82
|
+
omnifocus_directories = Dir[File.join(container_location, "com.omnigroup.OmniFocus*")]
|
83
|
+
|
84
|
+
default_omnifocus_directories = omnifocus_directories.select{ |path|
|
85
|
+
File.basename(path) =~ /com\.omnigroup\.OmniFocus\d+$/
|
86
|
+
}
|
87
|
+
|
88
|
+
if (default_omnifocus_directories.size == 0)
|
89
|
+
# If none match the regexp, we return ""
|
90
|
+
@default_location = ""
|
91
|
+
else
|
92
|
+
# Otherwise, match highest
|
93
|
+
last_omnifocus_directory = default_omnifocus_directories.sort().last()
|
94
|
+
|
95
|
+
@default_location = File.join(
|
96
|
+
last_omnifocus_directory,
|
97
|
+
"Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
|
98
|
+
)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
return @default_location
|
73
103
|
end
|
74
104
|
|
75
|
-
#
|
105
|
+
# App store file location. Will look for "com.omnigroup.Omnifocus###.MacAppStore"
|
106
|
+
# (where ### is a number) and pick the most recent.
|
107
|
+
#
|
108
|
+
# If it cannot find any directories matching this pattern, will return ""
|
109
|
+
# (empty string). Note that File.exists?("") returns `false`.
|
76
110
|
def appstore_location
|
77
|
-
@appstore_location
|
78
|
-
|
79
|
-
|
111
|
+
if @appstore_location.nil?
|
112
|
+
omnifocus_directories = Dir[File.join(container_location, "com.omnigroup.OmniFocus*")]
|
113
|
+
|
114
|
+
appstore_omnifocus_directories = omnifocus_directories.select{ |path|
|
115
|
+
File.basename(path) =~ /com\.omnigroup\.OmniFocus\d+\.MacAppStore$/
|
116
|
+
}
|
117
|
+
|
118
|
+
if (appstore_omnifocus_directories.size == 0)
|
119
|
+
# If none match the regexp, we return ""
|
120
|
+
@appstore_location = ""
|
121
|
+
else
|
122
|
+
# Otherwise, match highest
|
123
|
+
last_omnifocus_directory = appstore_omnifocus_directories.sort().last()
|
124
|
+
|
125
|
+
@appstore_location = File.join(
|
126
|
+
last_omnifocus_directory,
|
127
|
+
"Data/Library/Application Support/OmniFocus/OmniFocus.ofocus"
|
128
|
+
)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
return @appstore_location
|
80
133
|
end
|
81
134
|
|
82
135
|
# Determine location based on assigned and default values. Returns +nil+
|
data/rubyfocus.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.extra_rdoc_files = ["README.md"]
|
18
18
|
|
19
19
|
# Add runtime dependencies here
|
20
|
-
s.add_runtime_dependency "nokogiri", "~> 1.
|
21
|
-
s.add_runtime_dependency "rubyzip", "~> 1.2", ">= 1.2.
|
20
|
+
s.add_runtime_dependency "nokogiri", "~> 1.8", ">= 1.8.5"
|
21
|
+
s.add_runtime_dependency "rubyzip", "~> 1.2", ">= 1.2.2"
|
22
22
|
s.add_runtime_dependency "httparty", "~> 0.13", ">= 0.13.7"
|
23
23
|
end
|
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.16
|
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.
|
4
|
+
version: 0.5.16
|
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:
|
11
|
+
date: 2019-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.8'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.8.5
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1.
|
29
|
+
version: '1.8'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
32
|
+
version: 1.8.5
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: rubyzip
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '1.2'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.2.
|
42
|
+
version: 1.2.2
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '1.2'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.2.
|
52
|
+
version: 1.2.2
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: httparty
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.7.3
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Pure ruby bridge to OmniFocus.
|