mvpkit 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -267
- data/VERSION +1 -1
- data/mvpkit.gemspec +3 -8
- data/project/app/controllers/concerns/analytics_concern.rb +58 -60
- data/project/app/controllers/concerns/seo_concern.rb +16 -18
- data/project/app/controllers/concerns/session_concern.rb +17 -19
- data/project/app/controllers/seo_controller.rb +1 -1
- data/project/config/initializers/canonical_host.rb +2 -2
- data/project/package.json +1 -0
- data/project/yarn.lock +13 -0
- metadata +2 -7
- data/project/app/engines/admin/test/admin_test.rb +0 -7
- data/project/app/engines/admin/test/controllers/admin/conversions_controller_test.rb +0 -52
- data/project/app/engines/admin/test/controllers/admin/users_controller_test.rb +0 -52
- data/project/app/engines/admin/test/integration/navigation_test.rb +0 -8
- data/project/app/engines/admin/test/test_helper.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74ac40d8034b41251d502e5dedb82c2ad8e6276
|
4
|
+
data.tar.gz: 338c0bc0424df146c492eefc0a6c6bf242c632b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0381087c3379d6f0e827eff05477df3365c916809ef4abbdac97c76501a29b3e3045de921b9edbc4f4d8ccd099de73fb479bc1e6dc7ac36bdda1c5d6a66c79f
|
7
|
+
data.tar.gz: 8e77fe87ae3e0de1064c465da896bf9c7cae515d89f2dd68e817e7742a906cd76f3630c10cc98386a5a11dd0f9df2e3cb2005ef24089b4be42b842f4e4fca01c
|
data/Gemfile.lock
CHANGED
@@ -1,189 +1,13 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
CFPropertyList (2.3.5)
|
5
|
-
actionpack (5.0.1)
|
6
|
-
actionview (= 5.0.1)
|
7
|
-
activesupport (= 5.0.1)
|
8
|
-
rack (~> 2.0)
|
9
|
-
rack-test (~> 0.6.3)
|
10
|
-
rails-dom-testing (~> 2.0)
|
11
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
12
|
-
actionview (5.0.1)
|
13
|
-
activesupport (= 5.0.1)
|
14
|
-
builder (~> 3.1)
|
15
|
-
erubis (~> 2.7.0)
|
16
|
-
rails-dom-testing (~> 2.0)
|
17
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
18
|
-
activemodel (5.0.1)
|
19
|
-
activesupport (= 5.0.1)
|
20
|
-
activesupport (5.0.1)
|
21
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
-
i18n (~> 0.7)
|
23
|
-
minitest (~> 5.1)
|
24
|
-
tzinfo (~> 1.1)
|
25
4
|
addressable (2.5.0)
|
26
5
|
public_suffix (~> 2.0, >= 2.0.2)
|
27
|
-
aws_cf_signer (0.1.3)
|
28
|
-
better_errors (2.1.1)
|
29
|
-
coderay (>= 1.0.0)
|
30
|
-
erubis (>= 2.6.6)
|
31
|
-
rack (>= 0.9.0)
|
32
|
-
binding_of_caller (0.7.2)
|
33
|
-
debug_inspector (>= 0.0.1)
|
34
6
|
builder (3.2.3)
|
35
|
-
bullet (5.4.0)
|
36
|
-
activesupport (>= 3.0.0)
|
37
|
-
uniform_notifier (~> 1.10.0)
|
38
|
-
byebug (9.0.6)
|
39
|
-
carrierwave (1.0.0)
|
40
|
-
activemodel (>= 4.0.0)
|
41
|
-
activesupport (>= 4.0.0)
|
42
|
-
mime-types (>= 1.16)
|
43
|
-
cloudinary (1.5.2)
|
44
|
-
aws_cf_signer
|
45
|
-
json (~> 1.8)
|
46
|
-
rest-client (< 2.0)
|
47
|
-
coderay (1.1.1)
|
48
|
-
concurrent-ruby (1.0.4)
|
49
|
-
debug_inspector (0.0.2)
|
50
7
|
descendants_tracker (0.0.4)
|
51
8
|
thread_safe (~> 0.3, >= 0.3.1)
|
52
|
-
domain_name (0.5.20161129)
|
53
|
-
unf (>= 0.0.5, < 1.0.0)
|
54
|
-
erubis (2.7.0)
|
55
|
-
excon (0.55.0)
|
56
9
|
faraday (0.9.2)
|
57
10
|
multipart-post (>= 1.2, < 3)
|
58
|
-
fission (0.5.0)
|
59
|
-
CFPropertyList (~> 2.2)
|
60
|
-
fog (1.38.0)
|
61
|
-
fog-aliyun (>= 0.1.0)
|
62
|
-
fog-atmos
|
63
|
-
fog-aws (>= 0.6.0)
|
64
|
-
fog-brightbox (~> 0.4)
|
65
|
-
fog-cloudatcost (~> 0.1.0)
|
66
|
-
fog-core (~> 1.32)
|
67
|
-
fog-dynect (~> 0.0.2)
|
68
|
-
fog-ecloud (~> 0.1)
|
69
|
-
fog-google (<= 0.1.0)
|
70
|
-
fog-json
|
71
|
-
fog-local
|
72
|
-
fog-openstack
|
73
|
-
fog-powerdns (>= 0.1.1)
|
74
|
-
fog-profitbricks
|
75
|
-
fog-rackspace
|
76
|
-
fog-radosgw (>= 0.0.2)
|
77
|
-
fog-riakcs
|
78
|
-
fog-sakuracloud (>= 0.0.4)
|
79
|
-
fog-serverlove
|
80
|
-
fog-softlayer
|
81
|
-
fog-storm_on_demand
|
82
|
-
fog-terremark
|
83
|
-
fog-vmfusion
|
84
|
-
fog-voxel
|
85
|
-
fog-vsphere (>= 0.4.0)
|
86
|
-
fog-xenserver
|
87
|
-
fog-xml (~> 0.1.1)
|
88
|
-
ipaddress (~> 0.5)
|
89
|
-
fog-aliyun (0.1.0)
|
90
|
-
fog-core (~> 1.27)
|
91
|
-
fog-json (~> 1.0)
|
92
|
-
ipaddress (~> 0.8)
|
93
|
-
xml-simple (~> 1.1)
|
94
|
-
fog-atmos (0.1.0)
|
95
|
-
fog-core
|
96
|
-
fog-xml
|
97
|
-
fog-aws (1.2.0)
|
98
|
-
fog-core (~> 1.38)
|
99
|
-
fog-json (~> 1.0)
|
100
|
-
fog-xml (~> 0.1)
|
101
|
-
ipaddress (~> 0.8)
|
102
|
-
fog-brightbox (0.11.0)
|
103
|
-
fog-core (~> 1.22)
|
104
|
-
fog-json
|
105
|
-
inflecto (~> 0.0.2)
|
106
|
-
fog-cloudatcost (0.1.2)
|
107
|
-
fog-core (~> 1.36)
|
108
|
-
fog-json (~> 1.0)
|
109
|
-
fog-xml (~> 0.1)
|
110
|
-
ipaddress (~> 0.8)
|
111
|
-
fog-core (1.43.0)
|
112
|
-
builder
|
113
|
-
excon (~> 0.49)
|
114
|
-
formatador (~> 0.2)
|
115
|
-
fog-dynect (0.0.3)
|
116
|
-
fog-core
|
117
|
-
fog-json
|
118
|
-
fog-xml
|
119
|
-
fog-ecloud (0.3.0)
|
120
|
-
fog-core
|
121
|
-
fog-xml
|
122
|
-
fog-google (0.1.0)
|
123
|
-
fog-core
|
124
|
-
fog-json
|
125
|
-
fog-xml
|
126
|
-
fog-json (1.0.2)
|
127
|
-
fog-core (~> 1.0)
|
128
|
-
multi_json (~> 1.10)
|
129
|
-
fog-local (0.3.1)
|
130
|
-
fog-core (~> 1.27)
|
131
|
-
fog-openstack (0.1.19)
|
132
|
-
fog-core (>= 1.40)
|
133
|
-
fog-json (>= 1.0)
|
134
|
-
ipaddress (>= 0.8)
|
135
|
-
fog-powerdns (0.1.1)
|
136
|
-
fog-core (~> 1.27)
|
137
|
-
fog-json (~> 1.0)
|
138
|
-
fog-xml (~> 0.1)
|
139
|
-
fog-profitbricks (3.0.0)
|
140
|
-
fog-core (~> 1.42)
|
141
|
-
fog-json (~> 1.0)
|
142
|
-
fog-rackspace (0.1.4)
|
143
|
-
fog-core (>= 1.35)
|
144
|
-
fog-json (>= 1.0)
|
145
|
-
fog-xml (>= 0.1)
|
146
|
-
ipaddress (>= 0.8)
|
147
|
-
fog-radosgw (0.0.5)
|
148
|
-
fog-core (>= 1.21.0)
|
149
|
-
fog-json
|
150
|
-
fog-xml (>= 0.0.1)
|
151
|
-
fog-riakcs (0.1.0)
|
152
|
-
fog-core
|
153
|
-
fog-json
|
154
|
-
fog-xml
|
155
|
-
fog-sakuracloud (1.7.5)
|
156
|
-
fog-core
|
157
|
-
fog-json
|
158
|
-
fog-serverlove (0.1.2)
|
159
|
-
fog-core
|
160
|
-
fog-json
|
161
|
-
fog-softlayer (1.1.4)
|
162
|
-
fog-core
|
163
|
-
fog-json
|
164
|
-
fog-storm_on_demand (0.1.1)
|
165
|
-
fog-core
|
166
|
-
fog-json
|
167
|
-
fog-terremark (0.1.0)
|
168
|
-
fog-core
|
169
|
-
fog-xml
|
170
|
-
fog-vmfusion (0.1.0)
|
171
|
-
fission
|
172
|
-
fog-core
|
173
|
-
fog-voxel (0.1.0)
|
174
|
-
fog-core
|
175
|
-
fog-xml
|
176
|
-
fog-vsphere (1.7.1)
|
177
|
-
fog-core
|
178
|
-
rbvmomi (~> 1.9)
|
179
|
-
fog-xenserver (0.2.3)
|
180
|
-
fog-core
|
181
|
-
fog-xml
|
182
|
-
fog-xml (0.1.2)
|
183
|
-
fog-core
|
184
|
-
nokogiri (~> 1.5, >= 1.5.11)
|
185
|
-
formatador (0.2.5)
|
186
|
-
geocoder (1.4.3)
|
187
11
|
git (1.3.0)
|
188
12
|
github_api (0.11.3)
|
189
13
|
addressable (~> 2.3)
|
@@ -195,11 +19,6 @@ GEM
|
|
195
19
|
oauth2
|
196
20
|
hashie (3.5.5)
|
197
21
|
highline (1.7.8)
|
198
|
-
http-cookie (1.0.3)
|
199
|
-
domain_name (~> 0.5)
|
200
|
-
i18n (0.8.1)
|
201
|
-
inflecto (0.0.2)
|
202
|
-
ipaddress (0.8.3)
|
203
22
|
jeweler (2.3.3)
|
204
23
|
builder
|
205
24
|
bundler (>= 1.0)
|
@@ -211,18 +30,11 @@ GEM
|
|
211
30
|
rake
|
212
31
|
rdoc
|
213
32
|
semver2
|
214
|
-
json (1.8.6)
|
215
33
|
jwt (1.5.6)
|
216
|
-
loofah (2.0.3)
|
217
|
-
nokogiri (>= 1.5.9)
|
218
|
-
method_source (0.8.2)
|
219
|
-
mime-types (2.99.3)
|
220
34
|
mini_portile2 (2.1.0)
|
221
|
-
minitest (5.10.1)
|
222
35
|
multi_json (1.12.1)
|
223
36
|
multi_xml (0.6.0)
|
224
37
|
multipart-post (2.0.0)
|
225
|
-
netrc (0.11.0)
|
226
38
|
nokogiri (1.6.8.1)
|
227
39
|
mini_portile2 (~> 2.1.0)
|
228
40
|
oauth2 (1.3.0)
|
@@ -234,96 +46,18 @@ GEM
|
|
234
46
|
psych (2.2.4)
|
235
47
|
public_suffix (2.0.5)
|
236
48
|
rack (2.0.1)
|
237
|
-
rack-canonical-host (0.2.2)
|
238
|
-
addressable (> 0, < 3)
|
239
|
-
rack (>= 1.0.0, < 3)
|
240
|
-
rack-ssl-enforcer (0.2.9)
|
241
|
-
rack-test (0.6.3)
|
242
|
-
rack (>= 1.0)
|
243
|
-
rails-dom-testing (2.0.2)
|
244
|
-
activesupport (>= 4.2.0, < 6.0)
|
245
|
-
nokogiri (~> 1.6)
|
246
|
-
rails-html-sanitizer (1.0.3)
|
247
|
-
loofah (~> 2.0)
|
248
|
-
railties (5.0.1)
|
249
|
-
actionpack (= 5.0.1)
|
250
|
-
activesupport (= 5.0.1)
|
251
|
-
method_source
|
252
|
-
rake (>= 0.8.7)
|
253
|
-
thor (>= 0.18.1, < 2.0)
|
254
49
|
rake (12.0.0)
|
255
|
-
rbvmomi (1.9.4)
|
256
|
-
builder (~> 3.2)
|
257
|
-
json (>= 1.8)
|
258
|
-
nokogiri (~> 1.5)
|
259
|
-
trollop (~> 2.1)
|
260
50
|
rdoc (5.1.0)
|
261
|
-
rest-client (1.8.0)
|
262
|
-
http-cookie (>= 1.0.2, < 2.0)
|
263
|
-
mime-types (>= 1.16, < 3.0)
|
264
|
-
netrc (~> 0.7)
|
265
|
-
rollbar (2.14.1)
|
266
|
-
multi_json
|
267
|
-
sass (3.4.23)
|
268
|
-
sass-rails (5.0.6)
|
269
|
-
railties (>= 4.0.0, < 6)
|
270
|
-
sass (~> 3.1)
|
271
|
-
sprockets (>= 2.8, < 4.0)
|
272
|
-
sprockets-rails (>= 2.0, < 4.0)
|
273
|
-
tilt (>= 1.1, < 3)
|
274
51
|
semantic (1.6.0)
|
275
52
|
semver2 (3.4.2)
|
276
|
-
sitemap_generator (5.3.0)
|
277
|
-
builder (~> 3.0)
|
278
|
-
slack-notifier (2.0.0)
|
279
|
-
sprockets (3.7.1)
|
280
|
-
concurrent-ruby (~> 1.0)
|
281
|
-
rack (> 1, < 3)
|
282
|
-
sprockets-rails (3.2.0)
|
283
|
-
actionpack (>= 4.0)
|
284
|
-
activesupport (>= 4.0)
|
285
|
-
sprockets (>= 3.0.0)
|
286
|
-
thor (0.19.4)
|
287
53
|
thread_safe (0.3.6)
|
288
|
-
tilt (2.0.6)
|
289
|
-
trollop (2.1.2)
|
290
|
-
tzinfo (1.2.2)
|
291
|
-
thread_safe (~> 0.1)
|
292
|
-
unf (0.1.4)
|
293
|
-
unf_ext
|
294
|
-
unf_ext (0.0.7.2)
|
295
|
-
uniform_notifier (1.10.0)
|
296
|
-
web-console (2.3.0)
|
297
|
-
activemodel (>= 4.0)
|
298
|
-
binding_of_caller (>= 0.7.2)
|
299
|
-
railties (>= 4.0)
|
300
|
-
sprockets-rails (>= 2.0, < 4.0)
|
301
|
-
xml-simple (1.1.5)
|
302
54
|
|
303
55
|
PLATFORMS
|
304
56
|
ruby
|
305
57
|
|
306
58
|
DEPENDENCIES
|
307
|
-
better_errors
|
308
|
-
binding_of_caller
|
309
|
-
bullet
|
310
|
-
byebug
|
311
|
-
carrierwave
|
312
|
-
cloudinary
|
313
|
-
faraday
|
314
|
-
fog
|
315
|
-
fog-aws
|
316
|
-
geocoder
|
317
|
-
hashie
|
318
59
|
jeweler (~> 2.3.2)
|
319
|
-
rack-canonical-host
|
320
|
-
rack-ssl-enforcer
|
321
|
-
rollbar
|
322
|
-
sass-rails (~> 5.0)
|
323
60
|
semantic
|
324
|
-
sitemap_generator
|
325
|
-
slack-notifier
|
326
|
-
web-console (~> 2.0)
|
327
61
|
|
328
62
|
BUNDLED WITH
|
329
|
-
1.
|
63
|
+
1.15.4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/mvpkit.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mvpkit 2.0.
|
5
|
+
# stub: mvpkit 2.0.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mvpkit".freeze
|
9
|
-
s.version = "2.0.
|
9
|
+
s.version = "2.0.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Ian Hunter".freeze]
|
14
|
-
s.date = "2017-
|
14
|
+
s.date = "2017-11-28"
|
15
15
|
s.description = "Built for Developers. Ideal for MVPs, product ideation and validation.".freeze
|
16
16
|
s.email = "ianhunter@gmail.com".freeze
|
17
17
|
s.executables = ["mvp".freeze]
|
@@ -119,11 +119,6 @@ Gem::Specification.new do |s|
|
|
119
119
|
"project/app/engines/admin/lib/admin/engine.rb",
|
120
120
|
"project/app/engines/admin/lib/admin/version.rb",
|
121
121
|
"project/app/engines/admin/lib/tasks/admin_tasks.rake",
|
122
|
-
"project/app/engines/admin/test/admin_test.rb",
|
123
|
-
"project/app/engines/admin/test/controllers/admin/conversions_controller_test.rb",
|
124
|
-
"project/app/engines/admin/test/controllers/admin/users_controller_test.rb",
|
125
|
-
"project/app/engines/admin/test/integration/navigation_test.rb",
|
126
|
-
"project/app/engines/admin/test/test_helper.rb",
|
127
122
|
"project/app/helpers/application_helper.rb",
|
128
123
|
"project/app/javascript/components/.gitkeep",
|
129
124
|
"project/app/javascript/components/conversion.jsx",
|
@@ -1,78 +1,76 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
extend ActiveSupport::Concern
|
1
|
+
module AnalyticsConcern
|
2
|
+
extend ActiveSupport::Concern
|
4
3
|
|
5
|
-
|
4
|
+
INVISIBLE_SESSION_COOKIE = 'invisible'
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
included do
|
7
|
+
before_action :generate_uid_if_not_set
|
8
|
+
helper_method :analytics_id
|
9
|
+
helper_method :analytics_identify_events
|
10
|
+
helper_method :analytics_track_events
|
11
|
+
end
|
13
12
|
|
14
|
-
|
15
|
-
|
13
|
+
def identify!(id, properties={})
|
14
|
+
return if session[INVISIBLE_SESSION_COOKIE].to_b == true
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
events = flash['__analytics_identify_events'] ||= []
|
17
|
+
events << {
|
18
|
+
'id': id,
|
19
|
+
'properties': properties
|
20
|
+
}
|
21
|
+
flash['__analytics_identify_events'] = events
|
22
|
+
end
|
24
23
|
|
25
|
-
|
26
|
-
|
24
|
+
def track!(event, properties={})
|
25
|
+
return if session[INVISIBLE_SESSION_COOKIE].to_b == true
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
27
|
+
events = flash['__analytics_track_events'] ||= []
|
28
|
+
events << {
|
29
|
+
'name': event,
|
30
|
+
'properties': properties.reverse_merge({
|
31
|
+
iteration: MVP::Iteration.version,
|
32
|
+
user: current_user.try(:name),
|
33
|
+
url: request.fullpath
|
34
|
+
})
|
35
|
+
}
|
36
|
+
flash['__analytics_track_events'] = events
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
def slack!(message, properties=nil)
|
40
|
+
if ENV['SLACK_WEBHOOK_URL']
|
41
|
+
_msg = [message]
|
42
|
+
_msg << properties.inspect if properties
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
44
|
+
begin
|
45
|
+
slack_notifier.ping _msg.join(' ')
|
46
|
+
rescue
|
47
|
+
slack_notifier.ping "Tried to use slack messaging but failure happened"
|
50
48
|
end
|
51
49
|
end
|
50
|
+
end
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
def analytics_identify_events
|
53
|
+
flash['__analytics_identify_events'] ||= []
|
54
|
+
flash['__analytics_identify_events']
|
55
|
+
end
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
def analytics_track_events
|
58
|
+
flash['__analytics_track_events'] ||= []
|
59
|
+
flash['__analytics_track_events']
|
60
|
+
end
|
62
61
|
|
63
|
-
|
62
|
+
private
|
64
63
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
64
|
+
def slack_notifier
|
65
|
+
Slack::Notifier.new ENV['SLACK_WEBHOOK_URL'], channel: ENV['SLACK_POST_CHANNEL'],
|
66
|
+
username: ENV['SLACK_POST_USERNAME']
|
67
|
+
end
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
69
|
+
def analytics_id
|
70
|
+
cookies[:uid]
|
71
|
+
end
|
73
72
|
|
74
|
-
|
75
|
-
|
76
|
-
end
|
73
|
+
def generate_uid_if_not_set
|
74
|
+
cookies[:uid] = SecureRandom.uuid unless cookies[:uid].present?
|
77
75
|
end
|
78
76
|
end
|
@@ -1,25 +1,23 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
extend ActiveSupport::Concern
|
1
|
+
module SEOConcern
|
2
|
+
extend ActiveSupport::Concern
|
4
3
|
|
5
|
-
|
4
|
+
private
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
included do
|
7
|
+
before_action :force_no_trailing_slash
|
8
|
+
helper_method :page
|
9
|
+
end
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
def force_no_trailing_slash
|
12
|
+
return if request.path == '/'
|
13
|
+
redirect_to request.original_url.gsub(/\/$/,'') if request.original_url.match(/\/$/)
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
16
|
+
def page
|
17
|
+
@page ||= begin
|
18
|
+
h = Hashie::Mash.new
|
19
|
+
h.classes = []
|
20
|
+
h
|
23
21
|
end
|
24
22
|
end
|
25
23
|
end
|
@@ -1,23 +1,21 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
extend ActiveSupport::Concern
|
1
|
+
module SessionConcern
|
2
|
+
extend ActiveSupport::Concern
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
# http://blog.laaz.org/tech/2012/12/27/rails-redirect_back_or_default/
|
5
|
+
def store_location(path=nil)
|
6
|
+
session[:return_to] = case
|
7
|
+
when !path.nil?
|
8
|
+
path
|
9
|
+
when request.get?
|
10
|
+
request.url
|
11
|
+
else
|
12
|
+
request.referer
|
13
|
+
end
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
21
|
-
alias_method :redirect_to_back_or_default, :redirect_back_or_default
|
16
|
+
# http://blog.laaz.org/tech/2012/12/27/rails-redirect_back_or_default/
|
17
|
+
def redirect_back_or_default(default=nil)
|
18
|
+
redirect_to(session.delete(:return_to) || default || request.referer)
|
22
19
|
end
|
20
|
+
alias_method :redirect_to_back_or_default, :redirect_back_or_default
|
23
21
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
if ENV['
|
2
|
-
Rails.application.config.middleware.use Rack::CanonicalHost, ENV['
|
1
|
+
if ENV['CANONICAL_HOST']
|
2
|
+
Rails.application.config.middleware.use Rack::CanonicalHost, ENV['CANONICAL_HOST']
|
3
3
|
end
|
data/project/package.json
CHANGED
data/project/yarn.lock
CHANGED
@@ -204,6 +204,12 @@ async-each@^1.0.0:
|
|
204
204
|
version "1.0.1"
|
205
205
|
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d"
|
206
206
|
|
207
|
+
async@2.4.1:
|
208
|
+
version "2.4.1"
|
209
|
+
resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7"
|
210
|
+
dependencies:
|
211
|
+
lodash "^4.14.0"
|
212
|
+
|
207
213
|
async@^1.5.2:
|
208
214
|
version "1.5.2"
|
209
215
|
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
|
@@ -1129,6 +1135,13 @@ compressible@~2.0.10:
|
|
1129
1135
|
dependencies:
|
1130
1136
|
mime-db ">= 1.29.0 < 2"
|
1131
1137
|
|
1138
|
+
compression-webpack-plugin@^1.0.0:
|
1139
|
+
version "1.0.0"
|
1140
|
+
resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-1.0.0.tgz#5c5eb6afd08ca6a5d66006eeef71da17b01bd676"
|
1141
|
+
dependencies:
|
1142
|
+
async "2.4.1"
|
1143
|
+
webpack-sources "^1.0.1"
|
1144
|
+
|
1132
1145
|
compression@^1.5.2:
|
1133
1146
|
version "1.7.0"
|
1134
1147
|
resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.0.tgz#030c9f198f1643a057d776a738e922da4373012d"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvpkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Hunter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semantic
|
@@ -146,11 +146,6 @@ files:
|
|
146
146
|
- project/app/engines/admin/lib/admin/engine.rb
|
147
147
|
- project/app/engines/admin/lib/admin/version.rb
|
148
148
|
- project/app/engines/admin/lib/tasks/admin_tasks.rake
|
149
|
-
- project/app/engines/admin/test/admin_test.rb
|
150
|
-
- project/app/engines/admin/test/controllers/admin/conversions_controller_test.rb
|
151
|
-
- project/app/engines/admin/test/controllers/admin/users_controller_test.rb
|
152
|
-
- project/app/engines/admin/test/integration/navigation_test.rb
|
153
|
-
- project/app/engines/admin/test/test_helper.rb
|
154
149
|
- project/app/helpers/application_helper.rb
|
155
150
|
- project/app/javascript/components/.gitkeep
|
156
151
|
- project/app/javascript/components/conversion.jsx
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Admin
|
4
|
-
class ConversionsControllerTest < ActionDispatch::IntegrationTest
|
5
|
-
include Engine.routes.url_helpers
|
6
|
-
|
7
|
-
setup do
|
8
|
-
@conversion = admin_conversions(:one)
|
9
|
-
end
|
10
|
-
|
11
|
-
test "should get index" do
|
12
|
-
get conversions_url
|
13
|
-
assert_response :success
|
14
|
-
end
|
15
|
-
|
16
|
-
test "should get new" do
|
17
|
-
get new_conversion_url
|
18
|
-
assert_response :success
|
19
|
-
end
|
20
|
-
|
21
|
-
test "should create conversion" do
|
22
|
-
assert_difference('Conversion.count') do
|
23
|
-
post conversions_url, params: { conversion: { email: @conversion.email } }
|
24
|
-
end
|
25
|
-
|
26
|
-
assert_redirected_to conversion_url(Conversion.last)
|
27
|
-
end
|
28
|
-
|
29
|
-
test "should show conversion" do
|
30
|
-
get conversion_url(@conversion)
|
31
|
-
assert_response :success
|
32
|
-
end
|
33
|
-
|
34
|
-
test "should get edit" do
|
35
|
-
get edit_conversion_url(@conversion)
|
36
|
-
assert_response :success
|
37
|
-
end
|
38
|
-
|
39
|
-
test "should update conversion" do
|
40
|
-
patch conversion_url(@conversion), params: { conversion: { email: @conversion.email } }
|
41
|
-
assert_redirected_to conversion_url(@conversion)
|
42
|
-
end
|
43
|
-
|
44
|
-
test "should destroy conversion" do
|
45
|
-
assert_difference('Conversion.count', -1) do
|
46
|
-
delete conversion_url(@conversion)
|
47
|
-
end
|
48
|
-
|
49
|
-
assert_redirected_to conversions_url
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Admin
|
4
|
-
class UsersControllerTest < ActionDispatch::IntegrationTest
|
5
|
-
include Engine.routes.url_helpers
|
6
|
-
|
7
|
-
setup do
|
8
|
-
@user = admin_users(:one)
|
9
|
-
end
|
10
|
-
|
11
|
-
test "should get index" do
|
12
|
-
get users_url
|
13
|
-
assert_response :success
|
14
|
-
end
|
15
|
-
|
16
|
-
test "should get new" do
|
17
|
-
get new_user_url
|
18
|
-
assert_response :success
|
19
|
-
end
|
20
|
-
|
21
|
-
test "should create user" do
|
22
|
-
assert_difference('User.count') do
|
23
|
-
post users_url, params: { user: { email: @user.email } }
|
24
|
-
end
|
25
|
-
|
26
|
-
assert_redirected_to user_url(User.last)
|
27
|
-
end
|
28
|
-
|
29
|
-
test "should show user" do
|
30
|
-
get user_url(@user)
|
31
|
-
assert_response :success
|
32
|
-
end
|
33
|
-
|
34
|
-
test "should get edit" do
|
35
|
-
get edit_user_url(@user)
|
36
|
-
assert_response :success
|
37
|
-
end
|
38
|
-
|
39
|
-
test "should update user" do
|
40
|
-
patch user_url(@user), params: { user: { email: @user.email } }
|
41
|
-
assert_redirected_to user_url(@user)
|
42
|
-
end
|
43
|
-
|
44
|
-
test "should destroy user" do
|
45
|
-
assert_difference('User.count', -1) do
|
46
|
-
delete user_url(@user)
|
47
|
-
end
|
48
|
-
|
49
|
-
assert_redirected_to users_url
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
-
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
|
7
|
-
require "rails/test_help"
|
8
|
-
|
9
|
-
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
10
|
-
# to be shown.
|
11
|
-
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
12
|
-
|
13
|
-
|
14
|
-
# Load fixtures from the engine
|
15
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
16
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
17
|
-
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
18
|
-
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
|
19
|
-
ActiveSupport::TestCase.fixtures :all
|
20
|
-
end
|