Small fixes
This commit is contained in:
parent
1a695b795e
commit
a306f72215
90
Gemfile.lock
90
Gemfile.lock
@ -61,11 +61,11 @@ GEM
|
|||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
zeitwerk (~> 2.3)
|
||||||
bcrypt (3.1.16)
|
bcrypt (3.1.16)
|
||||||
bootsnap (1.7.5)
|
bootsnap (1.10.3)
|
||||||
msgpack (~> 1.0)
|
msgpack (~> 1.2)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
concurrent-ruby (1.1.8)
|
concurrent-ruby (1.1.9)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
dalli (2.7.11)
|
dalli (2.7.11)
|
||||||
database_cleaner (2.0.1)
|
database_cleaner (2.0.1)
|
||||||
@ -74,17 +74,17 @@ GEM
|
|||||||
activerecord (>= 5.a)
|
activerecord (>= 5.a)
|
||||||
database_cleaner-core (~> 2.0.0)
|
database_cleaner-core (~> 2.0.0)
|
||||||
database_cleaner-core (2.0.1)
|
database_cleaner-core (2.0.1)
|
||||||
diff-lcs (1.4.4)
|
diff-lcs (1.5.0)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
factory_bot (6.2.0)
|
factory_bot (6.2.0)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
factory_bot_rails (6.2.0)
|
factory_bot_rails (6.2.0)
|
||||||
factory_bot (~> 6.2.0)
|
factory_bot (~> 6.2.0)
|
||||||
railties (>= 5.0.0)
|
railties (>= 5.0.0)
|
||||||
ffi (1.15.0)
|
ffi (1.15.5)
|
||||||
formatador (0.2.5)
|
formatador (1.1.0)
|
||||||
globalid (0.4.2)
|
globalid (1.0.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 5.0)
|
||||||
guard (2.16.2)
|
guard (2.16.2)
|
||||||
formatador (>= 0.2.4)
|
formatador (>= 0.2.4)
|
||||||
listen (>= 2.7, < 4.0)
|
listen (>= 2.7, < 4.0)
|
||||||
@ -99,57 +99,57 @@ GEM
|
|||||||
guard (~> 2.1)
|
guard (~> 2.1)
|
||||||
guard-compat (~> 1.1)
|
guard-compat (~> 1.1)
|
||||||
rspec (>= 2.99.0, < 4.0)
|
rspec (>= 2.99.0, < 4.0)
|
||||||
i18n (1.8.10)
|
i18n (1.9.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
kaminari (1.2.1)
|
kaminari (1.2.2)
|
||||||
activesupport (>= 4.1.0)
|
activesupport (>= 4.1.0)
|
||||||
kaminari-actionview (= 1.2.1)
|
kaminari-actionview (= 1.2.2)
|
||||||
kaminari-activerecord (= 1.2.1)
|
kaminari-activerecord (= 1.2.2)
|
||||||
kaminari-core (= 1.2.1)
|
kaminari-core (= 1.2.2)
|
||||||
kaminari-actionview (1.2.1)
|
kaminari-actionview (1.2.2)
|
||||||
actionview
|
actionview
|
||||||
kaminari-core (= 1.2.1)
|
kaminari-core (= 1.2.2)
|
||||||
kaminari-activerecord (1.2.1)
|
kaminari-activerecord (1.2.2)
|
||||||
activerecord
|
activerecord
|
||||||
kaminari-core (= 1.2.1)
|
kaminari-core (= 1.2.2)
|
||||||
kaminari-core (1.2.1)
|
kaminari-core (1.2.2)
|
||||||
liner (0.2.4)
|
liner (0.2.4)
|
||||||
listen (3.5.1)
|
listen (3.7.1)
|
||||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.10)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
loofah (2.9.1)
|
loofah (2.13.0)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
lumberjack (1.2.8)
|
lumberjack (1.2.8)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (1.0.1)
|
marcel (1.0.2)
|
||||||
memoizable (0.4.2)
|
memoizable (0.4.2)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.0.3)
|
mini_mime (1.0.3)
|
||||||
mini_portile2 (2.5.1)
|
mini_portile2 (2.7.1)
|
||||||
minitest (5.14.4)
|
minitest (5.15.0)
|
||||||
msgpack (1.4.2)
|
msgpack (1.4.4)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
nio4r (2.5.7)
|
nio4r (2.5.8)
|
||||||
nokogiri (1.11.3)
|
nokogiri (1.13.1)
|
||||||
mini_portile2 (~> 2.5.0)
|
mini_portile2 (~> 2.7.0)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
notiffany (0.1.3)
|
notiffany (0.1.3)
|
||||||
nenv (~> 0.1)
|
nenv (~> 0.1)
|
||||||
shellany (~> 0.0)
|
shellany (~> 0.0)
|
||||||
oj (3.11.5)
|
oj (3.11.8)
|
||||||
parslet (1.8.2)
|
parslet (1.8.2)
|
||||||
pg (1.2.3)
|
pg (1.2.3)
|
||||||
pry (0.14.1)
|
pry (0.14.1)
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
puma (5.3.0)
|
puma (5.6.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.5.2)
|
racc (1.6.0)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-proxy (0.6.5)
|
rack-proxy (0.7.2)
|
||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
@ -175,7 +175,7 @@ GEM
|
|||||||
rails-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.3.0)
|
rails-html-sanitizer (1.4.2)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
railties (6.1.3.2)
|
railties (6.1.3.2)
|
||||||
actionpack (= 6.1.3.2)
|
actionpack (= 6.1.3.2)
|
||||||
@ -183,7 +183,7 @@ GEM
|
|||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
rake (13.0.3)
|
rake (13.0.6)
|
||||||
rb-fsevent (0.11.0)
|
rb-fsevent (0.11.0)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
@ -192,15 +192,15 @@ GEM
|
|||||||
rspec-core (~> 3.10.0)
|
rspec-core (~> 3.10.0)
|
||||||
rspec-expectations (~> 3.10.0)
|
rspec-expectations (~> 3.10.0)
|
||||||
rspec-mocks (~> 3.10.0)
|
rspec-mocks (~> 3.10.0)
|
||||||
rspec-core (3.10.1)
|
rspec-core (3.10.2)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-expectations (3.10.1)
|
rspec-expectations (3.10.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-mocks (3.10.2)
|
rspec-mocks (3.10.3)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.10.0)
|
rspec-support (~> 3.10.0)
|
||||||
rspec-rails (5.0.1)
|
rspec-rails (5.0.3)
|
||||||
actionpack (>= 5.2)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 5.2)
|
activesupport (>= 5.2)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
@ -208,23 +208,23 @@ GEM
|
|||||||
rspec-expectations (~> 3.10)
|
rspec-expectations (~> 3.10)
|
||||||
rspec-mocks (~> 3.10)
|
rspec-mocks (~> 3.10)
|
||||||
rspec-support (~> 3.10)
|
rspec-support (~> 3.10)
|
||||||
rspec-support (3.10.2)
|
rspec-support (3.10.3)
|
||||||
semantic_range (3.0.0)
|
semantic_range (3.0.0)
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
signed_multiset (0.2.1)
|
signed_multiset (0.2.1)
|
||||||
sprockets (4.0.2)
|
sprockets (4.0.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
sprockets-rails (3.2.2)
|
sprockets-rails (3.4.2)
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 5.2)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 5.2)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.4.2)
|
sqlite3 (1.4.2)
|
||||||
thor (1.1.0)
|
thor (1.2.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
tzinfo-data (1.2021.1)
|
tzinfo-data (1.2021.5)
|
||||||
tzinfo (>= 1.0.0)
|
tzinfo (>= 1.0.0)
|
||||||
unitwise (2.2.0)
|
unitwise (2.2.0)
|
||||||
liner (~> 0.2)
|
liner (~> 0.2)
|
||||||
@ -236,10 +236,10 @@ GEM
|
|||||||
rack-proxy (>= 0.6.1)
|
rack-proxy (>= 0.6.1)
|
||||||
railties (>= 5.2)
|
railties (>= 5.2)
|
||||||
semantic_range (>= 2.3.0)
|
semantic_range (>= 2.3.0)
|
||||||
websocket-driver (0.7.3)
|
websocket-driver (0.7.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.5)
|
websocket-extensions (0.1.5)
|
||||||
zeitwerk (2.4.2)
|
zeitwerk (2.5.4)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -216,7 +216,7 @@
|
|||||||
if (this.isSourceUrl) {
|
if (this.isSourceUrl) {
|
||||||
return this.sourceUrl.host;
|
return this.sourceUrl.host;
|
||||||
} else {
|
} else {
|
||||||
return this.source;
|
return this.recipe.source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -244,7 +244,6 @@
|
|||||||
]),
|
]),
|
||||||
|
|
||||||
addRecipeToList(list) {
|
addRecipeToList(list) {
|
||||||
console.log(list);
|
|
||||||
api.addRecipeToTaskList(list.id, this.recipe.id)
|
api.addRecipeToTaskList(list.id, this.recipe.id)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.setCurrentTaskList(list);
|
this.setCurrentTaskList(list);
|
||||||
|
@ -18,7 +18,7 @@ class TaskList < ApplicationRecord
|
|||||||
if ri.ingredient.is_a?(Recipe)
|
if ri.ingredient.is_a?(Recipe)
|
||||||
add_recipe_ingredients(ri.ingredient, recurse_depth + 1)
|
add_recipe_ingredients(ri.ingredient, recurse_depth + 1)
|
||||||
else
|
else
|
||||||
item = self.task_items.detect { |i| i.name.downcase == ri.name.downcase } || TaskItem.new(name: ri.name, task_list: self)
|
item = self.task_items.detect { |i| i.name.downcase == ri.name.downcase } || task_items.build(name: ri.name)
|
||||||
quantity_str = [ri.quantity, ri.units].delete_if { |i| i.blank? }.join(' ')
|
quantity_str = [ri.quantity, ri.units].delete_if { |i| i.blank? }.join(' ')
|
||||||
if item.quantity.blank?
|
if item.quantity.blank?
|
||||||
item.quantity = quantity_str
|
item.quantity = quantity_str
|
||||||
|
Loading…
Reference in New Issue
Block a user