cocoon 1.2.10 → 1.2.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MmRkODE5NTEyY2EyYjMyNjYyODExYjcwY2VlZmVhNTVmMzAxNDdhNA==
5
- data.tar.gz: !binary |-
6
- NzBmOTNkOTIzZjY0YmMxY2I3NjM0OTNiNTU1MDUzMzhjYzgxNDcwNA==
2
+ SHA256:
3
+ metadata.gz: 5ece48b77f3c2ade4038d9a745ecda7d23ec24d2e1b391a7900c1b040e9800a0
4
+ data.tar.gz: dfd2781be46692cc32726a785d379503c1f1aadd37a015f3d18e1955f2bc893b
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MzZhOGI4MWM3NWYzOWUyYmI4NWMwMjkxMjQyMjY2NDZmZTY5YjA2Nzc3ZjUz
10
- MDM5NWI2NDBlNmEzZTMzNWI2N2E5NWUzM2YxZWVmYzgyZTIyZDJiMmIxYzU2
11
- ZjgxZjIzODQ4ZWYxNDVhZGYyNjc0NGU5NzQxMGVhNDA2NzhhNmU=
12
- data.tar.gz: !binary |-
13
- YjZlYTBmYzc0NzljYWM1ODU5M2NjZWEyNzYyNWUxZmUwYzkyZWIzMWE1ZDg1
14
- NTA4YTViYWNkYTYyMmUzY2MyZTljNWMzODhlM2E5MzgwMjA1NTBmMDI1NTY5
15
- M2IyMzBhZGY2ODlhMzc1MzhkNjMyNmU3ZTE2MzljODQ5OTRmNDI=
6
+ metadata.gz: 278cc47c1d3cf4bc126f8609cbb4efa945fb59b864f495097e3a1f0d536b6353cc43da3d4e49d2cddbb65c660adfc057a50d3b8639d7acb5bcf1eed761937fd8
7
+ data.tar.gz: 8c9b316114c977cdf62aac3c172cb50bb74444714099751bd4915d8b970a105d6cca61ffe7c41f8369d7bdf2cb6f935ce92b852dba58b1c7e234f32d06daa9fe
@@ -1,22 +1,32 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
4
3
  - 2.1.5
5
4
  - 2.2.6
6
5
  - 2.3.2
6
+ - 2.4.1
7
+ - 2.4.5
8
+ - 2.4.6
9
+ - 2.5.4
10
+ - 2.5.5
11
+ - 2.6.3
7
12
  - rbx-2
13
+
14
+ before_install:
15
+ - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
16
+ - gem install bundler -v '< 2'
17
+
8
18
  gemfile:
9
19
  - gemfiles/Gemfile.rails-3.2.13
10
20
  - gemfiles/Gemfile.rails-4-r2
11
- - Gemfile
21
+ - gemfiles/Gemfile.default
12
22
 
13
23
  matrix:
14
24
  fast_finish: true
15
25
  exclude:
16
26
  - rvm: 2.0.0
17
- gemfile: Gemfile
27
+ gemfile: gemfiles/Gemfile.default
18
28
  - rvm: 2.1.5
19
- gemfile: Gemfile
29
+ gemfile: gemfiles/Gemfile.default
20
30
  - rvm: 2.2.6
21
31
  gemfile: gemfiles/Gemfile.rails-3.2.13
22
32
  - rvm: 2.2.6
@@ -25,9 +35,29 @@ matrix:
25
35
  gemfile: gemfiles/Gemfile.rails-3.2.13
26
36
  - rvm: 2.3.2
27
37
  gemfile: gemfiles/Gemfile.rails-4-r2
28
- - rvm: 2.4.0
38
+ - rvm: 2.4.1
39
+ gemfile: gemfiles/Gemfile.rails-3.2.13
40
+ - rvm: 2.4.1
41
+ gemfile: gemfiles/Gemfile.rails-4-r2
42
+ - rvm: 2.4.6
43
+ gemfile: gemfiles/Gemfile.rails-3.2.13
44
+ - rvm: 2.4.6
45
+ gemfile: gemfiles/Gemfile.rails-4-r2
46
+ - rvm: 2.4.5
47
+ gemfile: gemfiles/Gemfile.rails-3.2.13
48
+ - rvm: 2.4.5
49
+ gemfile: gemfiles/Gemfile.rails-4-r2
50
+ - rvm: 2.5.4
51
+ gemfile: gemfiles/Gemfile.rails-3.2.13
52
+ - rvm: 2.5.4
53
+ gemfile: gemfiles/Gemfile.rails-4-r2
54
+ - rvm: 2.5.5
55
+ gemfile: gemfiles/Gemfile.rails-3.2.13
56
+ - rvm: 2.5.5
57
+ gemfile: gemfiles/Gemfile.rails-4-r2
58
+ - rvm: 2.6.3
29
59
  gemfile: gemfiles/Gemfile.rails-3.2.13
30
- - rvm: 2.4.0
60
+ - rvm: 2.6.3
31
61
  gemfile: gemfiles/Gemfile.rails-4-r2
32
62
  allow_failures:
33
63
  - rvm: rbx-2
data/Gemfile CHANGED
@@ -2,10 +2,11 @@ source "http://rubygems.org"
2
2
 
3
3
 
4
4
  group :development, :test do
5
- gem "rails", ">=4.0.0"
6
- gem "sqlite3"
5
+ gem "rails", "~> 4.2"
6
+ gem "sqlite3", '1.3.13'
7
7
  gem "json_pure"
8
- gem "jeweler", "~> 1.8"
8
+ gem "jeweler", git: 'git@github.com:technicalpickles/jeweler'
9
+ # gem "jeweler", "~> 2.3"
9
10
  gem "rspec-rails", "~> 3.0.0"
10
11
  gem "rspec", "~> 3.0.0"
11
12
  gem "actionpack", ">=4.0.0"
@@ -19,7 +20,7 @@ group :development, :test do
19
20
  platforms :rbx do
20
21
  gem 'rubysl'
21
22
  gem 'rubysl-test-unit'
22
- gem 'psych'
23
+ gem 'psych', '~> 2.2'
23
24
  gem 'racc'
24
25
  gem 'rubinius-developer_tools'
25
26
  end
File without changes
@@ -8,13 +8,13 @@ Nested forms are forms that handle nested models and attributes in one form;
8
8
  e.g. a project with its tasks or an invoice with its line items.
9
9
 
10
10
  Cocoon is form builder-agnostic, so it works with standard Rails, [Formtastic](https://github.com/justinfrench/formtastic), or [SimpleForm](https://github.com/plataformatec/simple_form).
11
- It is compatible with rails 3 and rails 4.
11
+ It is compatible with rails 3, 4 and 5.
12
12
 
13
13
  This project is not related to [Apache Cocoon](http://cocoon.apache.org/).
14
14
 
15
15
  ## Prerequisites
16
16
 
17
- This gem depends on jQuery, so it's most useful in a Rails 3 project where you are already using jQuery.
17
+ This gem depends on jQuery, so it's most useful in a Rails project where you are already using jQuery.
18
18
  Furthermore, I would advise you to use either [Formtastic](https://github.com/justinfrench/formtastic) or [SimpleForm](https://github.com/plataformatec/simple_form).
19
19
 
20
20
  ## Installation
@@ -27,6 +27,23 @@ gem "cocoon"
27
27
 
28
28
  > Please note that for rails 4 you will need at least v1.2.0 or later.
29
29
 
30
+ ### Rails 6/Webpacker
31
+
32
+ Add the componanion package
33
+
34
+ yarn add @nathanvda/cocoon
35
+
36
+ and then in your `app/javascripts/packs/application.js` you should add
37
+
38
+ require("jquery")
39
+ require("@nathanvda/cocoon")
40
+
41
+
42
+ > Note: there are alternative npm packages, which might better suit your needs.
43
+ E.g. some offer the cocoon functionality without using jquery (search for `cocoon + vanilla` --I found three packages on npm already).
44
+ Obviously you are free to use those, however the code samples in this README will (still) rely on jquery.
45
+
46
+
30
47
  ### Rails 3.1+/Rails 4/Rails 5
31
48
 
32
49
  Add the following to `application.js` so it compiles to the asset pipeline:
@@ -109,7 +126,7 @@ E.g. in your `ProjectsController`:
109
126
  Cocoon's default configuration requires `link_to_add_association` and associated partials to
110
127
  be properly wrapped with elements. The examples below illustrate simple layouts.
111
128
 
112
- Please note these examples rely on the `haml` gem (instead of the default `erb` views).
129
+ Please note these examples rely on the `haml` gem ([click here](https://github.com/nathanvda/cocoon/wiki/ERB-examples) for the default `erb` views).
113
130
 
114
131
  ### Formtastic
115
132
 
@@ -218,10 +235,10 @@ This should be called within the form builder.
218
235
 
219
236
  `link_to_add_association` takes four parameters:
220
237
 
221
- - name: the text to show in the link
222
- - f: the form builder
223
- - association: the name of the association (plural) of which a new instance needs to be added (symbol or string).
224
- - html_options: extra html-options (see [`link_to`](http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to)
238
+ - **name**: the text to show in the link
239
+ - **f**: the form builder
240
+ - **association**: the name of the association (plural) of which a new instance needs to be added (symbol or string).
241
+ - **html_options**: extra html-options (see [`link_to`](http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to)
225
242
  There are some special options, the first three allow to control the placement of the new link-data:
226
243
  - `data-association-insertion-traversal` : the jquery traversal method to allow node selection relative to the link. `closest`, `next`, `children`, etc. Default: absolute selection
227
244
  - `data-association-insertion-node` : the jquery selector of the node as string, or a function that takes the `link_to_add_association` node as the parameter and returns a node. Default: parent node
@@ -234,6 +251,7 @@ This should be called within the form builder.
234
251
  - `wrap_object` : a proc that will allow to wrap your object, especially useful if you are using decorators (e.g. draper). See example lower.
235
252
  - `force_non_association_create`: if true, it will _not_ create the new object using the association (see lower)
236
253
  - `form_name` : the name of the form parameter in your nested partial. By default this is `f`.
254
+ - `count` : the number of nested items to insert at once. Default `1`.
237
255
 
238
256
  Optionally, you can omit the name and supply a block that is captured to render the link body (if you want to do something more complicated).
239
257
 
@@ -318,8 +336,9 @@ a new nested object.
318
336
  This used to have a side-effect: for each call of `link_to_add_association` a new element was added to the association.
319
337
  This is no longer the case.
320
338
 
321
- For backward compatibility we keep this option for now. Or if for some specific reason you would
322
- really need an object to be _not_ created on the association.
339
+ For backward compatibility we keep this option for now. Or if for some specific reason you would really need an object
340
+ to be _not_ created on the association, for example if you did not want `after_add` callback to be triggered on
341
+ the association.
323
342
 
324
343
  Example use:
325
344
 
@@ -337,9 +356,9 @@ This should be placed inside the partial `_<association-object-singular>_fields`
337
356
 
338
357
  It takes three parameters:
339
358
 
340
- - name: the text to show in the link
341
- - f: referring to the containing form-object
342
- - html_options: extra html-options (see `link_to`)
359
+ - **name**: the text to show in the link
360
+ - **f**: referring to the containing form-object
361
+ - **html_options**: extra html-options (see `link_to`)
343
362
 
344
363
  Optionally you could also leave out the name and supply a block that is captured to give the name (if you want to do something more complicated).
345
364
 
@@ -358,21 +377,22 @@ Example:
358
377
 
359
378
  On insertion or removal the following events are triggered:
360
379
 
361
- * `cocoon:before-insert`: called before inserting a new nested child
380
+ * `cocoon:before-insert`: called before inserting a new nested child, can be [canceled](#canceling-a-callback)
362
381
  * `cocoon:after-insert`: called after inserting
363
- * `cocoon:before-remove`: called before removing the nested child
382
+ * `cocoon:before-remove`: called before removing the nested child, can be [canceled](#canceling-a-callback)
364
383
  * `cocoon:after-remove`: called after removal
365
384
 
366
385
  To listen to the events in your JavaScript:
367
386
 
368
387
  ```javascript
369
- $('#container').on('cocoon:before-insert', function(e, insertedItem) {
388
+ $('#container').on('cocoon:before-insert', function(e, insertedItem, originalEvent) {
370
389
  // ... do something
371
390
  });
372
391
  ```
373
392
 
374
393
  ...where `e` is the event and the second parameter is the inserted or removed item. This allows you to change markup, or
375
394
  add effects/animations (see example below).
395
+ `originalEvent` is also passed and references the event that triggered an insertion or removal (e.g. the `click` event on the link to add an association)
376
396
 
377
397
 
378
398
  If in your view you have the following snippet to select an `owner`:
@@ -435,6 +455,21 @@ $(this).data('remove-timeout', 1000);
435
455
 
436
456
  You could also immediately add this to your view, on the `.nested-fields` container (or the `wrapper_class` element you are using).
437
457
 
458
+ #### Canceling a Callback
459
+
460
+ You can cancel an action from occurring, either an insertion or removal, within the `before-<action>` callback by calling `event.preventDefault()` anywhere within the callback.
461
+
462
+ For example:
463
+
464
+ ```javascript
465
+ $('#container').on('cocoon:before-insert', function(event, insertedItem) {
466
+ var confirmation = confirm("Are you sure?");
467
+ if( confirmation === false ){
468
+ event.preventDefault();
469
+ }
470
+ });
471
+ ```
472
+
438
473
  ### Control the Insertion Behaviour
439
474
 
440
475
  The default insertion location is at the back of the current container. But we have added two `data-` attributes that are read to determine the insertion-node and -method.
data/Rakefile CHANGED
@@ -11,6 +11,9 @@ require 'rdoc/task'
11
11
 
12
12
  require 'rspec/core'
13
13
  require 'rspec/core/rake_task'
14
+ require 'erb'
15
+ require 'JSON'
16
+
14
17
 
15
18
  RSpec::Core::RakeTask.new(:spec)
16
19
 
@@ -39,4 +42,48 @@ begin
39
42
  Jeweler::GemcutterTasks.new
40
43
  rescue LoadError
41
44
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
42
- end
45
+ end
46
+
47
+
48
+ require 'bundler/gem_tasks'
49
+
50
+ spec = Bundler.load_gemspec('./cocoon.gemspec')
51
+
52
+
53
+ npm_src_dir = './npm'
54
+ npm_dest_dir = './dist'
55
+ CLOBBER.include 'dist'
56
+
57
+ assets_dir = './app/assets/'
58
+
59
+ npm_files = {
60
+ File.join(npm_dest_dir, 'cocoon.js') => File.join(assets_dir, 'javascripts', 'cocoon.js'),
61
+ File.join(npm_dest_dir, 'README.md') => File.join(npm_src_dir, 'README.md'),
62
+ File.join(npm_dest_dir, 'LICENSE') => './LICENSE'
63
+ }
64
+
65
+ namespace :npm do
66
+ npm_files.each do |dest, src|
67
+ file dest => src do
68
+ cp src, dest
69
+ end
70
+ end
71
+
72
+ task :'package-json' do
73
+ template = ERB.new(File.read(File.join(npm_src_dir, 'package.json.erb')))
74
+ content = template.result_with_hash(spec: spec)
75
+ File.write(File.join(npm_dest_dir, 'package.json'),
76
+ JSON.pretty_generate(JSON.parse(content)))
77
+ end
78
+
79
+ desc "Build nathanvda-cocoon-#{spec.version}.tgz into the pkg directory"
80
+ task build: (%i[package-json] + npm_files.keys) do
81
+ system("cd #{npm_dest_dir} && npm pack && mv ./nathanvda-cocoon-#{spec.version}.tgz ../pkg/")
82
+ end
83
+
84
+ desc "Build and push nathanvda-cocoon-#{spec.version}.tgz to https://npmjs.org"
85
+ task release: %i[build] do
86
+ system("npm publish ./pkg/nathanvda-cocoon-#{spec.version}.tgz --access public")
87
+ end
88
+ end
89
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.10
1
+ 1.2.15
@@ -39,6 +39,8 @@
39
39
 
40
40
  $(document).on('click', '.add_fields', function(e) {
41
41
  e.preventDefault();
42
+ e.stopPropagation();
43
+
42
44
  var $this = $(this),
43
45
  assoc = $this.data('association'),
44
46
  assocs = $this.data('associations'),
@@ -51,7 +53,8 @@
51
53
  regexp_underscord = new RegExp('_new_' + assoc + '_(\\w*)', 'g'),
52
54
  new_id = create_new_id(),
53
55
  new_content = content.replace(regexp_braced, newcontent_braced(new_id)),
54
- new_contents = [];
56
+ new_contents = [],
57
+ originalEvent = e;
55
58
 
56
59
 
57
60
  if (new_content == content) {
@@ -84,14 +87,18 @@
84
87
  $.each(new_contents, function(i, node) {
85
88
  var contentNode = $(node);
86
89
 
87
- insertionNodeElem.trigger('cocoon:before-insert', [contentNode]);
90
+ var before_insert = jQuery.Event('cocoon:before-insert');
91
+ insertionNodeElem.trigger(before_insert, [contentNode, originalEvent]);
88
92
 
89
- // allow any of the jquery dom manipulation methods (after, before, append, prepend, etc)
90
- // to be called on the node. allows the insertion node to be the parent of the inserted
91
- // code and doesn't force it to be a sibling like after/before does. default: 'before'
92
- var addedContent = insertionNodeElem[insertionMethod](contentNode);
93
+ if (!before_insert.isDefaultPrevented()) {
94
+ // allow any of the jquery dom manipulation methods (after, before, append, prepend, etc)
95
+ // to be called on the node. allows the insertion node to be the parent of the inserted
96
+ // code and doesn't force it to be a sibling like after/before does. default: 'before'
97
+ var addedContent = insertionNodeElem[insertionMethod](contentNode);
93
98
 
94
- insertionNodeElem.trigger('cocoon:after-insert', [contentNode]);
99
+ insertionNodeElem.trigger('cocoon:after-insert', [contentNode,
100
+ originalEvent]);
101
+ }
95
102
  });
96
103
  });
97
104
 
@@ -99,23 +106,29 @@
99
106
  var $this = $(this),
100
107
  wrapper_class = $this.data('wrapper-class') || 'nested-fields',
101
108
  node_to_delete = $this.closest('.' + wrapper_class),
102
- trigger_node = node_to_delete.parent();
109
+ trigger_node = node_to_delete.parent(),
110
+ originalEvent = e;
103
111
 
104
112
  e.preventDefault();
105
-
106
- trigger_node.trigger('cocoon:before-remove', [node_to_delete]);
107
-
108
- var timeout = trigger_node.data('remove-timeout') || 0;
109
-
110
- setTimeout(function() {
111
- if ($this.hasClass('dynamic')) {
112
- node_to_delete.remove();
113
- } else {
114
- $this.prev("input[type=hidden]").val("1");
115
- node_to_delete.hide();
116
- }
117
- trigger_node.trigger('cocoon:after-remove', [node_to_delete]);
118
- }, timeout);
113
+ e.stopPropagation();
114
+
115
+ var before_remove = jQuery.Event('cocoon:before-remove');
116
+ trigger_node.trigger(before_remove, [node_to_delete, originalEvent]);
117
+
118
+ if (!before_remove.isDefaultPrevented()) {
119
+ var timeout = trigger_node.data('remove-timeout') || 0;
120
+
121
+ setTimeout(function() {
122
+ if ($this.hasClass('dynamic')) {
123
+ node_to_delete.detach();
124
+ } else {
125
+ $this.prev("input[type=hidden]").val("1");
126
+ node_to_delete.hide();
127
+ }
128
+ trigger_node.trigger('cocoon:after-remove', [node_to_delete,
129
+ originalEvent]);
130
+ }, timeout);
131
+ }
119
132
  });
120
133
 
121
134
 
@@ -2,36 +2,40 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: cocoon 1.2.10 ruby lib
5
+ # stub: cocoon 1.2.15 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "cocoon".freeze
9
- s.version = "1.2.10"
9
+ s.version = "1.2.15"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Nathan Van der Auwera".freeze]
14
- s.date = "2017-05-11"
14
+ s.date = "2020-09-08"
15
15
  s.description = "Unobtrusive nested forms handling, using jQuery. Use this and discover cocoon-heaven.".freeze
16
16
  s.email = "nathan@dixis.com".freeze
17
17
  s.extra_rdoc_files = [
18
+ "LICENSE",
18
19
  "README.markdown"
19
20
  ]
20
21
  s.files = [
21
22
  ".travis.yml",
22
23
  "Gemfile",
23
24
  "History.md",
24
- "MIT-LICENSE",
25
+ "LICENSE",
25
26
  "README.markdown",
26
27
  "Rakefile",
27
28
  "VERSION",
28
29
  "app/assets/javascripts/cocoon.js",
29
30
  "cocoon.gemspec",
31
+ "gemfiles/Gemfile.default",
30
32
  "gemfiles/Gemfile.rails-3.2.13",
31
33
  "gemfiles/Gemfile.rails-4-r2",
32
34
  "lib/cocoon.rb",
33
35
  "lib/cocoon/view_helpers.rb",
34
36
  "lib/generators/cocoon/install/install_generator.rb",
37
+ "npm/README.md",
38
+ "npm/package.json.erb",
35
39
  "spec/cocoon_spec.rb",
36
40
  "spec/dummy/Rakefile",
37
41
  "spec/dummy/app/controllers/application_controller.rb",
@@ -82,17 +86,17 @@ Gem::Specification.new do |s|
82
86
  ]
83
87
  s.homepage = "http://github.com/nathanvda/cocoon".freeze
84
88
  s.licenses = ["MIT".freeze]
85
- s.rubygems_version = "2.6.10".freeze
89
+ s.rubygems_version = "3.0.8".freeze
86
90
  s.summary = "gem that enables easier nested forms with standard forms, formtastic and simple-form".freeze
87
91
 
88
92
  if s.respond_to? :specification_version then
89
93
  s.specification_version = 4
90
94
 
91
95
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
92
- s.add_development_dependency(%q<rails>.freeze, [">= 4.0.0"])
93
- s.add_development_dependency(%q<sqlite3>.freeze, [">= 0"])
96
+ s.add_development_dependency(%q<rails>.freeze, ["~> 4.2"])
97
+ s.add_development_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
94
98
  s.add_development_dependency(%q<json_pure>.freeze, [">= 0"])
95
- s.add_development_dependency(%q<jeweler>.freeze, ["~> 1.8"])
99
+ s.add_development_dependency(%q<jeweler>.freeze, [">= 0"])
96
100
  s.add_development_dependency(%q<rspec-rails>.freeze, ["~> 3.0.0"])
97
101
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0.0"])
98
102
  s.add_development_dependency(%q<actionpack>.freeze, [">= 4.0.0"])
@@ -102,14 +106,14 @@ Gem::Specification.new do |s|
102
106
  s.add_development_dependency(%q<generator_spec>.freeze, [">= 0"])
103
107
  s.add_development_dependency(%q<rubysl>.freeze, [">= 0"])
104
108
  s.add_development_dependency(%q<rubysl-test-unit>.freeze, [">= 0"])
105
- s.add_development_dependency(%q<psych>.freeze, [">= 0"])
109
+ s.add_development_dependency(%q<psych>.freeze, ["~> 2.2"])
106
110
  s.add_development_dependency(%q<racc>.freeze, [">= 0"])
107
111
  s.add_development_dependency(%q<rubinius-developer_tools>.freeze, [">= 0"])
108
112
  else
109
- s.add_dependency(%q<rails>.freeze, [">= 4.0.0"])
110
- s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
113
+ s.add_dependency(%q<rails>.freeze, ["~> 4.2"])
114
+ s.add_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
111
115
  s.add_dependency(%q<json_pure>.freeze, [">= 0"])
112
- s.add_dependency(%q<jeweler>.freeze, ["~> 1.8"])
116
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
113
117
  s.add_dependency(%q<rspec-rails>.freeze, ["~> 3.0.0"])
114
118
  s.add_dependency(%q<rspec>.freeze, ["~> 3.0.0"])
115
119
  s.add_dependency(%q<actionpack>.freeze, [">= 4.0.0"])
@@ -119,15 +123,15 @@ Gem::Specification.new do |s|
119
123
  s.add_dependency(%q<generator_spec>.freeze, [">= 0"])
120
124
  s.add_dependency(%q<rubysl>.freeze, [">= 0"])
121
125
  s.add_dependency(%q<rubysl-test-unit>.freeze, [">= 0"])
122
- s.add_dependency(%q<psych>.freeze, [">= 0"])
126
+ s.add_dependency(%q<psych>.freeze, ["~> 2.2"])
123
127
  s.add_dependency(%q<racc>.freeze, [">= 0"])
124
128
  s.add_dependency(%q<rubinius-developer_tools>.freeze, [">= 0"])
125
129
  end
126
130
  else
127
- s.add_dependency(%q<rails>.freeze, [">= 4.0.0"])
128
- s.add_dependency(%q<sqlite3>.freeze, [">= 0"])
131
+ s.add_dependency(%q<rails>.freeze, ["~> 4.2"])
132
+ s.add_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
129
133
  s.add_dependency(%q<json_pure>.freeze, [">= 0"])
130
- s.add_dependency(%q<jeweler>.freeze, ["~> 1.8"])
134
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
131
135
  s.add_dependency(%q<rspec-rails>.freeze, ["~> 3.0.0"])
132
136
  s.add_dependency(%q<rspec>.freeze, ["~> 3.0.0"])
133
137
  s.add_dependency(%q<actionpack>.freeze, [">= 4.0.0"])
@@ -137,7 +141,7 @@ Gem::Specification.new do |s|
137
141
  s.add_dependency(%q<generator_spec>.freeze, [">= 0"])
138
142
  s.add_dependency(%q<rubysl>.freeze, [">= 0"])
139
143
  s.add_dependency(%q<rubysl-test-unit>.freeze, [">= 0"])
140
- s.add_dependency(%q<psych>.freeze, [">= 0"])
144
+ s.add_dependency(%q<psych>.freeze, ["~> 2.2"])
141
145
  s.add_dependency(%q<racc>.freeze, [">= 0"])
142
146
  s.add_dependency(%q<rubinius-developer_tools>.freeze, [">= 0"])
143
147
  end
@@ -0,0 +1,31 @@
1
+ source "http://rubygems.org"
2
+
3
+
4
+ group :development, :test do
5
+ gem "rails", "~> 4.2"
6
+ gem "sqlite3", '~> 1.3.13'
7
+ gem "json_pure"
8
+ gem "jeweler"
9
+ gem "rspec-rails", "~> 3.0.0"
10
+ gem "rspec", "~> 3.0.0"
11
+ gem "simplecov", :require => false
12
+ gem "rake", "~> 10.1"
13
+
14
+ gem 'nokogiri'
15
+
16
+ gem "generator_spec"
17
+
18
+ platforms :rbx do
19
+ gem 'rubysl'
20
+ gem 'rubysl-test-unit'
21
+ gem 'psych'
22
+ gem 'racc'
23
+ gem 'rubinius-developer_tools'
24
+ end
25
+
26
+ end
27
+
28
+
29
+ # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
30
+ # gem 'ruby-debug'
31
+ # gem 'ruby-debug19'
@@ -37,13 +37,14 @@ module Cocoon
37
37
  wrapper_class = html_options.delete(:wrapper_class)
38
38
  html_options[:'data-wrapper-class'] = wrapper_class if wrapper_class.present?
39
39
 
40
- hidden_field_tag("#{f.object_name}[_destroy]", f.object._destroy) + link_to(name, '#', html_options)
40
+ f.hidden_field(:_destroy, value: f.object._destroy) + link_to(name, '#', html_options)
41
41
  end
42
42
  end
43
43
 
44
44
  # :nodoc:
45
- def render_association(association, f, new_object, form_name, render_options={}, custom_partial=nil)
45
+ def render_association(association, f, new_object, form_name, received_render_options={}, custom_partial=nil)
46
46
  partial = get_partial_path(custom_partial, association)
47
+ render_options = received_render_options.dup
47
48
  locals = render_options.delete(:locals) || {}
48
49
  ancestors = f.class.ancestors.map{|c| c.to_s}
49
50
  method_name = ancestors.include?('SimpleForm::FormBuilder') ? :simple_fields_for : (ancestors.include?('Formtastic::FormBuilder') ? :semantic_fields_for : :fields_for)
@@ -126,7 +127,7 @@ module Cocoon
126
127
  end
127
128
 
128
129
  def create_object_on_association(f, association, instance, force_non_association_create)
129
- if instance.class.name == "Mongoid::Relations::Metadata" || force_non_association_create
130
+ if instance.class.name.starts_with?('Mongoid::') || force_non_association_create
130
131
  create_object_with_conditions(instance)
131
132
  else
132
133
  assoc_obj = nil
@@ -0,0 +1,8 @@
1
+ # cocoon
2
+
3
+ Cocoon is the companion javascript code for the
4
+ rails gem [cocoon](https://github.com/nathanvda/cocoon)
5
+ which offers "dynamic" nested forms.
6
+
7
+ This code depends on jQuery.
8
+
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@nathanvda/cocoon",
3
+ "version": "<%= spec.version %>",
4
+ "license": "MIT",
5
+
6
+ "description": "Companion package for the cocoon Ruby gem.",
7
+ "homepage": "https://github.com/nathanvda/cocoon",
8
+ "repository": "https://github.com/nathanvda/cocoon",
9
+ "bugs": {
10
+ "url": "https://github.com/nathanvda/cocoon/issues"
11
+ },
12
+
13
+ "author": "nathan@dixis.com",
14
+
15
+ "main": "cocoon.js",
16
+ "files": ["cocoon.js", "README", "LICENSE", "package.json"],
17
+
18
+ "dependencies": {
19
+ "jquery": "^3.3.1"
20
+ }
21
+ }
@@ -14,12 +14,12 @@ describe Cocoon do
14
14
  before(:each) do
15
15
  @tester = TestClass.new
16
16
  @post = Post.new
17
- @form_obj = double(:object => @post, :object_name => @post.class.name)
18
17
  end
19
18
 
20
19
 
21
20
  context "link_to_add_association" do
22
21
  before(:each) do
22
+ @form_obj = double(:object => @post, :object_name => @post.class.name)
23
23
  allow(@tester).to receive(:render_association).and_return('form<tag>')
24
24
  end
25
25
 
@@ -198,9 +198,13 @@ describe Cocoon do
198
198
  allow(@tester).to receive(:render_association).and_call_original
199
199
  expect(@form_obj).to receive(:fields_for) { | association, new_object, options_hash, &block| block.call }
200
200
  expect(@tester).to receive(:render).with("person_fields", {:f=>nil, :dynamic=>true, :alfred=>"Judoka"}).and_return ("partiallll")
201
- @html = @tester.link_to_add_association('add something', @form_obj, :people, :render_options => {:wrapper => 'inline', :locals => {:alfred => 'Judoka'}})
201
+ @render_options = {:wrapper => 'inline', :locals => {:alfred => 'Judoka'}}
202
+ @html = @tester.link_to_add_association('add something', @form_obj, :people, :render_options => @render_options)
202
203
  end
203
204
  it_behaves_like "a correctly rendered add link", {template: 'partiallll', association: 'person', associations: 'people' }
205
+ it "does not afffect render-options" do
206
+ expect(@render_options[:locals]).to eq({alfred: 'Judoka'})
207
+ end
204
208
  end
205
209
  context "if no locals are given it still works" do
206
210
  before do
@@ -272,6 +276,9 @@ describe Cocoon do
272
276
  end
273
277
 
274
278
  context "link_to_remove_association" do
279
+ before do
280
+ @form_obj = @tester.send(:instantiate_builder, @post.class.name, @post, {})
281
+ end
275
282
  context "without a block" do
276
283
  context "accepts a name" do
277
284
  before do
@@ -326,7 +333,7 @@ describe Cocoon do
326
333
  before do
327
334
  @post_marked_for_destruction = Post.new
328
335
  @post_marked_for_destruction.mark_for_destruction
329
- @form_obj_destroyed = double(:object => @post_marked_for_destruction, :object_name => @post_marked_for_destruction.class.name)
336
+ @form_obj_destroyed = @tester.send(:instantiate_builder, @post_marked_for_destruction.class.name, @post_marked_for_destruction, {})
330
337
  @html = @tester.link_to_remove_association('remove something', @form_obj_destroyed)
331
338
  end
332
339
 
@@ -387,11 +394,11 @@ describe Cocoon do
387
394
  # I submitted a bug for this: https://github.com/rails/rails/issues/11376
388
395
  if Rails.rails4?
389
396
  @post = Post.create(title: 'Testing')
390
- @form_obj = double(:object => @post, :object_name => @post.class.name)
391
397
  end
392
- result = @tester.create_object(@form_obj, :admin_comments)
398
+ form_obj = double(:object => @post, :object_name => @post.class.name)
399
+ result = @tester.create_object(form_obj, :admin_comments)
393
400
  expect(result.author).to eq("Admin")
394
- expect(@form_obj.object.admin_comments).to be_empty
401
+ expect(form_obj.object.admin_comments).to be_empty
395
402
  end
396
403
 
397
404
  it "creates correct association for belongs_to associations" do
@@ -420,7 +427,8 @@ describe Cocoon do
420
427
 
421
428
  it "can create using only conditions not the association" do
422
429
  expect(@tester).to receive(:create_object_with_conditions).and_return('flappie')
423
- expect(@tester.create_object(@form_obj, :comments, true)).to eq('flappie')
430
+ form_obj = @tester.send(:instantiate_builder, @post.class.name, @post, {})
431
+ expect(@tester.create_object(form_obj, :comments, true)).to eq('flappie')
424
432
  end
425
433
  end
426
434
 
@@ -4,7 +4,7 @@ class CreatePosts < ActiveRecord::Migration
4
4
  t.string :title
5
5
  t.text :body
6
6
 
7
- t.timestamps
7
+ t.timestamps null: false
8
8
  end
9
9
  end
10
10
 
@@ -5,7 +5,7 @@ class CreateComments < ActiveRecord::Migration
5
5
  t.string :author
6
6
  t.integer :post_id
7
7
 
8
- t.timestamps
8
+ t.timestamps null: false
9
9
  end
10
10
  end
11
11
 
@@ -5,7 +5,7 @@ class CreatePeople < ActiveRecord::Migration
5
5
  t.string :description
6
6
  t.integer :post_id
7
7
 
8
- t.timestamps
8
+ t.timestamps null: false
9
9
  end
10
10
  end
11
11
 
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  # This file is auto-generated from the current state of the database. Instead
2
3
  # of editing this file, please use the migrations feature of Active Record to
3
4
  # incrementally modify your database, and then regenerate this schema definition.
@@ -8,23 +9,31 @@
8
9
  # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
10
  # you'll amass, the slower it'll run and the greater likelihood for issues).
10
11
  #
11
- # It's strongly recommended to check this file into your version control system.
12
+ # It's strongly recommended that you check this file into your version control system.
12
13
 
13
- ActiveRecord::Schema.define(:version => 20110306212250) do
14
+ ActiveRecord::Schema.define(version: 20110420222224) do
14
15
 
15
- create_table "comments", :force => true do |t|
16
+ create_table "comments", force: :cascade do |t|
16
17
  t.text "body"
17
18
  t.string "author"
18
19
  t.integer "post_id"
19
- t.datetime "created_at"
20
- t.datetime "updated_at"
20
+ t.datetime "created_at", null: false
21
+ t.datetime "updated_at", null: false
21
22
  end
22
23
 
23
- create_table "posts", :force => true do |t|
24
+ create_table "people", force: :cascade do |t|
25
+ t.string "name"
26
+ t.string "description"
27
+ t.integer "post_id"
28
+ t.datetime "created_at", null: false
29
+ t.datetime "updated_at", null: false
30
+ end
31
+
32
+ create_table "posts", force: :cascade do |t|
24
33
  t.string "title"
25
34
  t.text "body"
26
- t.datetime "created_at"
27
- t.datetime "updated_at"
35
+ t.datetime "created_at", null: false
36
+ t.datetime "updated_at", null: false
28
37
  end
29
38
 
30
39
  end
metadata CHANGED
@@ -1,241 +1,237 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.10
4
+ version: 1.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Van der Auwera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2020-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
19
+ version: '4.2'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 1.3.13
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 1.3.13
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json_pure
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jeweler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: !binary |-
62
- MS44
61
+ version: '0'
63
62
  type: :development
64
63
  prerelease: false
65
64
  version_requirements: !ruby/object:Gem::Requirement
66
65
  requirements:
67
- - - ~>
66
+ - - ">="
68
67
  - !ruby/object:Gem::Version
69
- version: !binary |-
70
- MS44
68
+ version: '0'
71
69
  - !ruby/object:Gem::Dependency
72
70
  name: rspec-rails
73
71
  requirement: !ruby/object:Gem::Requirement
74
72
  requirements:
75
- - - ~>
73
+ - - "~>"
76
74
  - !ruby/object:Gem::Version
77
75
  version: 3.0.0
78
76
  type: :development
79
77
  prerelease: false
80
78
  version_requirements: !ruby/object:Gem::Requirement
81
79
  requirements:
82
- - - ~>
80
+ - - "~>"
83
81
  - !ruby/object:Gem::Version
84
82
  version: 3.0.0
85
83
  - !ruby/object:Gem::Dependency
86
84
  name: rspec
87
85
  requirement: !ruby/object:Gem::Requirement
88
86
  requirements:
89
- - - ~>
87
+ - - "~>"
90
88
  - !ruby/object:Gem::Version
91
89
  version: 3.0.0
92
90
  type: :development
93
91
  prerelease: false
94
92
  version_requirements: !ruby/object:Gem::Requirement
95
93
  requirements:
96
- - - ~>
94
+ - - "~>"
97
95
  - !ruby/object:Gem::Version
98
96
  version: 3.0.0
99
97
  - !ruby/object:Gem::Dependency
100
98
  name: actionpack
101
99
  requirement: !ruby/object:Gem::Requirement
102
100
  requirements:
103
- - - ! '>='
101
+ - - ">="
104
102
  - !ruby/object:Gem::Version
105
103
  version: 4.0.0
106
104
  type: :development
107
105
  prerelease: false
108
106
  version_requirements: !ruby/object:Gem::Requirement
109
107
  requirements:
110
- - - ! '>='
108
+ - - ">="
111
109
  - !ruby/object:Gem::Version
112
110
  version: 4.0.0
113
111
  - !ruby/object:Gem::Dependency
114
112
  name: simplecov
115
113
  requirement: !ruby/object:Gem::Requirement
116
114
  requirements:
117
- - - ! '>='
115
+ - - ">="
118
116
  - !ruby/object:Gem::Version
119
117
  version: '0'
120
118
  type: :development
121
119
  prerelease: false
122
120
  version_requirements: !ruby/object:Gem::Requirement
123
121
  requirements:
124
- - - ! '>='
122
+ - - ">="
125
123
  - !ruby/object:Gem::Version
126
124
  version: '0'
127
125
  - !ruby/object:Gem::Dependency
128
126
  name: rake
129
127
  requirement: !ruby/object:Gem::Requirement
130
128
  requirements:
131
- - - ~>
129
+ - - "~>"
132
130
  - !ruby/object:Gem::Version
133
- version: !binary |-
134
- MTAuMQ==
131
+ version: '10.1'
135
132
  type: :development
136
133
  prerelease: false
137
134
  version_requirements: !ruby/object:Gem::Requirement
138
135
  requirements:
139
- - - ~>
136
+ - - "~>"
140
137
  - !ruby/object:Gem::Version
141
- version: !binary |-
142
- MTAuMQ==
138
+ version: '10.1'
143
139
  - !ruby/object:Gem::Dependency
144
140
  name: nokogiri
145
141
  requirement: !ruby/object:Gem::Requirement
146
142
  requirements:
147
- - - ! '>='
143
+ - - ">="
148
144
  - !ruby/object:Gem::Version
149
145
  version: '0'
150
146
  type: :development
151
147
  prerelease: false
152
148
  version_requirements: !ruby/object:Gem::Requirement
153
149
  requirements:
154
- - - ! '>='
150
+ - - ">="
155
151
  - !ruby/object:Gem::Version
156
152
  version: '0'
157
153
  - !ruby/object:Gem::Dependency
158
154
  name: generator_spec
159
155
  requirement: !ruby/object:Gem::Requirement
160
156
  requirements:
161
- - - ! '>='
157
+ - - ">="
162
158
  - !ruby/object:Gem::Version
163
159
  version: '0'
164
160
  type: :development
165
161
  prerelease: false
166
162
  version_requirements: !ruby/object:Gem::Requirement
167
163
  requirements:
168
- - - ! '>='
164
+ - - ">="
169
165
  - !ruby/object:Gem::Version
170
166
  version: '0'
171
167
  - !ruby/object:Gem::Dependency
172
168
  name: rubysl
173
169
  requirement: !ruby/object:Gem::Requirement
174
170
  requirements:
175
- - - ! '>='
171
+ - - ">="
176
172
  - !ruby/object:Gem::Version
177
173
  version: '0'
178
174
  type: :development
179
175
  prerelease: false
180
176
  version_requirements: !ruby/object:Gem::Requirement
181
177
  requirements:
182
- - - ! '>='
178
+ - - ">="
183
179
  - !ruby/object:Gem::Version
184
180
  version: '0'
185
181
  - !ruby/object:Gem::Dependency
186
182
  name: rubysl-test-unit
187
183
  requirement: !ruby/object:Gem::Requirement
188
184
  requirements:
189
- - - ! '>='
185
+ - - ">="
190
186
  - !ruby/object:Gem::Version
191
187
  version: '0'
192
188
  type: :development
193
189
  prerelease: false
194
190
  version_requirements: !ruby/object:Gem::Requirement
195
191
  requirements:
196
- - - ! '>='
192
+ - - ">="
197
193
  - !ruby/object:Gem::Version
198
194
  version: '0'
199
195
  - !ruby/object:Gem::Dependency
200
196
  name: psych
201
197
  requirement: !ruby/object:Gem::Requirement
202
198
  requirements:
203
- - - ! '>='
199
+ - - "~>"
204
200
  - !ruby/object:Gem::Version
205
- version: '0'
201
+ version: '2.2'
206
202
  type: :development
207
203
  prerelease: false
208
204
  version_requirements: !ruby/object:Gem::Requirement
209
205
  requirements:
210
- - - ! '>='
206
+ - - "~>"
211
207
  - !ruby/object:Gem::Version
212
- version: '0'
208
+ version: '2.2'
213
209
  - !ruby/object:Gem::Dependency
214
210
  name: racc
215
211
  requirement: !ruby/object:Gem::Requirement
216
212
  requirements:
217
- - - ! '>='
213
+ - - ">="
218
214
  - !ruby/object:Gem::Version
219
215
  version: '0'
220
216
  type: :development
221
217
  prerelease: false
222
218
  version_requirements: !ruby/object:Gem::Requirement
223
219
  requirements:
224
- - - ! '>='
220
+ - - ">="
225
221
  - !ruby/object:Gem::Version
226
222
  version: '0'
227
223
  - !ruby/object:Gem::Dependency
228
224
  name: rubinius-developer_tools
229
225
  requirement: !ruby/object:Gem::Requirement
230
226
  requirements:
231
- - - ! '>='
227
+ - - ">="
232
228
  - !ruby/object:Gem::Version
233
229
  version: '0'
234
230
  type: :development
235
231
  prerelease: false
236
232
  version_requirements: !ruby/object:Gem::Requirement
237
233
  requirements:
238
- - - ! '>='
234
+ - - ">="
239
235
  - !ruby/object:Gem::Version
240
236
  version: '0'
241
237
  description: Unobtrusive nested forms handling, using jQuery. Use this and discover
@@ -244,22 +240,26 @@ email: nathan@dixis.com
244
240
  executables: []
245
241
  extensions: []
246
242
  extra_rdoc_files:
243
+ - LICENSE
247
244
  - README.markdown
248
245
  files:
249
- - .travis.yml
246
+ - ".travis.yml"
250
247
  - Gemfile
251
248
  - History.md
252
- - MIT-LICENSE
249
+ - LICENSE
253
250
  - README.markdown
254
251
  - Rakefile
255
252
  - VERSION
256
253
  - app/assets/javascripts/cocoon.js
257
254
  - cocoon.gemspec
255
+ - gemfiles/Gemfile.default
258
256
  - gemfiles/Gemfile.rails-3.2.13
259
257
  - gemfiles/Gemfile.rails-4-r2
260
258
  - lib/cocoon.rb
261
259
  - lib/cocoon/view_helpers.rb
262
260
  - lib/generators/cocoon/install/install_generator.rb
261
+ - npm/README.md
262
+ - npm/package.json.erb
263
263
  - spec/cocoon_spec.rb
264
264
  - spec/dummy/Rakefile
265
265
  - spec/dummy/app/controllers/application_controller.rb
@@ -317,17 +317,16 @@ require_paths:
317
317
  - lib
318
318
  required_ruby_version: !ruby/object:Gem::Requirement
319
319
  requirements:
320
- - - ! '>='
320
+ - - ">="
321
321
  - !ruby/object:Gem::Version
322
322
  version: '0'
323
323
  required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  requirements:
325
- - - ! '>='
325
+ - - ">="
326
326
  - !ruby/object:Gem::Version
327
327
  version: '0'
328
328
  requirements: []
329
- rubyforge_project:
330
- rubygems_version: 2.6.10
329
+ rubygems_version: 3.0.8
331
330
  signing_key:
332
331
  specification_version: 4
333
332
  summary: gem that enables easier nested forms with standard forms, formtastic and