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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +24 -0
  3. data/CHANGELOG.md +5 -0
  4. data/README.md +212 -2
  5. data/example/rails5/Gemfile +1 -1
  6. data/example/rails5/app/controllers/books_controller.rb +3 -5
  7. data/example/rails5/app/controllers/people_controller.rb +1 -1
  8. data/example/rails5/db/migrate/{20211031043641_create_people.rb → 20211031170917_create_people.rb} +2 -2
  9. data/example/rails5/db/schema.rb +3 -3
  10. data/example/rails5/test/controllers/books_controller_test.rb +2 -14
  11. data/example/rails5/test/controllers/people_controller_test.rb +2 -14
  12. data/example/rails5/test/fixtures/books.yml +8 -7
  13. data/example/rails5/test/fixtures/people.yml +8 -7
  14. data/example/rails6.0.0/.gitignore +33 -0
  15. data/example/rails6.0.0/.ruby-version +1 -0
  16. data/example/rails6.0.0/Gemfile +43 -0
  17. data/example/{rails5 → rails6.0.0}/README.md +0 -0
  18. data/example/rails6.0.0/Rakefile +6 -0
  19. data/example/rails6.0.0/app/channels/application_cable/channel.rb +4 -0
  20. data/example/rails6.0.0/app/channels/application_cable/connection.rb +4 -0
  21. data/example/rails6.0.0/app/controllers/application_controller.rb +2 -0
  22. data/example/rails6.0.0/app/controllers/books_controller.rb +53 -0
  23. data/example/{rails5/test/integration → rails6.0.0/app/controllers/concerns}/.keep +0 -0
  24. data/example/rails6.0.0/app/controllers/people_controller.rb +55 -0
  25. data/example/rails6.0.0/app/jobs/application_job.rb +7 -0
  26. data/example/rails6.0.0/app/mailers/application_mailer.rb +4 -0
  27. data/example/rails6.0.0/app/models/application_record.rb +3 -0
  28. data/example/rails6.0.0/app/models/book.rb +2 -0
  29. data/example/rails6.0.0/app/models/concerns/.keep +0 -0
  30. data/example/rails6.0.0/app/models/person.rb +2 -0
  31. data/example/rails6.0.0/app/parameters/column.yml +15 -0
  32. data/example/rails6.0.0/app/views/layouts/mailer.html.erb +13 -0
  33. data/example/rails6.0.0/app/views/layouts/mailer.text.erb +1 -0
  34. data/example/rails6.0.0/bin/bundle +114 -0
  35. data/example/rails6.0.0/bin/rails +9 -0
  36. data/example/rails6.0.0/bin/rake +9 -0
  37. data/example/rails6.0.0/bin/setup +33 -0
  38. data/example/rails6.0.0/bin/spring +17 -0
  39. data/example/rails6.0.0/config/application.rb +37 -0
  40. data/example/rails6.0.0/config/boot.rb +4 -0
  41. data/example/rails6.0.0/config/cable.yml +10 -0
  42. data/example/rails6.0.0/config/credentials.yml.enc +1 -0
  43. data/example/rails6.0.0/config/database.yml +25 -0
  44. data/example/rails6.0.0/config/environment.rb +5 -0
  45. data/example/rails6.0.0/config/environments/development.rb +52 -0
  46. data/example/rails6.0.0/config/environments/production.rb +105 -0
  47. data/example/rails6.0.0/config/environments/test.rb +49 -0
  48. data/example/rails6.0.0/config/initializers/application_controller_renderer.rb +8 -0
  49. data/example/rails6.0.0/config/initializers/backtrace_silencers.rb +7 -0
  50. data/example/rails6.0.0/config/initializers/cors.rb +16 -0
  51. data/example/rails6.0.0/config/initializers/filter_parameter_logging.rb +4 -0
  52. data/example/rails6.0.0/config/initializers/inflections.rb +16 -0
  53. data/example/rails6.0.0/config/initializers/mime_types.rb +4 -0
  54. data/example/rails6.0.0/config/initializers/wrap_parameters.rb +14 -0
  55. data/example/rails6.0.0/config/locales/en.yml +33 -0
  56. data/example/rails6.0.0/config/puma.rb +38 -0
  57. data/example/rails6.0.0/config/routes.rb +5 -0
  58. data/example/rails6.0.0/config/spring.rb +6 -0
  59. data/example/rails6.0.0/config/storage.yml +34 -0
  60. data/example/rails6.0.0/config.ru +5 -0
  61. data/example/rails6.0.0/db/migrate/20211031165333_create_people.rb +11 -0
  62. data/example/rails6.0.0/db/migrate/20211031165612_create_books.rb +11 -0
  63. data/example/rails6.0.0/db/schema.rb +31 -0
  64. data/example/rails6.0.0/db/seeds.rb +7 -0
  65. data/example/rails6.0.0/lib/tasks/.keep +0 -0
  66. data/example/rails6.0.0/log/.keep +0 -0
  67. data/example/rails6.0.0/public/robots.txt +1 -0
  68. data/example/rails6.0.0/storage/.keep +0 -0
  69. data/example/rails6.0.0/test/channels/application_cable/connection_test.rb +11 -0
  70. data/example/rails6.0.0/test/controllers/.keep +0 -0
  71. data/example/rails6.0.0/test/controllers/books_controller_test.rb +38 -0
  72. data/example/rails6.0.0/test/controllers/people_controller_test.rb +38 -0
  73. data/example/rails6.0.0/test/fixtures/.keep +0 -0
  74. data/example/rails6.0.0/test/fixtures/books.yml +11 -0
  75. data/example/rails6.0.0/test/fixtures/files/.keep +0 -0
  76. data/example/rails6.0.0/test/fixtures/people.yml +11 -0
  77. data/example/rails6.0.0/test/integration/.keep +0 -0
  78. data/example/rails6.0.0/test/test_helper.rb +13 -0
  79. data/example/rails6.0.0/tmp/.keep +0 -0
  80. data/example/rails6.0.0/tmp/pids/.keep +0 -0
  81. data/lib/yamls/helpers/config.rb +6 -0
  82. data/lib/yamls/helpers/yaml_load.rb +19 -0
  83. data/lib/yamls/parameters.rb +6 -6
  84. data/lib/{support → yamls/support}/parameters.rb +1 -1
  85. data/lib/yamls/support.rb +8 -0
  86. data/lib/yamls/version.rb +1 -1
  87. data/lib/yamls.rb +3 -2
  88. metadata +74 -8
  89. data/lib/yamls/config.rb +0 -4
  90. 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,5 @@
1
+ Rails.application.routes.draw do
2
+ resources :books
3
+ resources :people
4
+ # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
5
+ end
@@ -0,0 +1,6 @@
1
+ Spring.watch(
2
+ ".ruby-version",
3
+ ".rbenv-vars",
4
+ "tmp/restart.txt",
5
+ "tmp/caching-dev.txt"
6
+ )
@@ -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,5 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require_relative 'config/environment'
4
+
5
+ run Rails.application
@@ -0,0 +1,11 @@
1
+ class CreatePeople < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :people do |t|
4
+ t.string :name
5
+ t.integer :age
6
+ t.integer :role
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateBooks < ActiveRecord::Migration[6.0]
2
+ def change
3
+ create_table :books do |t|
4
+ t.string :name
5
+ t.string :label
6
+ t.integer :value
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -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
@@ -0,0 +1,11 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
4
+ # test "connects with cookies" do
5
+ # cookies.signed[:user_id] = 42
6
+ #
7
+ # connect
8
+ #
9
+ # assert_equal connection.user_id, "42"
10
+ # end
11
+ end
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
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+ label: MyString
6
+ value: 1
7
+
8
+ two:
9
+ name: MyString
10
+ label: MyString
11
+ value: 1
File without changes
@@ -0,0 +1,11 @@
1
+ # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2
+
3
+ one:
4
+ name: MyString
5
+ age: 1
6
+ role: 1
7
+
8
+ two:
9
+ name: MyString
10
+ age: 1
11
+ role: 1
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,6 @@
1
+ # frozen_string_literal: true
2
+ module Yamls
3
+ module Helpers
4
+ FILEPATH = "app/parameters/column.yml"
5
+ end
6
+ end
@@ -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
@@ -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: nil,
11
+ required: model || action,
12
12
  nested: [],
13
- filepath: "#{Rails.root}/#{Yamls::FILEPATH}"
13
+ filepath: "#{Rails.root}/#{Helpers::FILEPATH}"
14
14
  )
15
15
  @params = params
16
- @required = required || model
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../yamls/parameters"
3
+ require "active_support"
4
4
 
5
5
  module Yamls
6
6
  module Support
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "yamls/support/parameters"
4
+
5
+ module Yamls
6
+ module Support
7
+ end
8
+ end
data/lib/yamls/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yamls
4
- VERSION = "0.1.2"
4
+ VERSION = "0.2.1"
5
5
  end
data/lib/yamls.rb CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  require "yaml"
4
4
 
5
- require_relative "yamls/version"
6
- require_relative "yamls/parameters"
5
+ require "yamls/version"
6
+ require "yamls/parameters"
7
+ require "yamls/support"
7
8
 
8
9
  module Yamls
9
10
  end
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.2
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-10-31 00:00:00.000000000 Z
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
- - lib/support/parameters.rb
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
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
- module Yamls
3
- FILEPATH = "app/parameters/column.yml"
4
- end
@@ -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