roda_api_generator 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +2 -0
  3. data/.gitignore +38 -0
  4. data/.rspec +4 -0
  5. data/.rubocop.yml +26 -0
  6. data/.travis.yml +23 -0
  7. data/CHANGELOG.md +37 -0
  8. data/CONTRIBUTING.md +29 -0
  9. data/Gemfile +6 -0
  10. data/Gemfile.lock +63 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +29 -0
  13. data/Rakefile +6 -0
  14. data/bin/console +14 -0
  15. data/bin/setup +8 -0
  16. data/example/.env +4 -0
  17. data/example/.rspec +2 -0
  18. data/example/Gemfile +28 -0
  19. data/example/Gemfile.lock +104 -0
  20. data/example/LICENSE +22 -0
  21. data/example/README.md +38 -0
  22. data/example/Rakefile +15 -0
  23. data/example/application/api.rb +17 -0
  24. data/example/application/api/api_support.rb +14 -0
  25. data/example/application/api/models/user.rb +6 -0
  26. data/example/application/api/operations/user_service.rb +15 -0
  27. data/example/application/api/routes/main.rb +20 -0
  28. data/example/application/config/database.rb +2 -0
  29. data/example/application/config/sequel.rb +11 -0
  30. data/example/application/db/migrations/20180930152809_add_user_table.rb +15 -0
  31. data/example/application/db/migrations/migration_template.rb +4 -0
  32. data/example/application/tasks/db.rake +30 -0
  33. data/example/config.ru +3 -0
  34. data/example/spec/root_view_spec.rb +17 -0
  35. data/example/spec/spec_helper.rb +69 -0
  36. data/exe/api_generators +6 -0
  37. data/lib/roda_api_generator.rb +6 -0
  38. data/lib/roda_api_generator/cli.rb +28 -0
  39. data/lib/roda_api_generator/generators/roda.rb +101 -0
  40. data/lib/roda_api_generator/templates/roda/.env +4 -0
  41. data/lib/roda_api_generator/templates/roda/Gemfile +28 -0
  42. data/lib/roda_api_generator/templates/roda/LICENSE +22 -0
  43. data/lib/roda_api_generator/templates/roda/README.md +38 -0
  44. data/lib/roda_api_generator/templates/roda/Rakefile +15 -0
  45. data/lib/roda_api_generator/templates/roda/application/api.rb +17 -0
  46. data/lib/roda_api_generator/templates/roda/application/api/api_support.rb +14 -0
  47. data/lib/roda_api_generator/templates/roda/application/api/models/user.rb +6 -0
  48. data/lib/roda_api_generator/templates/roda/application/api/operations/user_service.rb +15 -0
  49. data/lib/roda_api_generator/templates/roda/application/api/routes/main.rb +20 -0
  50. data/lib/roda_api_generator/templates/roda/application/config/database.rb +2 -0
  51. data/lib/roda_api_generator/templates/roda/application/config/sequel.rb +11 -0
  52. data/lib/roda_api_generator/templates/roda/application/db/migrations/20180930152809_add_user_table.rb +15 -0
  53. data/lib/roda_api_generator/templates/roda/application/db/migrations/migration_template.rb +4 -0
  54. data/lib/roda_api_generator/templates/roda/application/tasks/db.rake +30 -0
  55. data/lib/roda_api_generator/templates/roda/config.ru +3 -0
  56. data/lib/roda_api_generator/templates/roda/spec/root_view_spec.rb +17 -0
  57. data/lib/roda_api_generator/templates/roda/spec/rspec.options +2 -0
  58. data/lib/roda_api_generator/templates/roda/spec/spec_helper.rb.erb +69 -0
  59. data/lib/roda_api_generator/version.rb +3 -0
  60. data/roda_api_generator.gemspec +30 -0
  61. metadata +188 -0
@@ -0,0 +1,4 @@
1
+ DATABASE_ENV=postgres://root@localhost/db_development
2
+
3
+ RACK_COOKIE_KEY=something
4
+ RACK_COOKIE_SECRET=oEwNzxGhy6Xpw81dPyVQc1GI1Tb49pn0vie+nwwHnyDBuu0IwKbcR9WoXBDTXNQAeso=
@@ -0,0 +1,28 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development do
4
+ gem 'rake', '11.2.2'
5
+ end
6
+
7
+ gem 'dotenv', '2.5.0'
8
+ gem 'pg', '0.18.4'
9
+ gem 'puma', '3.12.0'
10
+ gem 'rack-protection', '1.5.5'
11
+ gem 'roda', '~> 2.26.0'
12
+ gem 'roda-http-auth'
13
+ gem 'sequel', '4.35.0'
14
+ gem 'simplecov', '0.16.1'
15
+
16
+ group :development, :test do
17
+ gem 'awesome_print', '1.8.0'
18
+ gem 'pry', '0.11.3'
19
+ gem 'rubocop'
20
+ end
21
+
22
+ group :test do
23
+ gem 'factory_bot', '4.8.2'
24
+ gem 'faker', '1.8.7'
25
+ gem 'rack-test', '1.0.0'
26
+ gem 'rspec', '3.7.0'
27
+ gem 'rspec_sequel_matchers', '0.4.0'
28
+ end
@@ -0,0 +1,22 @@
1
+ Copyright (c) <#{Time.new.year}> <#{ENV['USERNAME'] || ENV['USER']}>
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ # Your project's name
2
+
3
+ ## Setting the project up
4
+
5
+ ### Clone the repository
6
+
7
+ Fork the project and clone it to your machine.
8
+
9
+ ### Install the dependencies
10
+
11
+ bundle install
12
+
13
+ ### Install the database
14
+
15
+ `createdb db_development`
16
+ `bundle exec rake db:migrate`
17
+
18
+ ## Development
19
+
20
+ ### Launch the console
21
+
22
+ ??
23
+
24
+ ### Run the specs
25
+
26
+ `bundle exec rspec`
27
+
28
+ ## Built With
29
+
30
+ ??
31
+
32
+ ## Contributing Guidelines
33
+
34
+ ??
35
+
36
+ ## License
37
+
38
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,15 @@
1
+ require 'dotenv'
2
+ Dotenv.load
3
+
4
+ $LOAD_PATH.unshift(File.expand_path('./application'))
5
+ current_task = Rake.application.top_level_tasks.first
6
+
7
+ require 'bundler'
8
+ require 'bundler/setup'
9
+
10
+ if current_task['db:']
11
+ require 'config/sequel'
12
+ require 'config/database'
13
+ end
14
+
15
+ Dir['./application/tasks/**/*.rake'].each { |rake_file| import(rake_file) }
@@ -0,0 +1,17 @@
1
+ # Load path and gems/bundler
2
+ $LOAD_PATH << __dir__
3
+
4
+ require 'bundler'
5
+ require 'logger'
6
+ Bundler.require
7
+
8
+ require 'dotenv'
9
+ Dotenv.load
10
+
11
+ file_path = File.dirname(__FILE__)
12
+
13
+ %w(config api/db api/models api/operations).each do |path|
14
+ Dir["#{file_path}/#{path}/**/*.rb"].each { |file| require file }
15
+ end
16
+
17
+ require './application/api/api_support'
@@ -0,0 +1,14 @@
1
+ class ApiSupport < Roda
2
+ use Rack::Session::Cookie, key: ENV['RACK_COOKIE_KEY'], secret: ENV['RACK_COOKIE_SECRET']
3
+ use Rack::Protection
4
+ use Rack::Protection::RemoteReferrer
5
+
6
+ plugin :environments
7
+ plugin :http_auth
8
+ plugin :json
9
+ plugin :json_parser
10
+
11
+ self.environment = ENV['ENVIRONMENT']
12
+
13
+ require_relative './routes/main.rb'
14
+ end
@@ -0,0 +1,6 @@
1
+ module Api
2
+ module Models
3
+ class User < Sequel::Model(:user)
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,15 @@
1
+ module Api
2
+ module Operations
3
+ class UserService
4
+ def initialize(params)
5
+ @params = params
6
+ end
7
+
8
+ attr_reader :params
9
+
10
+ def show_params
11
+ params['email']
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,20 @@
1
+ class ApiSupport
2
+ route do |r|
3
+ r.root do
4
+ 'Nothing Here'
5
+ end
6
+
7
+ r.on 'example' do
8
+ r.get do
9
+ begin
10
+ params = request.params
11
+ rescue StandardError
12
+ params = JSON.parse(request.body.read)
13
+ end
14
+
15
+ user = Api::Operations::UserService.new(params)
16
+ user.show_params
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,2 @@
1
+ # Sequel Configuration
2
+ DB = Sequel.connect(ENV.fetch('DATABASE_ENV'))
@@ -0,0 +1,11 @@
1
+ require 'sequel'
2
+
3
+ Sequel.database_timezone = :local
4
+
5
+ # basic plugins
6
+ # to access the full list: https://sequel.jeremyevans.net/plugins.html
7
+ Sequel::Model.plugin :validation_helpers
8
+ Sequel::Model.plugin :nested_attributes
9
+ Sequel::Model.plugin :boolean_readers
10
+ Sequel::Model.plugin :table_select
11
+ Sequel::Model.plugin :string_stripper
@@ -0,0 +1,15 @@
1
+ Sequel.migration do
2
+ up do
3
+ create_table(:user) do
4
+ primary_key :id
5
+ String :first_name, null: false
6
+ String :last_name, null: false
7
+ String :email, null: false
8
+ String :username, null: false
9
+ end
10
+ end
11
+
12
+ down do
13
+ drop_table(:users)
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ namespace :db do
2
+ desc 'Performs migration up to latest migration available'
3
+ task :migrate do
4
+ Sequel.extension :migration, :core_extensions
5
+ Sequel::Migrator.run(DB, 'application/db/migrations')
6
+ end
7
+
8
+ desc 'Generates a new timestamped Sequel migration'
9
+ task :migration, :name do |_, args|
10
+ if args[:name].nil?
11
+ puts 'Please specify a name for your migration (e.g. rake generate:migration[add_user_table])'
12
+ exit false
13
+ end
14
+
15
+ timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S')
16
+ filename = File.join('application/db/migrations', "#{timestamp}_#{args[:name]}.rb")
17
+
18
+ require 'fileutils'
19
+ FileUtils.cp_r('application/db/migrations/migration_template.rb', filename)
20
+
21
+ puts "Created the migration #{filename}"
22
+ end
23
+
24
+ desc 'Drop all database tables and re-run migrations'
25
+ task :reset do
26
+ DB.tables.each { |table| DB.drop_table(table.to_sym) }
27
+
28
+ Rake::Task['db:migrate'].execute
29
+ end
30
+ end
@@ -0,0 +1,3 @@
1
+ require './application/api'
2
+
3
+ run Rack::Cascade.new [ApiSupport]
@@ -0,0 +1,17 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe 'Do a GET request in the root_path' do
4
+ it 'should render root page' do
5
+ get '/'
6
+
7
+ expect(last_response.status).to eq(200)
8
+ expect(last_response.body).to eq('Nothing Here')
9
+ end
10
+
11
+ it 'should render example page' do
12
+ get '/example', email: 'email'
13
+
14
+ expect(last_response.status).to eq(200)
15
+ expect(last_response.body).to eq('email')
16
+ end
17
+ end
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,69 @@
1
+ # Add Simplecov configuration
2
+ require 'simplecov'
3
+ SimpleCov.start do
4
+ add_filter '/.bundle/'
5
+ add_filter '/application/config/'
6
+ add_filter '/application/db/'
7
+ add_filter '/spec/'
8
+ end
9
+
10
+ # Require gems and files
11
+ require 'rspec/core'
12
+ require 'rack/test'
13
+ require './application/api'
14
+ require 'faker'
15
+ require 'factory_bot'
16
+ require 'rspec_sequel_matchers'
17
+
18
+ # Set locale en-US for faker
19
+ Faker::Config.locale = 'en-US'
20
+
21
+ # Necessary to test a cascading rack app and middleware
22
+ module RSpecHelpers
23
+ include Rack::Test::Methods
24
+
25
+ def login_as(user)
26
+ inject_header
27
+
28
+ Api.class_variable_set(:@@current_user, user)
29
+ end
30
+
31
+ def app
32
+ Rack::Builder.parse_file('config.ru').first
33
+ end
34
+
35
+ def inject_header
36
+ header 'AUTHORIZATION', %(Token token="abc", foo="bar")
37
+ end
38
+
39
+ def response_body
40
+ JSON.parse(last_response.body, symbolize_names: true)
41
+ end
42
+ end
43
+
44
+ # FactoryBot is expecting ActiveRecord
45
+ module Sequel
46
+ class Model
47
+ alias save! save
48
+ end
49
+ end
50
+
51
+ # Set up rspec basic configurations
52
+ RSpec.configure do |config|
53
+ config.extend RSpecHelpers
54
+ config.include RSpecHelpers
55
+ config.include FactoryBot::Syntax::Methods
56
+ config.include RspecSequel::Matchers
57
+
58
+ config.disable_monkey_patching!
59
+ config.filter_run_excluding :slow
60
+
61
+ config.expect_with :rspec do |c|
62
+ c.syntax = :expect
63
+ end
64
+
65
+ config.before(:suite) do
66
+ FactoryBot.definition_file_paths = %w(./spec/factories)
67
+ FactoryBot.find_definitions
68
+ end
69
+ end
@@ -0,0 +1,3 @@
1
+ module RubyApiGenerators
2
+ VERSION = '0.1.1'.freeze
3
+ end
@@ -0,0 +1,30 @@
1
+ lib = File.expand_path('lib', __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
4
+ require 'roda_api_generator/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'roda_api_generator'
8
+ spec.version = RubyApiGenerators::VERSION
9
+ spec.authors = ['Vitor Oliveira']
10
+ spec.email = ['vbrazo@gmail.com']
11
+ spec.summary = 'A collection of useful Ruby API generator scripts.'
12
+ spec.description = 'A collection of useful Ruby generator scripts for scaffolding APIs.'
13
+ spec.homepage = 'http://github.com/napice/roda_api_generator'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
17
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
18
+ end
19
+ spec.bindir = 'exe'
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ['lib']
22
+
23
+ spec.add_dependency 'thor'
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1.16'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.0'
28
+ spec.add_development_dependency 'rubocop', '0.59.2'
29
+ spec.add_development_dependency 'simplecov', '0.16.1'
30
+ end
metadata ADDED
@@ -0,0 +1,188 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: roda_api_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Vitor Oliveira
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.16'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.16'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '='
74
+ - !ruby/object:Gem::Version
75
+ version: 0.59.2
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.59.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '='
88
+ - !ruby/object:Gem::Version
89
+ version: 0.16.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '='
95
+ - !ruby/object:Gem::Version
96
+ version: 0.16.1
97
+ description: A collection of useful Ruby generator scripts for scaffolding APIs.
98
+ email:
99
+ - vbrazo@gmail.com
100
+ executables:
101
+ - api_generators
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".codeclimate.yml"
106
+ - ".gitignore"
107
+ - ".rspec"
108
+ - ".rubocop.yml"
109
+ - ".travis.yml"
110
+ - CHANGELOG.md
111
+ - CONTRIBUTING.md
112
+ - Gemfile
113
+ - Gemfile.lock
114
+ - LICENSE.txt
115
+ - README.md
116
+ - Rakefile
117
+ - bin/console
118
+ - bin/setup
119
+ - example/.env
120
+ - example/.rspec
121
+ - example/Gemfile
122
+ - example/Gemfile.lock
123
+ - example/LICENSE
124
+ - example/README.md
125
+ - example/Rakefile
126
+ - example/application/api.rb
127
+ - example/application/api/api_support.rb
128
+ - example/application/api/models/user.rb
129
+ - example/application/api/operations/user_service.rb
130
+ - example/application/api/routes/main.rb
131
+ - example/application/config/database.rb
132
+ - example/application/config/sequel.rb
133
+ - example/application/db/migrations/20180930152809_add_user_table.rb
134
+ - example/application/db/migrations/migration_template.rb
135
+ - example/application/tasks/db.rake
136
+ - example/config.ru
137
+ - example/spec/root_view_spec.rb
138
+ - example/spec/spec_helper.rb
139
+ - exe/api_generators
140
+ - lib/roda_api_generator.rb
141
+ - lib/roda_api_generator/cli.rb
142
+ - lib/roda_api_generator/generators/roda.rb
143
+ - lib/roda_api_generator/templates/roda/.env
144
+ - lib/roda_api_generator/templates/roda/Gemfile
145
+ - lib/roda_api_generator/templates/roda/LICENSE
146
+ - lib/roda_api_generator/templates/roda/README.md
147
+ - lib/roda_api_generator/templates/roda/Rakefile
148
+ - lib/roda_api_generator/templates/roda/application/api.rb
149
+ - lib/roda_api_generator/templates/roda/application/api/api_support.rb
150
+ - lib/roda_api_generator/templates/roda/application/api/models/user.rb
151
+ - lib/roda_api_generator/templates/roda/application/api/operations/user_service.rb
152
+ - lib/roda_api_generator/templates/roda/application/api/routes/main.rb
153
+ - lib/roda_api_generator/templates/roda/application/config/database.rb
154
+ - lib/roda_api_generator/templates/roda/application/config/sequel.rb
155
+ - lib/roda_api_generator/templates/roda/application/db/migrations/20180930152809_add_user_table.rb
156
+ - lib/roda_api_generator/templates/roda/application/db/migrations/migration_template.rb
157
+ - lib/roda_api_generator/templates/roda/application/tasks/db.rake
158
+ - lib/roda_api_generator/templates/roda/config.ru
159
+ - lib/roda_api_generator/templates/roda/spec/root_view_spec.rb
160
+ - lib/roda_api_generator/templates/roda/spec/rspec.options
161
+ - lib/roda_api_generator/templates/roda/spec/spec_helper.rb.erb
162
+ - lib/roda_api_generator/version.rb
163
+ - roda_api_generator.gemspec
164
+ homepage: http://github.com/napice/roda_api_generator
165
+ licenses:
166
+ - MIT
167
+ metadata: {}
168
+ post_install_message:
169
+ rdoc_options: []
170
+ require_paths:
171
+ - lib
172
+ required_ruby_version: !ruby/object:Gem::Requirement
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ version: '0'
177
+ required_rubygems_version: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ requirements: []
183
+ rubyforge_project:
184
+ rubygems_version: 2.7.7
185
+ signing_key:
186
+ specification_version: 4
187
+ summary: A collection of useful Ruby API generator scripts.
188
+ test_files: []