fasta 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. metadata +4 -63
  3. data/.gitignore +0 -11
  4. data/.idea/fasta.iml +0 -30
  5. data/.idea/inspectionProfiles/Project_Default.xml +0 -8
  6. data/.idea/misc.xml +0 -7
  7. data/.idea/modules.xml +0 -8
  8. data/.idea/workspace.xml +0 -838
  9. data/.rspec +0 -3
  10. data/.travis.yml +0 -7
  11. data/CODE_OF_CONDUCT.md +0 -74
  12. data/Gemfile +0 -6
  13. data/LICENSE.txt +0 -21
  14. data/README.md +0 -43
  15. data/Rakefile +0 -7
  16. data/bin/console +0 -14
  17. data/bin/setup +0 -8
  18. data/exe/fasta +0 -5
  19. data/fasta.gemspec +0 -48
  20. data/lib/fasta/app/endpoints/model/create.rb +0 -5
  21. data/lib/fasta/app/endpoints/model/delete.rb +0 -7
  22. data/lib/fasta/app/endpoints/model/index.rb +0 -5
  23. data/lib/fasta/app/endpoints/model/patch.rb +0 -7
  24. data/lib/fasta/app/endpoints/model/put.rb +0 -7
  25. data/lib/fasta/app/endpoints/model/show.rb +0 -7
  26. data/lib/fasta/app/endpoints/model.rb +0 -17
  27. data/lib/fasta/cli.rb +0 -22
  28. data/lib/fasta/server/actions/create.rb +0 -17
  29. data/lib/fasta/server/actions/delete.rb +0 -22
  30. data/lib/fasta/server/actions/index.rb +0 -13
  31. data/lib/fasta/server/actions/patch.rb +0 -18
  32. data/lib/fasta/server/actions/put.rb +0 -23
  33. data/lib/fasta/server/actions/show.rb +0 -14
  34. data/lib/fasta/server/actions.rb +0 -13
  35. data/lib/fasta/server/core/read.rb +0 -13
  36. data/lib/fasta/server/core/responder.rb +0 -100
  37. data/lib/fasta/server/core/write.rb +0 -38
  38. data/lib/fasta/version.rb +0 -3
  39. data/lib/fasta.rb +0 -7
  40. data/templates/Gemfile +0 -4
  41. data/templates/Procfile +0 -1
  42. data/templates/Rakefile +0 -2
  43. data/templates/app/endpoints/user/boards.rb +0 -11
  44. data/templates/app/endpoints/user/create.rb +0 -5
  45. data/templates/app/endpoints/user/delete.rb +0 -5
  46. data/templates/app/endpoints/user/index.rb +0 -3
  47. data/templates/app/endpoints/user/patch.rb +0 -5
  48. data/templates/app/endpoints/user/put.rb +0 -5
  49. data/templates/app/endpoints/user/show.rb +0 -5
  50. data/templates/app/endpoints/user.rb +0 -3
  51. data/templates/application.rb +0 -6
  52. data/templates/boot.ru +0 -3
  53. data/templates/config/database.yml +0 -22
  54. data/templates/config/environment.rb +0 -12
  55. data/templates/config/environments/development.rb +0 -2
  56. data/templates/config/environments/production.rb +0 -4
  57. data/templates/config/environments/test.rb +0 -2
  58. data/templates/config/puma.rb +0 -12
  59. data/templates/config/routes.rb +0 -19
@@ -1,5 +0,0 @@
1
- module User
2
- class Delete < Fasta::Model::Delete
3
- validate_fields :id
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module User
2
- class Index < Fasta::Model::Index; end
3
- end
@@ -1,5 +0,0 @@
1
- module User
2
- class Patch < Fasta::Model::Patch
3
- validate_fields :id
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module User
2
- class Put < Fasta::Model::Put
3
- validate_fields :id
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module User
2
- class Show < Fasta::Model::Show
3
- validate_fields :id
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module User
2
- extend Fasta::Model
3
- end
@@ -1,6 +0,0 @@
1
- require 'fasta'
2
- require './config/environment'
3
- Dir['./app/endpoints/**/*.rb'].each { |file| require file }
4
- Dir['./app/endpoints/**/**/*.rb'].each { |file| require file }
5
-
6
- require './config/routes.rb'
data/templates/boot.ru DELETED
@@ -1,3 +0,0 @@
1
- require './application.rb'
2
-
3
- run $router
@@ -1,22 +0,0 @@
1
- development:
2
- adapter: :postgres
3
- host: localhost
4
- port: 5432
5
- database: 'dodoshka_development'
6
- max_connections: 10
7
-
8
- production:
9
- adapter: :postgres
10
- host: 'ec2-79-125-119-70.eu-west-1.compute.amazonaws.com'
11
- port: 5432
12
- database: 'd9pseukhs9ukkm'
13
- user: 'pruwpijfbzumyl'
14
- password: 'ff435e3a4ac5a829b4b7f39e845af3d66c8a404a9de521387ca1faefc1201ad5'
15
- max_connections: 10
16
-
17
- test:
18
- adapter: :postgres
19
- host: localhost
20
- port: 5432
21
- database: 'dodoshka_test'
22
- max_connections: 10
@@ -1,12 +0,0 @@
1
- # Load environment
2
- # Development by default
3
-
4
- if ENV.fetch('RACK_ENV', nil).nil?
5
- require_relative 'environments/development.rb'
6
- else
7
- begin
8
- require_relative "environments/#{ENV.fetch('RACK_ENV')}.rb"
9
- rescue LoadError
10
- require_relative 'environments/development.rb'
11
- end
12
- end
@@ -1,2 +0,0 @@
1
- ENV['RACK_ENV'] = 'development'
2
- puts "Load #{ENV['RACK_ENV']} mode"
@@ -1,4 +0,0 @@
1
- # Use strings to set values
2
-
3
- ENV['RACK_ENV'] = 'production'
4
- puts "Load #{ENV['RACK_ENV']} mode"
@@ -1,2 +0,0 @@
1
- ENV['RACK_ENV'] = 'test'
2
- puts "Load #{ENV['RACK_ENV']} mode"
@@ -1,12 +0,0 @@
1
- # threads_count = ENV.fetch('RAILS_MAX_THREADS') { 64 }.to_i
2
- # threads threads_count, threads_count
3
- # port ENV.fetch('PORT') { $PORT }
4
-
5
- # ENV = {}
6
-
7
- # environment ENV.fetch('RACK_ENV', 'development') # default development
8
- # puts ENV
9
- # workers ENV.fetch("WEB_CONCURRENCY") { 1 }
10
- # preload_app!
11
-
12
- # plugin :tmp_restart
@@ -1,19 +0,0 @@
1
- require 'hanami/router'
2
-
3
- $router = Hanami::Router.new(parsers: [:json]) do
4
- action = ->(klass) { ->(env) { klass.call(env) } }
5
-
6
- root to: ->(_env) { [200, {}, ['Welcome to API']] }
7
-
8
- get '/users', to: action.call(User::Index)
9
- post '/users', to: action.call(User::Create)
10
- get '/users/:id', to: action.call(User::Show)
11
- put '/users/:id', to: action.call(User::Put)
12
- patch '/users/:id', to: action.call(User::Patch)
13
- delete '/users/:id', to: action.call(User::Delete)
14
- get '/users/:id/boards', to: action.call(User::Boards)
15
-
16
- # get '/accounts', to: action.call(Account::Index)
17
- # get '/accounts/:id', to: action.call(Account::Show)
18
- # get 'team/users', to: action.call(Team::User::Index)
19
- end