fix lint errors
This commit is contained in:
		
							
								
								
									
										2
									
								
								app.rb
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								app.rb
									
									
									
									
									
								
							| @@ -432,7 +432,7 @@ get "/chunked/:delay" do | ||||
|   delay = Float(params[:delay]) | ||||
|   stream do |out| | ||||
|     30.times do |i| | ||||
|       out << jsonify({id: i, message: i % 2 == 0 ? "tick" : "tock"}) | ||||
|       out << jsonify({id: i, message: (i % 2).zero? ? "tick" : "tock"}) | ||||
|       sleep delay | ||||
|     end | ||||
|   end | ||||
|   | ||||
| @@ -31,8 +31,7 @@ class Config | ||||
|   end | ||||
|  | ||||
|   def to_json(options = nil) | ||||
|     if options && | ||||
|        options.key?(:pretty) && | ||||
|     if options&.key?(:pretty) && | ||||
|         options[:pretty] == true | ||||
|       JSON.pretty_generate as_json(options) | ||||
|     else | ||||
|   | ||||
| @@ -4,7 +4,7 @@ $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib" | ||||
|  | ||||
| require "sensitive" | ||||
|  | ||||
| ALPHABET = ('a' .. 'z').reduce(:concat) | ||||
| ALPHABET = ("a".."z").reduce(:concat) | ||||
|  | ||||
| describe "Sensitive" do | ||||
|   before do | ||||
|   | ||||
		Reference in New Issue
	
	Block a user