ae-be_strong 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/be_strong/rails/tasks.rake +9 -2
- data/lib/be_strong/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23202d5d901cc26d80aab1c7989080b52f6998d7
|
4
|
+
data.tar.gz: aab5163e1cca14f63fd97a4324c933dbea1d081f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e701047b9559d68c47386f438c575ecaac3c48e0b804d28d55e781bf57b727dd7c79beeddbcae1d03fdd5667b88e7c3844c35e05275cf6d3efed3a2176e64b2
|
7
|
+
data.tar.gz: b0029e74cc6a0aac641ed11f002e06d766aabd8c6138b25c89bb3bc018a573beb9b914ec5072b62427425fa3b3a1924e4e3141a2c68e26d9255b76c6c9ff6086
|
@@ -1,7 +1,14 @@
|
|
1
1
|
namespace :be_strong do
|
2
2
|
desc 'Apply strong parameter method and remove attr_accessible, attr_protected.'
|
3
|
-
task convert: :environment do
|
4
|
-
|
3
|
+
task convert: :environment do |task, args|
|
4
|
+
params = {}
|
5
|
+
if args.extras.count >= 1
|
6
|
+
params[:controller_path] = args.extras[0]
|
7
|
+
end
|
8
|
+
if args.extras.count >= 2
|
9
|
+
params[:model_path] = args.extras[1]
|
10
|
+
end
|
11
|
+
result = BeStrong::Converter.convert(params)
|
5
12
|
result[:applied].each{|file| puts "Apply strong parameter: #{file}"}
|
6
13
|
result[:removed].each{|file| puts "Remove attr_[accessible|protected]: #{file}"}
|
7
14
|
end
|
data/lib/be_strong/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ae-be_strong
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AppFolio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|