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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb5bbddbbb12dc789017021fd4abdde165621f0c
4
- data.tar.gz: 89c00f618d4c9c648e476567435fde23e8a4ed60
3
+ metadata.gz: 6cdd18b2d90443fba160bcef6380a93f2454fc2b
4
+ data.tar.gz: 3b0577ce3736c1f1f991d74667e040235d923a0e
5
5
  SHA512:
6
- metadata.gz: 612e9f09f10928d5b86eac0118564ea236abd6d635e25fd7d4e59faff050384b63ba245e39d78faec8681d85ea0bf5fd5f4b170208c9be3a8149331699cd6265
7
- data.tar.gz: b7a7093215501ad48dbd6da0ac562249421f15f40507a587727af5c36181cf53315f867b18d27d77c3f56add24fca15aa3db077a4d1be6fbba62a2cdf53667b3
6
+ metadata.gz: 89ebb87139c20ea27858c0deba536ff1613a0f21d5d9cb023d54010df17d64821cd2d26fd66cb55755d522ca4a900d7a787fb5c8273ac267b7b4617c764cf1bb
7
+ data.tar.gz: f80071259acd700eadcb9578177827c02f53e256f7567a9001898d88917c76cc7e086d4b211bc68645e24991702b7ddb47482fd376a7bd8543d0758dde8796a6
data/README.rdoc CHANGED
@@ -1,3 +1 @@
1
- = OpenlabRuby
2
-
3
- This project rocks and uses MIT-LICENSE.
1
+ This project rocks and uses MIT-LICENSE.
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
8
8
 
9
9
  RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'OpenlabRuby'
11
+ rdoc.title = 'Openlab'
12
12
  rdoc.options << '--line-numbers'
13
13
  rdoc.rdoc_files.include('README.rdoc')
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -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 OpenlabRuby
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 || OpenlabRuby::Client.new
8
+ @client = client || Openlab::Client.new
9
9
  end
10
10
 
11
11
  def search(q, opts = {})
@@ -0,0 +1,3 @@
1
+ module Openlab
2
+ VERSION = "0.0.2"
3
+ end
data/lib/openlab_ruby.rb CHANGED
@@ -1,8 +1,8 @@
1
- require 'openlab_ruby/version'
2
- require 'openlab_ruby/client'
3
- require 'openlab_ruby/projects'
1
+ require 'openlab/version'
2
+ require 'openlab/client'
3
+ require 'openlab/projects'
4
4
 
5
- module OpenlabRuby
5
+ module Openlab
6
6
  class << self
7
7
  attr_accessor :config
8
8
 
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
 
3
- class OpenlabRubyTest < ActiveSupport::TestCase
3
+ class OpenlabTest < ActiveSupport::TestCase
4
4
  test "truth" do
5
- assert_kind_of Module, OpenlabRuby
5
+ assert_kind_of Module, Openlab
6
6
  end
7
7
  end
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.1
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: OpenlabRuby is an api wrapper for Openlab api
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: OpenlabRuby is an api wrapper for Openlab api
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
@@ -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
@@ -1,3 +0,0 @@
1
- module OpenlabRuby
2
- VERSION = "0.0.1"
3
- end