cocoon 1.2.11 → 1.2.12

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
  SHA1:
3
- metadata.gz: 1b41a3b05044110e35f9ac65dca30cdcb96455a4
4
- data.tar.gz: b98f78e8fb764b7de9d6aedfd86a1e50f6359390
3
+ metadata.gz: 3c5f601d2d0e1375b2cf13ff4190ee64a5812a24
4
+ data.tar.gz: 939b06465155cb439e825e08acffd858ca1d1e25
5
5
  SHA512:
6
- metadata.gz: '08fcb909826ebaa9728e62e0af6ba8392e655d5cedc03685aeccd90ee60e9247a5b4314b495e3024d82cc8de832569a03c224d6d125923ec4f392bb5870beafb'
7
- data.tar.gz: 1790076ada7fee16d634da3d17fc37cdb9cf5178285fc422285b57fa3ed831811e301c4fbf2ae5731f7ce5e49bb2d83207821105fccf37726310f0a336f8e252
6
+ metadata.gz: d043879722f20274185e96888cbf805a67b94a9f63ac144ed3c31d0d12c52766b173a8e2c5024b04005f6080273c29417702c1ac7b26260ebc964088b6a49d1d
7
+ data.tar.gz: 9e9507b5f0f3980233c99c8f438101f5349cbcb2f30ba7f4a480bc0a4f48b1d061d27bb953923d9edb597a4d511b024a190678fa613e4bc481a90d5629d5dba3
@@ -3,19 +3,20 @@ rvm:
3
3
  - 2.1.5
4
4
  - 2.2.6
5
5
  - 2.3.2
6
+ - 2.4.1
6
7
  - rbx-2
7
8
  gemfile:
8
9
  - gemfiles/Gemfile.rails-3.2.13
9
10
  - gemfiles/Gemfile.rails-4-r2
10
- - Gemfile
11
+ - gemfiles/Gemfile.default
11
12
 
12
13
  matrix:
13
14
  fast_finish: true
14
15
  exclude:
15
16
  - rvm: 2.0.0
16
- gemfile: Gemfile
17
+ gemfile: gemfiles/Gemfile.default
17
18
  - rvm: 2.1.5
18
- gemfile: Gemfile
19
+ gemfile: gemfiles/Gemfile.default
19
20
  - rvm: 2.2.6
20
21
  gemfile: gemfiles/Gemfile.rails-3.2.13
21
22
  - rvm: 2.2.6
@@ -24,9 +25,9 @@ matrix:
24
25
  gemfile: gemfiles/Gemfile.rails-3.2.13
25
26
  - rvm: 2.3.2
26
27
  gemfile: gemfiles/Gemfile.rails-4-r2
27
- - rvm: 2.4.0
28
+ - rvm: 2.4.1
28
29
  gemfile: gemfiles/Gemfile.rails-3.2.13
29
- - rvm: 2.4.0
30
+ - rvm: 2.4.1
30
31
  gemfile: gemfiles/Gemfile.rails-4-r2
31
32
  allow_failures:
32
33
  - rvm: rbx-2
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
2
2
 
3
3
 
4
4
  group :development, :test do
5
- gem "rails", ">=4.0.0"
5
+ gem "rails", "~> 4.2"
6
6
  gem "sqlite3", '1.3.13'
7
7
  gem "json_pure"
8
8
  gem "jeweler", "~> 2.3"
@@ -109,7 +109,7 @@ E.g. in your `ProjectsController`:
109
109
  Cocoon's default configuration requires `link_to_add_association` and associated partials to
110
110
  be properly wrapped with elements. The examples below illustrate simple layouts.
111
111
 
112
- Please note these examples rely on the `haml` gem (instead of the default `erb` views).
112
+ 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
113
 
114
114
  ### Formtastic
115
115
 
@@ -234,6 +234,7 @@ This should be called within the form builder.
234
234
  - `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
235
  - `force_non_association_create`: if true, it will _not_ create the new object using the association (see lower)
236
236
  - `form_name` : the name of the form parameter in your nested partial. By default this is `f`.
237
+ - `count` : the number of nested items to insert at once. Default `1`.
237
238
 
238
239
  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
240
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.11
1
+ 1.2.12
@@ -114,7 +114,7 @@
114
114
 
115
115
  setTimeout(function() {
116
116
  if ($this.hasClass('dynamic')) {
117
- node_to_delete.remove();
117
+ node_to_delete.detach();
118
118
  } else {
119
119
  $this.prev("input[type=hidden]").val("1");
120
120
  node_to_delete.hide();
@@ -2,16 +2,16 @@
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.11 ruby lib
5
+ # stub: cocoon 1.2.12 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "cocoon".freeze
9
- s.version = "1.2.11"
9
+ s.version = "1.2.12"
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-10-26"
14
+ s.date = "2018-10-18"
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 = [
@@ -27,6 +27,7 @@ Gem::Specification.new do |s|
27
27
  "VERSION",
28
28
  "app/assets/javascripts/cocoon.js",
29
29
  "cocoon.gemspec",
30
+ "gemfiles/Gemfile.default",
30
31
  "gemfiles/Gemfile.rails-3.2.13",
31
32
  "gemfiles/Gemfile.rails-4-r2",
32
33
  "lib/cocoon.rb",
@@ -89,7 +90,7 @@ Gem::Specification.new do |s|
89
90
  s.specification_version = 4
90
91
 
91
92
  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<rails>.freeze, ["~> 4.2"])
93
94
  s.add_development_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
94
95
  s.add_development_dependency(%q<json_pure>.freeze, [">= 0"])
95
96
  s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3"])
@@ -106,7 +107,7 @@ Gem::Specification.new do |s|
106
107
  s.add_development_dependency(%q<racc>.freeze, [">= 0"])
107
108
  s.add_development_dependency(%q<rubinius-developer_tools>.freeze, [">= 0"])
108
109
  else
109
- s.add_dependency(%q<rails>.freeze, [">= 4.0.0"])
110
+ s.add_dependency(%q<rails>.freeze, ["~> 4.2"])
110
111
  s.add_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
111
112
  s.add_dependency(%q<json_pure>.freeze, [">= 0"])
112
113
  s.add_dependency(%q<jeweler>.freeze, ["~> 2.3"])
@@ -124,7 +125,7 @@ Gem::Specification.new do |s|
124
125
  s.add_dependency(%q<rubinius-developer_tools>.freeze, [">= 0"])
125
126
  end
126
127
  else
127
- s.add_dependency(%q<rails>.freeze, [">= 4.0.0"])
128
+ s.add_dependency(%q<rails>.freeze, ["~> 4.2"])
128
129
  s.add_dependency(%q<sqlite3>.freeze, ["= 1.3.13"])
129
130
  s.add_dependency(%q<json_pure>.freeze, [">= 0"])
130
131
  s.add_dependency(%q<jeweler>.freeze, ["~> 2.3"])
@@ -0,0 +1,32 @@
1
+ source "http://rubygems.org"
2
+
3
+
4
+ group :development, :test do
5
+ gem "rails", "~> 4.2"
6
+ gem "sqlite3"
7
+ gem "json_pure"
8
+ gem "jeweler"
9
+ gem "rspec-rails", "~> 3.0.0"
10
+ gem "rspec", "~> 3.0.0"
11
+ gem "actionpack", ">=4.0.0"
12
+ gem "simplecov", :require => false
13
+ gem "rake", "~> 10.1"
14
+
15
+ gem 'nokogiri'
16
+
17
+ gem "generator_spec"
18
+
19
+ platforms :rbx do
20
+ gem 'rubysl'
21
+ gem 'rubysl-test-unit'
22
+ gem 'psych'
23
+ gem 'racc'
24
+ gem 'rubinius-developer_tools'
25
+ end
26
+
27
+ end
28
+
29
+
30
+ # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
31
+ # gem 'ruby-debug'
32
+ # gem 'ruby-debug19'
@@ -126,7 +126,7 @@ module Cocoon
126
126
  end
127
127
 
128
128
  def create_object_on_association(f, association, instance, force_non_association_create)
129
- if instance.class.name == "Mongoid::Relations::Metadata" || force_non_association_create
129
+ if instance.class.name.starts_with?('Mongoid::') || force_non_association_create
130
130
  create_object_with_conditions(instance)
131
131
  else
132
132
  assoc_obj = nil
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.11
4
+ version: 1.2.12
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-10-26 00:00:00.000000000 Z
11
+ date: 2018-10-18 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
@@ -251,6 +251,7 @@ files:
251
251
  - VERSION
252
252
  - app/assets/javascripts/cocoon.js
253
253
  - cocoon.gemspec
254
+ - gemfiles/Gemfile.default
254
255
  - gemfiles/Gemfile.rails-3.2.13
255
256
  - gemfiles/Gemfile.rails-4-r2
256
257
  - lib/cocoon.rb