scaffold_plus 1.4.15 → 1.4.16

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
  SHA1:
3
- metadata.gz: 91c3e71567a51855844ee3c16125dda85d7dc2ed
4
- data.tar.gz: 5ea3098bac0fecc156019e6df228857ad5424a96
3
+ metadata.gz: cfe850e68fb470d89fe657192af96933d6a2d8e6
4
+ data.tar.gz: 35a241fc5cc772f80b327374a6027ec12ee70f04
5
5
  SHA512:
6
- metadata.gz: f54d44bc4baaa01df2bf91734ec85fc7ad512b252d74958353afd0c61697f0628a44f515ac4d7055db08b3bffafd232fa4a8694cd221b91dd306b458003abc6d
7
- data.tar.gz: 5b3a89d84977fc83ba65991f13dde3af1d99fb10fb78334a21d0f92dd5551899e6eee286ceb9e2373d1275c1d6c6df3c8ad33aab2c65eb30c170d497a78c30c4
6
+ metadata.gz: 328b0f2324d9874a611211e57ef87b54c2ebb24320482aa221a81c10f206c4eb9307fa7284bd3e1914ace4f4ed878139c1884e1e16d114afcd73dd35d48015ca
7
+ data.tar.gz: 892e75b8c5096796849833fade07d38d0d5fd8499030cf400651684841099257c1f00b6c64c1882991756df5eed452c8b2e4e630144b408f9ac8a74c563a298a
data/Makefile CHANGED
@@ -9,13 +9,15 @@ all: build
9
9
  rel: build
10
10
  vim lib/scaffold_plus/version.rb
11
11
  git commit -a
12
- sudo gem uninstall scaffold_plus --all
13
12
  rake release
13
+ sudo gem uninstall scaffold_plus --all
14
14
  sudo rake install
15
15
 
16
16
 
17
17
  install: build
18
18
  git commit -a
19
+ sudo gem uninstall scaffold_plus --all
20
+ sudo rake install
19
21
 
20
22
  build:
21
23
  git add lib
@@ -6,17 +6,17 @@ module ScaffoldPlus
6
6
  desc "Enforce SSL for this controller in production"
7
7
  argument :name, type: :string,
8
8
  desc: "The resource that is SSL protected"
9
- class_option :only, type: :array,
10
- desc: 'Enforce for these actions'
11
- class_option :except, type: :array,
12
- desc: 'Do not enforce for these actions'
9
+ class_option :only_for, type: :array,
10
+ desc: 'Enforce SSL for these actions'
11
+ class_option :except_for, type: :array,
12
+ desc: 'Do not enforce SSL for these actions'
13
13
 
14
14
  def update_controller
15
15
  file = "app/controllers/#{table_name}_controller.rb"
16
16
  inject_into_file file, after: /^class.*ApplicationController$/ do
17
17
  text = "\n force_ssl if: :ssl_configured?"
18
- text << ", only: [ #{only_list} ]" if options.only.present?
19
- text << ", except: [ #{except_list} ]" if options.except.present?
18
+ text << ", only: [#{only_list}]" if options.only_for.present?
19
+ text << ", except: [#{except_list}]" if options.except_for.present?
20
20
  text
21
21
  end
22
22
  inject_into_file file, after: /private$/ do
@@ -35,11 +35,11 @@ module ScaffoldPlus
35
35
  protected
36
36
 
37
37
  def only_list
38
- [ options.only ].join(", ")
38
+ options.only_for.map { |o| ":#{o}" }.join(", ")
39
39
  end
40
40
 
41
41
  def except_list
42
- [ options.except ].join(", ")
42
+ options.except_for.map { |o| ":#{o}" }.join(", ")
43
43
  end
44
44
  end
45
45
  end
@@ -1,3 +1,3 @@
1
1
  module ScaffoldPlus
2
- VERSION = "1.4.15"
2
+ VERSION = "1.4.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaffold_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.15
4
+ version: 1.4.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Wiegand