shameless 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/shameless/model.rb +4 -0
- data/lib/shameless/store.rb +7 -7
- data/lib/shameless/version.rb +1 -1
- data/shameless.gemspec +2 -2
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 62705914e1b3d5a6e300d9038b669340ce5bca3cd9ae6fa5f42f22aee5933c94
|
4
|
+
data.tar.gz: 235c7b59732597c09afe2c90d9860e9ed35f59005b305460b7810e7394cc047a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1791591147dfb26da4c28ffdc83fad51c6ef4cf03697950697d396b41a085f24434edc120bae3c0b30d2260d0dc3fa32b68cda96c247e33d241bfeaf43550510
|
7
|
+
data.tar.gz: '08b5c198fbb14bceb004b422032615370f6b1d17db538067dce98ea3fe7b5548e94356c6ed3b5826d41ba746ff930ed51870895e09dc436b80707a7224dec5ed'
|
data/CHANGELOG.md
CHANGED
data/lib/shameless/model.rb
CHANGED
data/lib/shameless/store.rb
CHANGED
@@ -64,6 +64,13 @@ module Shameless
|
|
64
64
|
shardable_value % @configuration.shards_count
|
65
65
|
end
|
66
66
|
|
67
|
+
def find_table(table_name, shardable_value)
|
68
|
+
shard = find_shard(shardable_value)
|
69
|
+
partition = find_partition_for_shard(shard)
|
70
|
+
table_name = table_name_with_shard(table_name, shard)
|
71
|
+
partition.from(table_name)
|
72
|
+
end
|
73
|
+
|
67
74
|
private
|
68
75
|
|
69
76
|
def models_hash
|
@@ -103,13 +110,6 @@ module Shameless
|
|
103
110
|
shard.to_s.rjust(6, '0')
|
104
111
|
end
|
105
112
|
|
106
|
-
def find_table(table_name, shardable_value)
|
107
|
-
shard = find_shard(shardable_value)
|
108
|
-
partition = find_partition_for_shard(shard)
|
109
|
-
table_name = table_name_with_shard(table_name, shard)
|
110
|
-
partition.from(table_name)
|
111
|
-
end
|
112
|
-
|
113
113
|
def find_partition_for_shard(shard)
|
114
114
|
partition_index = shard / @configuration.shards_per_partition_count
|
115
115
|
partitions[partition_index]
|
data/lib/shameless/version.rb
CHANGED
data/shameless.gemspec
CHANGED
@@ -5,8 +5,8 @@ require 'shameless/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "shameless"
|
7
7
|
spec.version = Shameless::VERSION
|
8
|
-
spec.authors = ["Olek Janiszewski"]
|
9
|
-
spec.email = ["olek@hoteltonight.com"]
|
8
|
+
spec.authors = ["Olek Janiszewski", "Chas Lemley", "Marek Rosa"]
|
9
|
+
spec.email = ["olek@hoteltonight.com", "chas@hoteltonight.com", "marek@hoteltonight.com"]
|
10
10
|
|
11
11
|
spec.summary = %q{Scalable distributed append-only data store}
|
12
12
|
spec.homepage = "https://github.com/hoteltonight/shameless"
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shameless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olek Janiszewski
|
8
|
+
- Chas Lemley
|
9
|
+
- Marek Rosa
|
8
10
|
autorequire:
|
9
11
|
bindir: exe
|
10
12
|
cert_chain: []
|
11
|
-
date:
|
13
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: msgpack
|
@@ -97,6 +99,8 @@ dependencies:
|
|
97
99
|
description:
|
98
100
|
email:
|
99
101
|
- olek@hoteltonight.com
|
102
|
+
- chas@hoteltonight.com
|
103
|
+
- marek@hoteltonight.com
|
100
104
|
executables: []
|
101
105
|
extensions: []
|
102
106
|
extra_rdoc_files: []
|
@@ -139,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
143
|
- !ruby/object:Gem::Version
|
140
144
|
version: '0'
|
141
145
|
requirements: []
|
142
|
-
|
143
|
-
rubygems_version: 2.6.10
|
146
|
+
rubygems_version: 3.0.3
|
144
147
|
signing_key:
|
145
148
|
specification_version: 4
|
146
149
|
summary: Scalable distributed append-only data store
|