record_collection 0.9.2 → 0.10.0

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: 6d474fd59cf658f40154411ed1921864f724ef16
4
- data.tar.gz: 5a1ab9d2d6215fa356a6a1ab492c8eb46b5ec1ff
3
+ metadata.gz: e654f6b5c7b1ed264fc6ef308f6796cd2f2d2d73
4
+ data.tar.gz: 34ab6394a4d3f8f48b9f586e9affbbe6857f6f06
5
5
  SHA512:
6
- metadata.gz: a823124e2cc13030e85249442d9ba357098e42fe2e6f006b0abf6b1210faf4a3483175cb7cc673a5b36a7f17e42f3c4d9e2790bf3dc936000bc641f4a506e57f
7
- data.tar.gz: a5efd9d8bb02240dbd0ed7c14c296a61ef9e5c63d8f70a085b67a33d2d120628e7d1416c2240c8372f3e764cf227284b32c1ce500fba27be70dfaf719eb81975
6
+ metadata.gz: f9857ed54b6d7fb8afa92a60214288914cb480446cc377ad4666237103dca381b4e8082244475ac43210e167c3079be55f2d4bda5a8646050e05f45e2ac9cafc
7
+ data.tar.gz: fa18d0aa9fe61206460f21e1aec97076231922fd292abaf50c4e801c019e136c66c505f0ea3dddfdb068297e3f41a3a46c74f0ded91eb6c69ab2cc6c21f28f4b
@@ -5,7 +5,7 @@ rvm:
5
5
  env:
6
6
  - RAILS_VERSION=4.1.14
7
7
  - RAILS_VERSION=4.2.5
8
- - RAILS_VERSION=master
8
+ #- RAILS_VERSION=master
9
9
  addons:
10
10
  code_climate:
11
11
  repo_token: 22819b10ef9110a7fef884ab105239fc16fd0562ac79ae54c2204b5e07343919
@@ -1,6 +1,14 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 2015-12-25 - v0.10.0
5
+ --------------------
6
+ ### Changed
7
+ * renamed uniform_collection_attribute to uniform_collection_value
8
+
9
+ ### Fixed
10
+ * Make optionals active when all the values in the collection are nil
11
+
4
12
  2015-12-15 - v0.9.2
5
13
  -------------------
6
14
 
@@ -35,4 +43,3 @@ Employee::Collection.where(a: 1).where.not(b: 3)
35
43
 
36
44
  ### Added
37
45
  * Smarter find on collection object
38
-
data/Gemfile CHANGED
@@ -13,6 +13,7 @@ end
13
13
  gem "rails", rails
14
14
  if rails_version == 'master'
15
15
  gem 'arel', github: 'rails/arel'
16
+ gem 'rack', github: 'rack/rack'
16
17
  end
17
18
 
18
19
  group :test do
@@ -155,7 +155,7 @@ module RecordCollection
155
155
  # value in the collection, but the values of the collection are a result of
156
156
  # an invalid form submission. In this case you want to keep the values of the
157
157
  # submitted form as collection values, not the current uniform attribute.
158
- def uniform_collection_attribute(attr, options = {})
158
+ def uniform_collection_value(attr, options = {})
159
159
  attribute_spec = self.class.attributes[attr]
160
160
  raise "Attribute #{attr} not defined on collection" unless attribute_spec
161
161
  if attribute_spec[:type] == Boolean
@@ -166,10 +166,19 @@ module RecordCollection
166
166
  results = map{|r| r.public_send(attr) }.uniq
167
167
  end
168
168
  return nil unless results.size == 1 # one value found
169
- public_send("#{attr}=", results.first) if options[:set_if_nil] and public_send(attr).nil? # set value on the object if it is uniform and not yet set
169
+ self[attr] = results.first if options[:set_if_nil] and self[attr].nil?
170
170
  results.first
171
171
  end
172
172
 
173
+ def mixed_values_for_attribute?(attr, options = {})
174
+ attribute_spec = self.class.attributes[attr]
175
+ raise "Attribute #{attr} not defined on collection" unless attribute_spec
176
+ collection_values = self.map{|r| r[attr] }.uniq
177
+ return true if collection_values.size > 1
178
+ self[attr] = collection_values.first if collection_values.any? and options[:set_if_nil]
179
+ false
180
+ end
181
+
173
182
  def ids
174
183
  @ids ||= map{|record| record.try(:id) }.compact
175
184
  end
@@ -11,7 +11,7 @@ ActionView::Helpers::FormBuilder.class_eval do
11
11
  def collection_ids
12
12
  @collection_ids_already_added = true
13
13
  return "".html_safe unless object.respond_to?(:map)
14
- object.map{|record| @template.hidden_field_tag('ids[]', record.id, id: nil) }.join.html_safe
14
+ @template.hidden_field_tag('ids', object.map(&:id).join(RecordCollection.ids_separator), id: nil).html_safe
15
15
  end
16
16
 
17
17
  def optional_boolean(attr, options = {})
@@ -58,15 +58,15 @@ ActionView::Helpers::FormBuilder.class_eval do
58
58
  attrs
59
59
  end
60
60
 
61
+ # The attribute is active if it is defined on the collection
62
+ # (this can be the case when setting it nil and a validation of another attribute failed)
63
+ # or the collection has no mixed values of that attribute
61
64
  def active_class(attr)
62
65
  active = false # default
63
- if object.respond_to?(:uniform_collection_attribute)
64
- uniform_value = object.uniform_collection_attribute(attr, set_if_nil: true)
65
- # The field is active when the uniform value is not nil,
66
- # aka has a value
67
- active = !uniform_value.nil?
66
+ if object.respond_to?(:mixed_values_for_attribute?)
67
+ active = !object.mixed_values_for_attribute?(attr, set_if_nil: true)
68
68
  end
69
- active = true unless object.public_send(attr).nil? # Activate if collection or record attribute is not nil
69
+ active = true unless object[attr].nil? # Activate if collection or record attribute is not nil
70
70
  active ? 'active' : 'inactive'
71
71
  end
72
72
  end
@@ -1,6 +1,11 @@
1
1
  ActionView::Helpers::FormHelper.class_eval do
2
2
  private
3
3
 
4
+ # This trick makes it possible to use the record_collection object
5
+ # directly in to forms and point to the proper controller action
6
+ # like:
7
+ # = form_for @collection do |f|
8
+ # = f.text_field :name
4
9
  alias_method :old_apply_form_for_options!, :apply_form_for_options!
5
10
  def apply_form_for_options!(record, object, options) #:nodoc:
6
11
  if record.is_a?(RecordCollection::Base)
@@ -1,3 +1,3 @@
1
1
  module RecordCollection
2
- VERSION = "0.9.2"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -40,6 +40,8 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency "spring"
41
41
  spec.add_development_dependency "spring-commands-rspec"
42
42
  spec.add_development_dependency "quiet_assets"
43
+ spec.add_development_dependency "simple_form"
44
+ spec.add_development_dependency "rspec-html-matchers"
43
45
 
44
46
 
45
47
  spec.add_runtime_dependency 'active_attr', '>= 0.8'
@@ -32,59 +32,8 @@ RSpec.describe Employee::Collection do
32
32
  end
33
33
  end
34
34
 
35
- describe '#uniform_collection_attribute' do
36
- let(:collection_class){ described_class }
37
- describe 'boolean attribute' do
38
- let(:record) { Struct.new(:admin) }
39
-
40
- it 'returns false for mixed falsy boolean values' do
41
- expect( collection_class.new([record.new, record.new(false)]).uniform_collection_attribute(:admin)).to be false
42
- end
43
-
44
- it 'returns nil for mixes boolean values' do
45
- expect( collection_class.new([record.new, record.new(true)]).uniform_collection_attribute(:admin)).to be nil
46
- end
47
-
48
- it 'returns true for all truthy values' do
49
- expect( collection_class.new([record.new(true), record.new(true)]).uniform_collection_attribute(:admin)).to be true
50
- end
51
- end
52
-
53
- describe 'untyped attribute' do
54
- let(:record) { Struct.new(:section) }
55
- it 'returns nil for mixed values truthy and falsy' do
56
- collection = collection_class.new([record.new, record.new('NT2')])
57
- expect( collection.uniform_collection_attribute :section ).to be nil
58
- end
59
-
60
- it 'returns nil for mixed truthy values' do
61
- collection = collection_class.new([record.new('NT1'), record.new('NT2')])
62
- expect( collection.uniform_collection_attribute :section ).to be nil
63
- end
64
-
65
- it 'returns the value for all the same values, but does not set the value' do
66
- collection = collection_class.new([record.new('NT2'), record.new('NT2')])
67
- expect( collection.uniform_collection_attribute :section ).to eq 'NT2'
68
- expect( collection.section ).to be nil
69
- end
70
-
71
- it 'returns the value for all the same values, and sets the value if set_if_nil is given' do
72
- collection = collection_class.new([record.new('NT2'), record.new('NT2')])
73
- expect( collection.uniform_collection_attribute :section, set_if_nil: true ).to eq 'NT2'
74
- expect( collection.section ).to eq 'NT2'
75
- end
76
-
77
- it 'returns the value for all the same values, and does not set the value if set_if_nil is given, but already set (eg: by invalid form)' do
78
- collection = collection_class.new([record.new('NT2'), record.new('NT2')], section: 'Invalid set form value')
79
- expect( collection.uniform_collection_attribute :section, set_if_nil: true ).to eq 'NT2'
80
- expect( collection.section ).to eq 'Invalid set form value'
81
- end
82
- end
83
- end
84
-
85
35
  describe "array like behaviour" do
86
36
  collection = described_class.new([1])
87
37
  Array.wrap( collection ).should == collection
88
38
  end
89
39
  end
90
-
@@ -1,4 +1,5 @@
1
1
  class Project::Collection < RecordCollection::Base
2
2
  attribute :finished, type: Boolean
3
+ attribute :start_date, type: Date
3
4
  attribute :description
4
5
  end
@@ -1,8 +1,9 @@
1
1
  h1 Edit multiple projects
2
- = form_for @collection, url: [:collection_update, @collection] do |f|
2
+ = simple_form_for @collection, url: [:collection_update, @collection] do |f|
3
3
  = render 'form_errors', target: @collection
4
4
  .form-inputs= f.optional_boolean :finished, disabled: true
5
- .form-inputs= f.optional_text_area :description
5
+ .form-inputs= f.optional_input :start_date
6
+ .form-inputs= f.optional_input :description
6
7
  .form-actions= f.submit
7
8
  .page-actions
8
9
  = link_to 'Back', employees_path
@@ -0,0 +1,5 @@
1
+ class AddStartDateToProjects < ActiveRecord::Migration
2
+ def change
3
+ add_column :projects, :start_date, :date
4
+ end
5
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20151215123553) do
14
+ ActiveRecord::Schema.define(version: 20151225113902) do
15
15
 
16
16
  create_table "employees", force: :cascade do |t|
17
17
  t.string "name"
@@ -30,6 +30,7 @@ ActiveRecord::Schema.define(version: 20151215123553) do
30
30
  t.datetime "created_at", null: false
31
31
  t.datetime "updated_at", null: false
32
32
  t.text "description"
33
+ t.date "start_date"
33
34
  end
34
35
 
35
36
  end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.feature "Optional date field with multiple default nil values", type: :feature do
4
+ scenario "Immediately setting the date when none of the collection is set", js: true do
5
+ project_1 = Project.create name: "P1", start_date: nil
6
+ project_2 = Project.create name: "P2", start_date: nil
7
+ visit collection_edit_projects_path(ids: "#{project_1.id}~#{project_2.id}")
8
+ page.should have_selector '.collection_start_date'
9
+ end
10
+ end
@@ -1,8 +1,10 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe ActionView::Helpers::FormBuilder do
4
- let(:employee){ Employee.create section: 'SE1' }
5
- let(:arguments){ {form_object: Employee::Collection.new([employee])} }
4
+ let(:employee_1){ Employee.create section: 'SE1' }
5
+ let(:employee_2){ Employee.create section: 'SE1' }
6
+ let(:collection_class) { Employee::Collection }
7
+ let(:arguments){ {form_object: collection_class.new([employee_1, employee_2])} }
6
8
  subject{ described_class.new :collection, arguments[:form_object], @template, {}}
7
9
  before do
8
10
  # http://pivotallabs.com/testing-custom-form-builder/
@@ -14,13 +16,16 @@ describe ActionView::Helpers::FormBuilder do
14
16
 
15
17
  describe '.collection_ids' do
16
18
  it 'returns the collection ids as hidden fields' do
17
- subject.collection_ids.should match /^<input/
18
- subject.collection_ids.should match /name="ids\[\]"/
19
- subject.collection_ids.should match /value="#{employee.id}"/
19
+ #subject.collection_ids.should eq %|<input type="hidden" name="ids" value="#{employee_1.id}~#{employee_2.id}" />|
20
+ subject.collection_ids.should have_tag :input, with: {
21
+ type: 'hidden',
22
+ name: 'ids',
23
+ value: "#{employee_1.id}~#{employee_2.id}"
24
+ }
20
25
  end
21
26
 
22
27
  it "does not raise when the object is not a collection object" do
23
- arguments[:form_object] = employee
28
+ arguments[:form_object] = employee_1
24
29
  expect{ subject.collection_ids }.not_to raise_error
25
30
  end
26
31
  end
@@ -29,39 +34,38 @@ describe ActionView::Helpers::FormBuilder do
29
34
  it "generates proper output" do
30
35
  expect( subject ).to receive(:input).and_return "<simple-form-content>Simple Form Content</simple-form-content>".html_safe
31
36
  html = subject.optional_input(:section)
32
- doc = Nokogiri::HTML(html)
33
- doc.css("[name='ids[]'][value='#{employee.id}']").should be_present # add ids if not yet set
34
37
 
35
- optional_div = doc.css("div.optional-input.optional-attribute-container.section.active.one[data-attribute='section'][data-one=true]").first
36
- optional_div.text.should eq 'Simple Form Content'
38
+ html.should have_tag :input, with: {name: 'ids', value: "#{employee_1.id}~#{employee_2.id}"}
39
+ html.should have_tag :div, with: {
40
+ class: 'optional-input optional-attribute-container section active',
41
+ 'data-attribute' => 'section',
42
+ 'data-one' => false
43
+ }
37
44
  end
38
45
  end
39
46
 
40
47
  describe '#get_optional_classes' do
41
48
 
42
49
  describe 'active/inactive' do
43
- it "does not include active when record has no value" do
44
- employee.section = nil
50
+ it "does not include active when one record has no value and the other one has" do
51
+ employee_1.section = nil
45
52
  subject.get_optional_classes(:section).should_not include'active'
46
53
  subject.get_optional_classes(:section).should include'inactive'
47
54
  end
48
55
 
49
- it "includes active when record has en empty value" do
50
- employee.section = ''
56
+ it "includes active when collection has an empty value" do
57
+ subject.object.section = ''
51
58
  subject.get_optional_classes(:section).should include'active'
52
59
  subject.get_optional_classes(:section).should_not include'inactive'
53
60
  end
54
61
 
55
62
  it 'includes active when two records have the same value' do
56
- employee_2 = Employee.create section: 'SE1'
57
- arguments[:form_object] = Employee::Collection.new([employee, employee_2])
58
63
  subject.get_optional_classes(:section).should include'active'
59
64
  subject.get_optional_classes(:section).should_not include'inactive'
60
65
  end
61
66
 
62
67
  it 'does not include active when two records have different values' do
63
- employee_2 = Employee.create section: 'SE2'
64
- arguments[:form_object] = Employee::Collection.new([employee, employee_2])
68
+ employee_2.section = 'SE2' # = Employee.create section: 'SE2'
65
69
  subject.get_optional_classes(:section).should_not include'active'
66
70
  subject.get_optional_classes(:section).should include'inactive'
67
71
  end
@@ -69,17 +73,16 @@ describe ActionView::Helpers::FormBuilder do
69
73
 
70
74
  describe 'one' do
71
75
  it "includes one if only one record is present" do
76
+ arguments[:form_object] = collection_class.new([employee_1])
72
77
  subject.get_optional_classes(:section).should include'one'
73
78
  end
74
79
 
75
80
  it "includes one if the form record is not a collection but a normal record" do
76
- arguments[:form_object] = employee
81
+ arguments[:form_object] = employee_1
77
82
  subject.get_optional_classes(:section).should include'one'
78
83
  end
79
84
 
80
85
  it "does not include one for a collection having more than one records" do
81
- employee_2 = Employee.create section: 'SE2'
82
- arguments[:form_object] = Employee::Collection.new([employee, employee_2])
83
86
  subject.get_optional_classes(:section).should_not include'one'
84
87
  end
85
88
  end
@@ -61,52 +61,96 @@ RSpec.describe RecordCollection::Base do
61
61
  end
62
62
  end
63
63
 
64
- describe '#uniform_collection_attribute' do
65
- let(:collection_class){ ActiveCollectionTest }
66
- describe 'boolean attribute' do
67
- let(:record) { Struct.new(:check1) }
68
-
69
- it 'returns false for mixed falsy boolean values' do
70
- expect( collection_class.new([record.new, record.new(false)]).uniform_collection_attribute(:check1)).to be false
71
- end
72
-
73
- it 'returns nil for mixes boolean values' do
74
- expect( collection_class.new([record.new, record.new(true)]).uniform_collection_attribute(:check1)).to be nil
64
+ describe '#mixed_values_for_attribute?' do
65
+ context "TestCollection" do
66
+ let(:collection_class){ ActiveCollectionTest }
67
+ describe 'boolean attribute' do
68
+ let(:record) { Struct.new(:check1) }
69
+
70
+ it 'returns true for mixed falsy boolean values' do
71
+ expect( collection_class.new([record.new, record.new(false)]).mixed_values_for_attribute?(:check1)).to be true
72
+ end
73
+
74
+ it 'returns false for all truthy values' do
75
+ expect( collection_class.new([record.new(true), record.new(true)]).mixed_values_for_attribute?(:check1)).to be false
76
+ end
75
77
  end
76
78
 
77
- it 'returns true for all truthy values' do
78
- expect( collection_class.new([record.new(true), record.new(true)]).uniform_collection_attribute(:check1)).to be true
79
+ describe 'untyped attribute' do
80
+ let(:record) { Struct.new(:notes) }
81
+ it 'returns true for mixed values truthy and falsy' do
82
+ collection = collection_class.new([record.new, record.new('NOTE2')])
83
+ expect( collection.mixed_values_for_attribute? :notes ).to be true
84
+ end
85
+
86
+ it 'returns true for mixed truthy values' do
87
+ collection = collection_class.new([record.new('NOTE1'), record.new('NOTE2')])
88
+ expect( collection.mixed_values_for_attribute? :notes ).to be true
89
+ end
90
+
91
+ it 'returns the value for all the same values, and sets the value if set_if_nil is given' do
92
+ collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')])
93
+ expect( collection.mixed_values_for_attribute? :notes, set_if_nil: true ).to be false
94
+ expect( collection.notes ).to eq 'NOTE2'
95
+ end
96
+
97
+ it "does not set value if there are mixed values" do
98
+ collection = collection_class.new([record.new('NOTE1'), record.new('NOTE2')])
99
+ expect( collection.mixed_values_for_attribute? :notes, set_if_nil: true ).to be true
100
+ collection.notes.should be_nil
101
+ end
79
102
  end
80
103
  end
104
+ end
81
105
 
82
- describe 'untyped attribute' do
83
- let(:record) { Struct.new(:notes) }
84
- it 'returns nil for mixed values truthy and falsy' do
85
- collection = collection_class.new([record.new, record.new('NOTE2')])
86
- expect( collection.uniform_collection_attribute :notes ).to be nil
87
- end
106
+ describe '#uniform_collection_value' do
107
+ context "TestCollection" do
108
+ let(:collection_class){ ActiveCollectionTest }
109
+ describe 'boolean attribute' do
110
+ let(:record) { Struct.new(:check1) }
88
111
 
89
- it 'returns nil for mixed truthy values' do
90
- collection = collection_class.new([record.new('NOTE1'), record.new('NOTE2')])
91
- expect( collection.uniform_collection_attribute :notes ).to be nil
92
- end
112
+ it 'returns false for mixed falsy boolean values' do
113
+ expect( collection_class.new([record.new, record.new(false)]).uniform_collection_value(:check1)).to be false
114
+ end
93
115
 
94
- it 'returns the value for all the same values, but does not set the value' do
95
- collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')])
96
- expect( collection.uniform_collection_attribute :notes ).to eq 'NOTE2'
97
- expect( collection.notes ).to be nil
98
- end
116
+ it 'returns nil for mixes boolean values' do
117
+ expect( collection_class.new([record.new, record.new(true)]).uniform_collection_value(:check1)).to be nil
118
+ end
99
119
 
100
- it 'returns the value for all the same values, and sets the value if set_if_nil is given' do
101
- collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')])
102
- expect( collection.uniform_collection_attribute :notes, set_if_nil: true ).to eq 'NOTE2'
103
- expect( collection.notes ).to eq 'NOTE2'
120
+ it 'returns true for all truthy values' do
121
+ expect( collection_class.new([record.new(true), record.new(true)]).uniform_collection_value(:check1)).to be true
122
+ end
104
123
  end
105
124
 
106
- it 'returns the value for all the same values, and does not set the value if set_if_nil is given, but already set (eg: by invalid form)' do
107
- collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')], notes: 'Invalid set form value')
108
- expect( collection.uniform_collection_attribute :notes, set_if_nil: true ).to eq 'NOTE2'
109
- expect( collection.notes ).to eq 'Invalid set form value'
125
+ describe 'untyped attribute' do
126
+ let(:record) { Struct.new(:notes) }
127
+ it 'returns nil for mixed values truthy and falsy' do
128
+ collection = collection_class.new([record.new, record.new('NOTE2')])
129
+ expect( collection.uniform_collection_value :notes ).to be nil
130
+ end
131
+
132
+ it 'returns nil for mixed truthy values' do
133
+ collection = collection_class.new([record.new('NOTE1'), record.new('NOTE2')])
134
+ expect( collection.uniform_collection_value :notes ).to be nil
135
+ end
136
+
137
+ it 'returns the value for all the same values, but does not set the value' do
138
+ collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')])
139
+ expect( collection.uniform_collection_value :notes ).to eq 'NOTE2'
140
+ expect( collection.notes ).to be nil
141
+ end
142
+
143
+ it 'returns the value for all the same values, and sets the value if set_if_nil is given' do
144
+ collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')])
145
+ expect( collection.uniform_collection_value :notes, set_if_nil: true ).to eq 'NOTE2'
146
+ expect( collection.notes ).to eq 'NOTE2'
147
+ end
148
+
149
+ it 'returns the value for all the same values, and does not set the value if set_if_nil is given, but already set (eg: by invalid form)' do
150
+ collection = collection_class.new([record.new('NOTE2'), record.new('NOTE2')], notes: 'Invalid set form value')
151
+ expect( collection.uniform_collection_value :notes, set_if_nil: true ).to eq 'NOTE2'
152
+ expect( collection.notes ).to eq 'Invalid set form value'
153
+ end
110
154
  end
111
155
  end
112
156
  end
@@ -20,6 +20,7 @@ DatabaseCleaner.clean_with :truncation
20
20
  RSpec.configure do |config|
21
21
  config.mock_with :rspec
22
22
  config.include Dummy::Application.routes.url_helpers, type: :feature
23
+ config.include RSpecHtmlMatchers
23
24
 
24
25
  config.before :each do
25
26
  Employee.delete_all
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: record_collection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin ter Kuile
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -304,6 +304,34 @@ dependencies:
304
304
  - - ">="
305
305
  - !ruby/object:Gem::Version
306
306
  version: '0'
307
+ - !ruby/object:Gem::Dependency
308
+ name: simple_form
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - ">="
312
+ - !ruby/object:Gem::Version
313
+ version: '0'
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - ">="
319
+ - !ruby/object:Gem::Version
320
+ version: '0'
321
+ - !ruby/object:Gem::Dependency
322
+ name: rspec-html-matchers
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ">="
333
+ - !ruby/object:Gem::Version
334
+ version: '0'
307
335
  - !ruby/object:Gem::Dependency
308
336
  name: active_attr
309
337
  requirement: !ruby/object:Gem::Requirement
@@ -475,6 +503,7 @@ files:
475
503
  - spec/dummy/db/migrate/20150204125014_create_projects.rb
476
504
  - spec/dummy/db/migrate/20150721122805_add_description_to_projects.rb
477
505
  - spec/dummy/db/migrate/20151215123553_add_project_id_to_employees.rb
506
+ - spec/dummy/db/migrate/20151225113902_add_start_date_to_projects.rb
478
507
  - spec/dummy/db/schema.rb
479
508
  - spec/dummy/lib/assets/.keep
480
509
  - spec/dummy/log/.keep
@@ -485,6 +514,7 @@ files:
485
514
  - spec/features/disabled_boolean_spec.rb
486
515
  - spec/features/multi_select_spec.rb
487
516
  - spec/features/optional_boolean_with_normal_resource_spec.rb
517
+ - spec/features/optional_date_field_all_nil_spec.rb
488
518
  - spec/features/optional_text_field_with_normal_resource_spec.rb
489
519
  - spec/features/optionals_with_one_record_spec.rb
490
520
  - spec/features/translations_spec.rb
@@ -596,6 +626,7 @@ test_files:
596
626
  - spec/dummy/db/migrate/20150204125014_create_projects.rb
597
627
  - spec/dummy/db/migrate/20150721122805_add_description_to_projects.rb
598
628
  - spec/dummy/db/migrate/20151215123553_add_project_id_to_employees.rb
629
+ - spec/dummy/db/migrate/20151225113902_add_start_date_to_projects.rb
599
630
  - spec/dummy/db/schema.rb
600
631
  - spec/dummy/lib/assets/.keep
601
632
  - spec/dummy/log/.keep
@@ -606,6 +637,7 @@ test_files:
606
637
  - spec/features/disabled_boolean_spec.rb
607
638
  - spec/features/multi_select_spec.rb
608
639
  - spec/features/optional_boolean_with_normal_resource_spec.rb
640
+ - spec/features/optional_date_field_all_nil_spec.rb
609
641
  - spec/features/optional_text_field_with_normal_resource_spec.rb
610
642
  - spec/features/optionals_with_one_record_spec.rb
611
643
  - spec/features/translations_spec.rb