workarea-super_hero 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +15 -0
- data/.eslintrc +26 -0
- data/.gitignore +11 -0
- data/.jshintrc +37 -0
- data/.rails-rubocop.yml +119 -0
- data/.rubocop.yml +12 -0
- data/.scss-lint.yml +188 -0
- data/CHANGELOG.md +334 -0
- data/Gemfile +5 -0
- data/README.md +120 -0
- data/Rakefile +60 -0
- data/app/assets/images/workarea/admin/content_block_types/super_hero.svg +1 -0
- data/app/assets/images/workarea/svg/position_grid.svg +38 -0
- data/app/assets/javascripts/workarea/admin/super_hero/modules/media_modes.js +54 -0
- data/app/assets/javascripts/workarea/admin/super_hero/modules/position_input.js +59 -0
- data/app/assets/javascripts/workarea/storefront/super_hero/modules/vimeo_api.js +85 -0
- data/app/assets/javascripts/workarea/storefront/super_hero/modules/youtube_api.js +122 -0
- data/app/assets/stylesheets/workarea/admin/super_hero/components/_position_grid.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/super_hero/components/_content_position.scss +46 -0
- data/app/assets/stylesheets/workarea/storefront/super_hero/components/_super_hero_content_block.scss +69 -0
- data/app/models/workarea/content/fields/media_mode.rb +8 -0
- data/app/models/workarea/content/fields/video_advanced.rb +8 -0
- data/app/services/workarea/storefront/color_tools.rb +24 -0
- data/app/services/workarea/storefront/video_embedder/vimeo.rb +50 -0
- data/app/services/workarea/storefront/video_embedder/youtube.rb +56 -0
- data/app/services/workarea/storefront/video_embedder.rb +59 -0
- data/app/view_models/workarea/storefront/content_blocks/super_hero_view_model.rb +79 -0
- data/app/views/workarea/admin/content_blocks/_media_mode.html.haml +3 -0
- data/app/views/workarea/admin/content_blocks/_video_advanced.html.haml +12 -0
- data/app/views/workarea/admin/content_blocks/types/_super_hero.html.haml +106 -0
- data/app/views/workarea/storefront/content_blocks/_super_hero.html.haml +27 -0
- data/bin/rails +18 -0
- data/config/initializers/appends.rb +42 -0
- data/config/initializers/content_block_types.rb +49 -0
- data/config/locales/en.yml +23 -0
- data/config/routes.rb +2 -0
- data/lib/workarea/super_hero/engine.rb +8 -0
- data/lib/workarea/super_hero/version.rb +5 -0
- data/lib/workarea/super_hero.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/super_hero_logo.svg +15 -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 +34 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +9 -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 +86 -0
- data/test/dummy/config/environments/test.rb +43 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +11 -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 +18 -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 +23 -0
- data/test/dummy/config/puma.rb +47 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/services/workarea/storefront/color_tools_test.rb +32 -0
- data/test/services/workarea/storefront/video_embedder_test.rb +52 -0
- data/test/test_helper.rb +10 -0
- data/test/view_models/workarea/storefront/super_hero_view_model_test.rb +38 -0
- data/workarea-super_hero.gemspec +18 -0
- metadata +158 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b274f6e01ccf4f09c33ed91efd033ba4ac1ccb844674d3eac10a3c0bab704931
|
4
|
+
data.tar.gz: ce81777aaa6a92bc80ba593f971b120de2cc899a0c723f15c5ca2d7f858eca1d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1fc88d139f06c663a65a447b9d97375d4c2a38f9afa7944310b61091e15106f73e9db768bc8788c4eb2d53f788b827e428e3cd4e831f7e241d30401691390ad7
|
7
|
+
data.tar.gz: 7458e1a621a8b5c32ea9c7e5cb778b45f2d53b44180868fb3627442c58796f21ff9b3628c1419c5aba19e69fa7ff1b20d4755b14cb1962f1e9c77ba2b546446c
|
data/.editorconfig
ADDED
@@ -0,0 +1,15 @@
|
|
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}]
|
12
|
+
indent_size = 2
|
13
|
+
|
14
|
+
[{*.js,*.jst,*.ejs,*.scss}]
|
15
|
+
indent_size = 4
|
data/.eslintrc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"extends": "eslint:recommended",
|
3
|
+
"rules": {
|
4
|
+
"semi": [1, "always"]
|
5
|
+
},
|
6
|
+
"globals": {
|
7
|
+
"window": true,
|
8
|
+
"document": true,
|
9
|
+
"WORKAREA": true,
|
10
|
+
"$": true,
|
11
|
+
"jQuery": true,
|
12
|
+
"_": true,
|
13
|
+
"feature": true,
|
14
|
+
"JST": true,
|
15
|
+
"Turbolinks": true,
|
16
|
+
"I18n": true,
|
17
|
+
"Chart": true,
|
18
|
+
"Dropzone": true,
|
19
|
+
"strftime": true,
|
20
|
+
"Waypoint": true,
|
21
|
+
"wysihtml": true,
|
22
|
+
"LocalTime": true,
|
23
|
+
"Vimeo": true,
|
24
|
+
"YT": true,
|
25
|
+
}
|
26
|
+
}
|
data/.gitignore
ADDED
data/.jshintrc
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
{
|
2
|
+
"bitwise": true,
|
3
|
+
"camelcase": false,
|
4
|
+
"curly": true,
|
5
|
+
"eqeqeq": true,
|
6
|
+
"forin": true,
|
7
|
+
"immed": true,
|
8
|
+
"indent": 4,
|
9
|
+
"latedef": true,
|
10
|
+
"maxlen": 80,
|
11
|
+
"newcap": true,
|
12
|
+
"noarg": true,
|
13
|
+
"noempty": true,
|
14
|
+
"nonew": true,
|
15
|
+
"plusplus": true,
|
16
|
+
"quotmark": true,
|
17
|
+
"undef": true,
|
18
|
+
"unused": true,
|
19
|
+
"strict": true,
|
20
|
+
"trailing": true,
|
21
|
+
"browser": true,
|
22
|
+
"jquery": true,
|
23
|
+
"onevar": true,
|
24
|
+
"white": true,
|
25
|
+
"globals": {
|
26
|
+
"WEBLINC": false,
|
27
|
+
"_": false,
|
28
|
+
"I18n": false,
|
29
|
+
"JST": false,
|
30
|
+
"Modernizr": false,
|
31
|
+
"sinon": false,
|
32
|
+
"describe": false,
|
33
|
+
"it": false,
|
34
|
+
"expect": false,
|
35
|
+
"fixture": false
|
36
|
+
}
|
37
|
+
}
|
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
@@ -0,0 +1,12 @@
|
|
1
|
+
inherit_from: .rails-rubocop.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- 'test/dummy/**/*'
|
6
|
+
- 'lib/super_hero.rb'
|
7
|
+
- 'lib/super_hero/**/*'
|
8
|
+
|
9
|
+
# Check quotes usage according to lint rule below.
|
10
|
+
Style/StringLiterals:
|
11
|
+
Enabled: true
|
12
|
+
EnforcedStyle: single_quotes
|
data/.scss-lint.yml
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
# Extension of the default configuration:
|
2
|
+
# https://github.com/causes/scss-lint/blob/master/config/default.yml
|
3
|
+
|
4
|
+
linters:
|
5
|
+
Comment:
|
6
|
+
enabled: false
|
7
|
+
|
8
|
+
DeclarationOrder:
|
9
|
+
enabled: true
|
10
|
+
|
11
|
+
ElsePlacement:
|
12
|
+
enabled: true
|
13
|
+
style: new_line
|
14
|
+
|
15
|
+
EmptyRule:
|
16
|
+
enabled: false
|
17
|
+
|
18
|
+
HexLength:
|
19
|
+
enabled: true
|
20
|
+
style: long
|
21
|
+
|
22
|
+
Indentation:
|
23
|
+
enabled: true
|
24
|
+
allow_non_nested_indentation: true
|
25
|
+
character: space
|
26
|
+
width: 4
|
27
|
+
|
28
|
+
LeadingZero:
|
29
|
+
enabled: true
|
30
|
+
style: include_zero
|
31
|
+
|
32
|
+
MergeableSelector:
|
33
|
+
enabled: true
|
34
|
+
force_nesting: false
|
35
|
+
|
36
|
+
PropertySortOrder:
|
37
|
+
enabled: true
|
38
|
+
ignore_unspecified: false
|
39
|
+
separate_groups: false
|
40
|
+
order:
|
41
|
+
- display
|
42
|
+
-
|
43
|
+
- position
|
44
|
+
- top
|
45
|
+
- right
|
46
|
+
- bottom
|
47
|
+
- left
|
48
|
+
- z-index
|
49
|
+
-
|
50
|
+
- margin
|
51
|
+
- margin-top
|
52
|
+
- margin-right
|
53
|
+
- margin-bottom
|
54
|
+
- margin-left
|
55
|
+
-
|
56
|
+
- margin-collapse
|
57
|
+
- margin-top-collapse
|
58
|
+
- margin-right-collapse
|
59
|
+
- margin-bottom-collapse
|
60
|
+
- margin-left-collapse
|
61
|
+
-
|
62
|
+
- padding
|
63
|
+
- padding-top
|
64
|
+
- padding-right
|
65
|
+
- padding-bottom
|
66
|
+
- padding-left
|
67
|
+
-
|
68
|
+
- width
|
69
|
+
- height
|
70
|
+
- max-width
|
71
|
+
- max-height
|
72
|
+
- min-width
|
73
|
+
- min-height
|
74
|
+
-
|
75
|
+
- float
|
76
|
+
- clear
|
77
|
+
-
|
78
|
+
- color
|
79
|
+
-
|
80
|
+
- font
|
81
|
+
- font-size
|
82
|
+
- font-style
|
83
|
+
- font-family
|
84
|
+
- font-weight
|
85
|
+
- font-variant
|
86
|
+
- font-smoothing
|
87
|
+
-
|
88
|
+
- line-height
|
89
|
+
- letter-spacing
|
90
|
+
- word-spacing
|
91
|
+
-
|
92
|
+
- text-align
|
93
|
+
- text-indent
|
94
|
+
- text-shadow
|
95
|
+
- text-overflow
|
96
|
+
- text-rendering
|
97
|
+
- text-transform
|
98
|
+
- text-decoration
|
99
|
+
- text-size-adjust
|
100
|
+
-
|
101
|
+
- word-break
|
102
|
+
- word-wrap
|
103
|
+
-
|
104
|
+
- white-space
|
105
|
+
-
|
106
|
+
- background
|
107
|
+
- background-size
|
108
|
+
- background-color
|
109
|
+
- background-image
|
110
|
+
- background-repeat
|
111
|
+
- background-position
|
112
|
+
- background-attachment
|
113
|
+
-
|
114
|
+
- border
|
115
|
+
- border-top
|
116
|
+
- border-right
|
117
|
+
- border-bottom
|
118
|
+
- border-left
|
119
|
+
-
|
120
|
+
- border-image
|
121
|
+
- border-spacing
|
122
|
+
- border-collapse
|
123
|
+
-
|
124
|
+
- border-color
|
125
|
+
- border-top-color
|
126
|
+
- border-right-color
|
127
|
+
- border-bottom-color
|
128
|
+
- border-left-color
|
129
|
+
-
|
130
|
+
- border-style
|
131
|
+
- border-top-style
|
132
|
+
- border-right-style
|
133
|
+
- border-bottom-style
|
134
|
+
- border-left-style
|
135
|
+
-
|
136
|
+
- border-width
|
137
|
+
- border-top-width
|
138
|
+
- border-right-width
|
139
|
+
- border-bottom-width
|
140
|
+
- border-left-width
|
141
|
+
-
|
142
|
+
- border-radius
|
143
|
+
- border-top-right-radius
|
144
|
+
- border-bottom-right-radius
|
145
|
+
- border-bottom-left-radius
|
146
|
+
- border-top-left-radius
|
147
|
+
- border-radius-topright
|
148
|
+
- border-radius-bottomright
|
149
|
+
- border-radius-bottomleft
|
150
|
+
- border-radius-topleft
|
151
|
+
-
|
152
|
+
- box-shadow
|
153
|
+
|
154
|
+
SelectorFormat:
|
155
|
+
enabled: true
|
156
|
+
convention: hyphenated_BEM
|
157
|
+
|
158
|
+
SingleLinePerSelector:
|
159
|
+
enabled: false
|
160
|
+
|
161
|
+
SpaceAfterPropertyColon:
|
162
|
+
enabled: true
|
163
|
+
style: at_least_one_space
|
164
|
+
|
165
|
+
SpaceBeforeBrace:
|
166
|
+
enabled: true
|
167
|
+
style: space
|
168
|
+
allow_single_line_padding: true
|
169
|
+
|
170
|
+
VariableForProperty:
|
171
|
+
enabled: true
|
172
|
+
properties:
|
173
|
+
- color
|
174
|
+
- font-family
|
175
|
+
- background-color
|
176
|
+
|
177
|
+
# These default settings may be problematic to implementors. They are not
|
178
|
+
# ommitted so that they may be adjusted as needed during an implementation.
|
179
|
+
#
|
180
|
+
# For documentation:
|
181
|
+
# https://github.com/causes/scss-lint/blob/master/lib/scss_lint/linter/README.md
|
182
|
+
|
183
|
+
DuplicateProperty:
|
184
|
+
enabled: true
|
185
|
+
|
186
|
+
PropertySpelling:
|
187
|
+
enabled: true
|
188
|
+
extra_properties: [] # Add experimental CSS to this array, if needed
|