workmate 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1 +1,2 @@
1
- v0.1.0 first release
1
+ v0.1.0 first release
2
+ v0.1.1 fix application url
@@ -1,13 +1,9 @@
1
1
  == Installation
2
- $ gem install gcal-ruby
2
+ $ gem install workmate
3
3
 
4
4
  == Using
5
- require 'gcal'
5
+ require 'workmate'
6
6
 
7
- client = GCal::Client.new(api_key, api_secret, oauth_token, oauth_secret)
8
- client.all_calendars # returns all user calendars
9
- client.own_calendars # returns user owned calendars
10
- client.events(calendar.id) # returns events in calendar
11
-
12
- # retrieving events with options
13
- client.events(calendar.id, :start_time => 1.month.ago, :timezone => 'Europe/Moscow')
7
+ client = Workmate::Client.new(api_key, api_secret, oauth_token)
8
+ client.me # returns current user
9
+ client.user(user_id) # returns user by Id
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
3
3
  require 'rake'
4
4
  require 'echoe'
5
5
 
6
- Echoe.new('workmate', '0.1.0') do |p|
6
+ Echoe.new('workmate', '0.1.1') do |p|
7
7
  p.description = "Ruby library for Workmate API."
8
8
  p.url = "http://github.com/workmate/workmate-ruby"
9
9
  p.author = "Iskander Haziev"
@@ -1,4 +1,3 @@
1
1
  module Workmate
2
2
  require 'workmate/client'
3
- require 'workmate/user'
4
3
  end
@@ -2,11 +2,11 @@ require 'json'
2
2
  require 'oauth2'
3
3
  module Workmate
4
4
  class Client
5
- BASE_URL = 'http://localhost.localdomain:3000'
5
+ BASE_URL = 'https://workmateapp.com'
6
6
  API_URL = "#{BASE_URL}/api"
7
7
 
8
- def initialize(client_id, client_secret, token = nil)
9
- @client = OAuth2::Client.new(client_id, client_secret, :site => BASE_URL)
8
+ def initialize(client_id, client_secret, token = nil, url = BASE_URL)
9
+ @client = OAuth2::Client.new(client_id, client_secret, :site => url)
10
10
  @token = OAuth2::AccessToken.from_hash(@client, access_token: token)
11
11
  end
12
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{workmate}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = [%q{Iskander Haziev}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workmate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2
16
- requirement: &2164875160 !ruby/object:Gem::Requirement
16
+ requirement: &2169904140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164875160
24
+ version_requirements: *2169904140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &2164874060 !ruby/object:Gem::Requirement
27
+ requirement: &2169834880 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2164874060
35
+ version_requirements: *2169834880
36
36
  description: Ruby library for Workmate API.
37
37
  email: gvalmon@gmail.com
38
38
  executables: []