Ben Halpern
ad1a59a14c
Fix html variant image prefix logic ( #11917 )
...
* Fix html variant image prefix logic
* Update app/models/html_variant.rb
Co-authored-by: Mac Siri <mac@dev.to>
* Update spec/models/html_variant_spec.rb
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Use helper to simplify url code and update spec
* Provide Imgproxy default endpoint
Co-authored-by: Mac Siri <mac@dev.to>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2020-12-15 14:44:11 -05:00
Fernando Valverde
2297e84f35
[deploy] HTML Variant admin dashboard ( #10188 )
...
* HTML Variant admin dashboard
* Tweaks to actions & spec fixes
* Update app/controllers/admin/html_variants_controller.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Removes old html_variants dashboards
* Removes old lingering spec
Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-09-28 09:22:13 -06:00
Mac Siri
76de9a0317
[deploy] Replace #cloudinary with #optimized_image_url ( #9876 )
2020-08-21 14:46:00 -04:00
rhymes
a86f4c83f2
[deploy] Add relations and foreign keys between HtmlVariant related models ( #9846 )
...
* Add inverse has_many relation betwen User and Ahoy::[Event|Visit
]
* Add FKs and proper relations to HtmlVariant models
2020-08-18 11:33:38 -04:00
Mac Siri
a081810946
[deploy] Migrate ImageResizer to Images::Optimizer ( #9720 )
2020-08-14 09:44:30 -04:00
Mac Siri
3c5b01d490
[deploy] Implement ImageResizer module ( #9652 )
...
* Create ImageResizer module
* Refactor HtmlVariant
* Refactor CloudCoverUrl
* Fix broken spec
* Refactor PodcastEpisode
* Refactor Message
* Fix broken spec
* Refactor Articles::SocialImage
* Refactor ProfileImage & add spec
* Fix broken spec
2020-08-07 11:04:31 -04:00
Michael Kohl
a4dadfb728
Standardize ActiveRecord order clauses ( #9395 )
...
* Change simple order clauses
* Change nested order clauses
2020-07-20 10:00:51 -04:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position ( #9262 )
2020-07-16 15:51:11 +02:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength ( #9197 )
2020-07-08 08:36:36 -05:00
Ben Halpern
a53de929fe
[deploy] Remove sidebar variant from CTA ( #8040 )
...
* Remove sidebar variant from CTA
* Remove unneeded tests
* Modify algo *just a bit*
2020-05-23 13:35:43 -04:00
rhymes
34848a4209
Upgrade Rubocop to 0.81 ( #7219 )
...
* Upgrade rubocop to 0.81.0
* Reordered rubocop file and updated it
* Regenerate todo
* Correct some things
* Fix specs
2020-04-11 10:10:04 +02:00
Ben Halpern
e97cacef1e
Allow published/approved campaign html variant to be edited ( #7045 )
2020-04-02 16:01:41 -04:00
Ridhwana
39007b4dab
Campaign settings ( #6141 ) [deploy]
...
* feat: port over changes (+ suggestions) from https://github.com/thepracticaldev/dev.to/pull/5892/files
* chore: add query over multiple lines
* refactor: move the sql logic into the controller instead of in the template
* chore: appease code climate
2020-02-18 11:02:09 -06:00
rhymes
6cd46ae2f9
Enable bullet during tests to catch N+1 early (and some cleanups) ( #5930 ) [deploy]
...
* Remove unused methods
* Small refactorings
* Enable bullet in testing mode
* Remove unused eager loading for notes
* Skip bullet on rolify method
* Use .present?
* Fix method name
2020-02-07 09:02:22 -05:00
Omar Bahareth
41463a7264
Deduplicate giphy_img? function and add tests ( #4590 )
...
* De-duplicate giphy_img? function in favor of a tested service.
Add a tested `GiphyService` and move `giphy_img?` function to it.
Make `labor/markdown_parser.rb` and `models/html_variant.rb` use the service version of the function.
* Refactor GiphyService into Giphy::Image class
Based on comments from @rhymes, I've changed this into a `Giphy::Image` class sincethe repo is currently being moved away from `XYZService` objects for namespacing and organization purposes.
* Fix typo
Update describe case to mention the current method name.
2019-10-30 11:40:17 -04:00
cyrillefr
4fd66372dc
Enable Layout/AlignParameters ( #2340 )
...
Check if the parameters on a multi-line method call or definition are aligned.
Resolves : #2021
2019-04-08 18:47:34 -04:00
rhymes
3a53d5797e
Upgrade Rails to 5.2.3 ( #1408 )
2019-04-03 13:08:59 -04:00
Keshav Biswa
8d57d45ecc
Rubocop Style cops enabled ( #2056 )
...
* Rubocop enabled style/alias
* Enabled Style/ArrayJoin Cop
* Enabled Style/Attr
* Enabled Case Equality
* Enabled CharacterLiteral
* Enabled ColonMethodCall Cop
* Enabled CommentAnnotation cop
* Enabled PreferredHashMethods Cop
* Enabled DoubleNegation Cop
* Enabled EachWithObject Cop
* Enabled EmptyLiteral Cop
* Enabled EvenOdd Cop
* Enabled IfWithSemicolon Cop
* Enabled Lambda and LambdaCall Cop
* Enabled LineEndConcatenation Cop
* Enabled ModuleFunction Cop;
* Enable NegatedIf and NegatedWhile Cop
* Enabled NilComparison Cop
* Enabled Not Cop
* Enabled NumericLiterals Cop
* Enabled OneLineConditional Cop
* Enabled PercentLiteralDelimiters Cop
* Excluded internal/users_controller from negated_if cop
* Reverted the double negation change from github_issue_tag and github_issue.rb"
* Enabled PerlBackrefs Cop
* Changed Regexp.last_match(1) to Regexp.last_match(0)
* Enabled proc cop
* Enabled RaiseArgs Cop
* Reverted Regexp.last_match(0) to Regexp.last_match(1)
* Enabled SelfAssignment Cop
* Enabled SingleLineMethods Cop
* Enabled SpecialGlobalVars Cop
* Enabled VariableInterpolation Cop
* Enabled WhenThen Cop
* Enabled WhileUntilModifier Cop
* Enabled WordArray Cop
* Enabled IfUnlessModifier Cop
* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
Ben Halpern
59cf1e5852
Add missing CloudinaryHelper inclusion in HtmlVariant ( #1923 )
...
* Add missing CloudinaryHelper inclusion in HtmlVariant
* Add test
2019-02-28 06:57:05 -08:00
Ben Halpern
92b24a9978
Add html_variant split testing to /badge ( #1763 )
...
* Add /badge html_variant
* Fix some of the linting
2019-02-08 12:45:14 -04:00
Ben Halpern
ea63374408
Add below-article html variant ( #1669 )
...
* Add below-article html variant
* Fix tests for variant number
* Fix stories show tests for html_variants
2019-01-28 14:31:43 -05:00
rhymes
6553f08d94
Rubocop cleanups ( #1415 )
...
* Update rubocop-todo.yml with new violations
* Fix Layout/EmptyLine* rules
* Fix Layout/Indentation* rules
* Fix remaining Layout/* rules
* Fix Lint/DuplicateMethods by removing unused accessor
* Fix Lint/IneffectiveAccessModifier
* Fix Lint/MissingCopEnableDirective
* Re-run rubocop auto gen config
* Fix Layout/RescueEnsureAlignment
* Fix Naming/* rules
* Fix some RSpec/* rules
* Fix typos
* Fix RSpec/LetBeforeExamples
* Series should only be an attr_writer, not an attr_accessor
* Fix RSpec/InstanceVariable
* Fix RSpec/InstanceVariable
* Fix RSpec/RepeatedDescription and RSpec/RepeatedExample
* Fix Style/ClassAndModuleChildren
* Fix Style/ConditionalAssignment
* Fix some Style/* rules
* Trigger Travis CI build because failing tests are not failing locally
* Revert "Fix Style/ClassAndModuleChildren"
This reverts commit 1686801d8a1516ba1894f79e24401a20dea65f99.
2019-01-02 11:20:02 -05:00
rhymes
96d01b20a2
Use allow/allowed instead of whitelist ( #1296 )
...
* Use allow/allowed instead of whitelist
* Remove duplication in comment
2018-12-10 13:16:16 -05:00
Ben Halpern
f124c2f65a
Fix html variant image prefix issue + other small fixes ( #1005 )
2018-10-24 17:44:59 -04:00
Ben Halpern
735a96432c
Add usability features to html_variants ( #991 )
2018-10-23 16:23:48 -04:00
Ben Halpern
302e8f202d
Add HTML variants for cta optimization and other nav bar adjustments ( #970 )
...
* Add HTML variants for cta optimization and other nav bar adjustments
* Fix 1==1 non-random mistake
* Spruce up org call-to-action
* Change default text color
* Add html variant trial and success request specs
* Fix article sidebar caching issue
* One line adjustment
* Modify schema
* Add include ActionView::Helpers::TagHelper to user_tag_spec
* Modify follow_button to remove session context
* Dummy commit
* Change Edit Article to Edit Post
* Dummy commit
* Fix rubocop concerns
* Fix rubocop style
2018-10-22 17:03:57 -04:00