pundit_scaffold_generator 0.1.1 → 0.1.2

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: c0f2f446b8ae644e1563f27a9c237f5220e930ff09172299830ea75005f8a95b
4
- data.tar.gz: 94449bd7b46aca62f9bef5f00915585ea7a263c277fc7bdb3f2cba9c24be458e
3
+ metadata.gz: 24aa20aaf6a9532a50996747bf5e328a12ba77a36a3c3ae6927bf8ac9466c8f1
4
+ data.tar.gz: c387fed68657af821af0797378ab0d08fc7d80eef45ccaeefde2abb8271f761b
5
5
  SHA512:
6
- metadata.gz: 80c67cb49bef1ce626f9eff4085929a23c8632c994981e1fc1603b4d60d284c5cda904b7f61d222617d37752def830986c07640f09db2edcc1ae8f79befac1e0
7
- data.tar.gz: 03eb1aff9f5ee5188c201222a9b2b546f3fe6a517220a9fb7648c554ebc18631f9ff3536803a32101fc61df191a979f646c18f6f94a2db0d25bc570f32c84a71
6
+ metadata.gz: 94bddd1b1916210512cb344d34b66ab585247e0c6e40384c28160f11f5dc8787b63129e4bfc4bd1488f8fd0747d22dee319450d250e48ae9f3c10220a6436c75
7
+ data.tar.gz: 3c296b9e22bb51acb02526071bdea364372a5d7743ae9c382b121c4e6d837cd45afe62d28da062aa82183abc6d2ae8ff17745f688d24e94f60859979c9403618
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pundit_scaffold_generator (0.1.1)
4
+ pundit_scaffold_generator (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,13 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rspec
4
- #module Generators
5
- class PolicyGenerator < ::Rails::Generators::NamedBase
6
- source_root File.expand_path("templates", __dir__)
4
+ class PolicyGenerator < ::Rails::Generators::NamedBase
5
+ source_root File.expand_path("templates", __dir__)
7
6
 
8
- def create_policy_spec
9
- template "policy_spec.rb", File.join("spec/policies", class_path, "#{file_name}_policy_spec.rb")
10
- end
7
+ def create_policy_spec
8
+ template "policy_spec.rb", File.join("spec/policies", class_path, "#{file_name}_policy_spec.rb")
11
9
  end
12
- #end
10
+ end
13
11
  end
@@ -2,7 +2,6 @@ module PolicyGenerator
2
2
  module Generators
3
3
  class ScaffoldGenerator < Rails::Generators::NamedBase
4
4
  source_root File.expand_path('../templates', __FILE__)
5
- puts "PolicyGenerator::Generators::ScaffoldGenerator"
6
5
 
7
6
  def create_policy
8
7
  template "policy.rb", File.join("app/policies", class_path, "#{file_name}_policy.rb")
@@ -1,7 +1,7 @@
1
1
  require 'rails/generators/rails/scaffold/scaffold_generator'
2
2
 
3
3
  class Rails::Generators::ScaffoldGenerator
4
- class_option :policy_generator, desc: 'Internalization Engine',
4
+ class_option :policy_generator, desc: 'Generates the pundit policy',
5
5
  default: 'policy_generator'
6
6
  hook_for :policy_generator, required: true
7
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PunditScaffoldGenerator
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pundit_scaffold_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Kulikov