Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
h1. Hipchat S3
A way to send file uploads to your hipchat channel using s3
Uses the "hipchat gem":https://github.com/mojotech/hipchat and the "aws-s3":https://github.com/marcel/aws-s3
h2. Usage
bc.. hipchat_s3 = HipchatS3.new({:s3 => {:access_key_id => 'your-key', :secret_access_key => 'your-secret', :bucket => 'bucket'}, :hipchat => {:api_token => 'your-token'}}) hipchat_s3.s3_bucket = "another_bucket" # you can change your bucket name whenever you need
hipchat_s3.create_inline_image('image_path.jpg', hipchat_room_id, {:thumbnail_path => "thumb_path.jpg", :username => "Magic", :message => "message", :color => "green"})
hipchat_s3.create_inline_image('image_path.jpg', hipchat_room_id)
hipchat_s3.create_compressed_upload(path_to_compress, hipchat_room_id, {:message => "Files Compressed", :color => "green"})
hipchat_s3.create_file_upload(file_path, hipchat_room_id, {:username => "FileManager"})
hipchat_s3.hipchat_client[hipchat_room_id].send("Enforcer", "Failure! You can't do that!!!", :notify => true, :color => "red")
h2. Methods
bc.. create_compressed_upload(path, room, options={}) create_file_upload(file_path, room, options={}) create_inline_image(image_path, room, options={})
{:username => 'fileuploader', :message => "File Uploaded", :color => 'yellow'}
{:thumbnail_path => nil, :username => 'fileuploader', :message => "Image Uploaded", :color => 'yellow'}
h2. Rspec hook
bc.. config.after(:each) do if example.exception
message = "#{example.full_description} <br> #{example.location}"
hipchat_s3 ||= HipchatS3.new(HIPCHAT_S3)
if example.metadata[:type] == :acceptance && example.metadata[:js] == true
page.driver.browser.save_screenshot("failure.jpg")
hipchat_s3.create_inline_image("failure.jpg", hipchat_id, {:message => message, :username => "Failmaster", :color => "red"})
else
hipchat_s3.hipchat_client[hipchat_id].send("Enforcer", "Failure! YOU BROKE THE BUILD <br> #{message}", :notify => true, :color => "red")
end
end end
FAQs
Unknown package
We found that hipchat-s3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.