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