omnifocus-github 1.4.1 → 1.5.0
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.tar.gz.sig +0 -0
- data/History.txt +12 -0
- data/lib/omnifocus/github.rb +12 -8
- metadata +16 -16
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
=== 1.5.0 / 2013-05-10
|
2
|
+
|
3
|
+
* 1 major enhancement:
|
4
|
+
|
5
|
+
* Remove support for github api tokens (no longer supported by github)
|
6
|
+
|
7
|
+
* 3 bug fixes:
|
8
|
+
|
9
|
+
* add user-agent to api requests (required by github)
|
10
|
+
* display error message if trying to authenticate without user/pass
|
11
|
+
* remove debugging output
|
12
|
+
|
1
13
|
=== 1.4.1 / 2013-04-09
|
2
14
|
|
3
15
|
* 1 bug fix:
|
data/lib/omnifocus/github.rb
CHANGED
@@ -2,7 +2,7 @@ require 'open-uri'
|
|
2
2
|
require 'json'
|
3
3
|
|
4
4
|
module OmniFocus::Github
|
5
|
-
VERSION = "1.
|
5
|
+
VERSION = "1.5.0"
|
6
6
|
PREFIX = "GH"
|
7
7
|
|
8
8
|
GH_API_DEFAULT = "https://api.github.com"
|
@@ -10,14 +10,13 @@ module OmniFocus::Github
|
|
10
10
|
def populate_github_tasks
|
11
11
|
omnifocus_git_param(:accounts, "github").split(/\s+/).each do |account|
|
12
12
|
api = omnifocus_git_param(:api, GH_API_DEFAULT, account)
|
13
|
-
#
|
14
|
-
# are present, token is used.
|
13
|
+
# User + password is required
|
15
14
|
auth = {
|
16
15
|
:user => omnifocus_git_param(:user, nil, account),
|
17
16
|
:password => omnifocus_git_param(:password, nil, account),
|
18
17
|
:token => omnifocus_git_param(:token, nil, account),
|
19
18
|
}
|
20
|
-
unless
|
19
|
+
unless (auth[:user] && auth[:password])
|
21
20
|
warn "Missing authentication parameters for account #{account}."
|
22
21
|
next
|
23
22
|
end
|
@@ -42,13 +41,18 @@ module OmniFocus::Github
|
|
42
41
|
|
43
42
|
def fetch api, auth, page
|
44
43
|
uri = URI.parse "#{api}/issues?page=#{page}"
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
|
45
|
+
headers = {
|
46
|
+
"User-Agent"=>"omnifocus-github/#{VERSION}"
|
47
|
+
}
|
48
|
+
|
49
|
+
if auth[:user] && auth[:password]
|
50
|
+
headers[:http_basic_authentication] = [auth[:user], auth[:password]]
|
49
51
|
else
|
50
52
|
raise ArgumentError, "Missing authentication"
|
51
53
|
end
|
54
|
+
|
55
|
+
uri.read headers
|
52
56
|
end
|
53
57
|
|
54
58
|
def get_last body
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnifocus-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 1.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2013-
|
39
|
+
date: 2013-05-10 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: omnifocus
|
@@ -76,11 +76,11 @@ dependencies:
|
|
76
76
|
requirements:
|
77
77
|
- - ~>
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
hash:
|
79
|
+
hash: 31
|
80
80
|
segments:
|
81
|
-
-
|
82
|
-
-
|
83
|
-
version: "
|
81
|
+
- 5
|
82
|
+
- 0
|
83
|
+
version: "5.0"
|
84
84
|
type: :development
|
85
85
|
version_requirements: *id003
|
86
86
|
- !ruby/object:Gem::Dependency
|
@@ -91,11 +91,11 @@ dependencies:
|
|
91
91
|
requirements:
|
92
92
|
- - ~>
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
hash:
|
94
|
+
hash: 27
|
95
95
|
segments:
|
96
|
-
-
|
97
|
-
-
|
98
|
-
version: "
|
96
|
+
- 4
|
97
|
+
- 0
|
98
|
+
version: "4.0"
|
99
99
|
type: :development
|
100
100
|
version_requirements: *id004
|
101
101
|
- !ruby/object:Gem::Dependency
|
@@ -106,11 +106,11 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
hash:
|
109
|
+
hash: 11
|
110
110
|
segments:
|
111
111
|
- 3
|
112
|
-
-
|
113
|
-
version: "3.
|
112
|
+
- 6
|
113
|
+
version: "3.6"
|
114
114
|
type: :development
|
115
115
|
version_requirements: *id005
|
116
116
|
description: |-
|
metadata.gz.sig
CHANGED
Binary file
|