sp-duh 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +661 -0
- data/README.md +2 -0
- data/Rakefile +32 -0
- data/config/i18n/i18n.xlsx +0 -0
- data/config/initializers/active_record/connection_adapters_postgre_sql_adapter.rb +165 -0
- data/config/initializers/active_record/migration_without_transaction.rb +4 -0
- data/config/initializers/active_record/migrator.rb +34 -0
- data/config/initializers/rails/generators.rb +13 -0
- data/config/jsonapi/settings.yml +14 -0
- data/config/locales/pt.yml +15 -0
- data/lib/generators/accounting_migration/accounting_migration_generator.rb +10 -0
- data/lib/generators/accounting_migration/templates/migration.rb +42 -0
- data/lib/generators/accounting_payroll_migration/accounting_payroll_migration_generator.rb +10 -0
- data/lib/generators/accounting_payroll_migration/templates/migration.rb +73 -0
- data/lib/generators/sharded_migration/sharded_migration_generator.rb +10 -0
- data/lib/generators/sharded_migration/templates/migration.rb +45 -0
- data/lib/sp-duh.rb +32 -0
- data/lib/sp/duh.rb +180 -0
- data/lib/sp/duh/adapters/pg/text_decoder/json.rb +15 -0
- data/lib/sp/duh/adapters/pg/text_encoder/json.rb +15 -0
- data/lib/sp/duh/db/transfer/backup.rb +71 -0
- data/lib/sp/duh/db/transfer/restore.rb +89 -0
- data/lib/sp/duh/engine.rb +35 -0
- data/lib/sp/duh/exceptions.rb +70 -0
- data/lib/sp/duh/i18n/excel_loader.rb +26 -0
- data/lib/sp/duh/jsonapi/adapters/base.rb +168 -0
- data/lib/sp/duh/jsonapi/adapters/db.rb +36 -0
- data/lib/sp/duh/jsonapi/adapters/raw_db.rb +77 -0
- data/lib/sp/duh/jsonapi/configuration.rb +167 -0
- data/lib/sp/duh/jsonapi/doc/apidoc_documentation_format_generator.rb +286 -0
- data/lib/sp/duh/jsonapi/doc/generator.rb +32 -0
- data/lib/sp/duh/jsonapi/doc/schema_catalog_helper.rb +97 -0
- data/lib/sp/duh/jsonapi/doc/victor_pinus_metadata_format_parser.rb +374 -0
- data/lib/sp/duh/jsonapi/exceptions.rb +56 -0
- data/lib/sp/duh/jsonapi/model/base.rb +25 -0
- data/lib/sp/duh/jsonapi/model/concerns/attributes.rb +94 -0
- data/lib/sp/duh/jsonapi/model/concerns/model.rb +42 -0
- data/lib/sp/duh/jsonapi/model/concerns/persistence.rb +221 -0
- data/lib/sp/duh/jsonapi/model/concerns/serialization.rb +59 -0
- data/lib/sp/duh/jsonapi/parameters.rb +44 -0
- data/lib/sp/duh/jsonapi/resource_publisher.rb +28 -0
- data/lib/sp/duh/jsonapi/service.rb +110 -0
- data/lib/sp/duh/migrations.rb +47 -0
- data/lib/sp/duh/migrations/migrator.rb +41 -0
- data/lib/sp/duh/repl.rb +193 -0
- data/lib/sp/duh/version.rb +25 -0
- data/lib/tasks/db_utils.rake +98 -0
- data/lib/tasks/doc.rake +27 -0
- data/lib/tasks/i18n.rake +23 -0
- data/lib/tasks/oauth.rake +29 -0
- data/lib/tasks/transfer.rake +48 -0
- data/lib/tasks/xls2jrxml.rake +15 -0
- data/test/jsonapi/server.rb +67 -0
- data/test/tasks/test.rake +10 -0
- metadata +170 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2011-2017 Cloudware S.A. All rights reserved.
|
3
|
+
#
|
4
|
+
# This file is part of sp-duh.
|
5
|
+
#
|
6
|
+
# sp-duh is free software: you can redistribute it and/or modify
|
7
|
+
# it under the terms of the GNU Affero General Public License as published by
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
9
|
+
# (at your option) any later version.
|
10
|
+
#
|
11
|
+
# sp-duh is distributed in the hope that it will be useful,
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
+
# GNU General Public License for more details.
|
15
|
+
#
|
16
|
+
# You should have received a copy of the GNU Affero General Public License
|
17
|
+
# along with sp-duh. If not, see <http://www.gnu.org/licenses/>.
|
18
|
+
#
|
19
|
+
# encoding: utf-8
|
20
|
+
#
|
21
|
+
module SP
|
22
|
+
module Duh
|
23
|
+
VERSION = File.read(File.expand_path('../../../../VERSION', __FILE__))
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'pg'
|
3
|
+
|
4
|
+
def load_db_from_yml_spec (a_spec)
|
5
|
+
a_spec["folders"].each do |elem|
|
6
|
+
Pathname.glob("#{MOD_PATH}/db/#{elem}/**/").sort.each do |folder|
|
7
|
+
Dir["#{folder}/*.sql"].sort.each do |file|
|
8
|
+
puts "file #{file}"
|
9
|
+
$db.exec( File.read(file) )
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
return if a_spec["execute"].nil?
|
15
|
+
|
16
|
+
a_spec["folders"].each do |folder|
|
17
|
+
next unless a_spec["execute"].has_key?(folder)
|
18
|
+
next unless a_spec["execute"][folder].is_a?(Array)
|
19
|
+
a_spec["execute"][folder].each do |to_execute|
|
20
|
+
puts to_execute
|
21
|
+
$db.exec( "SELECT #{ to_execute};" )
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def load_db_config
|
27
|
+
ENV['RAILS_ENV'] ||= 'development'
|
28
|
+
$db_config = YAML.load_file(File.join('config', 'database.yml'))[ENV['RAILS_ENV']]
|
29
|
+
end
|
30
|
+
|
31
|
+
def connect_to_pg
|
32
|
+
load_db_config()
|
33
|
+
$db = PG.connect(host: $db_config['host'], port: $db_config['port'], dbname: $db_config['database'], user: $db_config['username'], password: $db_config['password'])
|
34
|
+
end
|
35
|
+
|
36
|
+
def config_json_api
|
37
|
+
jsonapi_service = SP::Duh::JSONAPI::Service.new($db, JSONAPI_PREFIX)
|
38
|
+
jsonapi_service.setup()
|
39
|
+
jsonapi_service.configuration.reload!
|
40
|
+
end
|
41
|
+
|
42
|
+
task :pg_connect do
|
43
|
+
$db.close unless $db.nil?
|
44
|
+
connect_to_pg()
|
45
|
+
$db
|
46
|
+
end
|
47
|
+
|
48
|
+
desc 'Reload jsonapi'
|
49
|
+
task :config_jsonapi => :pg_connect do
|
50
|
+
config_json_api()
|
51
|
+
end
|
52
|
+
|
53
|
+
task :production_safety do
|
54
|
+
load_db_config()
|
55
|
+
unless Object.const_defined?('FORBIDDEN_HOSTS')
|
56
|
+
raise "To run this task you must define 'FORBIDDEN_HOSTS' No, you don't know what you are doing!!!!"
|
57
|
+
end
|
58
|
+
if FORBIDDEN_HOSTS.include? %x[hostname -s].strip
|
59
|
+
raise "For safety reasons this task can't be run on this machine, no you don't know what you are doing"
|
60
|
+
end
|
61
|
+
unless %w(localhost tocstaging cloudex 127.0.0.1).include? $db_config['host']
|
62
|
+
raise "For safety reasons database host #{$db_config['host']} is not allowed"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
desc 'Reload GEM functions defined in db_functions.yml (FOR LOCAL GEM ONLY)'
|
67
|
+
task :reload_functions => [:production_safety, :pg_connect] do
|
68
|
+
unless Object.const_defined?('MOD_PATH')
|
69
|
+
raise "To run this task you must define 'MOD_PATH'!"
|
70
|
+
end
|
71
|
+
load_db_from_yml_spec(YAML.load_file(File.join(MOD_PATH, 'config', 'db_functions.yml')))
|
72
|
+
end
|
73
|
+
|
74
|
+
desc 'Create a new database seed using db_seed.yml spec'
|
75
|
+
task :create_db => :production_safety do
|
76
|
+
|
77
|
+
begin
|
78
|
+
connect_to_pg()
|
79
|
+
unless $db.nil?
|
80
|
+
$db.close
|
81
|
+
nuke_db = ask('Are you sure? The current database will be destroyed!!!!') { |q| q.default = 'no' }
|
82
|
+
if nuke_db.downcase == 'yes'
|
83
|
+
%x[dropdb -p #{$db_config['port']} -U #{$db_config['username']} -h #{$db_config['host']} #{$db_config['database']}]
|
84
|
+
raise 'dropdb failed, bailing out' unless $?.success?
|
85
|
+
end
|
86
|
+
end
|
87
|
+
rescue
|
88
|
+
end
|
89
|
+
|
90
|
+
%x[PGPASSWORD=#{$db_config['password']} createdb -h #{$db_config['host']} -U #{$db_config['username']} #{$db_config['database']}]
|
91
|
+
raise 'createdb failed, bailing out' unless $?.success?
|
92
|
+
connect_to_pg()
|
93
|
+
load_db_from_yml_spec(YAML.load_file(File.join(MOD_PATH, 'config', 'db_seed.yml')))
|
94
|
+
load_db_from_yml_spec(YAML.load_file(File.join(MOD_PATH, 'config', 'db_functions.yml')))
|
95
|
+
config_json_api()
|
96
|
+
end
|
97
|
+
|
98
|
+
|
data/lib/tasks/doc.rake
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
namespace :sp do
|
2
|
+
namespace :duh do
|
3
|
+
namespace :jsonapi do
|
4
|
+
namespace :doc do
|
5
|
+
|
6
|
+
desc "Generate (JSONAPI) API documentation"
|
7
|
+
task :generate, [ :publisher, :version, :folder ] => :environment do |task, arguments|
|
8
|
+
|
9
|
+
if arguments[:publisher].nil? || arguments[:version].nil?
|
10
|
+
raise "Usage: rake sp:duh:jsonapi:doc:generate[<resource publisher>,<API version>[,<documentation_folder; default = ./apidoc>]"
|
11
|
+
end
|
12
|
+
|
13
|
+
Rails.logger = Logger.new(STDOUT)
|
14
|
+
|
15
|
+
generator = SP::Duh::JSONAPI::Doc::Generator.new($db || ActiveRecord::Base.connection.raw_connection)
|
16
|
+
if arguments[:folder].nil?
|
17
|
+
generator.generate(arguments[:publisher], arguments[:version])
|
18
|
+
else
|
19
|
+
generator.generate(arguments[:publisher], arguments[:version], arguments[:folder])
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/tasks/i18n.rake
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
namespace :i18n do
|
2
|
+
|
3
|
+
desc "Reload all i18n entries into the database"
|
4
|
+
task :reload => :environment do
|
5
|
+
|
6
|
+
# Can we use the Rails' connection
|
7
|
+
if defined?($db)
|
8
|
+
pg_connection = $db
|
9
|
+
elsif defined?(Rails)
|
10
|
+
pg_connection = ActiveRecord::Base.connection.raw_connection
|
11
|
+
else
|
12
|
+
raise "No connection to Postgres!"
|
13
|
+
end
|
14
|
+
|
15
|
+
# For now, this is the only Excel file we will handle
|
16
|
+
excel_filename = File.join(SP::Duh.root, 'config', 'i18n', 'i18n.xlsx')
|
17
|
+
loader = SP::Duh::I18n::ExcelLoader.new(excel_filename, pg_connection)
|
18
|
+
loader.clear
|
19
|
+
loader.reload
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'redis'
|
2
|
+
|
3
|
+
namespace :sp do
|
4
|
+
namespace :duh do
|
5
|
+
|
6
|
+
desc "Copy OAuth configurations to Redis"
|
7
|
+
task :oauth, [ :root_path ] do |task, args|
|
8
|
+
|
9
|
+
root_path = args.to_hash[:root_path] || '.'
|
10
|
+
redis_config = HashWithIndifferentAccess[YAML.load_file(File.join(root_path, 'config/redis.yml'))]
|
11
|
+
oauth_config = HashWithIndifferentAccess[YAML.load_file(File.join(root_path, 'config/oauth.yml'))]
|
12
|
+
|
13
|
+
redis = Redis.new(:host => redis_config[:casper][:hostname], :port => redis_config[:casper][:port])
|
14
|
+
oauth_config[:'oauth-apps'].each do |service|
|
15
|
+
service['clients'].each do |client|
|
16
|
+
# First, remove old key
|
17
|
+
redis.del "#{service['service_id']}:oauth:#{client['client_id']}"
|
18
|
+
client.each do |key, value|
|
19
|
+
redis.hmset(
|
20
|
+
"#{service['service_id']}:oauth:#{client['client_id']}" ,
|
21
|
+
"#{key}" , "#{value}"
|
22
|
+
)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
namespace :sp do
|
2
|
+
namespace :duh do
|
3
|
+
namespace :transfer do
|
4
|
+
|
5
|
+
desc "Backup a sharded company for restoring to a different database"
|
6
|
+
task :backup, [ :company_id, :backup_file ] => :environment do |task, arguments|
|
7
|
+
|
8
|
+
if arguments[:company_id].nil?
|
9
|
+
raise "Usage: rake sp:duh:transfer:backup[<company_id> [, <backup_file> ]]"
|
10
|
+
end
|
11
|
+
|
12
|
+
company_id = arguments[:company_id].to_i
|
13
|
+
backer = SP::Duh::Db::Transfer::Backup.new(ActiveRecord::Base.connection.raw_connection)
|
14
|
+
backer.execute(company_id, arguments[:backup_file])
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
desc "Restore a sharded company backed up from a different database"
|
19
|
+
task :restore, [ :company_id, :backup_file ] => :environment do |task, arguments|
|
20
|
+
|
21
|
+
if arguments[:company_id].nil? || arguments[:backup_file].nil?
|
22
|
+
raise "Usage: rake sp:duh:transfer:backup[<company_id>, <backup_file>]"
|
23
|
+
end
|
24
|
+
|
25
|
+
company_id = arguments[:company_id].to_i
|
26
|
+
backup_file = arguments[:backup_file].to_s
|
27
|
+
restorer = SP::Duh::Db::Transfer::Restore.new(ActiveRecord::Base.connection.raw_connection)
|
28
|
+
restorer.execute(company_id, backup_file)
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Validate and get info from a sharded company backup"
|
33
|
+
task :check, [ :company_id, :backup_file ] => :environment do |task, arguments|
|
34
|
+
|
35
|
+
if arguments[:company_id].nil? || arguments[:backup_file].nil?
|
36
|
+
raise "Usage: rake sp:duh:transfer:check[<company_id>, <backup_file>]"
|
37
|
+
end
|
38
|
+
|
39
|
+
company_id = arguments[:company_id].to_i
|
40
|
+
backup_file = arguments[:backup_file].to_s
|
41
|
+
restorer = SP::Duh::Db::Transfer::Restore.new(ActiveRecord::Base.connection.raw_connection)
|
42
|
+
restorer.execute(company_id, backup_file, true)
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
desc 'Convert excel model to JRXML'
|
3
|
+
task :xls2jrxml, [:xls_file] do |task, args|
|
4
|
+
args = args.to_hash()
|
5
|
+
args[:xls_file] = "#{args[:xls_file]}.xlsx" unless args[:xls_file].end_with?('.xlsx')
|
6
|
+
|
7
|
+
jrxml_base = File.basename(args[:xls_file], '.xlsx')
|
8
|
+
Dir.mkdir './tmp' unless Dir.exists?('./tmp')
|
9
|
+
|
10
|
+
converter = ::Sp::Excel::Loader::Jrxml::ExcelToJrxml.new(args[:xls_file], nil, true, true, false)
|
11
|
+
File.rename("#{jrxml_base}.jrxml", "./tmp/#{jrxml_base}_compat.jrxml")
|
12
|
+
|
13
|
+
converter = ::Sp::Excel::Loader::Jrxml::ExcelToJrxml.new(args[:xls_file], nil, true, true, true)
|
14
|
+
File.rename("#{jrxml_base}.jrxml", "./tmp/#{jrxml_base}.jrxml")
|
15
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
require 'sinatra'
|
2
|
+
require 'json'
|
3
|
+
require 'yaml'
|
4
|
+
require 'pg'
|
5
|
+
require 'byebug'
|
6
|
+
|
7
|
+
Bundler.require
|
8
|
+
|
9
|
+
# Load test configuration
|
10
|
+
|
11
|
+
configuration = YAML.load_file(File.join(File.expand_path(File.dirname(__FILE__)), 'config.yml'))
|
12
|
+
|
13
|
+
server_configuration = configuration['server'] || {}
|
14
|
+
test_port = server_configuration['port'] || 9001
|
15
|
+
|
16
|
+
set :logging, true
|
17
|
+
set :port, test_port
|
18
|
+
|
19
|
+
# Open connection to the test database
|
20
|
+
|
21
|
+
pg_configuration = configuration['database'] || {}
|
22
|
+
pg_connection = PG.connect({
|
23
|
+
host: pg_configuration['host'],
|
24
|
+
port: pg_configuration['port'],
|
25
|
+
dbname: pg_configuration['database'],
|
26
|
+
user: pg_configuration['username'],
|
27
|
+
password: pg_configuration['password']
|
28
|
+
})
|
29
|
+
|
30
|
+
# Initialize and configure the test JSONAPI service
|
31
|
+
|
32
|
+
jsonapi_configuration = configuration['jsonapi'] || {}
|
33
|
+
url = jsonapi_configuration['url'] || "http://localhost:#{test_port}"
|
34
|
+
|
35
|
+
# The testing environment will include all JSONAPI resources defined for the given url
|
36
|
+
# No reloading of resources is done, since this gem does not know which publishers are available
|
37
|
+
jsonapi_service = SP::Duh::JSONAPI::Service.new(pg_connection, url)
|
38
|
+
$jsonapi_adapter = SP::Duh::JSONAPI::Adapters::RawDb.new(jsonapi_service)
|
39
|
+
|
40
|
+
get '/*' do
|
41
|
+
process_request
|
42
|
+
end
|
43
|
+
|
44
|
+
post '/*' do
|
45
|
+
process_request
|
46
|
+
end
|
47
|
+
|
48
|
+
put '/*' do
|
49
|
+
process_request
|
50
|
+
end
|
51
|
+
|
52
|
+
patch '/*' do
|
53
|
+
process_request
|
54
|
+
end
|
55
|
+
|
56
|
+
delete '/*' do
|
57
|
+
process_request
|
58
|
+
end
|
59
|
+
|
60
|
+
def process_request
|
61
|
+
content_type 'application/vnd.api+json', :charset => 'utf-8'
|
62
|
+
# Send the sharding parameters in the request headers
|
63
|
+
schema = request.env['HTTP_X_JSONAPI_SCHEMA'] || ''
|
64
|
+
prefix = request.env['HTTP_X_JSONAPI_PREFIX'] || ''
|
65
|
+
$jsonapi_adapter.request(request.fullpath, schema, prefix, request.body.read, request.request_method.upcase)
|
66
|
+
end
|
67
|
+
|
metadata
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sp-duh
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jorge Morais
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: highline
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sp-excel-loader
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: awesome_print
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '8.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '8.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.2'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.2'
|
83
|
+
description: Gem to manage JSONAPI requests to a resourceful database
|
84
|
+
email:
|
85
|
+
- jorge.morais@cldware.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- LICENSE
|
91
|
+
- README.md
|
92
|
+
- Rakefile
|
93
|
+
- config/i18n/i18n.xlsx
|
94
|
+
- config/initializers/active_record/connection_adapters_postgre_sql_adapter.rb
|
95
|
+
- config/initializers/active_record/migration_without_transaction.rb
|
96
|
+
- config/initializers/active_record/migrator.rb
|
97
|
+
- config/initializers/rails/generators.rb
|
98
|
+
- config/jsonapi/settings.yml
|
99
|
+
- config/locales/pt.yml
|
100
|
+
- lib/generators/accounting_migration/accounting_migration_generator.rb
|
101
|
+
- lib/generators/accounting_migration/templates/migration.rb
|
102
|
+
- lib/generators/accounting_payroll_migration/accounting_payroll_migration_generator.rb
|
103
|
+
- lib/generators/accounting_payroll_migration/templates/migration.rb
|
104
|
+
- lib/generators/sharded_migration/sharded_migration_generator.rb
|
105
|
+
- lib/generators/sharded_migration/templates/migration.rb
|
106
|
+
- lib/sp-duh.rb
|
107
|
+
- lib/sp/duh.rb
|
108
|
+
- lib/sp/duh/adapters/pg/text_decoder/json.rb
|
109
|
+
- lib/sp/duh/adapters/pg/text_encoder/json.rb
|
110
|
+
- lib/sp/duh/db/transfer/backup.rb
|
111
|
+
- lib/sp/duh/db/transfer/restore.rb
|
112
|
+
- lib/sp/duh/engine.rb
|
113
|
+
- lib/sp/duh/exceptions.rb
|
114
|
+
- lib/sp/duh/i18n/excel_loader.rb
|
115
|
+
- lib/sp/duh/jsonapi/adapters/base.rb
|
116
|
+
- lib/sp/duh/jsonapi/adapters/db.rb
|
117
|
+
- lib/sp/duh/jsonapi/adapters/raw_db.rb
|
118
|
+
- lib/sp/duh/jsonapi/configuration.rb
|
119
|
+
- lib/sp/duh/jsonapi/doc/apidoc_documentation_format_generator.rb
|
120
|
+
- lib/sp/duh/jsonapi/doc/generator.rb
|
121
|
+
- lib/sp/duh/jsonapi/doc/schema_catalog_helper.rb
|
122
|
+
- lib/sp/duh/jsonapi/doc/victor_pinus_metadata_format_parser.rb
|
123
|
+
- lib/sp/duh/jsonapi/exceptions.rb
|
124
|
+
- lib/sp/duh/jsonapi/model/base.rb
|
125
|
+
- lib/sp/duh/jsonapi/model/concerns/attributes.rb
|
126
|
+
- lib/sp/duh/jsonapi/model/concerns/model.rb
|
127
|
+
- lib/sp/duh/jsonapi/model/concerns/persistence.rb
|
128
|
+
- lib/sp/duh/jsonapi/model/concerns/serialization.rb
|
129
|
+
- lib/sp/duh/jsonapi/parameters.rb
|
130
|
+
- lib/sp/duh/jsonapi/resource_publisher.rb
|
131
|
+
- lib/sp/duh/jsonapi/service.rb
|
132
|
+
- lib/sp/duh/migrations.rb
|
133
|
+
- lib/sp/duh/migrations/migrator.rb
|
134
|
+
- lib/sp/duh/repl.rb
|
135
|
+
- lib/sp/duh/version.rb
|
136
|
+
- lib/tasks/db_utils.rake
|
137
|
+
- lib/tasks/doc.rake
|
138
|
+
- lib/tasks/i18n.rake
|
139
|
+
- lib/tasks/oauth.rake
|
140
|
+
- lib/tasks/transfer.rake
|
141
|
+
- lib/tasks/xls2jrxml.rake
|
142
|
+
- test/jsonapi/server.rb
|
143
|
+
- test/tasks/test.rake
|
144
|
+
homepage: https://github.com/vpfpinho/sp-duh
|
145
|
+
licenses:
|
146
|
+
- AGPL
|
147
|
+
metadata: {}
|
148
|
+
post_install_message:
|
149
|
+
rdoc_options: []
|
150
|
+
require_paths:
|
151
|
+
- lib
|
152
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
|
+
requirements:
|
159
|
+
- - ">="
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
version: '0'
|
162
|
+
requirements: []
|
163
|
+
rubyforge_project:
|
164
|
+
rubygems_version: 2.4.8
|
165
|
+
signing_key:
|
166
|
+
specification_version: 4
|
167
|
+
summary: Gem to manage JSONAPI requests to a resourceful database
|
168
|
+
test_files:
|
169
|
+
- test/jsonapi/server.rb
|
170
|
+
- test/tasks/test.rake
|