shard-container 0.8.1 → 0.9.0

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 (3) hide show
  1. checksums.yaml +4 -4
  2. metadata +9 -13
  3. data/readme.md +0 -67
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41dad1f55aae92f23394c0896228e323c180b505
4
- data.tar.gz: ca86d812315874c9d1bfd5368cb6151cc1409057
3
+ metadata.gz: 9a59bf5f9976b99a94988d75ca6aefb3fffafdfd
4
+ data.tar.gz: 29291c3ecc7ed92298999ebefd996f2ca6cca3e3
5
5
  SHA512:
6
- metadata.gz: 66f12801b8790e470dcef3001f86c634e04fac548e5139c57d6cf858c711bacde2a16d1ccf718b00cffe4a8d578344f48b1fc8632f7e1abc549b8c27cb7fabea
7
- data.tar.gz: 276631e41c9b6dab78ad0290ef54f47e646bf72d927755330b6339dbb1611efe974560c45a8fb6c3b09a047654708ef61bf70a7199dd933a92447f02279b2835
6
+ metadata.gz: 5c0c3ae4d81fb11cdef585d4754e22344348c4a9e8fe6725721b38fa976b0cf347769a6713cf02876430762eb721f89bc5b2b9a5121ce607c1a0dd1da49c7afb
7
+ data.tar.gz: 46c4b614f0a2c10a5a427d0560929288ca4a5978f3937a0c45156ff3a75e953bc359e80bfdbb87e1df7813489bfaa40d07de4d2e2d57aa6e9b5c8c8b73fe7518
metadata CHANGED
@@ -1,38 +1,34 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shard-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
- - Chitoge
7
+ - Ao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An intuitive new container class for everyone from the everyday programmer
14
14
  to the expert rubyist.
15
- email: RRTechFreelance@gmail.com
15
+ email:
16
16
  executables: []
17
17
  extensions: []
18
- extra_rdoc_files:
19
- - readme.md
18
+ extra_rdoc_files: []
20
19
  files:
21
20
  - lib/shard.rb
22
21
  - lib/shard/core.rb
23
22
  - lib/shard/formatting.rb
24
23
  - lib/shard/util.rb
25
- - readme.md
26
- homepage: https://github.com/Nevermore-BD/Shard
24
+ homepage: https://github.com/Ao-san/Shard
27
25
  licenses:
28
26
  - MIT
29
- - IBM Public License
30
- metadata:
31
- homepage: https://github.com/Nevermore-BD/Shard
27
+ metadata: {}
32
28
  post_install_message:
33
29
  rdoc_options: []
34
30
  require_paths:
35
- - "."
31
+ - lib
36
32
  required_ruby_version: !ruby/object:Gem::Requirement
37
33
  requirements:
38
34
  - - ">="
@@ -45,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
41
  version: '0'
46
42
  requirements: []
47
43
  rubyforge_project:
48
- rubygems_version: 2.4.5.1
44
+ rubygems_version: 2.6.6
49
45
  signing_key:
50
46
  specification_version: 4
51
47
  summary: A Hash, and then some.
data/readme.md DELETED
@@ -1,67 +0,0 @@
1
- [![Gem Version](https://badge.fury.io/rb/shard-container.svg)](https://badge.fury.io/rb/shard-container)
2
-
3
- # Shard
4
-
5
- ## What is Shard?
6
- > Shard is an intuitive container class that allows extended capabilities of Hashes and arrays, as well as extra methods for formatting and aliases.
7
-
8
- ## Methods
9
- > ##### Initialization
10
- > A shard's initial parameters are the symbols that you can access via method calls (ex `Shard.values[0].name`) and can be set to any non-iterable. For ease of documenting my code, we'll just use key/val/util.
11
- >
12
- > test1=Shard.new(key,val,util)
13
- >
14
- > ##### Inserting a new segment to a shard
15
- > Adding to a shard can be done one of two ways.
16
- >
17
- > test=Shard.new(:key,:val,:util) #initialize the shard
18
- >
19
- > test.insert(-1,'foo',:bar,123) #inserts at last position
20
- > test.insert(0,'foo',:baz,123) #inserts at position 0
21
- > test.values<<['foo',:bar,123] #this can be cleaned up later
22
- >
23
- > ##### Deleting shard elements
24
- > Deleting from a shard is also easily done. The type parameter is automatically converted to a symbol, so it can be any non-iterable that matches an identifier.
25
- >
26
- > test=Shard.new(:key,:val,:util) #initialize the shard
27
- > test.add(-1,'foo',:bar,123) #add to the shard
28
- >
29
- > test.delete('key','foo') #delete by key
30
- > test.delete(:val,':bar') #delete by value
31
- > test.delete(false,0,2) #delete everything from position 0 to 2
32
- > test.delete(:util,123,0,2) #delete all utils that match 123 from position 0 to 2
33
- >
34
- > ##### Correction
35
- > Shards also supply a few formatting methods.
36
- >
37
- > test=Shard.new(:key,:val,:util) #initialize the shard
38
- > x.values<<[1,2,3] #add to the shard manually
39
- > => [[1, 2, 3]]
40
- > test.corr #convert all manually inserted array to formatted Dict2 Structs
41
- > => [#<struct key=1, val=2, util=3>]
42
- >
43
- > ##### Pruning
44
- > Pruning a shard down to its unique identifiers is accomplished using the following aliases, or a raw `Shard.prune` method call using any combination of the shard identifiers.
45
- >
46
- > Shard.pAll #prune all
47
- > Shard.pruneAll #alias for pAll
48
- > Shard.prune(:key,:val) #prune both keys and values
49
- >
50
- > ##### Cleaning shards
51
- > Cleaning a shard using the `.clean` method returns an Array (nested, if more than one set is selected) of readable sets with all elements in their original types.
52
- >
53
- > Shard.clean #cleans and returns entire shard
54
- > Shard.clean(0) #cleans and returns shard element at index 0
55
- > Shard.clean(0,2) #cleans and returns shard elements at indexes 0 to 2
56
- >
57
- > ##### Listing
58
- > Listing shard elements is done with the `.list` method, like so
59
- >
60
- > Shard.list(:key,0,2) #returns all keys between index 0 and 2
61
- > Shard.listPos(:key,0) #returns the key at index 0
62
- >
63
- > ##### Meta tags
64
- > Getting a shard's meta information is done with the following methods or aliases
65
- >
66
- > Shard.meta.all #return a Hash of all meta tags
67
- > Shard.meta.[metatag] #return the supplied metatag's value (can be size, is_empty, num_indentifiers, identifiers, creationStamp, or editStamp)