yaks 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -1
- data/.travis.yml +8 -15
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +80 -54
- data/README.md +20 -7
- data/Rakefile +9 -0
- data/lib/yaks/mapper/association.rb +8 -3
- data/lib/yaks/mapper/link.rb +36 -16
- data/lib/yaks/mapper.rb +7 -3
- data/lib/yaks/resource.rb +0 -1
- data/lib/yaks/version.rb +1 -1
- data/spec/yaks/mapper/link_spec.rb +1 -5
- data/yaks.gemspec +3 -3
- metadata +30 -29
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZjQzODE2NjIwMDVlNzg2YTVlMjBiMWJiNTcyZTY3NmNkMzVhYWE1Mg==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc0da5d021a417473ad1aa2fa227056063afd316
|
4
|
+
data.tar.gz: 951a74f58913a08947939d7dc1835e9027e1b2bb
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
OGMwMzcxMDkzYjc2OGE2OGQwNWJjODc2NDdjNGZkZTk2NjdjOGNkNzk4Y2Vm
|
11
|
-
ZjEyY2U3MTU1M2FlN2ZhZWFiZWFjYjdhNTdhYTBjYmMzMTcxZTg=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZGZhMzA1OGQ3OTQxNTdmMWRiNTE0ZGQxOTgzZDc2MDllYzA5NjI3NmUwYTlj
|
14
|
-
M2EwYjhkZTVkYzBjMzBhOWRkZWFhODk0NDI3YmI2NjU1ZmQ0MDVlNzM1NmM2
|
15
|
-
MDJiZTllZTk0ZjM3ZDE4ZmU3N2E3YmQ2MDZiZTY4MWJjY2E5NjI=
|
6
|
+
metadata.gz: 87c342e810e87f31255645af7972da320640f6e660ce14750b6fe5a1f853330ffe45e7bd02baafa26ed4a32de92b3023aa8f73fa8542ff5568c8d4554ed21a21
|
7
|
+
data.tar.gz: f983048d7c554c219fcee21783d1e36eb82514502c1985632e0ca91f52338ab48d72cac2c0a8920d157f07f0ec013e4384b0596537be9c209052422206e85be8
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,23 +1,16 @@
|
|
1
1
|
language: ruby
|
2
|
-
before_install: gem install bundler
|
3
|
-
bundler_args: --without yard guard benchmarks
|
4
2
|
script: "bundle exec rspec"
|
5
3
|
rvm:
|
6
|
-
- 1.9.2
|
7
4
|
- 1.9.3
|
8
5
|
- 2.0.0
|
9
|
-
- 2.1.
|
6
|
+
- 2.1.1
|
7
|
+
- rbx
|
8
|
+
- jruby
|
10
9
|
- ruby-head
|
11
|
-
-
|
10
|
+
- jruby-head
|
12
11
|
matrix:
|
13
|
-
|
14
|
-
- rvm:
|
15
|
-
|
12
|
+
allow_failures:
|
13
|
+
- rvm: rbx
|
14
|
+
- rvm: jruby
|
15
|
+
- rvm: ruby-head
|
16
16
|
- rvm: jruby-head
|
17
|
-
env: JRUBY_OPTS="$JRUBY_OPTS --debug"
|
18
|
-
notifications:
|
19
|
-
email:
|
20
|
-
recipients:
|
21
|
-
- arne@arnebrasseur.net
|
22
|
-
on_success: never
|
23
|
-
on_failure: change
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
@@ -1,85 +1,111 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/harukizaemon/hamster.git
|
3
|
-
revision:
|
3
|
+
revision: f34f3e2faa489818bbbd069acaec005692891bc6
|
4
4
|
specs:
|
5
|
-
hamster (0.
|
5
|
+
hamster (1.0.1.pre.rc.1)
|
6
6
|
|
7
7
|
PATH
|
8
8
|
remote: .
|
9
9
|
specs:
|
10
|
-
yaks (0.
|
10
|
+
yaks (0.3.0)
|
11
11
|
concord (~> 0.1.4)
|
12
|
-
hamster
|
12
|
+
hamster
|
13
13
|
inflection (~> 1.0.0)
|
14
14
|
uri_template (~> 0.6.0)
|
15
15
|
|
16
16
|
GEM
|
17
17
|
remote: https://rubygems.org/
|
18
18
|
specs:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
ice_nine (~> 0.9)
|
26
|
-
backports (3.3.5)
|
27
|
-
coercible (0.2.0)
|
28
|
-
backports (~> 3.0, >= 3.1.0)
|
29
|
-
descendants_tracker (~> 0.0.1)
|
30
|
-
concord (0.1.4)
|
19
|
+
abstract_type (0.0.7)
|
20
|
+
adamantium (0.2.0)
|
21
|
+
ice_nine (~> 0.11.0)
|
22
|
+
memoizable (~> 0.4.0)
|
23
|
+
anima (0.2.0)
|
24
|
+
abstract_type (~> 0.0.7)
|
31
25
|
adamantium (~> 0.1)
|
32
|
-
equalizer (~> 0.0.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
26
|
+
equalizer (~> 0.0.8)
|
27
|
+
ast (2.0.0)
|
28
|
+
axiom-types (0.1.1)
|
29
|
+
descendants_tracker (~> 0.0.4)
|
30
|
+
ice_nine (~> 0.11.0)
|
31
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
32
|
+
coercible (1.0.0)
|
33
|
+
descendants_tracker (~> 0.0.1)
|
34
|
+
concord (0.1.5)
|
35
|
+
adamantium (~> 0.2.0)
|
36
|
+
equalizer (~> 0.0.9)
|
37
|
+
descendants_tracker (0.0.4)
|
38
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
40
39
|
diff-lcs (1.2.5)
|
41
|
-
|
42
|
-
|
43
|
-
ice_nine (0.10.0)
|
40
|
+
equalizer (0.0.9)
|
41
|
+
ice_nine (0.11.0)
|
44
42
|
inflection (1.0.0)
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
43
|
+
inflecto (0.0.2)
|
44
|
+
memoizable (0.4.2)
|
45
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
46
|
+
morpher (0.2.3)
|
47
|
+
abstract_type (~> 0.0.7)
|
48
|
+
adamantium (~> 0.2.0)
|
49
|
+
anima (~> 0.2.0)
|
50
|
+
ast (~> 2.0.0)
|
51
|
+
concord (~> 0.1.4)
|
52
|
+
equalizer (~> 0.0.9)
|
53
|
+
ice_nine (~> 0.11.0)
|
54
|
+
procto (~> 0.0.2)
|
55
|
+
mutant (0.5.11)
|
56
|
+
abstract_type (~> 0.0.7)
|
57
|
+
adamantium (~> 0.2.0)
|
58
|
+
anima (~> 0.2.0)
|
59
|
+
ast (~> 2.0)
|
60
|
+
concord (~> 0.1.5)
|
61
|
+
diff-lcs (~> 1.2)
|
62
|
+
equalizer (~> 0.0.9)
|
63
|
+
ice_nine (~> 0.11.0)
|
64
|
+
inflecto (~> 0.0.2)
|
65
|
+
memoizable (~> 0.4.2)
|
66
|
+
morpher (~> 0.2.3)
|
67
|
+
parser (~> 2.1)
|
68
|
+
procto (~> 0.0.2)
|
69
|
+
unparser (~> 0.1.12)
|
70
|
+
mutant-rspec (0.5.10)
|
71
|
+
mutant (~> 0.5.10)
|
72
|
+
rspec-core (>= 2.14.1, <= 3.0.0.beta2)
|
73
|
+
parser (2.1.9)
|
74
|
+
ast (>= 1.1, < 3.0)
|
75
|
+
slop (~> 3.4, >= 3.4.5)
|
76
|
+
procto (0.0.2)
|
77
|
+
rake (10.3.1)
|
78
|
+
rspec (2.14.0)
|
51
79
|
rspec-core (~> 2.14.0)
|
52
80
|
rspec-expectations (~> 2.14.0)
|
53
81
|
rspec-mocks (~> 2.14.0)
|
54
|
-
rspec-core (2.14.
|
55
|
-
rspec-expectations (2.14.
|
82
|
+
rspec-core (2.14.8)
|
83
|
+
rspec-expectations (2.14.5)
|
56
84
|
diff-lcs (>= 1.1.3, < 2.0)
|
57
|
-
rspec-mocks (2.14.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
atomic
|
68
|
-
tins (0.13.1)
|
85
|
+
rspec-mocks (2.14.6)
|
86
|
+
slop (3.5.0)
|
87
|
+
thread_safe (0.3.3)
|
88
|
+
unparser (0.1.12)
|
89
|
+
abstract_type (~> 0.0.7)
|
90
|
+
adamantium (~> 0.2.0)
|
91
|
+
concord (~> 0.1.4)
|
92
|
+
equalizer (~> 0.0.9)
|
93
|
+
parser (~> 2.1)
|
94
|
+
procto (~> 0.0.2)
|
69
95
|
uri_template (0.6.0)
|
70
|
-
virtus (1.0.
|
71
|
-
axiom-types (~> 0.
|
72
|
-
coercible (~> 0
|
73
|
-
descendants_tracker (~> 0.0.
|
74
|
-
equalizer (~> 0.0.
|
96
|
+
virtus (1.0.2)
|
97
|
+
axiom-types (~> 0.1)
|
98
|
+
coercible (~> 1.0)
|
99
|
+
descendants_tracker (~> 0.0.3)
|
100
|
+
equalizer (~> 0.0.9)
|
75
101
|
|
76
102
|
PLATFORMS
|
77
103
|
ruby
|
78
104
|
|
79
105
|
DEPENDENCIES
|
80
|
-
coveralls
|
81
106
|
hamster!
|
107
|
+
mutant-rspec
|
82
108
|
rake
|
83
|
-
rspec
|
109
|
+
rspec (~> 2.14)
|
84
110
|
virtus
|
85
111
|
yaks!
|
data/README.md
CHANGED
@@ -2,13 +2,11 @@
|
|
2
2
|
[![Build Status](https://secure.travis-ci.org/plexus/yaks.png?branch=master)][travis]
|
3
3
|
[![Dependency Status](https://gemnasium.com/plexus/yaks.png)][gemnasium]
|
4
4
|
[![Code Climate](https://codeclimate.com/github/plexus/yaks.png)][codeclimate]
|
5
|
-
[![Coverage Status](https://coveralls.io/repos/plexus/yaks/badge.png?branch=master)][coveralls]
|
6
5
|
|
7
6
|
[gem]: https://rubygems.org/gems/yaks
|
8
7
|
[travis]: https://travis-ci.org/plexus/yaks
|
9
8
|
[gemnasium]: https://gemnasium.com/plexus/yaks
|
10
9
|
[codeclimate]: https://codeclimate.com/github/plexus/yaks
|
11
|
-
[coveralls]: https://coveralls.io/r/plexus/yaks
|
12
10
|
|
13
11
|
# Yaks
|
14
12
|
|
@@ -96,7 +94,7 @@ end
|
|
96
94
|
|
97
95
|
### Links
|
98
96
|
|
99
|
-
You can specify link templates that will be expanded with model attributes. The link relation name should be a registered [IANA link relation](http://www.iana.org/assignments/link-relations/link-relations.xhtml) or a URL.
|
97
|
+
You can specify link templates that will be expanded with model attributes. The link relation name should be a registered [IANA link relation](http://www.iana.org/assignments/link-relations/link-relations.xhtml) or a URL. The template syntax follows [RFC6570 URI templates](http://tools.ietf.org/html/rfc6570).
|
100
98
|
|
101
99
|
```ruby
|
102
100
|
class FooMapper < Yaks::Mapper
|
@@ -107,6 +105,22 @@ end
|
|
107
105
|
|
108
106
|
To prevent a link to be expanded, add `expand: false` as an option. Now the actual template will be rendered in the result, so clients can use it to generate links from.
|
109
107
|
|
108
|
+
To partially expand the template, pass an array with field names to expand. e.g.
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
class ProductMapper < Yaks::Mapper
|
112
|
+
link 'http://api.foo.com/rels/line_item', '/api/line_items?product_id={product_id}&quantity={quantity}', expand: [:product_id]
|
113
|
+
end
|
114
|
+
|
115
|
+
# "_links": {
|
116
|
+
# "http://api.foo.com/rels/line_item": {
|
117
|
+
# "href": "/api/line_items?product_id=273&quantity={quantity}",
|
118
|
+
# "templated": true
|
119
|
+
# }
|
120
|
+
# }
|
121
|
+
|
122
|
+
```
|
123
|
+
|
110
124
|
You can pass a symbol instead of a template, in that case the symbol will be used as a method name on the object to retrieve the link. You can override this behavior just like with attributes.
|
111
125
|
|
112
126
|
```ruby
|
@@ -163,13 +177,13 @@ JSON-API has no concept of outbound links, so these will not be rendered, but th
|
|
163
177
|
|
164
178
|
## Policy over Configuration
|
165
179
|
|
166
|
-
It's an old
|
180
|
+
It's an old adage in the Ruby/Rails world to have "Convention over Configuration", mostly to derive values that were not given explicitly. Typically based on things having similar names and a 1-1 derivable relationship.
|
167
181
|
|
168
182
|
This saves a lot of typing, but for the uninitiated it can also create confusion, the implicitness makes it hard to follow what's going on.
|
169
183
|
|
170
184
|
What's worse, is that often the Configuration part is skimmed over, making it very hard to deviate from the Golden Standard.
|
171
185
|
|
172
|
-
There is another old
|
186
|
+
There is another old adage, "Policy vs Mechanism". Implement the mechanisms, but don't dictate the policy.
|
173
187
|
|
174
188
|
In Yaks whenever missing values need to be inferred, like finding an unspecified mapper for a relation, this is handled by a policy object. The default is `Yaks::DefaultPolicy`, you can go there to find all the rules of inference. Subclass it and override to fit your needs, then pass it in to each mapper/serializer, they will pass it on to whatever objects they call.
|
175
189
|
|
@@ -189,7 +203,7 @@ PostMapper.new(post, policy: MyPolicy.new)
|
|
189
203
|
|
190
204
|
## Acknowledgment
|
191
205
|
|
192
|
-
The mapper syntax is largely borrowed from ActiveModel::Serializers, which in turn closely mimics the syntax of ActiveRecord models. It's a great concise syntax that still offers plenty of flexibility, so to not reinvent the wheel
|
206
|
+
The mapper syntax is largely borrowed from ActiveModel::Serializers, which in turn closely mimics the syntax of ActiveRecord models. It's a great concise syntax that still offers plenty of flexibility, so to not reinvent the wheel I've stuck to the existing syntax as far as practical, although there are several extensions and deviations.
|
193
207
|
|
194
208
|
## How to contribute
|
195
209
|
|
@@ -215,7 +229,6 @@ To add a feature
|
|
215
229
|
* Adding extra output formats does not require altering existing code
|
216
230
|
* Has no opinion on what to use for final JSON encoding (json, multi_json, yajl, oj, etc.)
|
217
231
|
|
218
|
-
|
219
232
|
## License
|
220
233
|
|
221
234
|
MIT
|
data/Rakefile
CHANGED
@@ -9,3 +9,12 @@ task :push => :gem do
|
|
9
9
|
sh "git push --tags"
|
10
10
|
sh "gem push pkg/yaks-#{Yaks::VERSION}.gem"
|
11
11
|
end
|
12
|
+
|
13
|
+
require 'mutant'
|
14
|
+
task :default => :mutant
|
15
|
+
|
16
|
+
task :mutant do
|
17
|
+
pattern = ENV.fetch('PATTERN', 'Yaks*')
|
18
|
+
result = Mutant::CLI.run(%w[-Ilib -ryaks --use rspec --score 100] + [pattern])
|
19
|
+
fail unless result == Mutant::CLI::EXIT_SUCCESS
|
20
|
+
end
|
@@ -21,11 +21,16 @@ module Yaks
|
|
21
21
|
|
22
22
|
# @param [Symbol] src_type
|
23
23
|
# The profile type of the resource that contains the association
|
24
|
-
# @param [
|
25
|
-
# A
|
24
|
+
# @param [#call] loader
|
25
|
+
# A callable that can retrieve an association by its name
|
26
26
|
# @param [Hash] options
|
27
|
+
# @return Array[rel, resource]
|
28
|
+
# Returns the rel (registered type or URI) + the associated, mapped resource
|
27
29
|
def map_to_resource_pair(src_type, loader, options)
|
28
|
-
[
|
30
|
+
[
|
31
|
+
options[:rel_registry].lookup(src_type, key),
|
32
|
+
map_resource(loader.(name), options)
|
33
|
+
]
|
29
34
|
end
|
30
35
|
|
31
36
|
private
|
data/lib/yaks/mapper/link.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
module Yaks
|
2
2
|
class Mapper
|
3
3
|
class Link
|
4
|
+
extend Forwardable
|
4
5
|
include Concord.new(:rel, :template, :options)
|
5
6
|
include Util
|
6
7
|
|
8
|
+
def_delegators :uri_template, :expand, :expand_partial
|
9
|
+
|
7
10
|
def initialize(rel, template, options = {})
|
8
11
|
@rel, @template, @options = rel, template, options
|
9
12
|
end
|
@@ -12,18 +15,29 @@ module Yaks
|
|
12
15
|
self.rel == rel
|
13
16
|
end
|
14
17
|
|
15
|
-
def expand
|
16
|
-
options.fetch(:expand) {true}
|
18
|
+
def expand
|
19
|
+
options.fetch(:expand) { true }
|
20
|
+
end
|
21
|
+
alias expand? expand
|
22
|
+
|
23
|
+
# link 'http://{only}/{certain}/{variables}/{not_expanded}, expand: [:only, :certain, :variables]
|
24
|
+
def expand_partial?
|
25
|
+
expand.respond_to?(:map)
|
17
26
|
end
|
18
27
|
|
19
|
-
def expand_with(
|
20
|
-
|
28
|
+
def expand_with(lookup)
|
29
|
+
# link :method_that_returns_link
|
30
|
+
return lookup.call(template) if template.is_a? Symbol
|
31
|
+
|
32
|
+
# link 'http://link/{template}', expand: false
|
33
|
+
# link 'http://link/{template}', expand: [:only, :some, :fields]
|
21
34
|
return template unless expand?
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
35
|
+
|
36
|
+
if expand_partial?
|
37
|
+
uri_template.expand_partial(expansion_mapping(lookup)).to_s
|
38
|
+
else
|
39
|
+
uri_template.expand(expansion_mapping(lookup))
|
40
|
+
end
|
27
41
|
end
|
28
42
|
|
29
43
|
def map_to_resource_link(mapper)
|
@@ -34,16 +48,22 @@ module Yaks
|
|
34
48
|
)
|
35
49
|
end
|
36
50
|
|
37
|
-
def expand(variables)
|
38
|
-
uri_template.expand(variables)
|
39
|
-
end
|
40
|
-
|
41
51
|
def uri_template
|
42
52
|
@uri_template ||= URITemplate.new(template)
|
43
53
|
end
|
44
54
|
|
45
|
-
def
|
46
|
-
|
55
|
+
def template_variables
|
56
|
+
if expand_partial?
|
57
|
+
uri_template.variables & expand.map(&:to_s)
|
58
|
+
else
|
59
|
+
uri_template.variables
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def expansion_mapping(lookup)
|
64
|
+
template_variables.map.with_object({}) do |var, hsh|
|
65
|
+
hsh[var] = lookup.call(var)
|
66
|
+
end
|
47
67
|
end
|
48
68
|
|
49
69
|
# Link properties defined in HAL
|
@@ -59,7 +79,7 @@ module Yaks
|
|
59
79
|
def resource_link_options(mapper)
|
60
80
|
options = self.options
|
61
81
|
options = options.merge(title: resolve_title(options[:title], mapper)) if options.has_key?(:title)
|
62
|
-
options = options.merge( templated: true )
|
82
|
+
options = options.merge( templated: true ) if !expand? || expand_partial?
|
63
83
|
options.reject{|k,v| [:expand].include? k}
|
64
84
|
end
|
65
85
|
|
data/lib/yaks/mapper.rb
CHANGED
@@ -36,9 +36,13 @@ module Yaks
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def map_subresources
|
39
|
-
|
40
|
-
associations.select{|assoc|
|
41
|
-
association.map_to_resource_pair(
|
39
|
+
attributes = filter(associations.map(&:name))
|
40
|
+
associations.select{|assoc| attributes.include? assoc.name}.map do |association|
|
41
|
+
association.map_to_resource_pair(
|
42
|
+
profile_type,
|
43
|
+
method(:load_association),
|
44
|
+
options.merge(parent: subject)
|
45
|
+
)
|
42
46
|
end
|
43
47
|
end
|
44
48
|
|
data/lib/yaks/resource.rb
CHANGED
data/lib/yaks/version.rb
CHANGED
@@ -8,13 +8,9 @@ describe Yaks::Mapper::Link do
|
|
8
8
|
let(:rel) { :next }
|
9
9
|
let(:template) { '/foo/bar/{x}/{y}' }
|
10
10
|
let(:options) { {} }
|
11
|
-
its(:
|
11
|
+
its(:template_variables) { should eq ['x', 'y'] }
|
12
12
|
its(:uri_template) { should eq URITemplate.new(template) }
|
13
13
|
|
14
|
-
it 'should expand the template' do
|
15
|
-
expect(link.expand(:x => 3, :y => 'foo')).to eq '/foo/bar/3/foo'
|
16
|
-
end
|
17
|
-
|
18
14
|
describe 'expand_with' do
|
19
15
|
it 'should look up expansion values through the provided callable' do
|
20
16
|
expect(link.expand_with(->(var){ var.upcase })).to eq '/foo/bar/X/Y'
|
data/yaks.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = `git ls-files -- spec`.split($/)
|
18
18
|
gem.extra_rdoc_files = %w[README.md]
|
19
19
|
|
20
|
-
gem.add_runtime_dependency 'hamster'
|
20
|
+
gem.add_runtime_dependency 'hamster'
|
21
21
|
gem.add_runtime_dependency 'inflection' , '~> 1.0.0' # 12k , flog: 226.8
|
22
22
|
gem.add_runtime_dependency 'concord' , '~> 0.1.4' # 8k , flog: 62.3
|
23
23
|
gem.add_runtime_dependency 'uri_template' , '~> 0.6.0' # 104k , flog: 1521.4
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |gem|
|
|
25
25
|
# For comparison, ActiveSupport has a flog score of 11134.7
|
26
26
|
|
27
27
|
gem.add_development_dependency 'virtus'
|
28
|
-
gem.add_development_dependency 'rspec'
|
29
|
-
gem.add_development_dependency 'coveralls'
|
28
|
+
gem.add_development_dependency 'rspec', '~> 2.14'
|
30
29
|
gem.add_development_dependency 'rake'
|
30
|
+
gem.add_development_dependency 'mutant-rspec'
|
31
31
|
end
|
metadata
CHANGED
@@ -1,31 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arne Brasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
prerelease: false
|
15
14
|
name: hamster
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
|
-
- -
|
17
|
+
- - '>='
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0
|
19
|
+
version: '0'
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
prerelease: false
|
29
28
|
name: inflection
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
@@ -33,13 +32,13 @@ dependencies:
|
|
33
32
|
- !ruby/object:Gem::Version
|
34
33
|
version: 1.0.0
|
35
34
|
type: :runtime
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
prerelease: false
|
43
42
|
name: concord
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
45
44
|
requirements:
|
@@ -47,13 +46,13 @@ dependencies:
|
|
47
46
|
- !ruby/object:Gem::Version
|
48
47
|
version: 0.1.4
|
49
48
|
type: :runtime
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.1.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
prerelease: false
|
57
56
|
name: uri_template
|
58
57
|
requirement: !ruby/object:Gem::Requirement
|
59
58
|
requirements:
|
@@ -61,65 +60,66 @@ dependencies:
|
|
61
60
|
- !ruby/object:Gem::Version
|
62
61
|
version: 0.6.0
|
63
62
|
type: :runtime
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.6.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
prerelease: false
|
71
70
|
name: virtus
|
72
71
|
requirement: !ruby/object:Gem::Requirement
|
73
72
|
requirements:
|
74
|
-
- -
|
73
|
+
- - '>='
|
75
74
|
- !ruby/object:Gem::Version
|
76
75
|
version: '0'
|
77
76
|
type: :development
|
77
|
+
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
prerelease: false
|
85
84
|
name: rspec
|
86
85
|
requirement: !ruby/object:Gem::Requirement
|
87
86
|
requirements:
|
88
|
-
- -
|
87
|
+
- - ~>
|
89
88
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
89
|
+
version: '2.14'
|
91
90
|
type: :development
|
91
|
+
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
|
99
|
-
name: coveralls
|
98
|
+
name: rake
|
100
99
|
requirement: !ruby/object:Gem::Requirement
|
101
100
|
requirements:
|
102
|
-
- -
|
101
|
+
- - '>='
|
103
102
|
- !ruby/object:Gem::Version
|
104
103
|
version: '0'
|
105
104
|
type: :development
|
105
|
+
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
|
113
|
-
name: rake
|
112
|
+
name: mutant-rspec
|
114
113
|
requirement: !ruby/object:Gem::Requirement
|
115
114
|
requirements:
|
116
|
-
- -
|
115
|
+
- - '>='
|
117
116
|
- !ruby/object:Gem::Version
|
118
117
|
version: '0'
|
119
118
|
type: :development
|
119
|
+
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - '>='
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
description: Serialize to JSON-API and similar
|
@@ -132,6 +132,7 @@ extra_rdoc_files:
|
|
132
132
|
files:
|
133
133
|
- .gitignore
|
134
134
|
- .travis.yml
|
135
|
+
- CHANGELOG.md
|
135
136
|
- Gemfile
|
136
137
|
- Gemfile.lock
|
137
138
|
- README.md
|
@@ -198,17 +199,17 @@ require_paths:
|
|
198
199
|
- lib
|
199
200
|
required_ruby_version: !ruby/object:Gem::Requirement
|
200
201
|
requirements:
|
201
|
-
- -
|
202
|
+
- - '>='
|
202
203
|
- !ruby/object:Gem::Version
|
203
204
|
version: '0'
|
204
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
206
|
requirements:
|
206
|
-
- -
|
207
|
+
- - '>='
|
207
208
|
- !ruby/object:Gem::Version
|
208
209
|
version: '0'
|
209
210
|
requirements: []
|
210
211
|
rubyforge_project:
|
211
|
-
rubygems_version: 2.2.
|
212
|
+
rubygems_version: 2.2.2
|
212
213
|
signing_key:
|
213
214
|
specification_version: 4
|
214
215
|
summary: Serialize to JSON-API and similar
|