forest_liana 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/forest_liana/actions_controller.rb +12 -2
  3. data/lib/forest_liana/version.rb +1 -1
  4. data/spec/dummy/app/assets/config/manifest.js +1 -0
  5. data/spec/dummy/config/application.rb +1 -1
  6. data/spec/dummy/db/migrate/20190226172951_create_user.rb +1 -1
  7. data/spec/dummy/db/migrate/20190226173051_create_isle.rb +1 -1
  8. data/spec/dummy/db/migrate/20190226174951_create_tree.rb +1 -1
  9. data/spec/dummy/db/migrate/20190716130830_add_age_to_tree.rb +1 -1
  10. data/spec/dummy/db/migrate/20190716135241_add_type_to_user.rb +1 -1
  11. data/spec/dummy/db/schema.rb +18 -20
  12. data/spec/requests/actions_controller_spec.rb +59 -11
  13. data/spec/requests/resources_spec.rb +4 -4
  14. data/test/dummy/app/assets/config/manifest.js +1 -0
  15. data/test/dummy/config/application.rb +1 -1
  16. data/test/dummy/db/migrate/20150608130516_create_date_field.rb +1 -1
  17. data/test/dummy/db/migrate/20150608131430_create_integer_field.rb +1 -1
  18. data/test/dummy/db/migrate/20150608131603_create_decimal_field.rb +1 -1
  19. data/test/dummy/db/migrate/20150608131610_create_float_field.rb +1 -1
  20. data/test/dummy/db/migrate/20150608132159_create_boolean_field.rb +1 -1
  21. data/test/dummy/db/migrate/20150608132621_create_string_field.rb +1 -1
  22. data/test/dummy/db/migrate/20150608133038_create_belongs_to_field.rb +1 -1
  23. data/test/dummy/db/migrate/20150608133044_create_has_one_field.rb +1 -1
  24. data/test/dummy/db/migrate/20150608150016_create_has_many_field.rb +1 -1
  25. data/test/dummy/db/migrate/20150609114636_create_belongs_to_class_name_field.rb +1 -1
  26. data/test/dummy/db/migrate/20150612112520_create_has_and_belongs_to_many_field.rb +1 -1
  27. data/test/dummy/db/migrate/20150616150629_create_polymorphic_field.rb +1 -1
  28. data/test/dummy/db/migrate/20150623115554_create_has_many_class_name_field.rb +1 -1
  29. data/test/dummy/db/migrate/20150814081918_create_has_many_through_field.rb +1 -1
  30. data/test/dummy/db/migrate/20160627172810_create_owner.rb +1 -1
  31. data/test/dummy/db/migrate/20160627172951_create_tree.rb +1 -1
  32. data/test/dummy/db/migrate/20160628173505_add_timestamps.rb +1 -1
  33. data/test/dummy/db/migrate/20170614141921_create_serialize_field.rb +1 -1
  34. data/test/dummy/db/migrate/20181111162121_create_references_table.rb +1 -1
  35. data/test/services/forest_liana/resources_getter_test.rb +1 -1
  36. metadata +6 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e1a93b16b8c079a92000891ac73f8794fa87c2b6411e99a6e160d7f5e88e64d
4
- data.tar.gz: 0b6853a6eda1fef9f395fa9f247b90273fef74fe8eb9e621ed4647d43832dc03
3
+ metadata.gz: 8e6b91f8b65d70c711aa9f0f20e5efaf8ee6eddc7324b09629cab67ddbc7534b
4
+ data.tar.gz: c21d927739263c46975a51e67bbbe51c00affcb82db53ea5895bd18f107dc864
5
5
  SHA512:
6
- metadata.gz: 3e7aa35686573cce22819ea583a20c9d93afd39b72187aae0c618fd0e67e1494475435ae0ca9c8c892b7bbe3015c0e6ac0f220ca75b2526f66883f5a491f54f7
7
- data.tar.gz: ffdcfcf09b90001e66bff1910a86d635def03cf718a9e13282061d4f9d5c4b0780058ba7462106ea6c4deb299e388bb3c32a3eec624d51bfd7b0420a85a60167
6
+ metadata.gz: e160240b6a18c405861906143eb1fc121eb97317f0ee3a826ba07b7f93509a43ed906d03a91dccc978f3fa5432702b7d13d47afaa3e4109a46afb732bc3a4659
7
+ data.tar.gz: 3470dbf5dab1b67904d00eb183f63b70a511f158427fcedc8d2b63aad6080ce38dda979859eb5f5a5fd28cfbb97b3e7e4c132c776bd4c5cb1efb34b4d60674e4
@@ -55,10 +55,20 @@ module ForestLiana
55
55
  # Apply result on fields (transform the object back to an array), preserve order.
56
56
  fields = action.fields.map do |field|
57
57
  updated_field = result[field[:field]]
58
+
58
59
  # Reset `value` when not present in `enums` (which means `enums` has changed).
59
- if updated_field[:enums].is_a?(Array) && !updated_field[:enums].include?(updated_field[:value])
60
- updated_field[:value] = nil
60
+ if updated_field[:enums].is_a?(Array)
61
+ # `value` can be an array if the type of fields is `[x]`
62
+ if updated_field[:type].is_a?(Array) && updated_field[:value].is_a?(Array) && !(updated_field[:value] - updated_field[:enums]).empty?
63
+ updated_field[:value] = nil
64
+ end
65
+
66
+ # `value` can be any other value
67
+ if !updated_field[:type].is_a?(Array) && !updated_field[:enums].include?(updated_field[:value])
68
+ updated_field[:value] = nil
69
+ end
61
70
  end
71
+
62
72
  updated_field
63
73
  end
64
74
 
@@ -1,3 +1,3 @@
1
1
  module ForestLiana
2
- VERSION = "5.4.0"
2
+ VERSION = "5.4.1"
3
3
  end
@@ -20,7 +20,7 @@ module Dummy
20
20
  # config.i18n.default_locale = :de
21
21
 
22
22
  # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
23
+ # config.active_record.raise_in_transactional_callbacks = true
24
24
  end
25
25
  end
26
26
 
@@ -1,4 +1,4 @@
1
- class CreateUser < ActiveRecord::Migration
1
+ class CreateUser < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :users do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateIsle < ActiveRecord::Migration
1
+ class CreateIsle < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :isle do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateTree < ActiveRecord::Migration
1
+ class CreateTree < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :trees do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class AddAgeToTree < ActiveRecord::Migration
1
+ class AddAgeToTree < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :trees, :age, :integer
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddTypeToUser < ActiveRecord::Migration
1
+ class AddTypeToUser < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :users, :title, :integer
4
4
  end
@@ -1,44 +1,42 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
5
4
  #
6
- # Note that this schema.rb definition is the authoritative source for your
7
- # database schema. If you need to create the application database on another
8
- # system, you should be using db:schema:load, not running all the migrations
9
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
- # you'll amass, the slower it'll run and the greater likelihood for issues).
5
+ # This file is the source Rails uses to define your schema when running `rails
6
+ # db:schema:load`. When creating a new database, `rails db:schema:load` tends to
7
+ # be faster and is potentially less error prone than running all of your
8
+ # migrations from scratch. Old migrations may fail to apply correctly if those
9
+ # migrations use external dependencies or application code.
11
10
  #
12
11
  # It's strongly recommended that you check this file into your version control system.
13
12
 
14
- ActiveRecord::Schema.define(version: 20190716135241) do
13
+ ActiveRecord::Schema.define(version: 2019_07_16_135241) do
15
14
 
16
15
  create_table "isle", force: :cascade do |t|
17
- t.string "name"
18
- t.binary "map"
16
+ t.string "name"
17
+ t.binary "map"
19
18
  t.datetime "created_at"
20
19
  t.datetime "updated_at"
21
20
  end
22
21
 
23
22
  create_table "trees", force: :cascade do |t|
24
- t.string "name"
25
- t.integer "owner_id"
26
- t.integer "cutter_id"
27
- t.integer "island_id"
23
+ t.string "name"
24
+ t.integer "owner_id"
25
+ t.integer "cutter_id"
26
+ t.integer "island_id"
28
27
  t.datetime "created_at"
29
28
  t.datetime "updated_at"
30
- t.integer "age"
29
+ t.integer "age"
30
+ t.index ["cutter_id"], name: "index_trees_on_cutter_id"
31
+ t.index ["island_id"], name: "index_trees_on_island_id"
32
+ t.index ["owner_id"], name: "index_trees_on_owner_id"
31
33
  end
32
34
 
33
- add_index "trees", ["cutter_id"], name: "index_trees_on_cutter_id"
34
- add_index "trees", ["island_id"], name: "index_trees_on_island_id"
35
- add_index "trees", ["owner_id"], name: "index_trees_on_owner_id"
36
-
37
35
  create_table "users", force: :cascade do |t|
38
- t.string "name"
36
+ t.string "name"
39
37
  t.datetime "created_at"
40
38
  t.datetime "updated_at"
41
- t.integer "title"
39
+ t.integer "title"
42
40
  end
43
41
 
44
42
  end
@@ -35,6 +35,11 @@ describe 'Requesting Actions routes', :type => :request do
35
35
  type: 'Enum',
36
36
  enums: %w[a b c],
37
37
  }
38
+ multiple_enum = {
39
+ field: 'multipleEnum',
40
+ type: ['Enum'],
41
+ enums: %w[a b c],
42
+ }
38
43
 
39
44
  action_definition = {
40
45
  name: 'my_action',
@@ -95,34 +100,50 @@ describe 'Requesting Actions routes', :type => :request do
95
100
  }
96
101
  }
97
102
  }
103
+
104
+ multiple_enums_action_definition = {
105
+ name: 'multiple_enums_action',
106
+ fields: [foo, multiple_enum],
107
+ hooks: {
108
+ :change => {
109
+ 'foo' => -> (context) {
110
+ fields = context[:fields]
111
+ fields['multipleEnum'][:enums] = %w[c d z]
112
+ return fields
113
+ }
114
+ }
115
+ }
116
+ }
117
+
98
118
  action = ForestLiana::Model::Action.new(action_definition)
99
119
  fail_action = ForestLiana::Model::Action.new(fail_action_definition)
100
120
  cheat_action = ForestLiana::Model::Action.new(cheat_action_definition)
101
121
  enums_action = ForestLiana::Model::Action.new(enums_action_definition)
122
+ multiple_enums_action = ForestLiana::Model::Action.new(multiple_enums_action_definition)
102
123
  island = ForestLiana.apimap.find {|collection| collection.name.to_s == ForestLiana.name_for(Island)}
103
- island.actions = [action, fail_action, cheat_action, enums_action]
124
+ island.actions = [action, fail_action, cheat_action, enums_action, multiple_enums_action]
104
125
 
105
126
  describe 'call /load' do
106
127
  params = {recordIds: [1], collectionName: 'Island'}
107
128
 
108
129
  it 'should respond 200' do
109
- post '/forest/actions/my_action/hooks/load', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
130
+ post '/forest/actions/my_action/hooks/load', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
110
131
  expect(response.status).to eq(200)
111
132
  expect(JSON.parse(response.body)).to eq({'fields' => [foo.merge({:value => nil}).stringify_keys]})
112
133
  end
113
134
 
114
135
  it 'should respond 500 with bad params' do
115
- post '/forest/actions/my_action/hooks/load', {}
136
+ post '/forest/actions/my_action/hooks/load', params: {}
116
137
  expect(response.status).to eq(500)
117
138
  end
118
139
 
119
140
  it 'should respond 500 with bad hook result type' do
120
- post '/forest/actions/fail_action/hooks/load', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
141
+ post '/forest/actions/fail_action/hooks/load', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
121
142
  expect(response.status).to eq(500)
122
143
  end
123
144
 
124
145
  it 'should respond 500 with bad hook result data structure' do
125
- post '/forest/actions/cheat_action/hooks/load', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
146
+ post '/forest/actions/cheat_action/hooks/load', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
126
147
  expect(response.status).to eq(500)
127
148
  end
128
149
  end
@@ -132,7 +153,7 @@ describe 'Requesting Actions routes', :type => :request do
132
153
  params = {recordIds: [1], fields: [updated_foo], collectionName: 'Island', changedField: 'foo'}
133
154
 
134
155
  it 'should respond 200' do
135
- post '/forest/actions/my_action/hooks/change', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
156
+ post '/forest/actions/my_action/hooks/change', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
136
157
  expect(response.status).to eq(200)
137
158
  expected = updated_foo.clone.merge({:value => 'baz'})
138
159
  expected[:widgetEdit] = nil
@@ -141,24 +162,24 @@ describe 'Requesting Actions routes', :type => :request do
141
162
  end
142
163
 
143
164
  it 'should respond 500 with bad params' do
144
- post '/forest/actions/my_action/hooks/change', {}
165
+ post '/forest/actions/my_action/hooks/change', params: {}
145
166
  expect(response.status).to eq(500)
146
167
  end
147
168
 
148
169
  it 'should respond 500 with bad hook result type' do
149
- post '/forest/actions/fail_action/hooks/change', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
170
+ post '/forest/actions/fail_action/hooks/change', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
150
171
  expect(response.status).to eq(500)
151
172
  end
152
173
 
153
174
  it 'should respond 500 with bad hook result data structure' do
154
- post '/forest/actions/cheat_action/hooks/change', JSON.dump(params), 'CONTENT_TYPE' => 'application/json'
175
+ post '/forest/actions/cheat_action/hooks/change', params: JSON.dump(params), headers: { 'CONTENT_TYPE' => 'application/json' }
155
176
  expect(response.status).to eq(500)
156
177
  end
157
178
 
158
179
  it 'should reset value when enums has changed' do
159
180
  updated_enum = enum.clone.merge({:previousValue => nil, :value => 'a'}) # set value to a
160
181
  p = {recordIds: [1], fields: [updated_foo, updated_enum], collectionName: 'Island', changedField: 'foo'}
161
- post '/forest/actions/enums_action/hooks/change', JSON.dump(p), 'CONTENT_TYPE' => 'application/json'
182
+ post '/forest/actions/enums_action/hooks/change', params: JSON.dump(p), headers: { 'CONTENT_TYPE' => 'application/json' }
162
183
  expect(response.status).to eq(200)
163
184
 
164
185
  expected_enum = updated_enum.clone.merge({ :enums => %w[c d e], :value => nil, :widgetEdit => nil})
@@ -169,6 +190,33 @@ describe 'Requesting Actions routes', :type => :request do
169
190
  expect(JSON.parse(response.body)).to eq({'fields' => [expected_foo.stringify_keys, expected_enum.stringify_keys]})
170
191
  end
171
192
 
193
+ it 'should not reset value when every enum values are in the enums definition' do
194
+ updated_multiple_enum = multiple_enum.clone.merge({:previousValue => nil, :value => %w[c]})
195
+ p = {recordIds: [1], fields: [foo, updated_multiple_enum], collectionName: 'Island', changedField: 'foo'}
196
+ post '/forest/actions/multiple_enums_action/hooks/change', params: JSON.dump(p), headers: { 'CONTENT_TYPE' => 'application/json' }
197
+ expect(response.status).to eq(200)
198
+
199
+ expected_multiple_enum = updated_multiple_enum.clone.merge({ :enums => %w[c d z], :widgetEdit => nil, :value => %w[c]})
200
+ expected_multiple_enum.delete(:widget)
201
+ expected_foo = foo.clone.merge({ :widgetEdit => nil})
202
+ expected_foo.delete(:widget)
203
+
204
+ expect(JSON.parse(response.body)).to eq({'fields' => [expected_foo.stringify_keys, expected_multiple_enum.stringify_keys]})
205
+ end
206
+
207
+ it 'should reset value when one of the enum values is not in the enums definition' do
208
+ wrongly_updated_multiple_enum = multiple_enum.clone.merge({:previousValue => nil, :value => %w[a b]})
209
+ p = {recordIds: [1], fields: [foo, wrongly_updated_multiple_enum], collectionName: 'Island', changedField: 'foo'}
210
+ post '/forest/actions/multiple_enums_action/hooks/change', params: JSON.dump(p), headers: { 'CONTENT_TYPE' => 'application/json' }
211
+ expect(response.status).to eq(200)
212
+
213
+ expected_multiple_enum = wrongly_updated_multiple_enum.clone.merge({ :enums => %w[c d z], :widgetEdit => nil, :value => nil })
214
+ expected_multiple_enum.delete(:widget)
215
+ expected_foo = foo.clone.merge({ :widgetEdit => nil})
216
+ expected_foo.delete(:widget)
217
+
218
+ expect(JSON.parse(response.body)).to eq({'fields' => [expected_foo.stringify_keys, expected_multiple_enum.stringify_keys]})
219
+ end
172
220
  end
173
221
  end
174
- end
222
+ end
@@ -46,12 +46,12 @@ describe 'Requesting Tree resources', :type => :request do
46
46
  }
47
47
 
48
48
  it 'should respond 200' do
49
- get '/forest/Tree', params, headers
49
+ get '/forest/Tree', params: params, headers: headers
50
50
  expect(response.status).to eq(200)
51
51
  end
52
52
 
53
53
  it 'should respond the tree data' do
54
- get '/forest/Tree', params, headers
54
+ get '/forest/Tree', params: params, headers: headers
55
55
  expect(JSON.parse(response.body)).to eq({
56
56
  "data" => [{
57
57
  "type" => "Tree",
@@ -83,12 +83,12 @@ describe 'Requesting Tree resources', :type => :request do
83
83
  }
84
84
 
85
85
  it 'should respond 200' do
86
- get '/forest/Tree', params, headers
86
+ get '/forest/Tree', params: params, headers: headers
87
87
  expect(response.status).to eq(200)
88
88
  end
89
89
 
90
90
  it 'should respond the tree data' do
91
- get '/forest/Tree', params, headers
91
+ get '/forest/Tree', params: params, headers: headers
92
92
  expect(JSON.parse(response.body)).to eq({
93
93
  "data" => [{
94
94
  "type" => "Tree",
@@ -20,7 +20,7 @@ module Dummy
20
20
  # config.i18n.default_locale = :de
21
21
 
22
22
  # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
23
+ # config.active_record.raise_in_transactional_callbacks = true
24
24
  end
25
25
  end
26
26
 
@@ -1,4 +1,4 @@
1
- class CreateDateField < ActiveRecord::Migration
1
+ class CreateDateField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :date_fields do |t|
4
4
  t.date :field
@@ -1,4 +1,4 @@
1
- class CreateIntegerField < ActiveRecord::Migration
1
+ class CreateIntegerField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :integer_fields do |t|
4
4
  t.integer :field
@@ -1,4 +1,4 @@
1
- class CreateDecimalField < ActiveRecord::Migration
1
+ class CreateDecimalField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :decimal_fields do |t|
4
4
  t.decimal :field
@@ -1,4 +1,4 @@
1
- class CreateFloatField < ActiveRecord::Migration
1
+ class CreateFloatField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :float_fields do |t|
4
4
  t.float :field
@@ -1,4 +1,4 @@
1
- class CreateBooleanField < ActiveRecord::Migration
1
+ class CreateBooleanField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :boolean_fields do |t|
4
4
  t.boolean :field
@@ -1,4 +1,4 @@
1
- class CreateStringField < ActiveRecord::Migration
1
+ class CreateStringField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :string_fields do |t|
4
4
  t.string :field
@@ -1,4 +1,4 @@
1
- class CreateBelongsToField < ActiveRecord::Migration
1
+ class CreateBelongsToField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :belongs_to_fields do |t|
4
4
  t.references :has_one_field, index: true
@@ -1,4 +1,4 @@
1
- class CreateHasOneField < ActiveRecord::Migration
1
+ class CreateHasOneField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :has_one_fields do |t|
4
4
  t.boolean :checked
@@ -1,4 +1,4 @@
1
- class CreateHasManyField < ActiveRecord::Migration
1
+ class CreateHasManyField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :has_many_fields do |t|
4
4
  t.references :has_many_through_field, index: true
@@ -1,4 +1,4 @@
1
- class CreateBelongsToClassNameField < ActiveRecord::Migration
1
+ class CreateBelongsToClassNameField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :belongs_to_class_name_fields do |t|
4
4
  t.references :foo, index: true
@@ -1,4 +1,4 @@
1
- class CreateHasAndBelongsToManyField < ActiveRecord::Migration
1
+ class CreateHasAndBelongsToManyField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :has_and_belongs_to_many_fields do |t|
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreatePolymorphicField < ActiveRecord::Migration
1
+ class CreatePolymorphicField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :polymorphic_fields do |t|
4
4
  t.references :has_one_field, index: true
@@ -1,4 +1,4 @@
1
- class CreateHasManyClassNameField < ActiveRecord::Migration
1
+ class CreateHasManyClassNameField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :has_many_class_name_fields do |t|
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateHasManyThroughField < ActiveRecord::Migration
1
+ class CreateHasManyThroughField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :has_many_through_fields do |t|
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateOwner < ActiveRecord::Migration
1
+ class CreateOwner < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :owners do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateTree < ActiveRecord::Migration
1
+ class CreateTree < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :trees do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class AddTimestamps < ActiveRecord::Migration
1
+ class AddTimestamps < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :owners, :created_at, :datetime
4
4
  add_column :owners, :updated_at, :datetime
@@ -1,4 +1,4 @@
1
- class CreateSerializeField < ActiveRecord::Migration
1
+ class CreateSerializeField < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :serialize_fields do |t|
4
4
  t.string :field
@@ -1,4 +1,4 @@
1
- class CreateReferencesTable < ActiveRecord::Migration
1
+ class CreateReferencesTable < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :references do |t|
4
4
  end
@@ -106,7 +106,7 @@ module ForestLiana
106
106
  conditions: [{
107
107
  field: 'created_at',
108
108
  operator: 'after',
109
- value: '2015-06-18 08:00:00',
109
+ value: "#{Time.now.year - 5}-06-18 08:00:00",
110
110
  }, {
111
111
  field: 'owner:name',
112
112
  operator: 'equal',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_liana
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Munda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2021-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -302,6 +302,7 @@ files:
302
302
  - lib/tasks/send_apimap.rake
303
303
  - spec/dummy/README.rdoc
304
304
  - spec/dummy/Rakefile
305
+ - spec/dummy/app/assets/config/manifest.js
305
306
  - spec/dummy/app/assets/javascripts/application.js
306
307
  - spec/dummy/app/assets/stylesheets/application.css
307
308
  - spec/dummy/app/config/routes.rb
@@ -357,6 +358,7 @@ files:
357
358
  - spec/spec_helper.rb
358
359
  - test/dummy/README.rdoc
359
360
  - test/dummy/Rakefile
361
+ - test/dummy/app/assets/config/manifest.js
360
362
  - test/dummy/app/assets/javascripts/application.js
361
363
  - test/dummy/app/assets/stylesheets/application.css
362
364
  - test/dummy/app/controllers/application_controller.rb
@@ -510,6 +512,7 @@ test_files:
510
512
  - test/dummy/app/helpers/application_helper.rb
511
513
  - test/dummy/app/assets/javascripts/application.js
512
514
  - test/dummy/app/assets/stylesheets/application.css
515
+ - test/dummy/app/assets/config/manifest.js
513
516
  - test/dummy/app/controllers/application_controller.rb
514
517
  - test/dummy/Rakefile
515
518
  - test/dummy/bin/rake
@@ -580,6 +583,7 @@ test_files:
580
583
  - spec/dummy/app/helpers/application_helper.rb
581
584
  - spec/dummy/app/assets/javascripts/application.js
582
585
  - spec/dummy/app/assets/stylesheets/application.css
586
+ - spec/dummy/app/assets/config/manifest.js
583
587
  - spec/dummy/app/config/routes.rb
584
588
  - spec/dummy/app/controllers/application_controller.rb
585
589
  - spec/dummy/Rakefile