yamls 0.1.3 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 183fe67e715399097c4512be7c0d62763c4704f8000fec7b87cbede246cea17e
4
- data.tar.gz: 1c95933c487b318623f39e1acd4eb6054883deb2131395962bc537683e3599ad
3
+ metadata.gz: 031a2f3610bff9a51502301ef3d0294022441e729b0d20fd697e07f869268586
4
+ data.tar.gz: bfa3440c17a16ec61b782f0d14669a6e076358b75431cfd9829710b9f1dd44ca
5
5
  SHA512:
6
- metadata.gz: eed6e4d64f7da2ace01abe30755cf5beae02bdb0d462eba55fed83089a6c299cf05a8150f5c33c0a8724e1b37840881a688e8edcb6744c813fc94d54845ee651
7
- data.tar.gz: 7a572b43cd5b08835d126c0a481e572183f8e66a066b776231e91df2e8ce97ce7f0a54f7024cebc0ddae8126fc77e621a14ca05acbedf53df79c5ecd556cc06b
6
+ metadata.gz: b1c724cd5c8593682fa446b20f8ac5be08582792825d5d5347ac72af7ac48698fe998a069ba40e40adfdad375710a48663b4f6f901b5334755eb902157379e7c
7
+ data.tar.gz: 84f4abf75893fcbb7965fde6313f6e94cb0eabbc9fecae1bacb92416f67ced985717b7d563163d364d4a5fbfd75e121eafb6af9d20614234a03524ca35a26443
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Yamls
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/yamls.svg)](https://badge.fury.io/rb/yamls)
3
4
  [![CircleCI](https://circleci.com/gh/TsuMakoto/yamls/tree/main.svg?style=svg)](https://circleci.com/gh/TsuMakoto/yamls/tree/main)
4
5
 
5
6
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/yamls`. To experiment with that code, run `bin/console` for an interactive prompt.
@@ -1,6 +1,8 @@
1
1
  class BooksController < ApplicationController
2
2
  before_action :set_book, only: [:show, :update, :destroy]
3
3
 
4
+ include Yamls::Support::Parameters
5
+
4
6
  # GET /books
5
7
  def index
6
8
  @books = Book.all
@@ -46,10 +48,6 @@ class BooksController < ApplicationController
46
48
 
47
49
  # Only allow a trusted parameter "white list" through.
48
50
  def book_params
49
- Yamls::Parameters.new(
50
- params,
51
- model: :book,
52
- action: action_name,
53
- ).permit
51
+ yamls
54
52
  end
55
53
  end
@@ -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.3"
4
+ VERSION = "0.1.4"
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - TsuMakoto
@@ -97,6 +97,7 @@ files:
97
97
  - lib/yamls.rb
98
98
  - lib/yamls/config.rb
99
99
  - lib/yamls/parameters.rb
100
+ - lib/yamls/support.rb
100
101
  - lib/yamls/support/parameters.rb
101
102
  - lib/yamls/version.rb
102
103
  - lib/yamls/yaml_load.rb