workarea-core 3.5.5 → 3.5.6

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
  SHA256:
3
- metadata.gz: d47e5bfba5ae31a8628b66da9818d40cc49adb0e3428b0449bddb3a414bc0efc
4
- data.tar.gz: 4336935901cbd99fedf36de8e62ee3d1f842b143bed0d79e0b253be3419c97c2
3
+ metadata.gz: bb5020f2786f93ffc74cafd5726c8c279950df5645b73a4de0e53b8e5347bf12
4
+ data.tar.gz: f1f6c1f0e95915279dbd825021d1ac4ed6461d99f6f3746daadcdd28ef89a2a7
5
5
  SHA512:
6
- metadata.gz: 22c46296fa0ad6e75263909fe7793134219c05122077f2d6d58a1f4a493e425861f7051bbbb5684984bb34f7f0c9f80151fd44c9e8eb7b79868ccd2a8304a576
7
- data.tar.gz: 11bea33230c8001e5d2f8841729b065600bd89d6faa22be3d5cf5183dfe4e065739cce4b52f664f3edacbe010ed5ddd87c78ef0d32bafdfe4de90d7638dff272
6
+ metadata.gz: 97c8c17c68a43238a384073d9b9f3365635cf4577cd7e2d11fae11476548b69840eb903bcb4aabcffe07b23b8f93e12fc7724a5b809df5ed772415050ac41125
7
+ data.tar.gz: 395b8ae08cb06235e4a60e7a9cbac02c30b9db5022863903ae8b3affee561ecc5b204e0c492f41983df5ac0b224c17fce79cb1f0225f5ea518b4f47428f6dfdd
@@ -58,8 +58,31 @@ module Workarea
58
58
  end
59
59
 
60
60
  def process
61
+ add_previous_week_insights
62
+ add_previous_month_insights
63
+
61
64
  ProcessProductRecommendations.new.perform
62
65
  GenerateInsights.generate_all!
63
66
  end
67
+
68
+ def add_previous_week_insights
69
+ (1...12).each do |weeks|
70
+ travel_to weeks.weeks.ago
71
+
72
+ GenerateInsights.generate_weekly_insights
73
+
74
+ travel_back
75
+ end
76
+ end
77
+
78
+ def add_previous_month_insights
79
+ (1...3).each do |months|
80
+ travel_to months.months.ago
81
+
82
+ GenerateInsights.generate_monthly_insights
83
+
84
+ travel_back
85
+ end
86
+ end
64
87
  end
65
88
  end
@@ -36,12 +36,13 @@ module Workarea
36
36
  user.addresses.create!(
37
37
  first_name: user.first_name,
38
38
  last_name: user.last_name,
39
- street: '22 S. 3rd St.',
40
- city: 'Philadelphia',
41
- postal_code: '19106',
42
- region: 'PA',
39
+ street: Faker::Address.street_address,
40
+ city: Faker::Address.city,
41
+ postal_code: Faker::Address.zip_code,
42
+ region: Faker::Address.state_abbr,
43
43
  country: 'US',
44
- phone_number: '2159251800'
44
+ phone_number: Faker::PhoneNumber.cell_phone,
45
+ phone_extension: Faker::PhoneNumber.extension
45
46
  )
46
47
  end
47
48
 
@@ -2,7 +2,7 @@ module Workarea
2
2
  module VERSION
3
3
  MAJOR = 3
4
4
  MINOR = 5
5
- PATCH = 5
5
+ PATCH = 6
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.5
4
+ version: 3.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Crouse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-21 00:00:00.000000000 Z
11
+ date: 2020-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler