workarea-super_hero 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +15 -0
  3. data/.eslintrc +26 -0
  4. data/.gitignore +11 -0
  5. data/.jshintrc +37 -0
  6. data/.rails-rubocop.yml +119 -0
  7. data/.rubocop.yml +12 -0
  8. data/.scss-lint.yml +188 -0
  9. data/CHANGELOG.md +334 -0
  10. data/Gemfile +5 -0
  11. data/README.md +120 -0
  12. data/Rakefile +60 -0
  13. data/app/assets/images/workarea/admin/content_block_types/super_hero.svg +1 -0
  14. data/app/assets/images/workarea/svg/position_grid.svg +38 -0
  15. data/app/assets/javascripts/workarea/admin/super_hero/modules/media_modes.js +54 -0
  16. data/app/assets/javascripts/workarea/admin/super_hero/modules/position_input.js +59 -0
  17. data/app/assets/javascripts/workarea/storefront/super_hero/modules/vimeo_api.js +85 -0
  18. data/app/assets/javascripts/workarea/storefront/super_hero/modules/youtube_api.js +122 -0
  19. data/app/assets/stylesheets/workarea/admin/super_hero/components/_position_grid.scss +27 -0
  20. data/app/assets/stylesheets/workarea/storefront/super_hero/components/_content_position.scss +46 -0
  21. data/app/assets/stylesheets/workarea/storefront/super_hero/components/_super_hero_content_block.scss +69 -0
  22. data/app/models/workarea/content/fields/media_mode.rb +8 -0
  23. data/app/models/workarea/content/fields/video_advanced.rb +8 -0
  24. data/app/services/workarea/storefront/color_tools.rb +24 -0
  25. data/app/services/workarea/storefront/video_embedder/vimeo.rb +50 -0
  26. data/app/services/workarea/storefront/video_embedder/youtube.rb +56 -0
  27. data/app/services/workarea/storefront/video_embedder.rb +59 -0
  28. data/app/view_models/workarea/storefront/content_blocks/super_hero_view_model.rb +79 -0
  29. data/app/views/workarea/admin/content_blocks/_media_mode.html.haml +3 -0
  30. data/app/views/workarea/admin/content_blocks/_video_advanced.html.haml +12 -0
  31. data/app/views/workarea/admin/content_blocks/types/_super_hero.html.haml +106 -0
  32. data/app/views/workarea/storefront/content_blocks/_super_hero.html.haml +27 -0
  33. data/bin/rails +18 -0
  34. data/config/initializers/appends.rb +42 -0
  35. data/config/initializers/content_block_types.rb +49 -0
  36. data/config/locales/en.yml +23 -0
  37. data/config/routes.rb +2 -0
  38. data/lib/workarea/super_hero/engine.rb +8 -0
  39. data/lib/workarea/super_hero/version.rb +5 -0
  40. data/lib/workarea/super_hero.rb +11 -0
  41. data/script/admin_ci +9 -0
  42. data/script/ci +11 -0
  43. data/script/core_ci +9 -0
  44. data/script/plugins_ci +9 -0
  45. data/script/storefront_ci +9 -0
  46. data/super_hero_logo.svg +15 -0
  47. data/test/dummy/Rakefile +6 -0
  48. data/test/dummy/app/assets/config/manifest.js +4 -0
  49. data/test/dummy/app/assets/images/.keep +0 -0
  50. data/test/dummy/app/assets/javascripts/application.js +13 -0
  51. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  52. data/test/dummy/app/controllers/application_controller.rb +3 -0
  53. data/test/dummy/app/controllers/concerns/.keep +0 -0
  54. data/test/dummy/app/helpers/application_helper.rb +2 -0
  55. data/test/dummy/app/jobs/application_job.rb +2 -0
  56. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  57. data/test/dummy/app/models/concerns/.keep +0 -0
  58. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  59. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  60. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  61. data/test/dummy/bin/bundle +3 -0
  62. data/test/dummy/bin/rails +4 -0
  63. data/test/dummy/bin/rake +4 -0
  64. data/test/dummy/bin/setup +34 -0
  65. data/test/dummy/bin/update +29 -0
  66. data/test/dummy/config/application.rb +23 -0
  67. data/test/dummy/config/boot.rb +5 -0
  68. data/test/dummy/config/cable.yml +9 -0
  69. data/test/dummy/config/environment.rb +5 -0
  70. data/test/dummy/config/environments/development.rb +54 -0
  71. data/test/dummy/config/environments/production.rb +86 -0
  72. data/test/dummy/config/environments/test.rb +43 -0
  73. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  74. data/test/dummy/config/initializers/assets.rb +11 -0
  75. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  76. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  77. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  78. data/test/dummy/config/initializers/inflections.rb +16 -0
  79. data/test/dummy/config/initializers/mime_types.rb +4 -0
  80. data/test/dummy/config/initializers/new_framework_defaults.rb +18 -0
  81. data/test/dummy/config/initializers/session_store.rb +3 -0
  82. data/test/dummy/config/initializers/workarea.rb +5 -0
  83. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  84. data/test/dummy/config/locales/en.yml +23 -0
  85. data/test/dummy/config/puma.rb +47 -0
  86. data/test/dummy/config/routes.rb +5 -0
  87. data/test/dummy/config/secrets.yml +22 -0
  88. data/test/dummy/config/spring.rb +6 -0
  89. data/test/dummy/config.ru +5 -0
  90. data/test/dummy/lib/assets/.keep +0 -0
  91. data/test/dummy/log/.keep +0 -0
  92. data/test/services/workarea/storefront/color_tools_test.rb +32 -0
  93. data/test/services/workarea/storefront/video_embedder_test.rb +52 -0
  94. data/test/test_helper.rb +10 -0
  95. data/test/view_models/workarea/storefront/super_hero_view_model_test.rb +38 -0
  96. data/workarea-super_hero.gemspec +18 -0
  97. 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
@@ -0,0 +1,11 @@
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
+ test/dummy/.sass-cache
9
+ Gemfile.lock
10
+ test/dummy/public/*
11
+ .DS_STORE
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
+ }
@@ -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