yaml_csp_config 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 636f76164108ed26ee965a4c3a6b62f17691134fba8077f5bdbd157faff5b6d5
4
- data.tar.gz: 2627769481fee67efdc943ab7e50f0757edcdea387a930079cbf128ef49c927e
3
+ metadata.gz: 4d364ca228a1c6e897f15ceb024b277fe0d5ca6e857b8408e2beec971cd3ea62
4
+ data.tar.gz: 9dd744ccf9ee54ac541b364f829fbc284c839826c7a1bf2b862e4a06f7ae4bc1
5
5
  SHA512:
6
- metadata.gz: bbca5b53805a870e2c8f5811d25e718953628c2e6e33150f2f62d5a29555a38d79057b7910a34aca052f97b34cf31d15056a1ecbc9923a5093db7801dc628cc6
7
- data.tar.gz: ba204c300eb92eadfb14270df762294ccd33ee2f271a1289fce35be10ac104a64854b37f84abd3632014fa6d7ef088e2f352ecd8f6665869e940f49c133d2f5f
6
+ metadata.gz: b860612f0350846c2af70a0fe469f2b42b8dcdafd1899925e4a67834b971d6530481ab56b07c12a59e15d1f308ba7bef0e0f535bfdd08d69e6fc25947d71ef4b
7
+ data.tar.gz: 497d63f942a225ce8127bb516a8425330c1fce9cdb9e90fb97cfbc4400f6306cdfc6126738ea05d7972a6ab16e4ae6d8fb95f2c9038727b3aba8b04356cce10f
data/README.md CHANGED
@@ -163,7 +163,7 @@ $ gem install yaml_csp_config
163
163
  ```
164
164
  Then run the **generator to add the initializer**
165
165
 
166
- rails yaml_csp_config:install
166
+ rails g yaml_csp_config:install
167
167
 
168
168
 
169
169
  ## Usage
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ require "rdoc/task"
10
10
 
11
11
  RDoc::Task.new(:rdoc) do |rdoc|
12
12
  rdoc.rdoc_dir = "rdoc"
13
- rdoc.title = "YamlCspConfig"
13
+ rdoc.title = "YamlCspConfig"
14
14
  rdoc.options << "--line-numbers"
15
15
  rdoc.rdoc_files.include("README.md")
16
16
  rdoc.rdoc_files.include("lib/**/*.rb")
File without changes
@@ -5,13 +5,14 @@ require "rails/generators/base"
5
5
  module YamlCspConfig
6
6
  module Generators
7
7
  # The Install generator `yaml_csp_config:install`
8
- class InstallGenerator < Rails::Generators::Base
8
+ class InstallGenerator < ::Rails::Generators::Base
9
9
  source_root File.expand_path(__dir__)
10
10
 
11
11
  desc "Creates an initial basic YAML configuration, an initializer and configures Rails to use the gem."
12
-
13
- copy_file "yaml_csp_config.rb", "config/initializers/yaml_csp_config.rb"
14
- copy_file "content_security_policy.yml", "config/content_security_policy.yml"
12
+ def copy_tasks
13
+ template "templates/yaml_csp_config.rb", "config/initializers/yaml_csp_config.rb"
14
+ template "templates/content_security_policy.yml", "config/content_security_policy.yml"
15
+ end
15
16
  end
16
17
  end
17
18
  end
@@ -8,7 +8,7 @@ namespace :yaml_csp_config do
8
8
  puts "\nDirective\t\t: Directive Value"
9
9
  puts "---------\t\t ---------------"
10
10
  policy.directives.each do |k, v|
11
- puts "#{k}\t\t: #{v.join(' ')}"
11
+ puts "#{k}\t\t: #{v.join(" ")}"
12
12
  end
13
13
 
14
14
  puts "\n\nConfiguration\t\t: Value"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YamlCspConfig
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -20,10 +20,10 @@ module YamlCspConfig
20
20
  class Configuration
21
21
  # @dynamic configuration_file_path, yaml_config_base_key
22
22
  attr_accessor :configuration_file_path,
23
- :yaml_config_base_key
23
+ :yaml_config_base_key
24
24
  # @dynamic default_env_var_additions_key_prefix, default_env_var_group_key
25
25
  attr_accessor :default_env_var_additions_key_prefix,
26
- :default_env_var_group_key
26
+ :default_env_var_group_key
27
27
 
28
28
  def initialize
29
29
  @configuration_file_path = Rails.root.join("config", "content_security_policy.yml")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_csp_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-20 00:00:00.000000000 Z
11
+ date: 2022-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rubocop
42
+ name: standard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -92,10 +92,10 @@ files:
92
92
  - MIT-LICENSE
93
93
  - README.md
94
94
  - Rakefile
95
- - lib/generators/USAGE
96
- - lib/generators/install_generator.rb
97
- - lib/generators/templates/content_security_policy.yml
98
- - lib/generators/templates/yaml_csp_config.rb
95
+ - lib/generators/yaml_csp_config/USAGE
96
+ - lib/generators/yaml_csp_config/install_generator.rb
97
+ - lib/generators/yaml_csp_config/templates/content_security_policy.yml
98
+ - lib/generators/yaml_csp_config/templates/yaml_csp_config.rb
99
99
  - lib/tasks/yaml_csp_config_tasks.rake
100
100
  - lib/yaml_csp_config.rb
101
101
  - lib/yaml_csp_config/csp_ext.rb
@@ -107,7 +107,7 @@ homepage: https://github.com/stevegeek/yaml_csp_config
107
107
  licenses:
108
108
  - MIT
109
109
  metadata: {}
110
- post_install_message:
110
+ post_install_message:
111
111
  rdoc_options: []
112
112
  require_paths:
113
113
  - lib
@@ -122,8 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.0.3
126
- signing_key:
125
+ rubygems_version: 3.3.7
126
+ signing_key:
127
127
  specification_version: 4
128
128
  summary: yaml_csp_config provides you with a way to manage your Rails CSP configuration
129
129
  via a YAML file.