openlab_ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -3
- data/Rakefile +1 -1
- data/lib/openlab/client.rb +29 -0
- data/lib/{openlab_ruby → openlab}/projects.rb +3 -3
- data/lib/openlab/version.rb +3 -0
- data/lib/openlab_ruby.rb +4 -4
- data/test/openlab_ruby_test.rb +2 -2
- metadata +6 -6
- data/lib/openlab_ruby/client.rb +0 -21
- data/lib/openlab_ruby/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cdd18b2d90443fba160bcef6380a93f2454fc2b
|
4
|
+
data.tar.gz: 3b0577ce3736c1f1f991d74667e040235d923a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ebb87139c20ea27858c0deba536ff1613a0f21d5d9cb023d54010df17d64821cd2d26fd66cb55755d522ca4a900d7a787fb5c8273ac267b7b4617c764cf1bb
|
7
|
+
data.tar.gz: f80071259acd700eadcb9578177827c02f53e256f7567a9001898d88917c76cc7e086d4b211bc68645e24991702b7ddb47482fd376a7bd8543d0758dde8796a6
|
data/README.rdoc
CHANGED
data/Rakefile
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
module Openlab
|
4
|
+
class Client
|
5
|
+
include HTTParty
|
6
|
+
attr_reader :app_secret
|
7
|
+
format :json
|
8
|
+
|
9
|
+
def initialize(app_secret: nil)
|
10
|
+
@app_secret = app_secret || Openlab.config.app_secret
|
11
|
+
app_secret = @app_secret
|
12
|
+
|
13
|
+
self.class.base_uri Openlab.config.base_uri
|
14
|
+
self.class.headers 'Accept' => 'application/json', 'Authorization' => "Token token=#{app_secret}"
|
15
|
+
end
|
16
|
+
|
17
|
+
def projects
|
18
|
+
@projects ||= Openlab::Projects.new(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
def method_missing(method_name, *arguments, &block)
|
22
|
+
self.class.respond_to?(method_name) ? self.class.__send__(method_name, *arguments, &block) : super
|
23
|
+
end
|
24
|
+
|
25
|
+
def respond_to?(method_name, include_private = false)
|
26
|
+
self.class.respond_to?(method_name) || super
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
module
|
1
|
+
module Openlab
|
2
2
|
class Projects
|
3
3
|
PROJECTS_PATH = '/projects'
|
4
|
-
|
4
|
+
|
5
5
|
attr_accessor :client
|
6
6
|
|
7
7
|
def initialize(client = nil)
|
8
|
-
@client = client ||
|
8
|
+
@client = client || Openlab::Client.new
|
9
9
|
end
|
10
10
|
|
11
11
|
def search(q, opts = {})
|
data/lib/openlab_ruby.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
1
|
+
require 'openlab/version'
|
2
|
+
require 'openlab/client'
|
3
|
+
require 'openlab/projects'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Openlab
|
6
6
|
class << self
|
7
7
|
attr_accessor :config
|
8
8
|
|
data/test/openlab_ruby_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openlab_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Florentin
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.13'
|
27
|
-
description:
|
27
|
+
description: Openlab is an api wrapper for Openlab api
|
28
28
|
email:
|
29
29
|
- nicolas@sleede.com
|
30
30
|
executables: []
|
@@ -34,10 +34,10 @@ files:
|
|
34
34
|
- MIT-LICENSE
|
35
35
|
- README.rdoc
|
36
36
|
- Rakefile
|
37
|
+
- lib/openlab/client.rb
|
38
|
+
- lib/openlab/projects.rb
|
39
|
+
- lib/openlab/version.rb
|
37
40
|
- lib/openlab_ruby.rb
|
38
|
-
- lib/openlab_ruby/client.rb
|
39
|
-
- lib/openlab_ruby/projects.rb
|
40
|
-
- lib/openlab_ruby/version.rb
|
41
41
|
- lib/tasks/openlab_ruby_tasks.rake
|
42
42
|
- test/dummy/README.rdoc
|
43
43
|
- test/dummy/Rakefile
|
@@ -98,7 +98,7 @@ rubyforge_project:
|
|
98
98
|
rubygems_version: 2.4.8
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
|
-
summary:
|
101
|
+
summary: Openlab is an api wrapper for Openlab api
|
102
102
|
test_files:
|
103
103
|
- test/dummy/app/assets/javascripts/application.js
|
104
104
|
- test/dummy/app/assets/stylesheets/application.css
|
data/lib/openlab_ruby/client.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'httparty'
|
2
|
-
|
3
|
-
module OpenlabRuby
|
4
|
-
class Client
|
5
|
-
include HTTParty
|
6
|
-
attr_reader :app_secret
|
7
|
-
format :json
|
8
|
-
|
9
|
-
def initialize(app_secret: nil)
|
10
|
-
@app_secret = app_secret || OpenlabRuby.config.app_secret
|
11
|
-
app_secret = @app_secret
|
12
|
-
|
13
|
-
self.class.base_uri OpenlabRuby.config.base_uri
|
14
|
-
self.class.headers 'Accept' => 'application/json', 'Authorization' => "Token token=#{app_secret}"
|
15
|
-
end
|
16
|
-
|
17
|
-
def projects
|
18
|
-
@projects ||= OpenlabRuby::Projects.new(self)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/lib/openlab_ruby/version.rb
DELETED