Class: DearS3::Authentication
- Inherits:
-
Object
- Object
- DearS3::Authentication
- Includes:
- Singleton
- Defined in:
- lib/dears3/authentication.rb
Instance Method Summary collapse
-
#connect ⇒ Object
TODO: Give option to upload once without storing credentials.
- #create_credentials_file!(credentials) ⇒ Object
Instance Method Details
#connect ⇒ Object
TODO: Give option to upload once without storing credentials.
10 11 12 13 |
# File 'lib/dears3/authentication.rb', line 10 def connect # TODO: Raise error if no credentials file available ::AWS::S3.new aws_credentials end |
#create_credentials_file!(credentials) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/dears3/authentication.rb', line 15 def create_credentials_file! credentials File.open credentials_path, "w" do |f| f.write credentials.to_json f.write "\n" end end |