Commit 49077d7c authored by Jose Ernesto Suarez's avatar Jose Ernesto Suarez

scaffold de la libreria

parents
v0.0.1b
\ No newline at end of file
* @jernestosuarez
\ No newline at end of file
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at ernesto@wedoops.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
FROM ruby:2.7
WORKDIR /app
ADD Gemfile /app/Gemfile
#ADD Gemfile.lock /app/Gemfile.lock
ADD . /app
RUN bundle install --system
RUN rake spec
RUN gem build zoholib.gemspec
#TO-DO: Get automatically the version number
RUN gem install google-wedoops-$(cat /app/lib/zoholib/version.rb|grep VERSION|cut -d '=' -f 2|sed "s/'//g" | sed "s/ //g").gem
CMD ["ruby", "main.rb"]
\ No newline at end of file
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
## Specify your gem's dependencies in zoholib.gemspec
gemspec
gem 'httparty','~> 0.18.0'
gem 'http','~> 4.4.0'
gem 'logger','~> 1.4.2'
gem 'savon','~> 2.12.0'
gem 'sib-api-v3-sdk','~> 5.3.0'
gem 'launchy','~> 2.5.0'
\ No newline at end of file
The MIT License (MIT)
Copyright (c) 2019 ChaingoTech SL
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# Zoho Library
\ No newline at end of file
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task default: :spec
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'bundler/setup'
require 'zoholib'
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start
require 'irb'
IRB.start(__FILE__)
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx
bundle install
# Do any other automated setup that you need to do here
# frozen_string_literal: true
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'google-wedoops/version'
Gem::Specification.new do |spec|
spec.name = 'google-wedoops'
spec.version = Wedoops::Google::VERSION
spec.platform = Gem::Platform::RUBY
spec.date = '2020-04-29'
spec.authors = ['Jose Ernesto Suarez']
spec.email = 'ernesto@wedoops.io'
spec.summary = 'Google consumer Library'
spec.description = 'A library for interact with Google'
spec.homepage = 'http://www.wedoops.io'
spec.license = 'MIT'
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata['allowed_push_host'] = "https://gitlab.dev.wedoops.io"
else
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
end
#pec.files = Dir['lib/**/*.rb']
spec.files = `git ls-files`.split("\n")
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_dependency 'http','~> 4.4.0'
spec.add_dependency 'logger','~> 1.4.2'
spec.add_development_dependency 'bundler', '~> 1.15'
spec.add_development_dependency 'rake', '~> 13.0.1'
spec.add_development_dependency 'rspec', '~> 3.0'
end
File added
# frozen_string_literal: true
require 'google-wedoops/configuration'
require 'google-wedoops/version'
##
# This library is used for access Zoho
module Wedoops
module Google
class << self
attr_accessor :configuration
end
def self.configuration
@configuration ||= Configuration.new
end
def self.reset
@configuration = Configuration.new
end
def self.configure
yield(configuration)
end
end
end
# frozen_string_literal: true
module Wedoops
module Google
##
# This class permits the configuration of the Valenciaport Access.
# Is neccesary the WDSL URLs for the login and transport endpoint
# as well the array with the different credentials wich will be used
class Configuration
attr_accessor :user
def initialize
@user = nil
end
end
end
end
\ No newline at end of file
# frozen_string_literal: true
module Wedoops
module Google
VERSION = '0.0.5b'
end
end
\ No newline at end of file
require 'spec_helper'
require 'stringio'
RSpec.describe Wedoops::Google do
it 'has a version number' do
expect(Wedoops::Google::VERSION).not_to be nil
end
it 'does something useful' do
expect(true).to eq(true)
end
describe 'Configuration' do
it 'The configuration shuld be a Wedoops::Google::Configuration' do
expect(Wedoops::Google.configuration).to be_a_kind_of(Wedoops::Google::Configuration)
end
it 'The user is a string' do
expect(Wedoops::Google.configuration.user).to be_an(String)
end
end
end
\ No newline at end of file
# frozen_string_literal: true
require 'bundler/setup'
require 'google-wedoops'
RSpec.configure do |conf|
conf.before(:all) do
Wedoops::Google.configure do |config|
puts "Trying to config"
config.user = "Pepito"
end
end
conf.add_formatter(:documentation)
# Enable flags like --only-failures and --next-failure
conf.example_status_persistence_file_path = '.rspec_status'
# Disable RSpec exposing methods globally on `Module` and `main`
conf.disable_monkey_patching!
conf.expect_with :rspec do |c|
c.syntax = :expect
end
end
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