fake_go_up 0.1.3 → 0.2.0

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: e4749a4760bb70805a732a52247e24d546831917
4
- data.tar.gz: 35ff55beec0f6579a79fd1885836618f26cbd819
3
+ metadata.gz: a0de6d5060c4acaaab92fc40d85d5ab8759f3344
4
+ data.tar.gz: 89ef88ceadbd74001589cce7c50335967e6aa50f
5
5
  SHA512:
6
- metadata.gz: 378a6393a58449f74dd676b29315490846a5fc4083f583ffc3240b3a73685f0d8c8fc17283cd522fc012870fbbca00092ee8d1e538992dced3c95c96cab88713
7
- data.tar.gz: 69ab6d05575862037924b044eb93b19a86ecca8d84126bbbfce2a41c5f07828c227fae54081ab4f7373db08d6a5dacd28a2ba2e78fe24d00d09dff55674d297c
6
+ metadata.gz: d05d52cbfb65624269c33bfbfb5c58566c86a833f97da14391418f63cc0c404e540f6bd424a1819d63c36b24c29c3ac88428a00c41cc3dfb68da2ef6c748e968
7
+ data.tar.gz: 9464ee40a1b5d6152c49d5cfbb28f08584f5513e05c1ca78e021052cef1de480fc8eaf634efd2d1a9926b3a819c4a1d6a83490c8b4c8669269c87ee9c8435c47
data/lib/fake_go_up.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "fake_go_up/version"
2
2
  require "fake_go_up/task"
3
+ require "fake_go_up/item"
3
4
  require "pid_lock"
4
5
  Dir["lib/voters/*.rb"].each {|file| load file }
5
6
 
@@ -0,0 +1,26 @@
1
+ module FakeGoUp
2
+ class Item
3
+ attr_accessor :count
4
+
5
+ @@data = {}
6
+
7
+ def initialize(id = 1)
8
+ @id = id
9
+ @count = 0
10
+ end
11
+
12
+ def id
13
+ @id
14
+ end
15
+
16
+ def self.find_by_id(id)
17
+ @@data[id.to_i]
18
+ end
19
+
20
+ def self.create(id)
21
+ instance = new(id)
22
+ @@data[id] = instance
23
+ instance
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  module FakeGoUp
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_go_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - xuxiangyang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2015-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pid_lock
@@ -126,6 +126,7 @@ files:
126
126
  - bin/setup
127
127
  - fake_go_up.gemspec
128
128
  - lib/fake_go_up.rb
129
+ - lib/fake_go_up/item.rb
129
130
  - lib/fake_go_up/task.rb
130
131
  - lib/fake_go_up/version.rb
131
132
  homepage: https://github.com/xuxiangyang/fake_go_up