api_mapper 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +12 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +103 -0
- data/Rakefile +10 -0
- data/api_mapper.gemspec +36 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/api_mapper/client.rb +76 -0
- data/lib/api_mapper/functions.rb +30 -0
- data/lib/api_mapper/mapper.rb +77 -0
- data/lib/api_mapper/router.rb +43 -0
- data/lib/api_mapper/version.rb +3 -0
- data/lib/api_mapper.rb +17 -0
- data/lib/github_mapper/entities/emoji.rb +5 -0
- data/lib/github_mapper/entities/issue.rb +5 -0
- data/lib/github_mapper/entities/profile.rb +8 -0
- data/lib/github_mapper/entities/repository.rb +9 -0
- data/lib/github_mapper/entities/user.rb +5 -0
- data/lib/github_mapper/mappers/emoji_mapper.rb +6 -0
- data/lib/github_mapper/mappers/issue_mapper.rb +8 -0
- data/lib/github_mapper/mappers/profile_mapper.rb +7 -0
- data/lib/github_mapper/mappers/repositories_mapper.rb +7 -0
- data/lib/github_mapper/mappers/repository_mapper.rb +7 -0
- data/lib/github_mapper/mappers/user_mapper.rb +7 -0
- data/lib/github_mapper/router.rb +10 -0
- data/lib/github_mapper.rb +20 -0
- metadata +228 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2498ac8e2869d4236466e5ba3dd02c170a758ae5
|
4
|
+
data.tar.gz: e077a20464c4e2ba93ed8280e00db963ac2daab5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e0e34598d340dcf24922ae956dda3dcbf03899a59d41255db29e65d912789b382d2b056147eed935826ac24383ff9c24d5202c69ea3e34d4857bf7eae456b140
|
7
|
+
data.tar.gz: 40b304f67644549841318411f64121c9f456f79bfe6b489a119937e6829a94fade290dd425a1b3308fd5b7baf9b8923750381ee77044ada1b0f1f6707b25ca70
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
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. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Marcin Ciunelis
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
# ApiMapper
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/martinciu/api_mapper.svg?branch=master)](https://travis-ci.org/martinciu/api_mapper)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/martinciu/api_mapper/badges/gpa.svg)](https://codeclimate.com/github/martinciu/api_mapper)
|
5
|
+
[![Test Coverage](https://codeclimate.com/github/martinciu/api_mapper/badges/coverage.svg)](https://codeclimate.com/github/martinciu/api_mapper/coverage)
|
6
|
+
[![Dependency Status](https://gemnasium.com/martinciu/api_mapper.svg)](https://gemnasium.com/martinciu/api_mapper)
|
7
|
+
|
8
|
+
ApiMapper converts API resources into ruby objects
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
**Warning: This is work in progress. Public API will probably change**
|
13
|
+
|
14
|
+
Add this line to your application's Gemfile:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
gem 'api_mapper'
|
18
|
+
```
|
19
|
+
|
20
|
+
And then execute:
|
21
|
+
|
22
|
+
$ bundle
|
23
|
+
|
24
|
+
Or install it yourself as:
|
25
|
+
|
26
|
+
$ gem install api_mapper
|
27
|
+
|
28
|
+
## Usage
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
class User
|
32
|
+
include Virtus.model
|
33
|
+
attribute :id, Integer
|
34
|
+
attribute :login
|
35
|
+
attribute :hireable, Boolean
|
36
|
+
end
|
37
|
+
|
38
|
+
class Repository
|
39
|
+
include Virtus.model
|
40
|
+
attribute :id, Integer
|
41
|
+
attribute :name
|
42
|
+
attribute :full_name
|
43
|
+
attribute :owner, User
|
44
|
+
end
|
45
|
+
|
46
|
+
class UserMapper < ApiMapper::Mapper
|
47
|
+
attributes :id, :login, :hireable
|
48
|
+
entity User
|
49
|
+
end
|
50
|
+
|
51
|
+
class RepositoriesMapper < ApiMapper::ArrayMapper
|
52
|
+
attributes :id, :name, :full_name
|
53
|
+
relationship :owner, UserMapper
|
54
|
+
entity Repository
|
55
|
+
end
|
56
|
+
|
57
|
+
class Router < ApiMapper::Router
|
58
|
+
get "user", UserMapper
|
59
|
+
patch "user", UserMapper
|
60
|
+
get "repositories", RepositoriesMapper
|
61
|
+
end
|
62
|
+
|
63
|
+
# client setup
|
64
|
+
client = ApiMapper::Client.new('https://api.github.com')
|
65
|
+
client.router = Router.new
|
66
|
+
client.authorization("token secret_token")
|
67
|
+
|
68
|
+
# get profile
|
69
|
+
profile = client.get('user')
|
70
|
+
profile.login # martinciu
|
71
|
+
profile.hireable # false
|
72
|
+
|
73
|
+
# update profile
|
74
|
+
profile.hireable = true
|
75
|
+
updated_profile = client.patch('user', profile)
|
76
|
+
updated_profile.hireable = true
|
77
|
+
|
78
|
+
# get list of repositories
|
79
|
+
repositories = client.get('repositories')
|
80
|
+
repository = repositories.first
|
81
|
+
|
82
|
+
repository.id # 1
|
83
|
+
repository.name # grit
|
84
|
+
repository.full_name # mojombo/grit
|
85
|
+
repository.user.id # 1
|
86
|
+
repository.user.login # mojombo
|
87
|
+
```
|
88
|
+
|
89
|
+
## Development
|
90
|
+
|
91
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
92
|
+
|
93
|
+
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).
|
94
|
+
|
95
|
+
## Contributing
|
96
|
+
|
97
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/martinciu/api_mapper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
98
|
+
|
99
|
+
|
100
|
+
## License
|
101
|
+
|
102
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
103
|
+
|
data/Rakefile
ADDED
data/api_mapper.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'api_mapper/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "api_mapper"
|
8
|
+
spec.version = ApiMapper::VERSION
|
9
|
+
spec.authors = ["Marcin Ciunelis"]
|
10
|
+
spec.email = ["marcin.ciunelis@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{api_mapper converts API resources in to ruby objects}
|
13
|
+
spec.description = %q{}
|
14
|
+
# spec.homepage = "TODO: Put your gem's website or public repo URL here."
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "faraday", "~> 0.9.1"
|
23
|
+
spec.add_dependency "json", "~> 1.8.3"
|
24
|
+
spec.add_dependency "addressable", "~> 2.3.6"
|
25
|
+
spec.add_dependency "transproc", "~> 0.3.1"
|
26
|
+
|
27
|
+
# test mappers dependencies
|
28
|
+
spec.add_dependency "anima", "~> 0.2.0"
|
29
|
+
spec.add_dependency "virtus", "~> 1.0.5"
|
30
|
+
|
31
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
32
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
33
|
+
spec.add_development_dependency "minitest", "~> 5.8.0"
|
34
|
+
spec.add_development_dependency "vcr", "~> 2.9.3"
|
35
|
+
spec.add_development_dependency "webmock", "~> 1.21.0"
|
36
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "api_mapper"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
module ApiMapper
|
2
|
+
class Client
|
3
|
+
|
4
|
+
attr_writer :router
|
5
|
+
|
6
|
+
def initialize(base_url)
|
7
|
+
@base_url = base_url
|
8
|
+
@router = Router.new
|
9
|
+
end
|
10
|
+
|
11
|
+
def get(path)
|
12
|
+
mapper(:get, path).call(response(:get, path).body)
|
13
|
+
end
|
14
|
+
|
15
|
+
def patch(path, body)
|
16
|
+
mapper(:patch, path).call(response(:patch, path, body).body)
|
17
|
+
end
|
18
|
+
|
19
|
+
def post(path, body)
|
20
|
+
mapper(:post, path).call(response(:post, path, body).body)
|
21
|
+
end
|
22
|
+
|
23
|
+
def authorization(authorization)
|
24
|
+
@authorization = authorization
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def mapper(method, path)
|
30
|
+
@router.resolve(method, path).mapper.new
|
31
|
+
end
|
32
|
+
|
33
|
+
def response(method, path, body = nil)
|
34
|
+
Response.new(connection.send(method, path, Serializer.new(body).call))
|
35
|
+
end
|
36
|
+
|
37
|
+
def connection
|
38
|
+
@connection ||= Faraday.new(url: @base_url) do |conn|
|
39
|
+
conn.adapter :net_http
|
40
|
+
conn.headers["Content-Type"] = 'application/json'
|
41
|
+
conn.headers["Accept"] = 'application/json'
|
42
|
+
conn.headers["Authorization"] = @authorization if @authorization
|
43
|
+
conn.headers["X-Client"] = "ApiMapper-v#{ApiMapper::VERSION}"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
class Response
|
49
|
+
def initialize(raw)
|
50
|
+
@raw = raw
|
51
|
+
end
|
52
|
+
|
53
|
+
def body
|
54
|
+
JSON.parse(@raw.body)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class Serializer
|
59
|
+
def initialize(model)
|
60
|
+
@model = model
|
61
|
+
end
|
62
|
+
|
63
|
+
def call
|
64
|
+
attributes.inject({}) do |response, (key, value)|
|
65
|
+
response.merge(key => value)
|
66
|
+
end.to_json if @model
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def attributes
|
72
|
+
@model.attributes.select { |_, value| value != nil }
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module ApiMapper
|
2
|
+
module Functions
|
3
|
+
extend Transproc::Registry
|
4
|
+
|
5
|
+
module HashTransformations
|
6
|
+
def self.structure(hash, key_name, value_name)
|
7
|
+
hash.map { |key, value| { key_name => key, value_name => value } }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
module Factory
|
12
|
+
def self.factory(attributes, klass)
|
13
|
+
klass.new(attributes)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module Mapping
|
18
|
+
def self.mapping(hash, mapper)
|
19
|
+
mapper.new.call(hash)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
import Transproc::HashTransformations
|
24
|
+
import Transproc::ArrayTransformations
|
25
|
+
import Transproc::Conditional
|
26
|
+
import HashTransformations
|
27
|
+
import Factory
|
28
|
+
import Mapping
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
module ApiMapper
|
2
|
+
class Mapper
|
3
|
+
|
4
|
+
def call(origin)
|
5
|
+
self.class.transformation.call(origin)
|
6
|
+
end
|
7
|
+
|
8
|
+
class << self
|
9
|
+
def attributes(*attributes)
|
10
|
+
@attributes ||= Array(@attributes) + attributes
|
11
|
+
end
|
12
|
+
|
13
|
+
def entity(klass)
|
14
|
+
@entity = klass
|
15
|
+
end
|
16
|
+
|
17
|
+
def relationship(name, mapper = nil)
|
18
|
+
@relationships ||= []
|
19
|
+
@relationships << Relationship.new(name, mapper)
|
20
|
+
end
|
21
|
+
|
22
|
+
def transformation
|
23
|
+
mapping >> factory
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def all_attributes
|
29
|
+
Array(@attributes) + Array(@relationships).map(&:name)
|
30
|
+
end
|
31
|
+
|
32
|
+
def mapping
|
33
|
+
Array(@relationships).inject(t(:symbolize_keys) >> t(:accept_keys, all_attributes)) do |mapping, relationship|
|
34
|
+
mapping >> t(:map_value, relationship.name, t(:mapping, relationship.mapper))
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def factory
|
39
|
+
t(:factory, @entity)
|
40
|
+
end
|
41
|
+
|
42
|
+
def t(*args)
|
43
|
+
Functions[*args]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
class HashMapper < Mapper
|
49
|
+
def self.mapping
|
50
|
+
raise "Only one key, pair allowed" if @attributes.count > 1
|
51
|
+
@map = t(:structure, @attributes.first.keys.first, @attributes.first.values.first)
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.factory
|
55
|
+
t(:map_array, super)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class ArrayMapper < Mapper
|
60
|
+
def self.mapping
|
61
|
+
t(:map_array, t(:symbolize_keys) >> super)
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.factory
|
65
|
+
t(:map_array, super)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
class Relationship
|
70
|
+
attr_reader :name, :mapper
|
71
|
+
|
72
|
+
def initialize(name, mapper)
|
73
|
+
@name = name
|
74
|
+
@mapper = mapper
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module ApiMapper
|
2
|
+
class Router
|
3
|
+
class << self
|
4
|
+
def get(path, mapper)
|
5
|
+
add_route(:get, path, mapper)
|
6
|
+
end
|
7
|
+
|
8
|
+
def patch(path, mapper)
|
9
|
+
add_route(:patch, path, mapper)
|
10
|
+
end
|
11
|
+
|
12
|
+
def post(path, mapper)
|
13
|
+
add_route(:post, path, mapper)
|
14
|
+
end
|
15
|
+
|
16
|
+
def add_route(method, mapper, path)
|
17
|
+
routes << Route.new(method, mapper, path)
|
18
|
+
end
|
19
|
+
|
20
|
+
def routes
|
21
|
+
@routes ||= []
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve(method, path)
|
26
|
+
self.class.routes.find { |route| route.match(method, path) }
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class Route
|
31
|
+
attr_reader :mapper
|
32
|
+
|
33
|
+
def initialize(method, path, mapper)
|
34
|
+
@method = method
|
35
|
+
@path = Addressable::Template.new(path)
|
36
|
+
@mapper = mapper
|
37
|
+
end
|
38
|
+
|
39
|
+
def match(method, path)
|
40
|
+
@method == method && @path.match(path)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/api_mapper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require "anima"
|
2
|
+
require "faraday"
|
3
|
+
require "json"
|
4
|
+
require "transproc/all"
|
5
|
+
require "addressable/template"
|
6
|
+
require "virtus"
|
7
|
+
|
8
|
+
require "api_mapper/router"
|
9
|
+
require "api_mapper/client"
|
10
|
+
require "api_mapper/mapper"
|
11
|
+
require "api_mapper/functions"
|
12
|
+
|
13
|
+
require "api_mapper/version"
|
14
|
+
|
15
|
+
module ApiMapper
|
16
|
+
# Your code goes here...
|
17
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module GithubMapper
|
2
|
+
class Router < ApiMapper::Router
|
3
|
+
get "emojis", EmojiMapper
|
4
|
+
get "repositories", RepositoriesMapper
|
5
|
+
post "user/repos", RepositoryMapper
|
6
|
+
get "repos/{owner}/{repo}/issues", IssueMapper
|
7
|
+
get "user", ProfileMapper
|
8
|
+
patch "user", ProfileMapper
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'api_mapper'
|
2
|
+
|
3
|
+
require "github_mapper/entities/emoji"
|
4
|
+
require "github_mapper/entities/user"
|
5
|
+
require "github_mapper/entities/repository"
|
6
|
+
require "github_mapper/entities/profile"
|
7
|
+
require "github_mapper/entities/issue"
|
8
|
+
|
9
|
+
require "github_mapper/mappers/emoji_mapper"
|
10
|
+
require "github_mapper/mappers/user_mapper"
|
11
|
+
require "github_mapper/mappers/profile_mapper"
|
12
|
+
require "github_mapper/mappers/repositories_mapper"
|
13
|
+
require "github_mapper/mappers/repository_mapper"
|
14
|
+
require "github_mapper/mappers/issue_mapper"
|
15
|
+
|
16
|
+
require "github_mapper/router"
|
17
|
+
|
18
|
+
module GithibMapper
|
19
|
+
# Your code goes here...
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: api_mapper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcin Ciunelis
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.9.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.9.1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.8.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.8.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: addressable
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.3.6
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.6
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: transproc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.3.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.3.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: anima
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: virtus
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.5
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.5
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.10'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.10'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '10.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '10.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: minitest
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 5.8.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 5.8.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: vcr
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.9.3
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.9.3
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: webmock
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.21.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.21.0
|
167
|
+
description: ''
|
168
|
+
email:
|
169
|
+
- marcin.ciunelis@gmail.com
|
170
|
+
executables: []
|
171
|
+
extensions: []
|
172
|
+
extra_rdoc_files: []
|
173
|
+
files:
|
174
|
+
- ".gitignore"
|
175
|
+
- ".travis.yml"
|
176
|
+
- CODE_OF_CONDUCT.md
|
177
|
+
- Gemfile
|
178
|
+
- LICENSE.txt
|
179
|
+
- README.md
|
180
|
+
- Rakefile
|
181
|
+
- api_mapper.gemspec
|
182
|
+
- bin/console
|
183
|
+
- bin/setup
|
184
|
+
- lib/api_mapper.rb
|
185
|
+
- lib/api_mapper/client.rb
|
186
|
+
- lib/api_mapper/functions.rb
|
187
|
+
- lib/api_mapper/mapper.rb
|
188
|
+
- lib/api_mapper/router.rb
|
189
|
+
- lib/api_mapper/version.rb
|
190
|
+
- lib/github_mapper.rb
|
191
|
+
- lib/github_mapper/entities/emoji.rb
|
192
|
+
- lib/github_mapper/entities/issue.rb
|
193
|
+
- lib/github_mapper/entities/profile.rb
|
194
|
+
- lib/github_mapper/entities/repository.rb
|
195
|
+
- lib/github_mapper/entities/user.rb
|
196
|
+
- lib/github_mapper/mappers/emoji_mapper.rb
|
197
|
+
- lib/github_mapper/mappers/issue_mapper.rb
|
198
|
+
- lib/github_mapper/mappers/profile_mapper.rb
|
199
|
+
- lib/github_mapper/mappers/repositories_mapper.rb
|
200
|
+
- lib/github_mapper/mappers/repository_mapper.rb
|
201
|
+
- lib/github_mapper/mappers/user_mapper.rb
|
202
|
+
- lib/github_mapper/router.rb
|
203
|
+
homepage:
|
204
|
+
licenses:
|
205
|
+
- MIT
|
206
|
+
metadata: {}
|
207
|
+
post_install_message:
|
208
|
+
rdoc_options: []
|
209
|
+
require_paths:
|
210
|
+
- lib
|
211
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
217
|
+
requirements:
|
218
|
+
- - ">="
|
219
|
+
- !ruby/object:Gem::Version
|
220
|
+
version: '0'
|
221
|
+
requirements: []
|
222
|
+
rubyforge_project:
|
223
|
+
rubygems_version: 2.4.5
|
224
|
+
signing_key:
|
225
|
+
specification_version: 4
|
226
|
+
summary: api_mapper converts API resources in to ruby objects
|
227
|
+
test_files: []
|
228
|
+
has_rdoc:
|