yamls 0.1.2 → 0.2.1
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/.circleci/config.yml +24 -0
- data/CHANGELOG.md +5 -0
- data/README.md +212 -2
- data/example/rails5/Gemfile +1 -1
- data/example/rails5/app/controllers/books_controller.rb +3 -5
- data/example/rails5/app/controllers/people_controller.rb +1 -1
- data/example/rails5/db/migrate/{20211031043641_create_people.rb → 20211031170917_create_people.rb} +2 -2
- data/example/rails5/db/schema.rb +3 -3
- data/example/rails5/test/controllers/books_controller_test.rb +2 -14
- data/example/rails5/test/controllers/people_controller_test.rb +2 -14
- data/example/rails5/test/fixtures/books.yml +8 -7
- data/example/rails5/test/fixtures/people.yml +8 -7
- data/example/rails6.0.0/.gitignore +33 -0
- data/example/rails6.0.0/.ruby-version +1 -0
- data/example/rails6.0.0/Gemfile +43 -0
- data/example/{rails5 → rails6.0.0}/README.md +0 -0
- data/example/rails6.0.0/Rakefile +6 -0
- data/example/rails6.0.0/app/channels/application_cable/channel.rb +4 -0
- data/example/rails6.0.0/app/channels/application_cable/connection.rb +4 -0
- data/example/rails6.0.0/app/controllers/application_controller.rb +2 -0
- data/example/rails6.0.0/app/controllers/books_controller.rb +53 -0
- data/example/{rails5/test/integration → rails6.0.0/app/controllers/concerns}/.keep +0 -0
- data/example/rails6.0.0/app/controllers/people_controller.rb +55 -0
- data/example/rails6.0.0/app/jobs/application_job.rb +7 -0
- data/example/rails6.0.0/app/mailers/application_mailer.rb +4 -0
- data/example/rails6.0.0/app/models/application_record.rb +3 -0
- data/example/rails6.0.0/app/models/book.rb +2 -0
- data/example/rails6.0.0/app/models/concerns/.keep +0 -0
- data/example/rails6.0.0/app/models/person.rb +2 -0
- data/example/rails6.0.0/app/parameters/column.yml +15 -0
- data/example/rails6.0.0/app/views/layouts/mailer.html.erb +13 -0
- data/example/rails6.0.0/app/views/layouts/mailer.text.erb +1 -0
- data/example/rails6.0.0/bin/bundle +114 -0
- data/example/rails6.0.0/bin/rails +9 -0
- data/example/rails6.0.0/bin/rake +9 -0
- data/example/rails6.0.0/bin/setup +33 -0
- data/example/rails6.0.0/bin/spring +17 -0
- data/example/rails6.0.0/config/application.rb +37 -0
- data/example/rails6.0.0/config/boot.rb +4 -0
- data/example/rails6.0.0/config/cable.yml +10 -0
- data/example/rails6.0.0/config/credentials.yml.enc +1 -0
- data/example/rails6.0.0/config/database.yml +25 -0
- data/example/rails6.0.0/config/environment.rb +5 -0
- data/example/rails6.0.0/config/environments/development.rb +52 -0
- data/example/rails6.0.0/config/environments/production.rb +105 -0
- data/example/rails6.0.0/config/environments/test.rb +49 -0
- data/example/rails6.0.0/config/initializers/application_controller_renderer.rb +8 -0
- data/example/rails6.0.0/config/initializers/backtrace_silencers.rb +7 -0
- data/example/rails6.0.0/config/initializers/cors.rb +16 -0
- data/example/rails6.0.0/config/initializers/filter_parameter_logging.rb +4 -0
- data/example/rails6.0.0/config/initializers/inflections.rb +16 -0
- data/example/rails6.0.0/config/initializers/mime_types.rb +4 -0
- data/example/rails6.0.0/config/initializers/wrap_parameters.rb +14 -0
- data/example/rails6.0.0/config/locales/en.yml +33 -0
- data/example/rails6.0.0/config/puma.rb +38 -0
- data/example/rails6.0.0/config/routes.rb +5 -0
- data/example/rails6.0.0/config/spring.rb +6 -0
- data/example/rails6.0.0/config/storage.yml +34 -0
- data/example/rails6.0.0/config.ru +5 -0
- data/example/rails6.0.0/db/migrate/20211031165333_create_people.rb +11 -0
- data/example/rails6.0.0/db/migrate/20211031165612_create_books.rb +11 -0
- data/example/rails6.0.0/db/schema.rb +31 -0
- data/example/rails6.0.0/db/seeds.rb +7 -0
- data/example/rails6.0.0/lib/tasks/.keep +0 -0
- data/example/rails6.0.0/log/.keep +0 -0
- data/example/rails6.0.0/public/robots.txt +1 -0
- data/example/rails6.0.0/storage/.keep +0 -0
- data/example/rails6.0.0/test/channels/application_cable/connection_test.rb +11 -0
- data/example/rails6.0.0/test/controllers/.keep +0 -0
- data/example/rails6.0.0/test/controllers/books_controller_test.rb +38 -0
- data/example/rails6.0.0/test/controllers/people_controller_test.rb +38 -0
- data/example/rails6.0.0/test/fixtures/.keep +0 -0
- data/example/rails6.0.0/test/fixtures/books.yml +11 -0
- data/example/rails6.0.0/test/fixtures/files/.keep +0 -0
- data/example/rails6.0.0/test/fixtures/people.yml +11 -0
- data/example/rails6.0.0/test/integration/.keep +0 -0
- data/example/rails6.0.0/test/test_helper.rb +13 -0
- data/example/rails6.0.0/tmp/.keep +0 -0
- data/example/rails6.0.0/tmp/pids/.keep +0 -0
- data/lib/yamls/helpers/config.rb +6 -0
- data/lib/yamls/helpers/yaml_load.rb +19 -0
- data/lib/yamls/parameters.rb +6 -6
- data/lib/{support → yamls/support}/parameters.rb +1 -1
- data/lib/yamls/support.rb +8 -0
- data/lib/yamls/version.rb +1 -1
- data/lib/yamls.rb +3 -2
- metadata +74 -8
- data/lib/yamls/config.rb +0 -4
- data/lib/yamls/yaml_load.rb +0 -17
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Puma can serve each request in a thread from an internal thread pool.
|
|
2
|
+
# The `threads` method setting takes two numbers: a minimum and maximum.
|
|
3
|
+
# Any libraries that use thread pools should be configured to match
|
|
4
|
+
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
|
5
|
+
# and maximum; this matches the default thread size of Active Record.
|
|
6
|
+
#
|
|
7
|
+
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
|
8
|
+
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
|
9
|
+
threads min_threads_count, max_threads_count
|
|
10
|
+
|
|
11
|
+
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
|
12
|
+
#
|
|
13
|
+
port ENV.fetch("PORT") { 3000 }
|
|
14
|
+
|
|
15
|
+
# Specifies the `environment` that Puma will run in.
|
|
16
|
+
#
|
|
17
|
+
environment ENV.fetch("RAILS_ENV") { "development" }
|
|
18
|
+
|
|
19
|
+
# Specifies the `pidfile` that Puma will use.
|
|
20
|
+
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
|
21
|
+
|
|
22
|
+
# Specifies the number of `workers` to boot in clustered mode.
|
|
23
|
+
# Workers are forked web server processes. If using threads and workers together
|
|
24
|
+
# the concurrency of the application would be max `threads` * `workers`.
|
|
25
|
+
# Workers do not work on JRuby or Windows (both of which do not support
|
|
26
|
+
# processes).
|
|
27
|
+
#
|
|
28
|
+
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
|
29
|
+
|
|
30
|
+
# Use the `preload_app!` method when specifying a `workers` number.
|
|
31
|
+
# This directive tells Puma to first boot the application and load code
|
|
32
|
+
# before forking the application. This takes advantage of Copy On Write
|
|
33
|
+
# process behavior so workers use less memory.
|
|
34
|
+
#
|
|
35
|
+
# preload_app!
|
|
36
|
+
|
|
37
|
+
# Allow puma to be restarted by `rails restart` command.
|
|
38
|
+
plugin :tmp_restart
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
test:
|
|
2
|
+
service: Disk
|
|
3
|
+
root: <%= Rails.root.join("tmp/storage") %>
|
|
4
|
+
|
|
5
|
+
local:
|
|
6
|
+
service: Disk
|
|
7
|
+
root: <%= Rails.root.join("storage") %>
|
|
8
|
+
|
|
9
|
+
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
|
10
|
+
# amazon:
|
|
11
|
+
# service: S3
|
|
12
|
+
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
|
13
|
+
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
|
14
|
+
# region: us-east-1
|
|
15
|
+
# bucket: your_own_bucket
|
|
16
|
+
|
|
17
|
+
# Remember not to checkin your GCS keyfile to a repository
|
|
18
|
+
# google:
|
|
19
|
+
# service: GCS
|
|
20
|
+
# project: your_project
|
|
21
|
+
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
|
22
|
+
# bucket: your_own_bucket
|
|
23
|
+
|
|
24
|
+
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
|
25
|
+
# microsoft:
|
|
26
|
+
# service: AzureStorage
|
|
27
|
+
# storage_account_name: your_account_name
|
|
28
|
+
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
|
29
|
+
# container: your_container_name
|
|
30
|
+
|
|
31
|
+
# mirror:
|
|
32
|
+
# service: Mirror
|
|
33
|
+
# primary: local
|
|
34
|
+
# mirrors: [ amazon, google, microsoft ]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
|
4
|
+
#
|
|
5
|
+
# This file is the source Rails uses to define your schema when running `rails
|
|
6
|
+
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
|
7
|
+
# be faster and is potentially less error prone than running all of your
|
|
8
|
+
# migrations from scratch. Old migrations may fail to apply correctly if those
|
|
9
|
+
# migrations use external dependencies or application code.
|
|
10
|
+
#
|
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
|
12
|
+
|
|
13
|
+
ActiveRecord::Schema.define(version: 2021_10_31_165612) do
|
|
14
|
+
|
|
15
|
+
create_table "books", force: :cascade do |t|
|
|
16
|
+
t.string "name"
|
|
17
|
+
t.string "label"
|
|
18
|
+
t.integer "value"
|
|
19
|
+
t.datetime "created_at", precision: 6, null: false
|
|
20
|
+
t.datetime "updated_at", precision: 6, null: false
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
create_table "people", force: :cascade do |t|
|
|
24
|
+
t.string "name"
|
|
25
|
+
t.integer "age"
|
|
26
|
+
t.integer "role"
|
|
27
|
+
t.datetime "created_at", precision: 6, null: false
|
|
28
|
+
t.datetime "updated_at", precision: 6, null: false
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file should contain all the record creation needed to seed the database with its default values.
|
|
2
|
+
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
|
|
3
|
+
#
|
|
4
|
+
# Examples:
|
|
5
|
+
#
|
|
6
|
+
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
|
7
|
+
# Character.create(name: 'Luke', movie: movies.first)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class BooksControllerTest < ActionDispatch::IntegrationTest
|
|
4
|
+
setup do
|
|
5
|
+
@book = books(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get books_url, as: :json
|
|
10
|
+
assert_response :success
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
test "should create book" do
|
|
14
|
+
assert_difference('Book.count') do
|
|
15
|
+
post books_url, params: { book: { label: @book.label, name: @book.name, value: @book.value } }, as: :json
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
assert_response 201
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
test "should show book" do
|
|
22
|
+
get book_url(@book), as: :json
|
|
23
|
+
assert_response :success
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
test "should update book" do
|
|
27
|
+
patch book_url(@book), params: { book: { label: @book.label, name: @book.name, value: @book.value } }, as: :json
|
|
28
|
+
assert_response 200
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
test "should destroy book" do
|
|
32
|
+
assert_difference('Book.count', -1) do
|
|
33
|
+
delete book_url(@book), as: :json
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
assert_response 204
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class PeopleControllerTest < ActionDispatch::IntegrationTest
|
|
4
|
+
setup do
|
|
5
|
+
@person = people(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get people_url, as: :json
|
|
10
|
+
assert_response :success
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
test "should create person" do
|
|
14
|
+
assert_difference('Person.count') do
|
|
15
|
+
post people_url, params: { person: { age: @person.age, name: @person.name, role: @person.role } }, as: :json
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
assert_response 201
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
test "should show person" do
|
|
22
|
+
get person_url(@person), as: :json
|
|
23
|
+
assert_response :success
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
test "should update person" do
|
|
27
|
+
patch person_url(@person), params: { person: { age: @person.age, name: @person.name, role: @person.role } }, as: :json
|
|
28
|
+
assert_response 200
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
test "should destroy person" do
|
|
32
|
+
assert_difference('Person.count', -1) do
|
|
33
|
+
delete person_url(@person), as: :json
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
assert_response 204
|
|
37
|
+
end
|
|
38
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
ENV['RAILS_ENV'] ||= 'test'
|
|
2
|
+
require_relative '../config/environment'
|
|
3
|
+
require 'rails/test_help'
|
|
4
|
+
|
|
5
|
+
class ActiveSupport::TestCase
|
|
6
|
+
# Run tests in parallel with specified workers
|
|
7
|
+
parallelize(workers: :number_of_processors)
|
|
8
|
+
|
|
9
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
|
10
|
+
fixtures :all
|
|
11
|
+
|
|
12
|
+
# Add more helper methods to be used by all tests here...
|
|
13
|
+
end
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
module Yamls
|
|
3
|
+
module Helpers
|
|
4
|
+
class YamlLoad
|
|
5
|
+
def initialize(filepath, loader: YAML)
|
|
6
|
+
@filepath = filepath
|
|
7
|
+
@loader = loader
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def load
|
|
11
|
+
loader.load_file(filepath)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
attr_reader :filepath, :loader
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/yamls/parameters.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
require_relative "./config"
|
|
3
|
-
require_relative "./yaml_load"
|
|
2
|
+
require_relative "./helpers/config"
|
|
3
|
+
require_relative "./helpers/yaml_load"
|
|
4
4
|
|
|
5
5
|
module Yamls
|
|
6
6
|
class Parameters
|
|
@@ -8,12 +8,12 @@ module Yamls
|
|
|
8
8
|
params,
|
|
9
9
|
model: nil,
|
|
10
10
|
action: nil,
|
|
11
|
-
required:
|
|
11
|
+
required: model || action,
|
|
12
12
|
nested: [],
|
|
13
|
-
filepath: "#{Rails.root}/#{
|
|
13
|
+
filepath: "#{Rails.root}/#{Helpers::FILEPATH}"
|
|
14
14
|
)
|
|
15
15
|
@params = params
|
|
16
|
-
@required = required
|
|
16
|
+
@required = required
|
|
17
17
|
@nested = [model, action].push(*nested).compact.map(&:to_s)
|
|
18
18
|
@filepath = filepath
|
|
19
19
|
end
|
|
@@ -29,7 +29,7 @@ module Yamls
|
|
|
29
29
|
attr_reader :params, :filepath, :required, :nested
|
|
30
30
|
|
|
31
31
|
def yaml_loader
|
|
32
|
-
@yaml_loader ||= YamlLoad.new(filepath)
|
|
32
|
+
@yaml_loader ||= Helpers::YamlLoad.new(filepath)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
35
|
def columns
|
data/lib/yamls/version.rb
CHANGED
data/lib/yamls.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yamls
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- TsuMakoto
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-11-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description:
|
|
14
14
|
email:
|
|
@@ -31,7 +31,6 @@ files:
|
|
|
31
31
|
- example/rails5/.gitignore
|
|
32
32
|
- example/rails5/.ruby-version
|
|
33
33
|
- example/rails5/Gemfile
|
|
34
|
-
- example/rails5/README.md
|
|
35
34
|
- example/rails5/Rakefile
|
|
36
35
|
- example/rails5/app/channels/application_cable/channel.rb
|
|
37
36
|
- example/rails5/app/channels/application_cable/connection.rb
|
|
@@ -76,8 +75,8 @@ files:
|
|
|
76
75
|
- example/rails5/config/routes.rb
|
|
77
76
|
- example/rails5/config/spring.rb
|
|
78
77
|
- example/rails5/config/storage.yml
|
|
79
|
-
- example/rails5/db/migrate/20211031043641_create_people.rb
|
|
80
78
|
- example/rails5/db/migrate/20211031052741_create_books.rb
|
|
79
|
+
- example/rails5/db/migrate/20211031170917_create_people.rb
|
|
81
80
|
- example/rails5/db/schema.rb
|
|
82
81
|
- example/rails5/db/seeds.rb
|
|
83
82
|
- example/rails5/lib/tasks/.keep
|
|
@@ -91,15 +90,82 @@ files:
|
|
|
91
90
|
- example/rails5/test/fixtures/books.yml
|
|
92
91
|
- example/rails5/test/fixtures/files/.keep
|
|
93
92
|
- example/rails5/test/fixtures/people.yml
|
|
94
|
-
- example/rails5/test/integration/.keep
|
|
95
93
|
- example/rails5/test/test_helper.rb
|
|
96
94
|
- example/rails5/tmp/.keep
|
|
97
|
-
-
|
|
95
|
+
- example/rails6.0.0/.gitignore
|
|
96
|
+
- example/rails6.0.0/.ruby-version
|
|
97
|
+
- example/rails6.0.0/Gemfile
|
|
98
|
+
- example/rails6.0.0/README.md
|
|
99
|
+
- example/rails6.0.0/Rakefile
|
|
100
|
+
- example/rails6.0.0/app/channels/application_cable/channel.rb
|
|
101
|
+
- example/rails6.0.0/app/channels/application_cable/connection.rb
|
|
102
|
+
- example/rails6.0.0/app/controllers/application_controller.rb
|
|
103
|
+
- example/rails6.0.0/app/controllers/books_controller.rb
|
|
104
|
+
- example/rails6.0.0/app/controllers/concerns/.keep
|
|
105
|
+
- example/rails6.0.0/app/controllers/people_controller.rb
|
|
106
|
+
- example/rails6.0.0/app/jobs/application_job.rb
|
|
107
|
+
- example/rails6.0.0/app/mailers/application_mailer.rb
|
|
108
|
+
- example/rails6.0.0/app/models/application_record.rb
|
|
109
|
+
- example/rails6.0.0/app/models/book.rb
|
|
110
|
+
- example/rails6.0.0/app/models/concerns/.keep
|
|
111
|
+
- example/rails6.0.0/app/models/person.rb
|
|
112
|
+
- example/rails6.0.0/app/parameters/column.yml
|
|
113
|
+
- example/rails6.0.0/app/views/layouts/mailer.html.erb
|
|
114
|
+
- example/rails6.0.0/app/views/layouts/mailer.text.erb
|
|
115
|
+
- example/rails6.0.0/bin/bundle
|
|
116
|
+
- example/rails6.0.0/bin/rails
|
|
117
|
+
- example/rails6.0.0/bin/rake
|
|
118
|
+
- example/rails6.0.0/bin/setup
|
|
119
|
+
- example/rails6.0.0/bin/spring
|
|
120
|
+
- example/rails6.0.0/config.ru
|
|
121
|
+
- example/rails6.0.0/config/application.rb
|
|
122
|
+
- example/rails6.0.0/config/boot.rb
|
|
123
|
+
- example/rails6.0.0/config/cable.yml
|
|
124
|
+
- example/rails6.0.0/config/credentials.yml.enc
|
|
125
|
+
- example/rails6.0.0/config/database.yml
|
|
126
|
+
- example/rails6.0.0/config/environment.rb
|
|
127
|
+
- example/rails6.0.0/config/environments/development.rb
|
|
128
|
+
- example/rails6.0.0/config/environments/production.rb
|
|
129
|
+
- example/rails6.0.0/config/environments/test.rb
|
|
130
|
+
- example/rails6.0.0/config/initializers/application_controller_renderer.rb
|
|
131
|
+
- example/rails6.0.0/config/initializers/backtrace_silencers.rb
|
|
132
|
+
- example/rails6.0.0/config/initializers/cors.rb
|
|
133
|
+
- example/rails6.0.0/config/initializers/filter_parameter_logging.rb
|
|
134
|
+
- example/rails6.0.0/config/initializers/inflections.rb
|
|
135
|
+
- example/rails6.0.0/config/initializers/mime_types.rb
|
|
136
|
+
- example/rails6.0.0/config/initializers/wrap_parameters.rb
|
|
137
|
+
- example/rails6.0.0/config/locales/en.yml
|
|
138
|
+
- example/rails6.0.0/config/puma.rb
|
|
139
|
+
- example/rails6.0.0/config/routes.rb
|
|
140
|
+
- example/rails6.0.0/config/spring.rb
|
|
141
|
+
- example/rails6.0.0/config/storage.yml
|
|
142
|
+
- example/rails6.0.0/db/migrate/20211031165333_create_people.rb
|
|
143
|
+
- example/rails6.0.0/db/migrate/20211031165612_create_books.rb
|
|
144
|
+
- example/rails6.0.0/db/schema.rb
|
|
145
|
+
- example/rails6.0.0/db/seeds.rb
|
|
146
|
+
- example/rails6.0.0/lib/tasks/.keep
|
|
147
|
+
- example/rails6.0.0/log/.keep
|
|
148
|
+
- example/rails6.0.0/public/robots.txt
|
|
149
|
+
- example/rails6.0.0/storage/.keep
|
|
150
|
+
- example/rails6.0.0/test/channels/application_cable/connection_test.rb
|
|
151
|
+
- example/rails6.0.0/test/controllers/.keep
|
|
152
|
+
- example/rails6.0.0/test/controllers/books_controller_test.rb
|
|
153
|
+
- example/rails6.0.0/test/controllers/people_controller_test.rb
|
|
154
|
+
- example/rails6.0.0/test/fixtures/.keep
|
|
155
|
+
- example/rails6.0.0/test/fixtures/books.yml
|
|
156
|
+
- example/rails6.0.0/test/fixtures/files/.keep
|
|
157
|
+
- example/rails6.0.0/test/fixtures/people.yml
|
|
158
|
+
- example/rails6.0.0/test/integration/.keep
|
|
159
|
+
- example/rails6.0.0/test/test_helper.rb
|
|
160
|
+
- example/rails6.0.0/tmp/.keep
|
|
161
|
+
- example/rails6.0.0/tmp/pids/.keep
|
|
98
162
|
- lib/yamls.rb
|
|
99
|
-
- lib/yamls/config.rb
|
|
163
|
+
- lib/yamls/helpers/config.rb
|
|
164
|
+
- lib/yamls/helpers/yaml_load.rb
|
|
100
165
|
- lib/yamls/parameters.rb
|
|
166
|
+
- lib/yamls/support.rb
|
|
167
|
+
- lib/yamls/support/parameters.rb
|
|
101
168
|
- lib/yamls/version.rb
|
|
102
|
-
- lib/yamls/yaml_load.rb
|
|
103
169
|
- yamls.gemspec
|
|
104
170
|
homepage: https://github.com/TsuMakoto/yamls
|
|
105
171
|
licenses: []
|
data/lib/yamls/config.rb
DELETED
data/lib/yamls/yaml_load.rb
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
module Yamls
|
|
3
|
-
class YamlLoad
|
|
4
|
-
def initialize(filepath, loader: YAML)
|
|
5
|
-
@filepath = filepath
|
|
6
|
-
@loader = loader
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
def load
|
|
10
|
-
loader.load_file(filepath)
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
attr_reader :filepath, :loader
|
|
16
|
-
end
|
|
17
|
-
end
|