brainspace 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48d471a444baaf087f07b5f36cde0f05ada724bb
4
- data.tar.gz: c1cfec19537408264943f4793506493cc90fe3aa
3
+ metadata.gz: 0886920eea0a52ecd66691a48c644c1cf5aa803e
4
+ data.tar.gz: 8e26aa548e91922fa034da99b81d79894f9b15ea
5
5
  SHA512:
6
- metadata.gz: c04c7c20015d9b7ff26e3c6d9baecb1221a01681ca0914949ff1d14d456c09abdf6c4b42d256ff14db5ebd40d36480a614945c7726d1ba972fe5aa2340edc772
7
- data.tar.gz: fd04ab43966cc1acbf5e42c8c0b7349fb1d4c04b26e35709461ffb1e0318835b5b04184d78573b5dbeaa7d1a9f94b4bfb1a4085a3776548e54a68a5b028107ce
6
+ metadata.gz: db15db43b7241e265a89722b0e31d07a4cd54fc4c2710574f42bd91fe70cff72545b87f1acc6f14c4ffda845df2c426c47be163d2d3e1a84b5327820f735eb02
7
+ data.tar.gz: 33df2bba3dd9c8f2b4dd99e8426b5d12c986c210d4b4e5a1fce054e8dd38fb52320f4c47a16f5c6b1df17dc03ce67962364fcee0bae49fdc0fc583e63c2c6940
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- brainspace (0.0.1)
4
+ brainspace (0.1.0)
5
5
  faraday
6
6
  hashie
7
7
  json
@@ -19,6 +19,6 @@ module Brainspace
19
19
  end
20
20
 
21
21
  def self.apikey
22
- @@apikey ||= JSON.parse(Faraday.get("#{config.host}/authenticate", {pass: config.password, user: config.user}).body)['data']
22
+ JSON.parse(Faraday.get("#{config.host}/authenticate", {pass: config.password, user: config.user}).body)['data']
23
23
  end
24
24
  end
@@ -7,7 +7,15 @@ module Brainspace
7
7
  end
8
8
 
9
9
  def method_missing(method_sym, *arguments, &block)
10
- @mash.send(method_sym)
10
+ @mash.send(method_sym, arguments)
11
+ end
12
+
13
+ def to_json(opts)
14
+ @mash.to_json(opts)
15
+ end
16
+
17
+ def as_json(opts)
18
+ @mash.as_json(opts)
11
19
  end
12
20
  end
13
21
  end
@@ -1,3 +1,3 @@
1
1
  module Brainspace
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,5 +1,52 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.brainspace.com/authenticate?pass=DUMMY&user=dummy@dummy.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - X-Requested-With,Content-Type,Accept,X-CSRF-Token
23
+ Access-Control-Allow-Methods:
24
+ - GET, PUT, POST, PATCH, DELETE, OPTIONS
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Fri, 03 Oct 2014 19:15:03 GMT
31
+ Etag:
32
+ - '"1766880628"'
33
+ Server:
34
+ - nginx/1.4.6 (Ubuntu)
35
+ X-Powered-By:
36
+ - Express
37
+ Content-Length:
38
+ - '59'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "success": true,
46
+ "data": "542ef5b7e3e72f2344df4d72"
47
+ }
48
+ http_version:
49
+ recorded_at: Fri, 03 Oct 2014 19:15:12 GMT
3
50
  - request:
4
51
  method: get
5
52
  uri: https://api.brainspace.com/collections?apikey=542ef5b7e3e72f2344df4d72
@@ -1,5 +1,52 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.brainspace.com/authenticate?pass=DUMMY&user=dummy@dummy.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - X-Requested-With,Content-Type,Accept,X-CSRF-Token
23
+ Access-Control-Allow-Methods:
24
+ - GET, PUT, POST, PATCH, DELETE, OPTIONS
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Fri, 03 Oct 2014 19:15:03 GMT
31
+ Etag:
32
+ - '"1766880628"'
33
+ Server:
34
+ - nginx/1.4.6 (Ubuntu)
35
+ X-Powered-By:
36
+ - Express
37
+ Content-Length:
38
+ - '59'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "success": true,
46
+ "data": "542ef5b7e3e72f2344df4d72"
47
+ }
48
+ http_version:
49
+ recorded_at: Fri, 03 Oct 2014 19:15:12 GMT
3
50
  - request:
4
51
  method: get
5
52
  uri: https://api.brainspace.com/collections/3713?apikey=542ef5b7e3e72f2344df4d72
@@ -1,5 +1,52 @@
1
1
  ---
2
2
  http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.brainspace.com/authenticate?pass=DUMMY&user=dummy@dummy.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Access-Control-Allow-Headers:
22
+ - X-Requested-With,Content-Type,Accept,X-CSRF-Token
23
+ Access-Control-Allow-Methods:
24
+ - GET, PUT, POST, PATCH, DELETE, OPTIONS
25
+ Access-Control-Allow-Origin:
26
+ - '*'
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Date:
30
+ - Fri, 03 Oct 2014 19:15:03 GMT
31
+ Etag:
32
+ - '"1766880628"'
33
+ Server:
34
+ - nginx/1.4.6 (Ubuntu)
35
+ X-Powered-By:
36
+ - Express
37
+ Content-Length:
38
+ - '59'
39
+ Connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: |-
44
+ {
45
+ "success": true,
46
+ "data": "542ef5b7e3e72f2344df4d72"
47
+ }
48
+ http_version:
49
+ recorded_at: Fri, 03 Oct 2014 19:15:12 GMT
3
50
  - request:
4
51
  method: get
5
52
  uri: https://api.brainspace.com/discovery/collection/3713?apikey=542ef5b7e3e72f2344df4d72
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brainspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fábio Batista