asana 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZjVmMmMzNGZiODUxMDA4ODlkODg3NTBhMDNlZTVjYjdmMWU3YjUxYQ==
4
+ Y2VlNTc3NDk5ZjRlMjQ2YzM0ZjdkMDExNDEwNGY3OWE4YmQwOGQ4ZA==
5
5
  data.tar.gz: !binary |-
6
- ZTI3MWMwYzg5ZDkyNTIzYmUxYmE0NDZmNDJhM2M3ODFmNzdlNGRlYQ==
6
+ NmJjOGJiOTE1N2IzNTlhOGNlMGVkMmU4NDkyMzdmOTgxYzI4NTc3Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDg1YjlmOGQwMjk5MjJmZDllNTc2NDE0ZTQxNWYwYTZlZTg1NWVjYjg4NTRi
10
- YTJkMTMyNjYxNjI5NThlMTQ1ZWExZmM2M2MwN2QwYTJmMDQ3NWZiMWE5ZTNl
11
- ZmQ2OWYzMGM0ZjMwY2M4NDM4YWQ5NDk0NTYyMDIxMjI1M2VmMzQ=
9
+ Y2RhYzc1MWEwZWJlN2QwZTM1ZWI3MWI3NmMxMjI2YmFkZGEzMTRiMGMwZDI1
10
+ NWEwZDBjM2RiODE5ZTZlZTkzZDBhNzkzMDg1NzAwYzZkNzE3YzlmMDA2NTUz
11
+ YjE3YmY4ODU3YThhNDhjZThmODA4N2ZkZDNlZDFmOWJiNGIxMGU=
12
12
  data.tar.gz: !binary |-
13
- MmQ1ZTI4ODRjYjk0MWFiNGMxZWM3ZTkyNDk0OWJkNTk5NzJkMDYxYWFiOTdh
14
- ZDEyOGIxZDU5YzQxMjU0NmNlYjJhZDkzZDBkYmY2NGUxMWMyN2FhOGU2MmQ2
15
- NzBkYzc1M2EwYWI1MTI5YzhhZmU0MjRiMzY4Nzg1NzVhNjZkZmE=
13
+ YWFhOWI2ZjU2YjMxYmFmNzJmYjM3NDAxODlkNWIwYWNhYWVhNzJjYmVhM2E5
14
+ YmJkZmIzNWE5ZTQzNjkzMTc0MDc5ZTExMGExOWE5OTNhNTRhMmI0NWU0ZTE5
15
+ NzA0Zjc4MmE3NDM2NGJkOGNkNDM3ZDc2YTk0NmJmOWFjOTgwZTM=
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ .idea
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /Gemfile.lock
@@ -4,14 +4,7 @@ AllCops:
4
4
  Exclude:
5
5
  - 'bin/**/*'
6
6
  - 'examples/**/*'
7
- - 'lib/asana/resources/attachment.rb'
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
- [![Build Status](https://travis-ci.org/Asana/ruby-asana.svg)](https://travis-ci.org/Asana/ruby-asana)
3
+ [![Build Status](https://travis-ci.org/Asana/ruby-asana.svg?branch=master)](https://travis-ci.org/Asana/ruby-asana)
4
4
  [![Code Climate](https://codeclimate.com/github/Asana/ruby-asana/badges/gpa.svg)](https://codeclimate.com/github/Asana/ruby-asana)
5
5
  [![Dependency Status](https://gemnasium.com/Asana/ruby-asana.svg)](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 'ruby-asana'
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 ruby-asana
28
+ $ gem install asana
29
29
 
30
30
  ## Usage
31
31
 
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  gem 'omniauth'
4
4
  gem 'omniauth-asana'
5
5
  gem 'sinatra'
6
- gem 'ruby-asana', path: '../'
6
+ gem 'asana', path: '../'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- ruby-asana (0.1.0)
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
@@ -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
- ' not associate a user with the request.'
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
@@ -1,3 +1,5 @@
1
+ require_relative 'events'
2
+
1
3
  module Asana
2
4
  module Resources
3
5
  # An _event_ is an object representing a change to a resource that was
@@ -1,3 +1,5 @@
1
+ require_relative 'events'
2
+
1
3
  module Asana
2
4
  module Resources
3
5
  # Public: Mixin to enable a resource with the ability to fetch events about
@@ -1,3 +1,5 @@
1
+ require_relative 'event'
2
+
1
3
  module Asana
2
4
  module Resources
3
5
  # Public: An infinite collection of events.
@@ -1,3 +1,4 @@
1
+ require_relative 'resource'
1
2
  require 'set'
2
3
 
3
4
  module Asana
@@ -65,7 +65,7 @@ module Asana
65
65
  private
66
66
 
67
67
  # Internal: The Asana::Client instance.
68
- def client # rubocop:disable Style/TrivialAccessors
68
+ def client
69
69
  @_client
70
70
  end
71
71
 
@@ -1,5 +1,8 @@
1
- require_relative 'resources/resource'
2
- require_relative 'resources/collection'
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 }
@@ -1,5 +1,5 @@
1
1
  #:nodoc:
2
2
  module Asana
3
3
  # Public: Version of the gem.
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
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.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-02 00:00:00.000000000 Z
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