workarea-product_videos 1.2.2
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.
- checksums.yaml +7 -0
- data/.editorconfig +16 -0
- data/.eslintrc +27 -0
- data/.gitignore +19 -0
- data/.rails-rubocop.yml +119 -0
- data/.rubocop.yml +7 -0
- data/.scss-lint.yml +192 -0
- data/CHANGELOG.md +92 -0
- data/Gemfile +16 -0
- data/README.md +87 -0
- data/Rakefile +60 -0
- data/app/assets/images/workarea/admin/icons/video.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/video_play.svg +1 -0
- data/app/assets/javascripts/workarea/storefront/product_videos/modules/vimeo_api.js +81 -0
- data/app/assets/javascripts/workarea/storefront/product_videos/modules/youtube_api.js +124 -0
- data/app/assets/stylesheets/workarea/storefront/product_videos/components/_product_video.scss +37 -0
- data/app/controllers/workarea/admin/catalog_product_videos_controller.rb +52 -0
- data/app/controllers/workarea/storefront/products_controller.decorator +19 -0
- data/app/models/workarea/catalog/product.decorator +7 -0
- data/app/models/workarea/catalog/product_video.rb +32 -0
- data/app/services/workarea/video_embed_parser.rb +54 -0
- data/app/view_models/workarea/storefront/product_video_view_model.rb +84 -0
- data/app/view_models/workarea/storefront/product_view_model.decorator +9 -0
- data/app/views/workarea/admin/catalog_product_videos/edit.html.haml +76 -0
- data/app/views/workarea/admin/catalog_product_videos/index.html.haml +46 -0
- data/app/views/workarea/admin/catalog_product_videos/new.html.haml +57 -0
- data/app/views/workarea/admin/catalog_products/_product_videos_card.html.haml +21 -0
- data/app/views/workarea/storefront/products/_video_link.html.haml +8 -0
- data/app/views/workarea/storefront/products/_video_thumbnail.html.haml +12 -0
- data/app/views/workarea/storefront/products/video.html.haml +3 -0
- data/bin/rails +20 -0
- data/config/initializers/appends.rb +37 -0
- data/config/initializers/product_videos.rb +5 -0
- data/config/initializers/workarea.rb +3 -0
- data/config/locales/en.yml +41 -0
- data/config/routes.rb +15 -0
- data/lib/workarea/product_videos/engine.rb +8 -0
- data/lib/workarea/product_videos/version.rb +5 -0
- data/lib/workarea/product_videos.rb +11 -0
- data/script/admin_ci +9 -0
- data/script/ci +11 -0
- data/script/core_ci +9 -0
- data/script/plugins_ci +9 -0
- data/script/storefront_ci +9 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +38 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config/application.rb +29 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +91 -0
- data/test/dummy/config/environments/test.rb +44 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +23 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +32 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/package.json +5 -0
- data/test/factories/embed_codes.rb +15 -0
- data/test/integration/workarea/admin/product_videos_integration_test.rb +59 -0
- data/test/integration/workarea/storefront/product_videos_integration_test.rb +30 -0
- data/test/services/workarea/video_embedder_test.rb +27 -0
- data/test/system/workarea/admin/product_videos_system_test.rb +58 -0
- data/test/system/workarea/storefront/product_videos_system_test.rb +60 -0
- data/test/teaspoon_env.rb +6 -0
- data/test/test_helper.rb +10 -0
- data/test/view_models/workarea/storefront/product_video_view_model_test.rb +46 -0
- data/workarea-product_videos.gemspec +19 -0
- metadata +157 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f359538c9d4ef138027cd641f79962fdb8389857ddad2d7b42202b15d18aa57f
|
|
4
|
+
data.tar.gz: '07882f77f35b5bdf00902d52aa15bf0e6570217460cb5e55ef4daacb2d140a2e'
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 4f4871cc770def34f2890d0dae4ade2b27e4d57a5eb3a6914b50dd79f34e4bd796676048d27a3e69185abb11cd0c11aa71e037d8ff680fe71ca3e555599b611d
|
|
7
|
+
data.tar.gz: fdd2030236c22e89b27a376a1158c90e7990fceaa6690d22eca50dac6dcf4f13e84a534ee12ee0ea70b608b30550467f602d568cdf1ef740aca28fc8d18c2e11
|
data/.editorconfig
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
|
|
11
|
+
[{*.rb,*.haml,*.decorator}]
|
|
12
|
+
indent_size = 2
|
|
13
|
+
indent_style = space
|
|
14
|
+
|
|
15
|
+
[{*.js,*.jst,*.ejs,*.scss}]
|
|
16
|
+
indent_size = 4
|
data/.eslintrc
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "eslint:recommended",
|
|
3
|
+
"rules": {
|
|
4
|
+
"semi": ["error", "always"],
|
|
5
|
+
"eqeqeq": ["error", "always"]
|
|
6
|
+
},
|
|
7
|
+
"globals": {
|
|
8
|
+
"window": true,
|
|
9
|
+
"document": true,
|
|
10
|
+
"WORKAREA": true,
|
|
11
|
+
"$": true,
|
|
12
|
+
"jQuery": true,
|
|
13
|
+
"_": true,
|
|
14
|
+
"feature": true,
|
|
15
|
+
"JST": true,
|
|
16
|
+
"Turbolinks": true,
|
|
17
|
+
"I18n": true,
|
|
18
|
+
"Chart": true,
|
|
19
|
+
"Dropzone": true,
|
|
20
|
+
"strftime": true,
|
|
21
|
+
"Waypoint": true,
|
|
22
|
+
"wysihtml": true,
|
|
23
|
+
"LocalTime": true,
|
|
24
|
+
"YT": true,
|
|
25
|
+
"Vimeo": true
|
|
26
|
+
}
|
|
27
|
+
}
|
data/.gitignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.bundle/
|
|
2
|
+
log/*.log
|
|
3
|
+
pkg/
|
|
4
|
+
test/dummy/db/*.sqlite3
|
|
5
|
+
test/dummy/db/*.sqlite3-journal
|
|
6
|
+
test/dummy/log/*.log
|
|
7
|
+
test/dummy/tmp/
|
|
8
|
+
.DS_Store
|
|
9
|
+
.byebug_history
|
|
10
|
+
.bundle/
|
|
11
|
+
.sass-cache/
|
|
12
|
+
Gemfile.lock
|
|
13
|
+
pkg/
|
|
14
|
+
test/dummy/tmp/
|
|
15
|
+
test/dummy/public/
|
|
16
|
+
log/*.log
|
|
17
|
+
test/dummy/log/*.log
|
|
18
|
+
test/dummy/db/*.sqlite3
|
|
19
|
+
test/dummy/db/*.sqlite3-journal
|
data/.rails-rubocop.yml
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
|
3
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
|
4
|
+
DisabledByDefault: true
|
|
5
|
+
|
|
6
|
+
# Prefer &&/|| over and/or.
|
|
7
|
+
Style/AndOr:
|
|
8
|
+
Enabled: true
|
|
9
|
+
|
|
10
|
+
# Do not use braces for hash literals when they are the last argument of a
|
|
11
|
+
# method call.
|
|
12
|
+
Style/BracesAroundHashParameters:
|
|
13
|
+
Enabled: true
|
|
14
|
+
|
|
15
|
+
# Align `when` with `case`.
|
|
16
|
+
Layout/CaseIndentation:
|
|
17
|
+
Enabled: true
|
|
18
|
+
|
|
19
|
+
# Align comments with method definitions.
|
|
20
|
+
Layout/CommentIndentation:
|
|
21
|
+
Enabled: true
|
|
22
|
+
|
|
23
|
+
# No extra empty lines.
|
|
24
|
+
Layout/EmptyLines:
|
|
25
|
+
Enabled: true
|
|
26
|
+
|
|
27
|
+
# In a regular class definition, no empty lines around the body.
|
|
28
|
+
Layout/EmptyLinesAroundClassBody:
|
|
29
|
+
Enabled: true
|
|
30
|
+
|
|
31
|
+
# In a regular method definition, no empty lines around the body.
|
|
32
|
+
Layout/EmptyLinesAroundMethodBody:
|
|
33
|
+
Enabled: true
|
|
34
|
+
|
|
35
|
+
# In a regular module definition, no empty lines around the body.
|
|
36
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
37
|
+
Enabled: true
|
|
38
|
+
|
|
39
|
+
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
|
40
|
+
Style/HashSyntax:
|
|
41
|
+
Enabled: true
|
|
42
|
+
|
|
43
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
|
44
|
+
# extra level of indentation.
|
|
45
|
+
Layout/IndentationConsistency:
|
|
46
|
+
Enabled: true
|
|
47
|
+
EnforcedStyle: rails
|
|
48
|
+
|
|
49
|
+
# Two spaces, no tabs (for indentation).
|
|
50
|
+
Layout/IndentationWidth:
|
|
51
|
+
Enabled: true
|
|
52
|
+
|
|
53
|
+
Layout/SpaceAfterColon:
|
|
54
|
+
Enabled: true
|
|
55
|
+
|
|
56
|
+
Layout/SpaceAfterComma:
|
|
57
|
+
Enabled: true
|
|
58
|
+
|
|
59
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
60
|
+
Enabled: true
|
|
61
|
+
|
|
62
|
+
Layout/SpaceAroundKeyword:
|
|
63
|
+
Enabled: true
|
|
64
|
+
|
|
65
|
+
Layout/SpaceAroundOperators:
|
|
66
|
+
Enabled: true
|
|
67
|
+
|
|
68
|
+
Layout/SpaceBeforeFirstArg:
|
|
69
|
+
Enabled: true
|
|
70
|
+
|
|
71
|
+
# Defining a method with parameters needs parentheses.
|
|
72
|
+
Style/MethodDefParentheses:
|
|
73
|
+
Enabled: true
|
|
74
|
+
|
|
75
|
+
# Use `foo {}` not `foo{}`.
|
|
76
|
+
Layout/SpaceBeforeBlockBraces:
|
|
77
|
+
Enabled: true
|
|
78
|
+
|
|
79
|
+
# Use `foo { bar }` not `foo {bar}`.
|
|
80
|
+
Layout/SpaceInsideBlockBraces:
|
|
81
|
+
Enabled: true
|
|
82
|
+
|
|
83
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
|
84
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
85
|
+
Enabled: true
|
|
86
|
+
|
|
87
|
+
Layout/SpaceInsideParens:
|
|
88
|
+
Enabled: true
|
|
89
|
+
|
|
90
|
+
# Check quotes usage according to lint rule below.
|
|
91
|
+
Style/StringLiterals:
|
|
92
|
+
Enabled: true
|
|
93
|
+
EnforcedStyle: double_quotes
|
|
94
|
+
|
|
95
|
+
# Detect hard tabs, no hard tabs.
|
|
96
|
+
Layout/Tab:
|
|
97
|
+
Enabled: true
|
|
98
|
+
|
|
99
|
+
# Blank lines should not have any spaces.
|
|
100
|
+
Layout/TrailingBlankLines:
|
|
101
|
+
Enabled: true
|
|
102
|
+
|
|
103
|
+
# No trailing whitespace.
|
|
104
|
+
Layout/TrailingWhitespace:
|
|
105
|
+
Enabled: true
|
|
106
|
+
|
|
107
|
+
# Use quotes for string literals when they are enough.
|
|
108
|
+
Style/UnneededPercentQ:
|
|
109
|
+
Enabled: true
|
|
110
|
+
|
|
111
|
+
# Align `end` with the matching keyword or starting expression except for
|
|
112
|
+
# assignments, where it should be aligned with the LHS.
|
|
113
|
+
Lint/EndAlignment:
|
|
114
|
+
Enabled: true
|
|
115
|
+
EnforcedStyleAlignWith: variable
|
|
116
|
+
|
|
117
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
|
118
|
+
Lint/RequireParentheses:
|
|
119
|
+
Enabled: true
|
data/.rubocop.yml
ADDED
data/.scss-lint.yml
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Extension of the default configuration:
|
|
2
|
+
# https://github.com/causes/scss-lint/blob/master/config/default.yml
|
|
3
|
+
|
|
4
|
+
exclude: 'docs/**'
|
|
5
|
+
|
|
6
|
+
linters:
|
|
7
|
+
Comment:
|
|
8
|
+
enabled: false
|
|
9
|
+
|
|
10
|
+
DeclarationOrder:
|
|
11
|
+
enabled: true
|
|
12
|
+
|
|
13
|
+
ElsePlacement:
|
|
14
|
+
enabled: true
|
|
15
|
+
|
|
16
|
+
EmptyRule:
|
|
17
|
+
enabled: false
|
|
18
|
+
|
|
19
|
+
HexLength:
|
|
20
|
+
enabled: true
|
|
21
|
+
style: long
|
|
22
|
+
|
|
23
|
+
Indentation:
|
|
24
|
+
enabled: true
|
|
25
|
+
allow_non_nested_indentation: true
|
|
26
|
+
character: space
|
|
27
|
+
width: 4
|
|
28
|
+
|
|
29
|
+
LeadingZero:
|
|
30
|
+
enabled: true
|
|
31
|
+
style: include_zero
|
|
32
|
+
|
|
33
|
+
MergeableSelector:
|
|
34
|
+
enabled: true
|
|
35
|
+
force_nesting: false
|
|
36
|
+
|
|
37
|
+
PropertySortOrder:
|
|
38
|
+
enabled: true
|
|
39
|
+
ignore_unspecified: false
|
|
40
|
+
separate_groups: false
|
|
41
|
+
order:
|
|
42
|
+
- display
|
|
43
|
+
-
|
|
44
|
+
- position
|
|
45
|
+
- top
|
|
46
|
+
- right
|
|
47
|
+
- bottom
|
|
48
|
+
- left
|
|
49
|
+
- z-index
|
|
50
|
+
-
|
|
51
|
+
- margin
|
|
52
|
+
- margin-top
|
|
53
|
+
- margin-right
|
|
54
|
+
- margin-bottom
|
|
55
|
+
- margin-left
|
|
56
|
+
-
|
|
57
|
+
- margin-collapse
|
|
58
|
+
- margin-top-collapse
|
|
59
|
+
- margin-right-collapse
|
|
60
|
+
- margin-bottom-collapse
|
|
61
|
+
- margin-left-collapse
|
|
62
|
+
-
|
|
63
|
+
- padding
|
|
64
|
+
- padding-top
|
|
65
|
+
- padding-right
|
|
66
|
+
- padding-bottom
|
|
67
|
+
- padding-left
|
|
68
|
+
-
|
|
69
|
+
- width
|
|
70
|
+
- height
|
|
71
|
+
- max-width
|
|
72
|
+
- max-height
|
|
73
|
+
- min-width
|
|
74
|
+
- min-height
|
|
75
|
+
-
|
|
76
|
+
- float
|
|
77
|
+
- clear
|
|
78
|
+
-
|
|
79
|
+
- color
|
|
80
|
+
-
|
|
81
|
+
- font
|
|
82
|
+
- font-size
|
|
83
|
+
- font-style
|
|
84
|
+
- font-family
|
|
85
|
+
- font-weight
|
|
86
|
+
- font-variant
|
|
87
|
+
- font-smoothing
|
|
88
|
+
-
|
|
89
|
+
- line-height
|
|
90
|
+
- letter-spacing
|
|
91
|
+
- word-spacing
|
|
92
|
+
-
|
|
93
|
+
- text-align
|
|
94
|
+
- text-indent
|
|
95
|
+
- text-shadow
|
|
96
|
+
- text-overflow
|
|
97
|
+
- text-rendering
|
|
98
|
+
- text-transform
|
|
99
|
+
- text-decoration
|
|
100
|
+
- text-size-adjust
|
|
101
|
+
-
|
|
102
|
+
- word-break
|
|
103
|
+
- word-wrap
|
|
104
|
+
-
|
|
105
|
+
- white-space
|
|
106
|
+
-
|
|
107
|
+
- background
|
|
108
|
+
- background-size
|
|
109
|
+
- background-color
|
|
110
|
+
- background-image
|
|
111
|
+
- background-repeat
|
|
112
|
+
- background-position
|
|
113
|
+
- background-attachment
|
|
114
|
+
-
|
|
115
|
+
- border
|
|
116
|
+
- border-top
|
|
117
|
+
- border-right
|
|
118
|
+
- border-bottom
|
|
119
|
+
- border-left
|
|
120
|
+
-
|
|
121
|
+
- border-image
|
|
122
|
+
- border-spacing
|
|
123
|
+
- border-collapse
|
|
124
|
+
-
|
|
125
|
+
- border-color
|
|
126
|
+
- border-top-color
|
|
127
|
+
- border-right-color
|
|
128
|
+
- border-bottom-color
|
|
129
|
+
- border-left-color
|
|
130
|
+
-
|
|
131
|
+
- border-style
|
|
132
|
+
- border-top-style
|
|
133
|
+
- border-right-style
|
|
134
|
+
- border-bottom-style
|
|
135
|
+
- border-left-style
|
|
136
|
+
-
|
|
137
|
+
- border-width
|
|
138
|
+
- border-top-width
|
|
139
|
+
- border-right-width
|
|
140
|
+
- border-bottom-width
|
|
141
|
+
- border-left-width
|
|
142
|
+
-
|
|
143
|
+
- border-radius
|
|
144
|
+
- border-top-right-radius
|
|
145
|
+
- border-bottom-right-radius
|
|
146
|
+
- border-bottom-left-radius
|
|
147
|
+
- border-top-left-radius
|
|
148
|
+
- border-radius-topright
|
|
149
|
+
- border-radius-bottomright
|
|
150
|
+
- border-radius-bottomleft
|
|
151
|
+
- border-radius-topleft
|
|
152
|
+
-
|
|
153
|
+
- box-shadow
|
|
154
|
+
|
|
155
|
+
SelectorFormat:
|
|
156
|
+
enabled: true
|
|
157
|
+
convention: hyphenated_BEM
|
|
158
|
+
|
|
159
|
+
SingleLinePerSelector:
|
|
160
|
+
enabled: false
|
|
161
|
+
|
|
162
|
+
SpaceAfterPropertyColon:
|
|
163
|
+
enabled: true
|
|
164
|
+
style: at_least_one_space
|
|
165
|
+
|
|
166
|
+
SpaceBeforeBrace:
|
|
167
|
+
enabled: true
|
|
168
|
+
style: space
|
|
169
|
+
allow_single_line_padding: true
|
|
170
|
+
|
|
171
|
+
VariableForProperty:
|
|
172
|
+
enabled: true
|
|
173
|
+
properties:
|
|
174
|
+
- color
|
|
175
|
+
- font-family
|
|
176
|
+
- background-color
|
|
177
|
+
|
|
178
|
+
PseudoElement:
|
|
179
|
+
enabled: false
|
|
180
|
+
|
|
181
|
+
# These default settings may be problematic to implementors. They are not
|
|
182
|
+
# ommitted so that they may be adjusted as needed during an implementation.
|
|
183
|
+
#
|
|
184
|
+
# For documentation:
|
|
185
|
+
# https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md
|
|
186
|
+
|
|
187
|
+
DuplicateProperty:
|
|
188
|
+
enabled: true
|
|
189
|
+
|
|
190
|
+
PropertySpelling:
|
|
191
|
+
enabled: true
|
|
192
|
+
extra_properties: [] # Add experimental CSS to this array, if needed
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Workarea Product Videos 1.2.2 (2019-08-21)
|
|
2
|
+
--------------------------------------------------------------------------------
|
|
3
|
+
|
|
4
|
+
* Open Source!
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Workarea Product Videos 1.2.1 (2019-03-19)
|
|
9
|
+
--------------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
* ESLinting
|
|
12
|
+
|
|
13
|
+
PRODVIDEO-18
|
|
14
|
+
Jake Beresford
|
|
15
|
+
|
|
16
|
+
* Fix ESLinting errors
|
|
17
|
+
|
|
18
|
+
PRODVIDEO-18
|
|
19
|
+
Jake Beresford
|
|
20
|
+
|
|
21
|
+
* Update for v3.4 compatibility
|
|
22
|
+
|
|
23
|
+
* Add CI scripts
|
|
24
|
+
* Update Gemfile
|
|
25
|
+
|
|
26
|
+
PRODVIDEO-18
|
|
27
|
+
Jake Beresford
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Workarea Product Videos 1.2.0 (2018-07-24)
|
|
32
|
+
--------------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
* Bump version for v1.2.0 release
|
|
35
|
+
|
|
36
|
+
Jake Beresford
|
|
37
|
+
|
|
38
|
+
* Fix creation of product images for thumbnail system test
|
|
39
|
+
|
|
40
|
+
PRODVIDEO-17
|
|
41
|
+
Jake Beresford
|
|
42
|
+
|
|
43
|
+
* Process thumbnail images with dragonfly
|
|
44
|
+
|
|
45
|
+
PRODVIDEO-15
|
|
46
|
+
Lucas Boyd
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
Workarea Product Videos 1.1.1 (2018-06-12)
|
|
51
|
+
--------------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
* Fixes failing test for thumbnail videos by creating alt images properly
|
|
54
|
+
|
|
55
|
+
PRODVIDEO-14
|
|
56
|
+
Jake Beresford
|
|
57
|
+
|
|
58
|
+
* Add description for thumbnail display type in admin
|
|
59
|
+
|
|
60
|
+
PRODVIDEO-13
|
|
61
|
+
Jake Beresford
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
Workarea Product Videos 1.1.0 (2018-04-10)
|
|
66
|
+
--------------------------------------------------------------------------------
|
|
67
|
+
|
|
68
|
+
* Update markup and styles to only apply height reservation to product video iframes
|
|
69
|
+
|
|
70
|
+
* Fixes incorrect padding added around dialog links when display_option == 'dialog'
|
|
71
|
+
|
|
72
|
+
PRODVIDEO-3
|
|
73
|
+
Jake Beresford
|
|
74
|
+
|
|
75
|
+
* Add Thumbnail as display option on product videos
|
|
76
|
+
|
|
77
|
+
* Adds thumbnail as a display_option
|
|
78
|
+
* Adds thumbnail field on ProductVideo
|
|
79
|
+
* Adds asset picker to admin catalog_product_videos new & edit views
|
|
80
|
+
* Display video thumbnail on the PDP
|
|
81
|
+
* Adds svg icon to indicate a thumbnail will play a video
|
|
82
|
+
* Update condition in video_link to prevent double rendering videos with display_option == 'thumbnail'
|
|
83
|
+
* Update README
|
|
84
|
+
* Remove incorrect class on video link when display option is dialog
|
|
85
|
+
* Add tests for thumbnail videos
|
|
86
|
+
|
|
87
|
+
PRODVIDEO-3
|
|
88
|
+
Jake Beresford
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
Workarea Product Videos 1.0.0 (2018-02-20)
|
|
92
|
+
--------------------------------------------------------------------------------
|
data/Gemfile
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
3
|
+
# Declare your gem's dependencies in product_videos.gemspec.
|
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
|
5
|
+
# development dependencies will be added by default to the :development group.
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
|
11
|
+
# your gem to rubygems.org.
|
|
12
|
+
|
|
13
|
+
# To use a debugger
|
|
14
|
+
# gem 'byebug', group: [:development, :test]
|
|
15
|
+
|
|
16
|
+
gem "workarea", source: "https://gems.weblinc.com"
|
data/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Workarea Product Videos
|
|
2
|
+
================================================================================
|
|
3
|
+
|
|
4
|
+
Product Videos plugin for the Workarea platform.
|
|
5
|
+
Allows an admin user to add videos to any product!
|
|
6
|
+
|
|
7
|
+
Video embed support
|
|
8
|
+
--------------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
This plugin supports embed codes from Vimeo and Youtube.
|
|
11
|
+
Adding support for other video hosts would require customization of the video_embed_parser
|
|
12
|
+
service.
|
|
13
|
+
We do not host video content, and therefor do not offer an option to upload a video
|
|
14
|
+
via the admin. All videos must use an embed code.
|
|
15
|
+
|
|
16
|
+
Display options
|
|
17
|
+
--------------------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
Out of the box we provide 3 options for displaying product videos on the storefront:
|
|
20
|
+
embedded, link, and thumbnail.
|
|
21
|
+
|
|
22
|
+
### Embedded
|
|
23
|
+
|
|
24
|
+
Embeds an iframe below the product description.
|
|
25
|
+
|
|
26
|
+
### Dialog
|
|
27
|
+
|
|
28
|
+
Adds a link below the product description, on click the video will open in a dialog.
|
|
29
|
+
|
|
30
|
+
### Thumbnail
|
|
31
|
+
|
|
32
|
+
Embeds a thumbnail image in the product alt-image array, thumbnail has a play icon
|
|
33
|
+
svg overlayed, this is trivial to customize.
|
|
34
|
+
When the thumbnail is clicked the video will open in a dialog
|
|
35
|
+
Thumbnail image can be selected in the admin via an asset picker.
|
|
36
|
+
If no thumbnail image is selected the first product image will be used as a fallback.
|
|
37
|
+
|
|
38
|
+
**Caveat:** Since the thumbnail image is appended to the alt image array, the product must
|
|
39
|
+
have more than 1 image for the video to display. This could easily be changed in
|
|
40
|
+
implementation, but is not within the scope of this plugin.
|
|
41
|
+
|
|
42
|
+
Getting Started
|
|
43
|
+
--------------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
This gem contains a rails engine that must be mounted onto a host Rails application.
|
|
46
|
+
|
|
47
|
+
To access Workarea gems and source code, you must be an employee of WebLinc or a licensed retailer or partner.
|
|
48
|
+
|
|
49
|
+
Workarea gems are hosted privately at https://gems.weblinc.com/.
|
|
50
|
+
You must have individual or team credentials to install gems from this server. Add your gems server credentials to Bundler:
|
|
51
|
+
|
|
52
|
+
bundle config gems.weblinc.com my_username:my_password
|
|
53
|
+
|
|
54
|
+
Or set the appropriate environment variable in a shell startup file:
|
|
55
|
+
|
|
56
|
+
export BUNDLE_GEMS__WEBLINC__COM='my_username:my_password'
|
|
57
|
+
|
|
58
|
+
Then add the gem to your application's Gemfile specifying the source:
|
|
59
|
+
|
|
60
|
+
# ...
|
|
61
|
+
gem 'workarea-product_videos', source: 'https://gems.weblinc.com'
|
|
62
|
+
# ...
|
|
63
|
+
|
|
64
|
+
Or use a source block:
|
|
65
|
+
|
|
66
|
+
# ...
|
|
67
|
+
source 'https://gems.weblinc.com' do
|
|
68
|
+
gem 'workarea-product_videos'
|
|
69
|
+
end
|
|
70
|
+
# ...
|
|
71
|
+
|
|
72
|
+
Update your application's bundle.
|
|
73
|
+
|
|
74
|
+
cd path/to/application
|
|
75
|
+
bundle
|
|
76
|
+
|
|
77
|
+
Workarea Platform Documentation
|
|
78
|
+
--------------------------------------------------------------------------------
|
|
79
|
+
|
|
80
|
+
See [http://developer.weblinc.com](http://developer.weblinc.com) for Workarea platform documentation.
|
|
81
|
+
|
|
82
|
+
Copyright & Licensing
|
|
83
|
+
--------------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
Copyright WebLinc 2017. All rights reserved.
|
|
86
|
+
|
|
87
|
+
For licensing, contact sales@workarea.com.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require "bundler/setup"
|
|
3
|
+
rescue LoadError
|
|
4
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
require "rdoc/task"
|
|
8
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
9
|
+
rdoc.rdoc_dir = "rdoc"
|
|
10
|
+
rdoc.title = "Product Videos"
|
|
11
|
+
rdoc.options << "--line-numbers"
|
|
12
|
+
rdoc.rdoc_files.include("README.md")
|
|
13
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
|
17
|
+
load "rails/tasks/engine.rake"
|
|
18
|
+
load "rails/tasks/statistics.rake"
|
|
19
|
+
load "workarea/changelog.rake"
|
|
20
|
+
|
|
21
|
+
require "rake/testtask"
|
|
22
|
+
Rake::TestTask.new(:test) do |t|
|
|
23
|
+
t.libs << "lib"
|
|
24
|
+
t.libs << "test"
|
|
25
|
+
t.pattern = "test/**/*_test.rb"
|
|
26
|
+
t.verbose = false
|
|
27
|
+
end
|
|
28
|
+
task default: :test
|
|
29
|
+
|
|
30
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
31
|
+
require "workarea/product_videos/version"
|
|
32
|
+
|
|
33
|
+
desc "Release version #{Workarea::ProductVideos::VERSION} of the gem"
|
|
34
|
+
task :release do
|
|
35
|
+
host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
|
|
36
|
+
|
|
37
|
+
#Rake::Task["workarea:changelog"].execute
|
|
38
|
+
#system "git add CHANGELOG.md"
|
|
39
|
+
#system 'git commit -m "Update CHANGELOG"'
|
|
40
|
+
#system "git push origin HEAD"
|
|
41
|
+
|
|
42
|
+
system "git tag -a v#{Workarea::ProductVideos::VERSION} -m 'Tagging #{Workarea::ProductVideos::VERSION}'"
|
|
43
|
+
system "git push --tags"
|
|
44
|
+
|
|
45
|
+
system "gem build workarea-product_videos.gemspec"
|
|
46
|
+
system "gem push workarea-product_videos-#{Workarea::ProductVideos::VERSION}.gem"
|
|
47
|
+
system "gem push workarea-product_videos-#{Workarea::ProductVideos::VERSION}.gem --host #{host}"
|
|
48
|
+
system "rm workarea-product_videos-#{Workarea::ProductVideos::VERSION}.gem"
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
desc "Run the JavaScript tests"
|
|
52
|
+
ENV["TEASPOON_RAILS_ENV"] = File.expand_path("../test/dummy/config/environment", __FILE__)
|
|
53
|
+
task teaspoon: "app:teaspoon"
|
|
54
|
+
|
|
55
|
+
desc "Start a server at http://localhost:3000/teaspoon for JavaScript tests"
|
|
56
|
+
task :teaspoon_server do
|
|
57
|
+
Dir.chdir("test/dummy")
|
|
58
|
+
teaspoon_env = File.expand_path("../test/teaspoon_env.rb", __FILE__)
|
|
59
|
+
system "RAILS_ENV=test TEASPOON_ENV=#{teaspoon_env} rails s"
|
|
60
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>video</title><path d="M3.47,14.54H21.58V28.67H3.47Zm8.4-6A5.21,5.21,0,1,1,6.66,3.35,5.22,5.22,0,0,1,11.87,8.58Zm11.45,0a5.21,5.21,0,1,1-5.21-5.23A5.22,5.22,0,0,1,23.32,8.56Zm-.59,9.61h2.54v6.88H22.73Zm3.65-.09v6.15l4.17,4.17V14.82Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><title>Play Video</title><path d="M12.21,9.21a1.63,1.63,0,0,0-1.57,1.63V21.15A1.61,1.61,0,0,0,13,22.57L22,17.41a1.62,1.62,0,0,0,0-2.82L13,9.43A1.72,1.72,0,0,0,12.21,9.21ZM16,2.43A13.57,13.57,0,1,1,2.43,16,13.56,13.56,0,0,1,16,2.43ZM16,1A15,15,0,1,0,31,16,15,15,0,0,0,16,1Z"/></svg>
|