timekit 0.1.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a949e4226d697c9097cb9b375019fe09de090c6e
4
- data.tar.gz: af28a8f0b4cef1cf9de19eee1d03b06f76a44d7e
3
+ metadata.gz: 66b5a72518833ff8e3433bd41b8ce0f8140b0aa2
4
+ data.tar.gz: 66190bf36b9c5573660179de6c37fdd204484c84
5
5
  SHA512:
6
- metadata.gz: 50ba7321a6251f3703446ec428530b2f7898901dac50b7c9ba0619c2ac206fc5a85e4d3a82afe8e2f83443c6023faf9fa6fa7b00c9f9b2fcb39516d26e438e51
7
- data.tar.gz: 48a5d03e9c6f8a0d72483bd4303299b51c5059a0fe3e1497e811e3877e33cbda00e80e522322abd61d9fde1a73f4decab80baf4fe7024b247ea190824f9f8c5e
6
+ metadata.gz: e8fbaf37e4a43fd006e1f98eb6c7ee1164a16a8bd726b67240956fb3c3af2e558e77b045f60e5bc3006ef44ebf2d6277ff7cec968a235a97394cc357cf414ad3
7
+ data.tar.gz: fe99a6a55789db2040375d40582d27b9844704f51a314356b15350f714af784b3084287fbe150dfbf0ad88cf6bfb7d2c153af5b3fc0d858ddae34087eab9a46f
data/README.md CHANGED
@@ -1,8 +1,19 @@
1
1
  # The Timekit Ruby Gem
2
2
 
3
3
  [![Gem Version](http://img.shields.io/gem/v/timekit.svg)][gem]
4
+ [![Build Status](http://img.shields.io/travis/mgauthier/timekit.svg)][travis]
5
+ [![Dependency Status](http://img.shields.io/gemnasium/mgauthier/timekit.svg)][gemnasium]
6
+ [![Code Climate](http://img.shields.io/codeclimate/github/mgauthier/timekit.svg)][codeclimate]
7
+ [![Coverage Status](http://img.shields.io/coveralls/mgauthier/timekit.svg)][coveralls]
8
+ [![Inline docs](http://inch-ci.org/github/mgauthier/timekit.svg?branch=master)](http://inch-ci.org/github/mgauthier/timekit)
4
9
 
5
10
  [gem]: https://rubygems.org/gems/timekit
11
+ [travis]: https://travis-ci.org/mgauthier/timekit
12
+ [gemnasium]: https://gemnasium.com/mgauthier/timekit
13
+ [codeclimate]: https://codeclimate.com/github/mgauthier/timekit
14
+ [coveralls]: https://coveralls.io/r/mgauthier/timekit
15
+ [inchpages]: http://inch-ci.org/github/mgauthier/timekit
16
+
6
17
 
7
18
  A Ruby interface to the Timekit API.
8
19
 
@@ -319,10 +330,9 @@ client.delete('widget-id')
319
330
  This library aims to support and is [tested against][travis] the following Ruby
320
331
  versions:
321
332
 
322
- * Ruby 2.0.0
323
333
  * Ruby 2.1
324
334
  * Ruby 2.2
325
- * JRuby 9.1.1.0
335
+ * Ruby 2.3
326
336
 
327
337
  If something doesn't work on one of these versions, it's a bug.
328
338
 
data/lib/timekit.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './timekit/config'
2
3
  require_relative './timekit/client'
3
4
  require_relative './timekit/authorization'
data/lib/timekit/app.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './app/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class App
3
4
  # Client class for the app resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/apps'.freeze
6
+ API_PATH = '/apps'
6
7
 
7
8
  def list
8
9
  get(API_PATH)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Authorization
3
4
  attr_reader :email, :api_token
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './booking/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Booking
3
4
  # Client class for the booking resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/bookings'.freeze
6
+ API_PATH = '/bookings'
6
7
 
7
8
  def list
8
9
  get(API_PATH)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './calendar/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Calendar
3
4
  # Client class for the calendar resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/calendars'.freeze
6
+ API_PATH = '/calendars'
6
7
 
7
8
  def create(
8
9
  name,
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'base64'
2
3
 
3
4
  module Timekit
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Config < Hash
3
4
  CONFIG_KEYS = [
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './credential/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Credential
3
4
  # Client class for the credential resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/credentials'.freeze
6
+ API_PATH = '/credentials'
6
7
 
7
8
  def list
8
9
  get(API_PATH)
data/lib/timekit/event.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './event/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Event
3
4
  # Client class for the event resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/events'.freeze
6
+ API_PATH = '/events'
6
7
 
7
8
  def list(start_datetime, end_datetime)
8
9
  params = {
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Filtercollection
3
4
  DAYS = %w(
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './findtime/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Findtime
3
4
  # Client class for the findtime resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/findtime'.freeze
6
+ API_PATH = '/findtime'
6
7
 
7
8
  def query(
8
9
  emails = nil,
@@ -1,9 +1,10 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Findtime
3
4
  class Filtercollections
4
5
  # Client class for the filtercollection resource
5
6
  class Client < Timekit::Client
6
- API_PATH = '/findtime/filtercollections'.freeze
7
+ API_PATH = '/findtime/filtercollections'
7
8
 
8
9
  def create(
9
10
  and_conditions = nil,
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'singleton'
2
3
  require 'rest-client'
3
4
 
@@ -6,7 +7,7 @@ module Timekit
6
7
  class Request
7
8
  include Singleton
8
9
 
9
- BASE_URL = 'https://api.timekit.io/v2'.freeze
10
+ BASE_URL = 'https://api.timekit.io/v2'
10
11
 
11
12
  [:get, :put, :post, :delete].each do |verb|
12
13
  define_method(verb) do |path, params, headers|
@@ -23,7 +24,7 @@ module Timekit
23
24
  # " #{BASE_URL}#{path}, #{params}, #{headers}"
24
25
  RestClient::Request.execute(
25
26
  method: verb.downcase.to_sym,
26
- url: "#{BASE_URL}#{path}",
27
+ url: BASE_URL + path,
27
28
  payload: params ? params.to_json : nil,
28
29
  headers: headers
29
30
  )
data/lib/timekit/user.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './user/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class User
3
4
  # Client class for the user resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/users'.freeze
6
+ API_PATH = '/users'
6
7
 
7
8
  def me
8
9
  get(API_PATH + '/me')
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  module Version
3
4
  module_function
@@ -9,12 +10,12 @@ module Timekit
9
10
 
10
11
  # @return [Integer]
11
12
  def minor
12
- 1
13
+ 2
13
14
  end
14
15
 
15
16
  # @return [Integer]
16
17
  def patch
17
- 0
18
+ 1
18
19
  end
19
20
 
20
21
  # @return [Integer, NilClass]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require_relative './widget/client'
2
3
 
3
4
  module Timekit
@@ -1,8 +1,9 @@
1
+ # frozen_string_literal: true
1
2
  module Timekit
2
3
  class Widget
3
4
  # Client class for the widget resource
4
5
  class Client < Timekit::Client
5
- API_PATH = '/widgets'.freeze
6
+ API_PATH = '/widgets'
6
7
 
7
8
  def list
8
9
  get(API_PATH)
data/timekit.gemspec CHANGED
@@ -1,22 +1,23 @@
1
+ # frozen_string_literal: true
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'timekit/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
- s.add_dependency 'rest-client', '~> 1.6'
7
+ s.add_dependency 'rest-client', '~> 2.0'
7
8
  s.name = 'timekit'
8
- s.version = '0.1.0'
9
9
  s.date = '2016-06-02'
10
10
  s.description = 'A gem to interact with the timekit.io api'
11
11
  s.summary = s.description
12
12
  s.authors = ['Michael Gauthier']
13
13
  s.email = 'michael.gauthier@gmail.com'
14
14
  s.files = ['lib/timekit.rb']
15
- s.homepage = 'http://rubygems.org/gems/timekit'
15
+ s.homepage = 'https://github.com/mgauthier/timekit'
16
16
  s.license = 'MIT'
17
17
  s.require_paths = %w(lib)
18
18
  s.files = %w(
19
19
  CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md timekit.gemspec
20
20
  ) + Dir['lib/**/*.rb']
21
21
  s.version = Timekit::Version
22
+ s.required_ruby_version = '~> 2.1'
22
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timekit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gauthier
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.6'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.6'
26
+ version: '2.0'
27
27
  description: A gem to interact with the timekit.io api
28
28
  email: michael.gauthier@gmail.com
29
29
  executables: []
@@ -59,7 +59,7 @@ files:
59
59
  - lib/timekit/widget.rb
60
60
  - lib/timekit/widget/client.rb
61
61
  - timekit.gemspec
62
- homepage: http://rubygems.org/gems/timekit
62
+ homepage: https://github.com/mgauthier/timekit
63
63
  licenses:
64
64
  - MIT
65
65
  metadata: {}
@@ -69,9 +69,9 @@ require_paths:
69
69
  - lib
70
70
  required_ruby_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: '2.1'
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
@@ -79,9 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.4.5.1
82
+ rubygems_version: 2.5.1
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: A gem to interact with the timekit.io api
86
86
  test_files: []
87
- has_rdoc: