rom-json 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.rubocop.yml +63 -0
- data/.rubocop_todo.yml +6 -0
- data/.travis.yml +22 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +16 -0
- data/LICENSE.txt +22 -0
- data/README.md +40 -0
- data/Rakefile +4 -0
- data/lib/rom-json.rb +1 -0
- data/lib/rom/json.rb +7 -0
- data/lib/rom/json/dataset.rb +17 -0
- data/lib/rom/json/gateway.rb +114 -0
- data/lib/rom/json/relation.rb +12 -0
- data/lib/rom/json/version.rb +5 -0
- data/rakelib/rubocop.rake +18 -0
- data/rom-json.gemspec +26 -0
- data/spec/fixtures/db/tasks.json +13 -0
- data/spec/fixtures/db/users.json +8 -0
- data/spec/fixtures/test_db.json +16 -0
- data/spec/integration/adapter_spec.rb +69 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/unit/dataset_spec.rb +20 -0
- data/spec/unit/repository_spec.rb +13 -0
- metadata +139 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5355ab062f27eb38e6db6e53e4b613a37eb61712
|
4
|
+
data.tar.gz: 12ebdf3a86a4c07b09c0e09aa186b0c2bec862f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4c3e5c2ee1fe76b03f31132043bfd8bb26d84e6473d9e2b324a78354cbfe7ae8997f7f0f2dc5b856d8c44fe12ddacedf42b643ac14ff8e69afcf55f4d5cc66cf
|
7
|
+
data.tar.gz: 1c73405a116c7f68162f03260102903d2255d1b43d2b3a8933fcfa4a38125b0044fb89fe5dc106f3f23f8e4dd2283d8b1a28b91ea27e8e3278a536e8c2baa238
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Generated by `rubocop --auto-gen-config`
|
2
|
+
inherit_from: .rubocop_todo.yml
|
3
|
+
|
4
|
+
# It’s quite readable when we know what we are doing
|
5
|
+
Lint/AssignmentInCondition:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
# No need to handle LoadError in rake
|
9
|
+
Lint/HandleExceptions:
|
10
|
+
Exclude:
|
11
|
+
- rakelib/*.rake
|
12
|
+
|
13
|
+
# The enforced style doesn’t match Vim’s defaults
|
14
|
+
Style/AlignParameters:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
# UTF-8 is perfectly fine in comments
|
18
|
+
Style/AsciiComments:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
# Allow using braces for value-returning blocks
|
22
|
+
Style/Blocks:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
# Documentation checked by Inch CI
|
26
|
+
Style/Documentation:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# Early returns have their vices
|
30
|
+
Style/GuardClause:
|
31
|
+
Enabled: false
|
32
|
+
|
33
|
+
# Need to be skipped for >-> usage
|
34
|
+
Style/Lambda:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
# Multiline block chains are ok
|
38
|
+
Style/MultilineBlockChain:
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
# Even a single escaped slash can be confusing
|
42
|
+
Style/RegexpLiteral:
|
43
|
+
MaxSlashes: 0
|
44
|
+
|
45
|
+
# Don’t introduce semantic fail/raise distinction
|
46
|
+
Style/SignalException:
|
47
|
+
EnforcedStyle: only_raise
|
48
|
+
|
49
|
+
# Need to be skipped for >-> usage
|
50
|
+
Style/SpaceAroundOperators:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
# Accept both single and double quotes
|
54
|
+
Style/StringLiterals:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
# Allow def self.foo; @foo; end
|
58
|
+
Style/TrivialAccessors:
|
59
|
+
Enabled: false
|
60
|
+
|
61
|
+
# Allow rom-csv
|
62
|
+
Style/FileName:
|
63
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2015-02-09 17:10:04 +0100 using RuboCop version 0.28.0.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
data/.travis.yml
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
language: ruby
|
2
|
+
bundler_args: --without tools
|
3
|
+
env:
|
4
|
+
- CODECLIMATE_REPO_TOKEN=ef69eb6a9e19987527e5010a02bbf71cd4ddc8a5137ba308f299817f56d06e7f
|
5
|
+
script: "bundle exec rake spec"
|
6
|
+
rvm:
|
7
|
+
- 2.0
|
8
|
+
- 2.1
|
9
|
+
- 2.2
|
10
|
+
- rbx-2
|
11
|
+
- jruby
|
12
|
+
- ruby-head
|
13
|
+
matrix:
|
14
|
+
allow_failures:
|
15
|
+
- rvm: ruby-head
|
16
|
+
notifications:
|
17
|
+
webhooks:
|
18
|
+
urls:
|
19
|
+
- https://webhooks.gitter.im/e/39e1225f489f38b0bd09
|
20
|
+
on_success: change
|
21
|
+
on_failure: always
|
22
|
+
on_start: false
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :test do
|
6
|
+
gem 'byebug', platform: :mri
|
7
|
+
gem 'inflecto'
|
8
|
+
gem 'rom', git: 'https://github.com/rom-rb/rom.git', branch: 'master'
|
9
|
+
gem 'rspec', '~> 3.1'
|
10
|
+
gem 'codeclimate-test-reporter', require: false
|
11
|
+
gem 'virtus'
|
12
|
+
end
|
13
|
+
|
14
|
+
group :tools do
|
15
|
+
gem 'rubocop'
|
16
|
+
end
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Piotr Solnica
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
[gem]: https://rubygems.org/gems/rom-json
|
2
|
+
[travis]: https://travis-ci.org/rom-rb/rom-json
|
3
|
+
[gemnasium]: https://gemnasium.com/rom-rb/rom-json
|
4
|
+
[codeclimate]: https://codeclimate.com/github/rom-rb/rom-json
|
5
|
+
[inchpages]: http://inch-ci.org/github/rom-rb/rom-json
|
6
|
+
|
7
|
+
# ROM::JSON
|
8
|
+
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/rom-json.svg)][gem]
|
10
|
+
[![Build Status](https://travis-ci.org/rom-rb/rom-json.svg?branch=master)][travis]
|
11
|
+
[![Dependency Status](https://gemnasium.com/rom-rb/rom-json.png)][gemnasium]
|
12
|
+
[![Code Climate](https://codeclimate.com/github/rom-rb/rom-json/badges/gpa.svg)][codeclimate]
|
13
|
+
[![Test Coverage](https://codeclimate.com/github/rom-rb/rom-json/badges/coverage.svg)][codeclimate]
|
14
|
+
[![Inline docs](http://inch-ci.org/github/rom-rb/rom-json.svg?branch=master)][inchpages]
|
15
|
+
|
16
|
+
JSON support for [Ruby Object Mapper](https://github.com/rom-rb/rom)
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Add this line to your application's Gemfile:
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
gem 'rom-json'
|
24
|
+
```
|
25
|
+
|
26
|
+
And then execute:
|
27
|
+
|
28
|
+
$ bundle
|
29
|
+
|
30
|
+
Or install it yourself as:
|
31
|
+
|
32
|
+
$ gem install rom-json
|
33
|
+
|
34
|
+
## Usage
|
35
|
+
|
36
|
+
See `spec/integration/adapter_spec.rb` for a sample usage.
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
See `LICENSE` file.
|
data/Rakefile
ADDED
data/lib/rom-json.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'rom/json'
|
data/lib/rom/json.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'rom/memory/dataset'
|
2
|
+
|
3
|
+
module ROM
|
4
|
+
module JSON
|
5
|
+
# JSON in-memory dataset used by JSON gateways
|
6
|
+
#
|
7
|
+
# @api public
|
8
|
+
class Dataset < ROM::Memory::Dataset
|
9
|
+
# Data-row transformation proc
|
10
|
+
#
|
11
|
+
# @api private
|
12
|
+
def self.row_proc
|
13
|
+
Transproc[:hash_recursion, Transproc[:symbolize_keys]]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
require 'rom/gateway'
|
4
|
+
require 'rom/json/dataset'
|
5
|
+
|
6
|
+
module ROM
|
7
|
+
module JSON
|
8
|
+
# JSON gateway
|
9
|
+
#
|
10
|
+
# Connects to a json file and uses it as a data-source
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# ROM.setup(:json, '/path/to/data.yml')
|
14
|
+
#
|
15
|
+
# rom = ROM.finalize.env
|
16
|
+
#
|
17
|
+
# gateway = rom.gateways[:default]
|
18
|
+
#
|
19
|
+
# gateway.dataset?(:users) # => true
|
20
|
+
# gateway[:users] # => data under 'users' key from the json file
|
21
|
+
#
|
22
|
+
# @api public
|
23
|
+
class Gateway < ROM::Gateway
|
24
|
+
# @attr_reader [Hash] sources Data loaded from files
|
25
|
+
#
|
26
|
+
# @api private
|
27
|
+
attr_reader :sources
|
28
|
+
|
29
|
+
# @attr_reader [Hash] datasets JSON datasets from sources
|
30
|
+
#
|
31
|
+
# @api private
|
32
|
+
attr_reader :datasets
|
33
|
+
|
34
|
+
# Create a new json gateway from a path to file(s)
|
35
|
+
#
|
36
|
+
# @example
|
37
|
+
# gateway = ROM::JSON::Gateway.new('/path/to/files')
|
38
|
+
#
|
39
|
+
# @param [String, Pathname] path The path to your JSON file(s)
|
40
|
+
#
|
41
|
+
# @return [Gateway]
|
42
|
+
#
|
43
|
+
# @api public
|
44
|
+
def self.new(path)
|
45
|
+
super(load_from(path))
|
46
|
+
end
|
47
|
+
|
48
|
+
# Load data from json file(s)
|
49
|
+
#
|
50
|
+
# @api private
|
51
|
+
def self.load_from(path)
|
52
|
+
if File.directory?(path)
|
53
|
+
load_files(path)
|
54
|
+
else
|
55
|
+
load_file(path)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Load json files from a given directory and return a name => data map
|
60
|
+
#
|
61
|
+
# @api private
|
62
|
+
def self.load_files(path)
|
63
|
+
Dir["#{path}/*.json"].each_with_object({}) do |file, h|
|
64
|
+
name = File.basename(file, '.*')
|
65
|
+
h[name] = load_file(file).fetch(name)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Load json file
|
70
|
+
#
|
71
|
+
# @api private
|
72
|
+
def self.load_file(path)
|
73
|
+
::JSON.parse(File.read(path))
|
74
|
+
end
|
75
|
+
|
76
|
+
# @param [String] path The absolute path to json file
|
77
|
+
#
|
78
|
+
# @api private
|
79
|
+
def initialize(sources)
|
80
|
+
@sources = sources
|
81
|
+
@datasets = {}
|
82
|
+
end
|
83
|
+
|
84
|
+
# Return dataset by its name
|
85
|
+
#
|
86
|
+
# @param [Symbol]
|
87
|
+
#
|
88
|
+
# @return [Array<Hash>]
|
89
|
+
#
|
90
|
+
# @api public
|
91
|
+
def [](name)
|
92
|
+
datasets.fetch(name)
|
93
|
+
end
|
94
|
+
|
95
|
+
# Register a new dataset
|
96
|
+
#
|
97
|
+
# @param [Symbol]
|
98
|
+
#
|
99
|
+
# @return [Dataset]
|
100
|
+
#
|
101
|
+
# @api public
|
102
|
+
def dataset(name)
|
103
|
+
datasets[name] = Dataset.new(sources.fetch(name.to_s))
|
104
|
+
end
|
105
|
+
|
106
|
+
# Return if a dataset with provided name exists
|
107
|
+
#
|
108
|
+
# @api public
|
109
|
+
def dataset?(name)
|
110
|
+
datasets.key?(name)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
begin
|
2
|
+
require "rubocop/rake_task"
|
3
|
+
|
4
|
+
Rake::Task[:default].enhance [:rubocop]
|
5
|
+
|
6
|
+
RuboCop::RakeTask.new do |task|
|
7
|
+
task.options << "--display-cop-names"
|
8
|
+
end
|
9
|
+
|
10
|
+
namespace :rubocop do
|
11
|
+
desc 'Generate a configuration file acting as a TODO list.'
|
12
|
+
task :auto_gen_config do
|
13
|
+
exec "bundle exec rubocop --auto-gen-config"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
rescue LoadError
|
18
|
+
end
|
data/rom-json.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rom/json/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'rom-json'
|
8
|
+
spec.version = ROM::JSON::VERSION.dup
|
9
|
+
spec.authors = ['Piotr Solnica', "Rolf Bjaanes"]
|
10
|
+
spec.email = ['piotr.solnica@gmail.com']
|
11
|
+
spec.summary = 'JSON support for Ruby Object Mapper'
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = 'http://rom-rb.org'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_runtime_dependency 'rom', '~> 0.8', '>= 0.8.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler'
|
24
|
+
spec.add_development_dependency 'rake'
|
25
|
+
spec.add_development_dependency 'rubocop', '~> 0.28.0'
|
26
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'rom/lint/spec'
|
4
|
+
|
5
|
+
describe 'JSON adapter' do
|
6
|
+
subject(:rom) { setup.finalize }
|
7
|
+
|
8
|
+
let(:root) { Pathname(__FILE__).dirname.join('..') }
|
9
|
+
|
10
|
+
let(:path) { "#{root}/fixtures/test_db.json" }
|
11
|
+
let(:setup) { ROM.setup(:json, path) }
|
12
|
+
|
13
|
+
before do
|
14
|
+
setup.relation(:users) do
|
15
|
+
def by_name(name)
|
16
|
+
restrict(name: name)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
setup.mappers do
|
21
|
+
define(:users) do
|
22
|
+
register_as :entity
|
23
|
+
|
24
|
+
model name: 'User'
|
25
|
+
|
26
|
+
attribute :name
|
27
|
+
attribute :email
|
28
|
+
|
29
|
+
embedded :roles, type: :array do
|
30
|
+
attribute :name, from: 'role_name'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'env#relation' do
|
37
|
+
it 'returns mapped object' do
|
38
|
+
jane = rom.relation(:users).as(:entity).by_name('Jane').first
|
39
|
+
|
40
|
+
expect(jane.name).to eql('Jane')
|
41
|
+
expect(jane.email).to eql('jane@doe.org')
|
42
|
+
expect(jane.roles.length).to eql(2)
|
43
|
+
expect(jane.roles).to eql([
|
44
|
+
{ name: 'Member' }, { name: 'Admin' }
|
45
|
+
])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'multi-file setup' do
|
50
|
+
it 'uses one-file-per-relation' do
|
51
|
+
setup = ROM.setup(:json, "#{root}/fixtures/db")
|
52
|
+
|
53
|
+
setup.relation(:users)
|
54
|
+
setup.relation(:tasks)
|
55
|
+
|
56
|
+
rom = setup.finalize
|
57
|
+
|
58
|
+
expect(rom.relation(:users)).to match_array([
|
59
|
+
{ name: 'Jane', email: 'jane@doe.org' }
|
60
|
+
])
|
61
|
+
|
62
|
+
expect(rom.relation(:tasks)).to match_array([
|
63
|
+
{ title: 'Task One' },
|
64
|
+
{ title: 'Task Two' },
|
65
|
+
{ title: 'Task Three' }
|
66
|
+
])
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
if RUBY_ENGINE == 'rbx'
|
4
|
+
require "codeclimate-test-reporter"
|
5
|
+
CodeClimate::TestReporter.start
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'rom-json'
|
9
|
+
|
10
|
+
begin
|
11
|
+
require 'byebug'
|
12
|
+
rescue LoadError
|
13
|
+
end
|
14
|
+
|
15
|
+
root = Pathname(__FILE__).dirname
|
16
|
+
|
17
|
+
Dir[root.join('shared/*.rb').to_s].each { |f| require f }
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'rom/lint/spec'
|
4
|
+
|
5
|
+
describe ROM::JSON::Dataset do
|
6
|
+
let(:data) { [{ id: 1 }, { id: 2 }] }
|
7
|
+
let(:dataset) { ROM::JSON::Dataset.new(data) }
|
8
|
+
|
9
|
+
it_behaves_like "a rom enumerable dataset"
|
10
|
+
|
11
|
+
it "symbolizes keys" do
|
12
|
+
dataset = ROM::JSON::Dataset.new(["foo" => 23])
|
13
|
+
expect(dataset.to_a).to eq([{ foo: 23 }])
|
14
|
+
end
|
15
|
+
|
16
|
+
it "symbolizes keys recursively" do
|
17
|
+
dataset = ROM::JSON::Dataset.new(["foo" => { "bar" => :baz }])
|
18
|
+
expect(dataset.to_a).to eq([foo: { bar: :baz }])
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'rom/lint/spec'
|
4
|
+
|
5
|
+
describe ROM::JSON::Gateway do
|
6
|
+
let(:root) { Pathname(__FILE__).dirname.join('..') }
|
7
|
+
|
8
|
+
it_behaves_like 'a rom gateway' do
|
9
|
+
let(:identifier) { :json }
|
10
|
+
let(:gateway) { ROM::JSON::Gateway }
|
11
|
+
let(:uri) { "#{root}/fixtures/test_db.json" }
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rom-json
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Piotr Solnica
|
8
|
+
- Rolf Bjaanes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rom
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0.8'
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.8.0
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0.8'
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.8.0
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: bundler
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
type: :development
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rake
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rubocop
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.28.0
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.28.0
|
76
|
+
description: JSON support for Ruby Object Mapper
|
77
|
+
email:
|
78
|
+
- piotr.solnica@gmail.com
|
79
|
+
executables: []
|
80
|
+
extensions: []
|
81
|
+
extra_rdoc_files: []
|
82
|
+
files:
|
83
|
+
- ".gitignore"
|
84
|
+
- ".rspec"
|
85
|
+
- ".rubocop.yml"
|
86
|
+
- ".rubocop_todo.yml"
|
87
|
+
- ".travis.yml"
|
88
|
+
- CHANGELOG.md
|
89
|
+
- Gemfile
|
90
|
+
- LICENSE.txt
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- lib/rom-json.rb
|
94
|
+
- lib/rom/json.rb
|
95
|
+
- lib/rom/json/dataset.rb
|
96
|
+
- lib/rom/json/gateway.rb
|
97
|
+
- lib/rom/json/relation.rb
|
98
|
+
- lib/rom/json/version.rb
|
99
|
+
- rakelib/rubocop.rake
|
100
|
+
- rom-json.gemspec
|
101
|
+
- spec/fixtures/db/tasks.json
|
102
|
+
- spec/fixtures/db/users.json
|
103
|
+
- spec/fixtures/test_db.json
|
104
|
+
- spec/integration/adapter_spec.rb
|
105
|
+
- spec/spec_helper.rb
|
106
|
+
- spec/unit/dataset_spec.rb
|
107
|
+
- spec/unit/repository_spec.rb
|
108
|
+
homepage: http://rom-rb.org
|
109
|
+
licenses:
|
110
|
+
- MIT
|
111
|
+
metadata: {}
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubyforge_project:
|
128
|
+
rubygems_version: 2.4.5
|
129
|
+
signing_key:
|
130
|
+
specification_version: 4
|
131
|
+
summary: JSON support for Ruby Object Mapper
|
132
|
+
test_files:
|
133
|
+
- spec/fixtures/db/tasks.json
|
134
|
+
- spec/fixtures/db/users.json
|
135
|
+
- spec/fixtures/test_db.json
|
136
|
+
- spec/integration/adapter_spec.rb
|
137
|
+
- spec/spec_helper.rb
|
138
|
+
- spec/unit/dataset_spec.rb
|
139
|
+
- spec/unit/repository_spec.rb
|