asana 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 +8 -8
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -8
- data/README.md +3 -3
- data/examples/Gemfile +1 -1
- data/examples/Gemfile.lock +5 -2
- data/lib/asana/errors.rb +9 -7
- data/lib/asana/{resources → resource_includes}/attachment_uploading.rb +0 -0
- data/lib/asana/{resources → resource_includes}/collection.rb +0 -0
- data/lib/asana/{resources → resource_includes}/event.rb +2 -0
- data/lib/asana/{resources → resource_includes}/event_subscription.rb +2 -0
- data/lib/asana/{resources → resource_includes}/events.rb +2 -0
- data/lib/asana/{resources → resource_includes}/registry.rb +1 -0
- data/lib/asana/{resources → resource_includes}/resource.rb +1 -1
- data/lib/asana/{resources → resource_includes}/response_helper.rb +0 -0
- data/lib/asana/resources.rb +5 -2
- data/lib/asana/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2VlNTc3NDk5ZjRlMjQ2YzM0ZjdkMDExNDEwNGY3OWE4YmQwOGQ4ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmJjOGJiOTE1N2IzNTlhOGNlMGVkMmU4NDkyMzdmOTgxYzI4NTc3Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2RhYzc1MWEwZWJlN2QwZTM1ZWI3MWI3NmMxMjI2YmFkZGEzMTRiMGMwZDI1
|
10
|
+
NWEwZDBjM2RiODE5ZTZlZTkzZDBhNzkzMDg1NzAwYzZkNzE3YzlmMDA2NTUz
|
11
|
+
YjE3YmY4ODU3YThhNDhjZThmODA4N2ZkZDNlZDFmOWJiNGIxMGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWFhOWI2ZjU2YjMxYmFmNzJmYjM3NDAxODlkNWIwYWNhYWVhNzJjYmVhM2E5
|
14
|
+
YmJkZmIzNWE5ZTQzNjkzMTc0MDc5ZTExMGExOWE5OTNhNTRhMmI0NWU0ZTE5
|
15
|
+
NzA0Zjc4MmE3NDM2NGJkOGNkNDM3ZDc2YTk0NmJmOWFjOTgwZTM=
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -4,14 +4,7 @@ AllCops:
|
|
4
4
|
Exclude:
|
5
5
|
- 'bin/**/*'
|
6
6
|
- 'examples/**/*'
|
7
|
-
- 'lib/asana/resources
|
8
|
-
- 'lib/asana/resources/project.rb'
|
9
|
-
- 'lib/asana/resources/story.rb'
|
10
|
-
- 'lib/asana/resources/tag.rb'
|
11
|
-
- 'lib/asana/resources/task.rb'
|
12
|
-
- 'lib/asana/resources/team.rb'
|
13
|
-
- 'lib/asana/resources/user.rb'
|
14
|
-
- 'lib/asana/resources/workspace.rb'
|
7
|
+
- 'lib/asana/resources/*'
|
15
8
|
- 'spec/templates/unicorn.rb'
|
16
9
|
- 'spec/templates/world.rb'
|
17
10
|
- 'test.rb'
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Asana
|
2
2
|
|
3
|
-
[](https://travis-ci.org/Asana/ruby-asana)
|
3
|
+
[](https://travis-ci.org/Asana/ruby-asana)
|
4
4
|
[](https://codeclimate.com/github/Asana/ruby-asana)
|
5
5
|
[](https://gemnasium.com/Asana/ruby-asana)
|
6
6
|
|
@@ -16,7 +16,7 @@ Supported rubies:
|
|
16
16
|
Add this line to your application's Gemfile:
|
17
17
|
|
18
18
|
```ruby
|
19
|
-
gem '
|
19
|
+
gem 'asana'
|
20
20
|
```
|
21
21
|
|
22
22
|
And then execute:
|
@@ -25,7 +25,7 @@ And then execute:
|
|
25
25
|
|
26
26
|
Or install it yourself as:
|
27
27
|
|
28
|
-
$ gem install
|
28
|
+
$ gem install asana
|
29
29
|
|
30
30
|
## Usage
|
31
31
|
|
data/examples/Gemfile
CHANGED
data/examples/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
|
4
|
+
asana (0.1.1)
|
5
5
|
faraday (~> 0.9)
|
6
6
|
faraday_middleware (~> 0.9)
|
7
7
|
faraday_middleware-multi_json (~> 0.0)
|
@@ -50,7 +50,10 @@ PLATFORMS
|
|
50
50
|
ruby
|
51
51
|
|
52
52
|
DEPENDENCIES
|
53
|
+
asana!
|
53
54
|
omniauth
|
54
55
|
omniauth-asana
|
55
|
-
ruby-asana!
|
56
56
|
sinatra
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
1.10.3
|
data/lib/asana/errors.rb
CHANGED
@@ -19,8 +19,8 @@ module Asana
|
|
19
19
|
# user could not be authenticated.
|
20
20
|
NotAuthorized = Class.new(APIError) do
|
21
21
|
def to_s
|
22
|
-
'A valid API key was not provided with the request, so the API could'
|
23
|
-
'
|
22
|
+
'A valid API key was not provided with the request, so the API could '\
|
23
|
+
'not associate a user with the request.'
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -28,8 +28,8 @@ module Asana
|
|
28
28
|
# access the requested resource or to perform the requested action on it.
|
29
29
|
Forbidden = Class.new(APIError) do
|
30
30
|
def to_s
|
31
|
-
'The API key and request syntax was valid but the server is refusing'
|
32
|
-
'to complete the request. This can happen if you try to read or write'
|
31
|
+
'The API key and request syntax was valid but the server is refusing '\
|
32
|
+
'to complete the request. This can happen if you try to read or write '\
|
33
33
|
'to objects or properties that the user does not have access to.'
|
34
34
|
end
|
35
35
|
end
|
@@ -37,8 +37,8 @@ module Asana
|
|
37
37
|
# Public: A 404 error. Raised when the requested resource doesn't exist.
|
38
38
|
NotFound = Class.new(APIError) do
|
39
39
|
def to_s
|
40
|
-
'Either the request method and path supplied do not specify a known'
|
41
|
-
'action in the API, or the object specified by the request does not'
|
40
|
+
'Either the request method and path supplied do not specify a known '\
|
41
|
+
'action in the API, or the object specified by the request does not '\
|
42
42
|
'exist.'
|
43
43
|
end
|
44
44
|
end
|
@@ -54,7 +54,7 @@ module Asana
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def to_s
|
57
|
-
"There has been an error on Asana's end. Use this unique phrase to"
|
57
|
+
"There has been an error on Asana's end. Use this unique phrase to "\
|
58
58
|
'identify the problem when contacting developer support: ' +
|
59
59
|
%("#{@phrase}")
|
60
60
|
end
|
@@ -64,6 +64,7 @@ module Asana
|
|
64
64
|
# parameters. It contains a list of errors indicating the specific problems.
|
65
65
|
InvalidRequest = Class.new(APIError) do
|
66
66
|
attr_accessor :errors
|
67
|
+
|
67
68
|
def initialize(errors)
|
68
69
|
@errors = errors
|
69
70
|
end
|
@@ -78,6 +79,7 @@ module Asana
|
|
78
79
|
# before retrying the operation.
|
79
80
|
RateLimitEnforced = Class.new(APIError) do
|
80
81
|
attr_accessor :retry_after_seconds
|
82
|
+
|
81
83
|
def initialize(retry_after_seconds)
|
82
84
|
@retry_after_seconds = retry_after_seconds
|
83
85
|
end
|
File without changes
|
File without changes
|
File without changes
|
data/lib/asana/resources.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
require_relative '
|
2
|
-
require_relative '
|
1
|
+
require_relative 'resource_includes/resource'
|
2
|
+
require_relative 'resource_includes/collection'
|
3
|
+
|
4
|
+
Dir[File.join(File.dirname(__FILE__), 'resource_includes', '*.rb')]
|
5
|
+
.each { |resource| require resource }
|
3
6
|
|
4
7
|
Dir[File.join(File.dirname(__FILE__), 'resources', '*.rb')]
|
5
8
|
.each { |resource| require resource }
|
data/lib/asana/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Txus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -150,17 +150,17 @@ files:
|
|
150
150
|
- lib/asana/http_client/environment_info.rb
|
151
151
|
- lib/asana/http_client/error_handling.rb
|
152
152
|
- lib/asana/http_client/response.rb
|
153
|
+
- lib/asana/resource_includes/attachment_uploading.rb
|
154
|
+
- lib/asana/resource_includes/collection.rb
|
155
|
+
- lib/asana/resource_includes/event.rb
|
156
|
+
- lib/asana/resource_includes/event_subscription.rb
|
157
|
+
- lib/asana/resource_includes/events.rb
|
158
|
+
- lib/asana/resource_includes/registry.rb
|
159
|
+
- lib/asana/resource_includes/resource.rb
|
160
|
+
- lib/asana/resource_includes/response_helper.rb
|
153
161
|
- lib/asana/resources.rb
|
154
162
|
- lib/asana/resources/attachment.rb
|
155
|
-
- lib/asana/resources/attachment_uploading.rb
|
156
|
-
- lib/asana/resources/collection.rb
|
157
|
-
- lib/asana/resources/event.rb
|
158
|
-
- lib/asana/resources/event_subscription.rb
|
159
|
-
- lib/asana/resources/events.rb
|
160
163
|
- lib/asana/resources/project.rb
|
161
|
-
- lib/asana/resources/registry.rb
|
162
|
-
- lib/asana/resources/resource.rb
|
163
|
-
- lib/asana/resources/response_helper.rb
|
164
164
|
- lib/asana/resources/story.rb
|
165
165
|
- lib/asana/resources/tag.rb
|
166
166
|
- lib/asana/resources/task.rb
|