Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

replace_quotes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replace_quotes

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Dependency Status Build Status Code Climate Test Coverage security

ReplaceQuotes

This gem is used for improving RuboCop compliance by replacing unnecessary double quotes with single quotes in a file. To avoid causing errors, ReplaceQuotes leaves double quotes alone when they are used in a line containing single quotes or "#{".

Before:

"There is Ruby on High Speed Rails, and there is Not Exactly."
"Make sure you choose the correct one."

"I hope we're using Ruby on High Speed Rails"
"There's Ruby on High Speed Rails, and there's Not Exactly."

option1 = "High Speed Ruby on Rails"
option2 = "Not Exactly"
"#{option1} is much better and faster than #{option2}."

After:

'There is Ruby on High Speed Rails, and there is Not Exactly.'
'Make sure you choose the correct one.'

"I hope we're using Ruby on High Speed Rails"
"There's Ruby on High Speed Rails, and there's Not Exactly."

option1 = 'High Speed Ruby on Rails'
option2 = 'Not Exactly'
"#{option1} is much better and faster than #{option2}."

Installation

Add this line to your application's Gemfile:

gem 'replace_quotes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install replace_quotes

Usage

In a Ruby script or console, enter the command ReplaceQuotes.update(filename), where filename is the name of the file for which you wish to replace unnecessary double quotes with single quotes.

Development

Testing this gem

Enter sh gem_test.sh.

Testing the source code

Enter sh gem_code.sh.

Running this gem in irb

Enter sh gem_console.sh.

Installing this gem

Enter sh gem_install.sh.

Testing this gem and source code AND installing this gem

Enter sh all.sh.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/replace_quotes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 15 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc