sme_storage 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.textile +16 -0
  2. data/lib/sme_storage.rb +2 -2
  3. metadata +3 -3
  4. data/README +0 -12
data/README.textile ADDED
@@ -0,0 +1,16 @@
1
+ A ruby library for uploading files to SMEStorage (http://www.smestorage.com/), and generally interacting with the SMEStorage API.
2
+
3
+ h2. Installing
4
+
5
+ <pre><code>gem install sme_storage</code></pre>
6
+
7
+ h2. Usage
8
+
9
+ <pre><code>require "rubygems"
10
+ require "sme_storage"
11
+
12
+ storage = SmeStorage.new("user", "password")
13
+ storage.authenticate
14
+ storage.upload("/Users/augustl/Desktop/testfile.txt")</code></pre>
15
+
16
+ Author: August Lilleaas, august.lilleaas@gmail.com
data/lib/sme_storage.rb CHANGED
@@ -16,7 +16,7 @@ class SmeStorage
16
16
  # Performs the authentication. Has to be called before upload.
17
17
  def authenticate
18
18
  @token = Api.get_token(@username, @password)
19
- @authenticated = (@token != nil)
19
+ @authenticated = !!@token
20
20
  end
21
21
 
22
22
  # The actual upload. Takes a File instance, or a Pathname, or a
@@ -76,4 +76,4 @@ class SmeStorage
76
76
  false
77
77
  end
78
78
  end
79
- end
79
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sme_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - August Lilleaas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-29 00:00:00 +01:00
12
+ date: 2010-02-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,7 +22,7 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - README
25
+ - README.textile
26
26
  - LICENSE
27
27
  - Rakefile
28
28
  - lib/sme_storage/api.rb
data/README DELETED
@@ -1,12 +0,0 @@
1
- A small ruby library for uploading files to SMEStorage (http://www.smestorage.com/). It does not implement all of SMEStorage's API, just the file upload part.
2
-
3
- Basic usage:
4
-
5
- require "rubygems"
6
- require "sme_storage"
7
-
8
- storage = SmeStorage.new("user", "password")
9
- storage.authenticate
10
- storage.upload("/Users/augustl/Desktop/testfile.txt")
11
-
12
- Author: August Lilleaas, august.lilleaas@gmail.com