ssd 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b92b6965932b8d802b091967ab77bb96bc70aeb
4
- data.tar.gz: 31f3d7183f06ebf5bcfb994f9ea98dcce56f25b0
3
+ metadata.gz: 66fbedba3d0cd3cae41d234f436fd58b706d0fd7
4
+ data.tar.gz: 13b3f1c961041b5ce1f3b93b961597c374dd1b90
5
5
  SHA512:
6
- metadata.gz: f7ab0c3636b09dffd47ed82beb7f5f1bdd1ffc149822b172e6be1d8269e8eb9acf33a28c9f365b2c3d8621c5f230189546c38ae1fd2ae5a098abe1462f18f912
7
- data.tar.gz: 4b8a3d685f228d66a99ab8791603c7819b316e6e4ad1669c516b35a2fa37d22ff5880eed16c5c05ce2f8c39c56e05b91415a5cb4b60e56afcf6ad860ea5c0fbe
6
+ metadata.gz: 2afea1097690895891a0cd9c7f6e6037ef8e53cc0e5db637e86426ee518dfd777097afd6e9f6b9e562a1ff1e9436695f6548d737951f07f123e2b555a5dbe4cc
7
+ data.tar.gz: 7bf3abe7e9b32b7fe3b7b8f31f00278acc8cb36e7fa8c468ae0cce283743d8cbfe9649216233fd0306e9b0fb157da3cc9639a62bf5d42872870375e36d15603d
data/README.md CHANGED
@@ -24,18 +24,20 @@ SSD is carefully crafted to scale specially-well with the Microservies Architetu
24
24
  Usage
25
25
  ======
26
26
  ```ruby
27
- class User
28
- include SSD
29
- attr_accessor :id # ssd key
30
- end
27
+ module MyApp
28
+ class User
29
+ include SSD
30
+ attr_accessor :id # ssd key
31
+ end
31
32
 
32
- class API
33
- get '\' do
34
- @user = User.new # Initialize an object form any Class that `include SSD`
35
- @user.id = "generated_id" # Give it an ssd key via it's :id
36
- @user.append # Do an `append` operation and viola! DONE
37
- User.get("generated_id") # Later to read it via Class.get(id)
38
- end
33
+ class API < Sinatra::Base
34
+ get '/' do
35
+ @user = User.new # Initialize an object form any Class that `include SSD`
36
+ @user.id = "generated_id" # Give it an ssd key via it's :id
37
+ @user.append! # Do an `append!` operation and viola! DONE
38
+ User.ssd("generated_id") # Later to read it via Class.ssd(id)
39
+ end
40
+ end
39
41
  end
40
42
  ```
41
43
 
data/lib/ssd.rb CHANGED
@@ -113,7 +113,7 @@ module SSD
113
113
  end
114
114
  end
115
115
 
116
- def fetch id
116
+ def ssd id
117
117
  #TODO add raise if id.nil?
118
118
  last_key = (last_key id)
119
119
  @@ssd_db.transaction true do
@@ -121,8 +121,8 @@ module SSD
121
121
  end
122
122
  end
123
123
 
124
- alias get fetch
125
- alias find fetch
124
+ #alias get fetch
125
+ #alias find fetch
126
126
 
127
127
  def delete *ids
128
128
  @@ssd_db.transaction do
data/lib/ssd/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SSD
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/specs/ssd_spec.rb CHANGED
@@ -27,7 +27,7 @@ describe SSD do
27
27
  @user = User.new
28
28
  @user.id = @generated_id
29
29
  @user.append!
30
- user = User.get(@generated_id)
30
+ user = User.ssd(@generated_id)
31
31
  user.id.must_equal @generated_id
32
32
  end
33
33
  end
@@ -40,11 +40,11 @@ describe SSD do
40
40
  @user.location = "Egypt"
41
41
  @user.append!
42
42
 
43
- @user = User.get(@generated_id)
43
+ @user = User.ssd(@generated_id)
44
44
  @user.location = "Brazil"
45
45
  @user.append!
46
46
 
47
- @user = User.get(@generated_id)
47
+ @user = User.ssd(@generated_id)
48
48
  @user.location = "France"
49
49
  @user.append!
50
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zotherstupidguy