briskly 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: c1e4055da36518f843ffa0a729ec7ab016d2ab9d
4
- data.tar.gz: cd3a5302b93311c7639379865fcf20d9293e1089
3
+ metadata.gz: cc09fb91d10b8b72f768bdda7498d3b245ecb4c4
4
+ data.tar.gz: a643a2fbb0bc19a203baf9e267377e66b730c889
5
5
  SHA512:
6
- metadata.gz: 7256bcc2ba6efe086617b0b0fff4d607396ab013ff702bdb28534134d865fe8a1ab89dca3ca4e46706a2c67d42324cde543771ada1c05204c75c277165c2fe5e
7
- data.tar.gz: 454ee238cf15ffdf96416f66d8d8b8acc8dfc2b2014445492882105e39840172cfe588e0be7c05c5f9d504ba29922e6825c44982f77b186e3091fff294a63ee5
6
+ metadata.gz: b95555fac955a3aa13adafb120ac63dfedd561d585bb9dedadbd53484fb1c91cb0dfd26f31b18c8df2f50c2d791215f8ddfe1ef1bc1a1a5532765d65f7cbdc18
7
+ data.tar.gz: 738eb8736657105116025df1e2403ead482eeb6e8f311c479918a34e66bc7e29ade269bf6572f64a7e3c7461c3c63dafee1390c82b085e8ce0d10ac585607ba1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- briskly (0.1.1)
4
+ briskly (0.1.2)
5
5
  fast_trie
6
6
  i18n
7
7
 
@@ -9,12 +9,11 @@ class Briskly::Store
9
9
  def initialize(key)
10
10
  @key = key
11
11
  @store = Trie.new
12
- @elements = {}
13
12
  end
14
13
 
15
14
  def with(values)
16
15
  @store = Trie.new
17
- @elements = {}
16
+ elements = {}
18
17
 
19
18
  values.each_with_index do |value, index|
20
19
 
@@ -28,15 +27,15 @@ class Briskly::Store
28
27
  # We need to make sure we keep the index
29
28
  # and in order to avoid loops always order
30
29
  # the array after each insertion
31
- @elements[normalised] ||= []
32
- @elements[normalised].push([element, index])
30
+ elements[normalised] ||= []
31
+ elements[normalised].push([element, index])
33
32
  .sort! { |a,b| a[1] <=> b[1] }
34
33
  end
35
34
 
36
35
  end
37
36
 
38
37
 
39
- @elements.each do |key, values|
38
+ elements.each do |key, values|
40
39
  @store.add key, values
41
40
  end
42
41
  end
@@ -1,6 +1,6 @@
1
1
  require 'pathname'
2
2
 
3
3
  module Briskly
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  GEMDIR = Pathname.new(__FILE__).parent.parent.parent
6
6
  end
@@ -2,8 +2,6 @@ require 'pry'
2
2
 
3
3
  RSpec.configure do |config|
4
4
  config.treat_symbols_as_metadata_keys_with_true_values = true
5
- config.run_all_when_everything_filtered = true
6
- config.filter_run :focus
7
5
 
8
6
  # Run specs in random order to surface order dependencies. If you find an
9
7
  # order dependency and want to debug it, you can fix the order by providing
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: briskly
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
  - Pedro Cunha