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 +4 -4
- data/app/seeds/workarea/insights_seeds.rb +23 -0
- data/app/seeds/workarea/orders_seeds.rb +6 -5
- data/lib/workarea/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb5020f2786f93ffc74cafd5726c8c279950df5645b73a4de0e53b8e5347bf12
|
4
|
+
data.tar.gz: f1f6c1f0e95915279dbd825021d1ac4ed6461d99f6f3746daadcdd28ef89a2a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
40
|
-
city:
|
41
|
-
postal_code:
|
42
|
-
region:
|
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:
|
44
|
+
phone_number: Faker::PhoneNumber.cell_phone,
|
45
|
+
phone_extension: Faker::PhoneNumber.extension
|
45
46
|
)
|
46
47
|
end
|
47
48
|
|
data/lib/workarea/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|