smart_aleck 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTIwMTIyMmFiNWQyYzg1NTk4MWM1NWI1ZjQ0NzJiYzU2MmI3ZWU5MA==
4
+ YThiZjJmZDE5M2IxMjc2MDRjZDhiNDgxYTZlNzhjMjQwMmZlZGQ4ZA==
5
5
  data.tar.gz: !binary |-
6
- OTYxZTg4YTVmODRhOTBjNzU4ZWRjZDJjZWI3ODEyMzRjMDdiNTIwZg==
6
+ ZjhjMGEzNzMzZTc3MjMxMDU1OWMxYzc0NzlkMmU0MTUwMTJhZDc1MQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzM1M2FjZDk4ZDJiZDIyMzA5MzgxZDQ0NjI0MjQ5YjJmODlkYjZmOGU5ZjQ3
10
- NTUyMWQyMmRkYTlmZjg5ODYwMDg0NmU1ZjgwOWExYWQxOTc1NjdlMGQ0MWI2
11
- N2MyYWY1ZGM2MjA1NzJmMWJjZTVmMGViNWMyNjY1ZjE0MWU1Zjc=
9
+ YjNjY2RlODhiNTNkZTM4ODcxMTc4MzZmNGEyMWI3YTIwYTQ2YzQxYjA0MDM2
10
+ YTU2MTEyZDJlZDg0NWFhOTBlYWE0OTRkYWMyMTYwMGZhNTZjMTkxNjYzM2Jl
11
+ MzdjYzMwMTM1OTdiODc0N2FjZmNjODkzZTYwYzdhYTk1NTFiY2U=
12
12
  data.tar.gz: !binary |-
13
- NjQ5ZjUwMThhNmU2M2ZlOTkxODUwYWNhMTk1MDU0Njg4ZjdkMzVhZTA5MmRl
14
- ZTBjOGU5NTQ4NGNmYTY4MzZmMTE2YWViYzgxNTA4MjRhNTM4NjY3ZGJlYmUz
15
- NGI3ZTEwOWUyMGE1MjY5NmE2MjMyMTQ2NjYxNDgyNmY2ZjViMjI=
13
+ YzQyZDg0MjYzYTBkNmU4OTFlN2FhNzNmYjU1OTNiMDBiZmRhNzcyOThiMzE0
14
+ NjgwZDVhZjA3OWMyOWE5NmY4NmVjODMxOGZmYmE5Y2UxN2M4ZjBkMTViNjQ2
15
+ YmMwYTUyNWNiZjQ1MWY3ZWIzYjBmNmEwOWU5M2Q0YjhiMjgzYjg=
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *~
11
+ *.swp
@@ -1,3 +1,5 @@
1
+ require 'base58'
2
+
1
3
  module SmartAleck
2
4
  class CategoryIndexer
3
5
  attr_reader :category_hash
@@ -8,9 +10,11 @@ module SmartAleck
8
10
 
9
11
  def initialize(categories)
10
12
  @category_hash =
11
- categories.map {|category|
12
- 2 ** (category.respond_to?(:id) ? category.id : category).to_i
13
- }.inject(:|).to_i
13
+ Base58.encode(
14
+ categories.map {|category|
15
+ 2 ** (category.respond_to?(:id) ? category.id : category).to_i
16
+ }.inject(:|).to_i
17
+ )
14
18
  end
15
19
  end
16
20
  end
@@ -1,3 +1,3 @@
1
1
  module SmartAleck
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -23,4 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec", "~> 3.2"
24
24
  spec.add_development_dependency "faker", "~> 1.4"
25
25
  spec.add_runtime_dependency "optionally"
26
+ spec.add_runtime_dependency "base58", "~> 0.1"
26
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_aleck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Walters
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: base58
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '0.1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '0.1'
83
97
  description:
84
98
  email:
85
99
  - pooster@gmail.com