Commit e580b7a8 authored by Jose Ernesto Suarez's avatar Jose Ernesto Suarez

Merge branch 'fix/submodule' into 'master'

Fix/submodule

See merge request wedoops/zoholib!1
parents 0e4138c5 ed7c5be6
example_id | status | run_time |
----------------------------- | ------ | --------------- |
./spec/zoholib_spec.rb[1:1] | passed | 0.00183 seconds |
./spec/zoholib_spec.rb[1:2] | passed | 0.00144 seconds |
./spec/zoholib_spec.rb[1:3:1] | passed | 0.00112 seconds |
./spec/zoholib_spec.rb[1:3:2] | passed | 0.0012 seconds |
./spec/zoholib_spec.rb[1:3:3] | passed | 0.00009 seconds |
./spec/zoholib_spec.rb[1:3:4] | passed | 0.0002 seconds |
./spec/zoholib_spec.rb[1:3:5] | passed | 0.00022 seconds |
./spec/zoholib_spec.rb[1:1] | passed | 0.00155 seconds |
./spec/zoholib_spec.rb[1:2] | passed | 0.00156 seconds |
./spec/zoholib_spec.rb[1:3:1] | passed | 0.00096 seconds |
./spec/zoholib_spec.rb[1:3:2] | passed | 0.00039 seconds |
./spec/zoholib_spec.rb[1:3:3] | passed | 0.00039 seconds |
./spec/zoholib_spec.rb[1:3:4] | passed | 0.00029 seconds |
./spec/zoholib_spec.rb[1:3:5] | passed | 0.00045 seconds |
......@@ -14,7 +14,8 @@ require 'zoholib/zoho_client'
##
# This library is used for access Zoho
module Zoholib
module Wedoops
module Zoholib
class << self
attr_accessor :configuration
end
......@@ -30,4 +31,5 @@ module Zoholib
def self.configure
yield(configuration)
end
end
end
......@@ -4,8 +4,8 @@ require 'json'
require 'logger'
require 'date'
module Zoholib
module Wedoops
module Zoholib
class AdamoClient
def initialize(options={})
......@@ -93,4 +93,5 @@ module Zoholib
@http.get(url)
end
end
end
end
\ No newline at end of file
......@@ -3,8 +3,8 @@
#En algun momento tenemos que abrir un navegador
require 'launchy'
require 'socket'
module Zoholib
module Wedoops
module Zoholib
class AuthorizationRequest < ZohoRequest
# Sin en algun momento se quiere evitar el encode de URL
......@@ -121,4 +121,5 @@ module Zoholib
end
end
end
\ No newline at end of file
......@@ -5,8 +5,8 @@ require 'logger'
require 'date'
require 'savon'
module Zoholib
module Wedoops
module Zoholib
class B12Client
def initialize(options={})
......@@ -53,5 +53,6 @@ module Zoholib
end
end
end
end
\ No newline at end of file
# frozen_string_literal: true
module Zoholib
module Wedoops
module Zoholib
##
# This class permits the configuration of the Valenciaport Access.
# Is neccesary the WDSL URLs for the login and transport endpoint
......@@ -16,5 +16,6 @@ module Zoholib
end
end
end
end
\ No newline at end of file
#require './lib/zoho_request'
module Zoholib
module Wedoops
module Zoholib
class GrantRequest < ZohoRequest
#base_uri "https://accounts.zoho.com/oauth/v2/token"
......@@ -22,4 +23,5 @@ module Zoholib
end
end
end
\ No newline at end of file
#require './lib/zoho_request'
module Zoholib
module Wedoops
module Zoholib
class RefreshRequest < ZohoRequest
# Sin en algun momento se quiere evitar el encode de URL
......@@ -22,4 +23,5 @@ module Zoholib
end
end
end
\ No newline at end of file
module Zoholib
module Zoho
module Wedoops
module Zoholib
class Response
......
# frozen_string_literal: true
module Zoholib
module Wedoops
module Zoholib
VERSION = '0.0.1b'
end
end
\ No newline at end of file
......@@ -7,8 +7,8 @@ require 'httparty'
#require './lib/authorization_request'
module Zoholib
module Wedoops
module Zoholib
class ZohoBasicClient
include HTTParty
base_uri 'https://www.zohoapis.com/crm/v2/'
......@@ -156,7 +156,7 @@ module Zoholib
return result
end
private
private
def build_header
{:headers => { "Authorization" => "Zoho-oauthtoken #{@token}"}}
......@@ -170,4 +170,5 @@ private
end
end
end
end
\ No newline at end of file
......@@ -7,8 +7,8 @@ require 'date'
require 'httparty'
#include ERB::Util
module Zoholib
module Wedoops
module Zoholib
class ZohoClient < ERB
attr_accessor :token, :scope, :auth_type, :client_id, :redirect_uri, :code
......@@ -622,4 +622,5 @@ module Zoholib
end
end
end
end
require 'httparty'
require 'json'
module Zoholib
module Wedoops
module Zoholib
class ZohoRequest
include HTTParty
#debug_output $stdout
......@@ -13,4 +13,5 @@ module Zoholib
attr_reader :subdomain, :uri
end
end
end
\ No newline at end of file
......@@ -5,7 +5,7 @@ require 'zoholib'
RSpec.configure do |conf|
conf.before(:all) do
Zoholib.configure do |config|
Wedoops::Zoholib.configure do |config|
puts "Trying to config"
config.client_id = "client_id"
config.client_secret = "client_secret"
......
require 'spec_helper'
require 'stringio'
RSpec.describe Zoholib do
RSpec.describe Wedoops::Zoholib do
it 'has a version number' do
expect(Zoholib::VERSION).not_to be nil
expect(Wedoops::Zoholib::VERSION).not_to be nil
end
it 'does something useful' do
......@@ -12,23 +12,23 @@ RSpec.describe Zoholib do
describe 'Configuration' do
it 'The configuration shuld be a Zoholib::Configuration' do
expect(Zoholib.configuration).to be_a_kind_of(Zoholib::Configuration)
expect(Wedoops::Zoholib.configuration).to be_a_kind_of(Wedoops::Zoholib::Configuration)
end
it 'The client_id is a string' do
expect(Zoholib.configuration.client_id).to be_an(String)
expect(Wedoops::Zoholib.configuration.client_id).to be_an(String)
end
it 'The client_secret is a string' do
expect(Zoholib.configuration.client_secret).to be_an(String)
expect(Wedoops::Zoholib.configuration.client_secret).to be_an(String)
end
it 'The scopes is a string' do
expect(Zoholib.configuration.scope).to be_an(String)
expect(Wedoops::Zoholib.configuration.scope).to be_an(String)
end
it 'The refresh_token is a string' do
expect(Zoholib.configuration.refresh_token).to be_an(String)
expect(Wedoops::Zoholib.configuration.refresh_token).to be_an(String)
end
end
end
\ No newline at end of file
......@@ -6,7 +6,7 @@ require 'zoholib/version'
Gem::Specification.new do |spec|
spec.name = 'zoholib'
spec.version = Zoholib::VERSION
spec.version = Wedoops::Zoholib::VERSION
spec.date = '2020-04-25'
spec.authors = ['Wedoops.io']
spec.email = 'wedoops@wedoops.io'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment