-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from jsmestad/develop
Release v1.0 as a active fork based on JsonApiClient
- Loading branch information
Showing
105 changed files
with
6,405 additions
and
1,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Ruby CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: circleci/ruby:2.5 | ||
working_directory: ~/jsonapi_consumer | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: install dependencies | ||
command: | | ||
bundle install --jobs=4 --retry=3 --path vendor/bundle | ||
- run: | ||
command: env CI=true bundle exec rake test | ||
when: always | ||
|
||
# collect reports | ||
- store_test_results: | ||
path: /tmp/reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.bundle/ | ||
/.ruby-version | ||
/.yardoc | ||
/Gemfile.lock | ||
/_yardoc/ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } | ||
|
||
# Specify your gem's dependencies in jsonapi-consumer.gemspec | ||
gemspec | ||
|
||
gem 'fsevent' | ||
gem 'guard-rspec', require: false | ||
gem 'rake' | ||
gem 'minitest-ci' | ||
gem 'pry' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
require "bundler/gem_tasks" | ||
|
||
begin | ||
require 'rspec/core/rake_task' | ||
require 'rdoc/task' | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
RDoc::Task.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'JsonApiClient' | ||
rdoc.options << '--line-numbers' | ||
rdoc.rdoc_files.include('README.rdoc') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
|
||
require 'rake/testtask' | ||
|
||
task default: :spec | ||
rescue LoadError | ||
# no rspec available | ||
Rake::TestTask.new(:test) do |t| | ||
t.libs << 'lib' | ||
t.libs << 'test' | ||
t.pattern = 'test/**/*_test.rb' | ||
t.verbose = false | ||
end | ||
|
||
task default: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "mikasa_client" | ||
|
||
# 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(__FILE__) | ||
|
||
# require "irb" | ||
# IRB.start(__FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,66 @@ | ||
require "jsonapi/consumer/version" | ||
|
||
require 'faraday' | ||
require 'faraday_middleware' | ||
require 'active_model' | ||
|
||
require "active_support/concern" | ||
require "active_support/core_ext" | ||
require "active_support/inflector" | ||
require "faraday" | ||
require "faraday_middleware" | ||
require "addressable/uri" | ||
require "active_support/core_ext/string" | ||
|
||
module JSONAPI | ||
module Consumer | ||
|
||
module Associations | ||
autoload :BaseAssociation, 'jsonapi/consumer/associations/base_association' | ||
autoload :BelongsTo, 'jsonapi/consumer/associations/belongs_to' | ||
autoload :HasMany, 'jsonapi/consumer/associations/has_many' | ||
autoload :HasOne, 'jsonapi/consumer/associations/has_one' | ||
end | ||
|
||
module Helpers | ||
autoload :Callbacks, 'jsonapi/consumer/helpers/callbacks' | ||
autoload :Dirty, 'jsonapi/consumer/helpers/dirty' | ||
autoload :DynamicAttributes, 'jsonapi/consumer/helpers/dynamic_attributes' | ||
autoload :URI, 'jsonapi/consumer/helpers/uri' | ||
end | ||
|
||
module Linking | ||
autoload :Links, "jsonapi/consumer/linking/links" | ||
autoload :TopLevelLinks, "jsonapi/consumer/linking/top_level_links" | ||
end | ||
|
||
module Relationships | ||
autoload :Relations, "jsonapi/consumer/relationships/relations" | ||
autoload :TopLevelRelations, "jsonapi/consumer/relationships/top_level_relations" | ||
end | ||
|
||
module Middleware | ||
autoload :JsonRequest, 'jsonapi/consumer/middleware/json_request' | ||
autoload :ParseJson, 'jsonapi/consumer/middleware/parse_json' | ||
autoload :Status, 'jsonapi/consumer/middleware/status' | ||
end | ||
|
||
module Paginating | ||
autoload :Paginator, 'jsonapi/consumer/paginating/paginator' | ||
end | ||
|
||
module Parsers | ||
autoload :Parser, 'jsonapi/consumer/parsers/parser' | ||
end | ||
|
||
module Query | ||
autoload :Builder, 'jsonapi/consumer/query/builder' | ||
autoload :Requestor, 'jsonapi/consumer/query/requestor' | ||
end | ||
|
||
autoload :Connection, 'jsonapi/consumer/connection' | ||
autoload :Errors, 'jsonapi/consumer/errors' | ||
autoload :ErrorCollector, 'jsonapi/consumer/error_collector' | ||
autoload :Formatter, 'jsonapi/consumer/formatter' | ||
autoload :Implementation, 'jsonapi/consumer/implementation' | ||
autoload :IncludedData, 'jsonapi/consumer/included_data' | ||
autoload :MetaData, 'jsonapi/consumer/meta_data' | ||
autoload :Resource, 'jsonapi/consumer/resource' | ||
autoload :ResultSet, 'jsonapi/consumer/result_set' | ||
autoload :Schema, 'jsonapi/consumer/schema' | ||
autoload :Utils, 'jsonapi/consumer/utils' | ||
end | ||
end | ||
|
||
require "jsonapi/consumer/errors" | ||
|
||
require "jsonapi/consumer/middleware" | ||
require "jsonapi/consumer/middleware/parse_json" | ||
require "jsonapi/consumer/middleware/raise_error" | ||
require "jsonapi/consumer/middleware/request_headers" | ||
require "jsonapi/consumer/middleware/request_timeout" | ||
|
||
require "jsonapi/consumer/parser" | ||
|
||
require "jsonapi/consumer/query" | ||
require "jsonapi/consumer/query/base" | ||
require "jsonapi/consumer/query/create" | ||
require "jsonapi/consumer/query/delete" | ||
require "jsonapi/consumer/query/find" | ||
require "jsonapi/consumer/query/new" | ||
require "jsonapi/consumer/query/update" | ||
|
||
require "jsonapi/consumer/resource/association_concern" | ||
require "jsonapi/consumer/resource/attributes_concern" | ||
require "jsonapi/consumer/resource/connection_concern" | ||
require "jsonapi/consumer/resource/finders_concern" | ||
require "jsonapi/consumer/resource/object_build_concern" | ||
require "jsonapi/consumer/resource/serializer_concern" | ||
require "jsonapi/consumer/resource" | ||
end |
Oops, something went wrong.