Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport paths reorganization from main #7

Merged
merged 13 commits into from
Sep 28, 2023
Merged
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI
on: [push]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- run: bundle install
- run: bundle exec rspec
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- run: bundle install
- run: bundle exec rubocop
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.6
3.2.2
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
source "http://rubygems.org"

gem 'activesupport', '>= 5.1.4'
gem 'faraday', '> 0.9.2'
gem 'faraday', '~> 1'
gem 'faraday_middleware', '> 0.12.2'
gem 'hashie', '> 3.5.7'

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
group :development do
gem "rspec"
gem "rake"
gem "bundler"
gem "webmock"
gem "rspec-its"
gem "juwelier", git: 'https://github.com/flajann2/juwelier.git'
gem "rubocop"
end
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# vertebrae

Some basic infrastructure for writing beautiful API clients. See tijuana\_client for a small example.

[![CI Status](https://github.com/controlshift/vertebrae/actions/workflows/ci.yml/badge.svg)](https://github.com/controlshift/vertebrae/actions/workflows/ci.yml)

## Development

After checking out the repo, run `bundle install` to install dependencies. Then, run `rake spec` to run the tests.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Copyright

Copyright (c) 2013 Nathan Woodhull. See LICENSE.txt for
further details.

21 changes: 0 additions & 21 deletions README.rdoc

This file was deleted.

17 changes: 2 additions & 15 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

require 'rubygems'
require 'bundler'
require 'bundler/gem_tasks'

begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
Expand All @@ -11,21 +13,6 @@ rescue Bundler::BundlerError => e
end
require 'rake'

require 'juwelier'
Juwelier::Tasks.new do |gem|
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
gem.name = "vertebrae"
gem.homepage = "http://github.com/controlshift/vertebrae"
gem.license = "MIT"
gem.summary = %Q{API Client Infrastructure}
gem.description = %Q{A set of low level infrastructure and reusable code for building API clients}
gem.email = "[email protected]"
gem.authors = ["Nathan Woodhull"]

# dependencies defined in Gemfile
end
Juwelier::RubygemsDotOrgTasks.new

require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

23 changes: 12 additions & 11 deletions lib/vertebrae.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

require 'active_support/all'

require 'constants'
require 'authorization'
require 'configuration'
require 'connection'
require 'request'
require 'response_error'
require 'api'
require 'base'
require 'model'
require 'vertebrae/constants'
require 'vertebrae/authorization'
require 'vertebrae/configuration'
require 'vertebrae/connection'
require 'vertebrae/request'
require 'vertebrae/response_error'
require 'vertebrae/api'
require 'vertebrae/base'
require 'vertebrae/model'
require 'vertebrae/version'

require 'railties' if defined? Rails
require 'vertebrae/railties' if defined? Rails

module Vertebrae

end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions lib/connection.rb → lib/vertebrae/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

require 'faraday'
require 'faraday_middleware'
require 'response/raise_error'
require 'authorization'
require 'vertebrae/response/raise_error'
require 'vertebrae/authorization'

module Vertebrae
class Connection
Expand Down Expand Up @@ -44,6 +44,7 @@ def default_middleware
end

builder.use Faraday::Response::Logger if ENV['DEBUG']

unless options[:raw]
builder.use FaradayMiddleware::Mashify
builder.use FaradayMiddleware::ParseJson
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions lib/vertebrae/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

module Vertebrae
VERSION = '0.8.0'
end
98 changes: 29 additions & 69 deletions vertebrae.gemspec
Original file line number Diff line number Diff line change
@@ -1,98 +1,58 @@
# Generated by juwelier
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
# stub: vertebrae 0.7.0 ruby lib
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'vertebrae/version'

Gem::Specification.new do |s|
s.name = "vertebrae".freeze
s.version = "0.7.0"
s.version = Vertebrae::VERSION

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Nathan Woodhull".freeze]
s.date = "2021-03-22"
s.date = "2023-09-28"
s.description = "A set of low level infrastructure and reusable code for building API clients".freeze
s.email = "[email protected]".freeze
s.extra_rdoc_files = [
"LICENSE.txt",
"README.rdoc"
]
s.files = [
".document",
".rspec",
".rubocop.yml",
".ruby-gemset",
".ruby-version",
".travis.yml",
"Gemfile",
"LICENSE.txt",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/api.rb",
"lib/authorization.rb",
"lib/base.rb",
"lib/configuration.rb",
"lib/connection.rb",
"lib/constants.rb",
"lib/core_ext/array.rb",
"lib/model.rb",
"lib/railties.rb",
"lib/request.rb",
"lib/response/raise_error.rb",
"lib/response_error.rb",
"lib/vertebrae.rb",
"spec/api_spec.rb",
"spec/configuration_spec.rb",
"spec/dummy/client.rb",
"spec/dummy/dummy.rb",
"spec/logger_spec.rb",
"spec/request_spec.rb",
"spec/spec_helper.rb",
"vertebrae.gemspec"
"README.md"
]
# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
s.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
end

s.homepage = "http://github.com/controlshift/vertebrae".freeze
s.licenses = ["MIT".freeze]
s.rubygems_version = "3.0.8".freeze
s.summary = "API Client Infrastructure".freeze

if s.respond_to? :specification_version then
s.specification_version = 4
end

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
s.add_runtime_dependency(%q<faraday>.freeze, [">= 1.0"])
s.add_runtime_dependency(%q<faraday_middleware>.freeze, [">= 1.0"])
s.add_runtime_dependency(%q<hashie>.freeze, ["> 3.5.7"])
s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
s.add_development_dependency(%q<rspec-its>.freeze, [">= 0"])
s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
else
s.add_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
s.add_dependency(%q<faraday>.freeze, [">= 1.0"])
s.add_dependency(%q<faraday_middleware>.freeze, [">= 1.0"])
s.add_dependency(%q<hashie>.freeze, ["> 3.5.7"])
s.add_dependency(%q<rspec>.freeze, [">= 0"])
s.add_dependency(%q<bundler>.freeze, [">= 0"])
s.add_dependency(%q<webmock>.freeze, [">= 0"])
s.add_dependency(%q<rspec-its>.freeze, [">= 0"])
s.add_dependency(%q<juwelier>.freeze, [">= 0"])
s.add_dependency(%q<rubocop>.freeze, [">= 0"])
end
if s.respond_to? :add_runtime_dependency then
s.add_runtime_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
s.add_runtime_dependency(%q<faraday>.freeze, ["~> 1"])
s.add_runtime_dependency(%q<faraday_middleware>.freeze, ["> 0.12.2"])
s.add_runtime_dependency(%q<hashie>.freeze, ["> 3.5.7"])
s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
s.add_development_dependency(%q<rake>.freeze, [">= 0"])
s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
s.add_development_dependency(%q<rspec-its>.freeze, [">= 0"])
s.add_development_dependency(%q<rubocop>.freeze, [">= 0"])
else
s.add_dependency(%q<activesupport>.freeze, [">= 5.1.4"])
s.add_dependency(%q<faraday>.freeze, [">= 1.0"])
s.add_dependency(%q<faraday_middleware>.freeze, [">= 1.0"])
s.add_dependency(%q<faraday>.freeze, ["~> 1"])
s.add_dependency(%q<faraday_middleware>.freeze, ["> 0.12.2"])
s.add_dependency(%q<hashie>.freeze, ["> 3.5.7"])
s.add_dependency(%q<rspec>.freeze, [">= 0"])
s.add_dependency(%q<rake>.freeze, [">= 0"])
s.add_dependency(%q<bundler>.freeze, [">= 0"])
s.add_dependency(%q<webmock>.freeze, [">= 0"])
s.add_dependency(%q<rspec-its>.freeze, [">= 0"])
s.add_dependency(%q<juwelier>.freeze, [">= 0"])
s.add_dependency(%q<rubocop>.freeze, [">= 0"])
end
end
Expand Down