spree_sample 3.4.4 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/db/samples/taxons.rb +6 -5
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 414a76ab429e62accf7f2320b66653829eca5b3e
4
- data.tar.gz: d58d2ab1fd7c7042080ac8435c06a2ab01eb247c
3
+ metadata.gz: c0c1a7f26623704af640938a2e828555c6912b6a
4
+ data.tar.gz: d3c4b585777348bab90c1a003dc58f5d351fbda0
5
5
  SHA512:
6
- metadata.gz: 1f255a5ea33ead7845f1a181be0b242cc7ce439dc667c694c45f49ca593e62df5899afbb780e6687736075f80a795ee38bf19af7ecfc8095ba6f54b54adf2cd1
7
- data.tar.gz: 79f131dacc59a5d9284d7e6fca28abc110d6981f401556323cfc5d5ddc216f29077befa6760438f7b278265d24f01c883ea6195471422eeb1499e67a1f136fdb
6
+ metadata.gz: d0ea37a96a212daf1a7d5e588d80449e154f6b80ed9e3dc5238cc1e56d9564f0d44fb2347635d45a373c7649bdd3990fd4f8e52bd22f371b0f019d83afc7b80f
7
+ data.tar.gz: 3458dc9ab711541505691d83a684d4b16657d1bdbc3bbaf1e4fc5518e54cc223ac245eee3e05edc620869b01dcbe5df046d575fce7558daa6eae07b5045eb848
data/db/samples/taxons.rb CHANGED
@@ -139,9 +139,10 @@ taxons = [
139
139
  taxons.each do |taxon_attrs|
140
140
  parent = Spree::Taxon.where(name: taxon_attrs[:parent]).first
141
141
  taxonomy = taxon_attrs[:taxonomy]
142
- Spree::Taxon.where(name: taxon_attrs[:name]).first_or_create! do |taxon|
143
- taxon.parent = parent
144
- taxon.taxonomy = taxonomy
145
- taxon.products = taxon_attrs[:products] if taxon_attrs[:products]
146
- end
142
+
143
+ taxon = Spree::Taxon.where(name: taxon_attrs[:name]).first_or_create!
144
+ taxon.parent = parent
145
+ taxon.taxonomy = taxonomy
146
+ taxon.save
147
+ taxon.products = taxon_attrs[:products] if taxon_attrs[:products]
147
148
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_sample
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.4
4
+ version: 3.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-15 00:00:00.000000000 Z
11
+ date: 2018-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.4.4
19
+ version: 3.4.5
20
20
  type: :runtime
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: 3.4.4
26
+ version: 3.4.5
27
27
  description: Required dependency for Spree
28
28
  email: sean@spreecommerce.com
29
29
  executables: []