bullet_train-super_scaffolding 1.0.20 → 1.0.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e30f0c69d9e11ebfad8a9d79f6420a4043d2eb4ca6d45e18bcb352b3040542a
|
4
|
+
data.tar.gz: '0832eb0ab26760187545003236fc03b849365f5851de9ffbb4a4d165a52ac184'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49cf82540e82861823ac650d6a35a3ae784651d619403a75e07e42019107143f1fc938a11d88e47d018ffb4d1c965caf26b35d33e1f0ba49e948a6ec649a5582
|
7
|
+
data.tar.gz: 95f382c94750e927b613554acbdfb21197728575a5b4d9230bdbff2ac0729c428bfe3275dc6ea5194b3187a33ab95ce0a74f6e20852381ce746934a2a7d74167
|
@@ -38,8 +38,8 @@ module BulletTrain
|
|
38
38
|
end
|
39
39
|
|
40
40
|
child = argv[0]
|
41
|
-
primary_parent = argv[1].split("class_name=").last.split(",").first.split("
|
42
|
-
secondary_parent = argv[2].split("class_name=").last.split(",").first.split("
|
41
|
+
primary_parent = argv[1].split("class_name=").last.split(",").first.split("}").first
|
42
|
+
secondary_parent = argv[2].split("class_name=").last.split(",").first.split("}").first
|
43
43
|
|
44
44
|
# There should only be two attributes.
|
45
45
|
attributes = [argv[1], argv[2]]
|
@@ -194,13 +194,13 @@ class Scaffolding::RoutesFileManipulator
|
|
194
194
|
parts = parts.dup
|
195
195
|
resource = parts.pop
|
196
196
|
# TODO this doesn't take into account any options like we do in `find_resource`.
|
197
|
-
find_in_namespace(/resources :#{resource}#{options[:options] ? ", #{options[:options].gsub(/(
|
197
|
+
find_in_namespace(/resources :#{resource}#{options[:options] ? ", #{options[:options].gsub(/({)(.*)(})/, '{\2}')}" : ""}(,?\s.*)? do(\s.*)?$/, parts, within)
|
198
198
|
end
|
199
199
|
|
200
200
|
def find_resource(parts, options = {})
|
201
201
|
parts = parts.dup
|
202
202
|
resource = parts.pop
|
203
|
-
needle = /resources :#{resource}#{options[:options] ? ", #{options[:options].gsub(/(
|
203
|
+
needle = /resources :#{resource}#{options[:options] ? ", #{options[:options].gsub(/({)(.*)(})/, '{\2}')}" : ""}(,?\s.*)?$/
|
204
204
|
find_in_namespace(needle, parts, options[:within], options[:ignore])
|
205
205
|
end
|
206
206
|
|
data/lib/scaffolding/script.rb
CHANGED
@@ -36,7 +36,7 @@ def check_required_options_for_attributes(scaffolding_type, attributes, child, p
|
|
36
36
|
type = parts.join(":")
|
37
37
|
|
38
38
|
# extract any options they passed in with the field.
|
39
|
-
type, attribute_options = type.scan(/^(.*)
|
39
|
+
type, attribute_options = type.scan(/^(.*){(.*)}/).first || type
|
40
40
|
|
41
41
|
# create a hash of the options.
|
42
42
|
attribute_options = if attribute_options
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-super_scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|