sinatra-active-model-serializers 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/Gemfile +4 -0
- data/README.md +4 -1
- data/Rakefile +3 -0
- data/lib/sinatra-active-model-serializers.rb +2 -0
- data/lib/{sinatra_active_model_serializers → sinatra-active-model-serializers}/json.rb +0 -0
- data/lib/sinatra-active-model-serializers/version.rb +6 -0
- data/sinatra-active-model-serializers.gemspec +5 -5
- data/spec/app/application.rb +1 -1
- metadata +5 -5
- data/lib/sinatra_active_model_serializers.rb +0 -2
- data/lib/sinatra_active_model_serializers/version.rb +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc0d28ae98fef8d4d5d9809110025b3b200ec98c
|
|
4
|
+
data.tar.gz: c1fd75ba0b95d1bd8fad30bde41d736406657a70
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b81affe5ba647d88f9ab23d7d27df18ac74d364ca1b914a17088572b38f14c3a6f4b1f7c6379e0bce3279333c1a0013f4e052cc661c331884317e859391eba4f
|
|
7
|
+
data.tar.gz: 12607c5a5ada55124f103072e164e9a5783da5f3101adeb792120820d581ce65b849b622ac4543fc48bcce0d37e520b096773c000db0c155b614ecf9cb03fba0
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# Sinatra::ActiveModelSerializers
|
|
4
4
|
|
|
5
|
+
[](http://badge.fury.io/rb/sinatra-active-model-serializers)
|
|
6
|
+
|
|
5
7
|
This gem has the function of adapt the Active Model Serializers to work in Sinatra from a more practical way with models.
|
|
6
8
|
If do you use everything at the default, just require `sinatra_active_model_serializers` for serializers work correctly the a json response.
|
|
7
9
|
|
|
@@ -32,7 +34,8 @@ After is simply do require from our library on your `application.rb`, eg.
|
|
|
32
34
|
|
|
33
35
|
```ruby
|
|
34
36
|
require 'rubygems'
|
|
35
|
-
require '
|
|
37
|
+
require 'bundler'
|
|
38
|
+
Bundler.require :default
|
|
36
39
|
|
|
37
40
|
class App < Sinatra::Base
|
|
38
41
|
get '/' do
|
data/Rakefile
CHANGED
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
2
|
|
|
3
3
|
# Run `rake sinatra-contrib.gemspec` to update the gemspec.
|
|
4
|
-
require File.expand_path('../lib/
|
|
4
|
+
require File.expand_path('../lib/sinatra-active-model-serializers/version', __FILE__)
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'sinatra-active-model-serializers'
|
|
@@ -27,9 +27,9 @@ Gem::Specification.new do |s|
|
|
|
27
27
|
'Rakefile',
|
|
28
28
|
'db/migrate/00_create_tests.rb',
|
|
29
29
|
'db/schema.rb',
|
|
30
|
-
'lib/
|
|
31
|
-
'lib/
|
|
32
|
-
'lib/
|
|
30
|
+
'lib/sinatra-active-model-serializers.rb',
|
|
31
|
+
'lib/sinatra-active-model-serializers/json.rb',
|
|
32
|
+
'lib/sinatra-active-model-serializers/version.rb',
|
|
33
33
|
'sinatra-active-model-serializers.gemspec',
|
|
34
34
|
'spec/app/application.rb',
|
|
35
35
|
'spec/app/models/test.rb',
|
|
@@ -42,4 +42,4 @@ Gem::Specification.new do |s|
|
|
|
42
42
|
]
|
|
43
43
|
|
|
44
44
|
s.add_runtime_dependency 'active_model_serializers', '0.9.3'
|
|
45
|
-
end
|
|
45
|
+
end
|
data/spec/app/application.rb
CHANGED
|
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
|
2
2
|
require 'bundler'
|
|
3
3
|
Bundler.require(:defaut, :test)
|
|
4
4
|
|
|
5
|
-
require './lib/
|
|
5
|
+
require './lib/sinatra-active-model-serializers/'
|
|
6
6
|
Dir['./spec/app/models/**/*.rb'].flatten.sort.each { |file| require file}
|
|
7
7
|
|
|
8
8
|
module App
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sinatra-active-model-serializers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- saulosantiago
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: active_model_serializers
|
|
@@ -39,9 +39,9 @@ files:
|
|
|
39
39
|
- Rakefile
|
|
40
40
|
- db/migrate/00_create_tests.rb
|
|
41
41
|
- db/schema.rb
|
|
42
|
-
- lib/
|
|
43
|
-
- lib/
|
|
44
|
-
- lib/
|
|
42
|
+
- lib/sinatra-active-model-serializers.rb
|
|
43
|
+
- lib/sinatra-active-model-serializers/json.rb
|
|
44
|
+
- lib/sinatra-active-model-serializers/version.rb
|
|
45
45
|
- sinatra-active-model-serializers.gemspec
|
|
46
46
|
- spec/app/application.rb
|
|
47
47
|
- spec/app/models/test.rb
|