quaderno 1.12.1 → 1.12.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9ae9abea0d3343d938483cdd28d73d26cfa81d7
4
- data.tar.gz: ff96ce978beafeec37db10af8c19ebbc2e08ea79
3
+ metadata.gz: 7d577205a1e6a23c45fd4540b9d544101480b388
4
+ data.tar.gz: c638102be8f4e3d93832a6d0b0f63e5a584d547d
5
5
  SHA512:
6
- metadata.gz: a3476624509e49e4a2a28f49ec3767c0e6456af336291db6f5409c71943e86b6a0d0e4bbb6d8d688034339268a1d3da948f705c37d532635dd8c9782b1e8d0d3
7
- data.tar.gz: 966aa6365df9eec3403bbee7504cc7a24f4959e3cb21e216e9ef6c9aaadc1cfb253d7b248809239d08e6cb05ff393e2982353b2cb2bcafae7fb6e33f196b64a7
6
+ metadata.gz: 23ac0a3b1a68f69efe4ac85e687558b17d288d66c997a76a9af11aa602d1413d2652ebed73e036ef7e2ab32e534877616f884c6d7576c59a9e953b4986b7b04f
7
+ data.tar.gz: bdc724107f2c6b3d405f3a9ed9dbea4ad4cbbdbcba721ddc29681badc3dd5408e86e1f7eac004f2048966aebe85cac5a83fb6a1a010e210d594aed154effa61a
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Quaderno-ruby is a ruby wrapper for [Quaderno API] (https://github.com/quaderno/quaderno-api).
4
4
  As the API, it's mostly CRUD.
5
5
 
6
- Current version is 1.12.0 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
6
+ Current version is 1.12.2 See the changelog [here](https://github.com/quaderno/quaderno-ruby/blob/master/changelog.md)
7
7
 
8
8
  ## Installation & Configuration
9
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.12.1
1
+ 1.12.2
data/changelog.md CHANGED
@@ -1,4 +1,7 @@
1
1
  #Changelog
2
+ ##1.12.2
3
+ * Added `me` method.
4
+
2
5
  ##1.12.0
3
6
  * Added thread-safe credentials configuration.
4
7
  * `all` methods returns a `Quaderno::Object` with pagination info instead of an `Array`
@@ -78,6 +78,22 @@ module Quaderno
78
78
  true
79
79
  end
80
80
 
81
+ def self.me(options = {})
82
+ options[:auth_token] ||= auth_token
83
+ options[:url] ||= url
84
+
85
+ authentication = get_authentication(options)
86
+
87
+ party_response = get("#{authentication[:url]}me.json",
88
+ basic_auth: authentication[:basic_auth],
89
+ headers: version_header.merge(authentication[:headers])
90
+ )
91
+
92
+ check_exception_for(party_response, { subdomain_or_token: true })
93
+
94
+ party_response.parsed_response
95
+ end
96
+
81
97
  #Returns the rate limit information: limit and remaining requests
82
98
  def self.rate_limit_info
83
99
  party_response = get("#{@@url}ping.json", basic_auth: { username: auth_token }, headers: version_header)
data/quaderno.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: quaderno 1.12.1 ruby lib
5
+ # stub: quaderno 1.12.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "quaderno"
9
- s.version = "1.12.1"
9
+ s.version = "1.12.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Recrea"]
14
- s.date = "2017-06-16"
14
+ s.date = "2017-06-23"
15
15
  s.description = " A ruby wrapper for Quaderno API "
16
16
  s.email = "carlos@recrea.es"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quaderno
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Recrea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-16 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty