file_distribution 0.2.0 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eaa94a19b025255aaf8b025cbafb52eea7ead248
4
- data.tar.gz: 031ebb61ba60285c500dbc8f98d25ee1e44bbc63
3
+ metadata.gz: f9c5d0ae4ba5ce7f6dd69fc75b1b82855e17a402
4
+ data.tar.gz: b34fb80cc78f1e2e7258554c079b85707a1da796
5
5
  SHA512:
6
- metadata.gz: 9ad739b95a1fef51e32ff247c9b48c5b3fcf43ca29a697b61a0054e810184cf2aa03826e86e70e5174071a81d5e285dfa9f54e30941835833655bce91695ff00
7
- data.tar.gz: 598187de802d1d9c14b0d60b783066a7e27203528aecaf12eb2ab07c3e493f888e94bc07350700e2841b532df0e654c7d70274691efe084606353a588fa972d5
6
+ metadata.gz: 42646d716562e95aef5d89f06d4ef74644c404b307ffdf7c75b69af99944c986899271091220e72a8146672a866fa9f3282e43fcaf42444cbea7c01146b68a42
7
+ data.tar.gz: ae6017973fbdbf7bab4738af3dac7281519eabee810ffc98db6ab61977fa6dabc3be3f7bda7f3d7040546181b4201bd50e13abbbc6071d099ae07b3bab6dca86
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2013 Adam Kubica <caffecoder@kaizen-step.com>
3
+ Copyright (c) 2013 Adam Kubica <xcdr@kaizen-step.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,12 +1,11 @@
1
1
  #
2
- # @author: Adam Kubica (caffecoder) <caffecoder@kaizen-step.com>
2
+ # @author: Adam Kubica (xcdr) <xcdr@kaizen-step.com>
3
3
  #
4
4
 
5
5
  #
6
6
  # Class for manage hashed file distribution.
7
7
  #
8
8
  class FileDistribution
9
-
10
9
  # Creates new instance with directory prefix.
11
10
  #
12
11
  # Params:
@@ -22,7 +21,7 @@ class FileDistribution
22
21
  def set_extension(ext)
23
22
  @ext = ext
24
23
 
25
- @ext = sprintf('.%s', ext) if !ext.empty? && ext.chars.first != '.'
24
+ @ext = format('.%s', ext) if !ext.empty? && ext.chars.first != '.'
26
25
  end
27
26
 
28
27
  # Returns Destination path.
@@ -33,8 +32,8 @@ class FileDistribution
33
32
  # Params:
34
33
  # - id: database file ID etc.
35
34
  def hex_path(id)
36
- hex = sprintf('%x', id)
37
- hex = sprintf('0%s', hex) if hex.length.odd?
35
+ hex = format('%x', id)
36
+ hex = format('0%s', hex) if hex.length.odd?
38
37
  @path = File.join(@prefix, hex.scan(/../))
39
38
  @path += @ext
40
39
  end
@@ -1,5 +1,5 @@
1
1
  #
2
- # @author: Adam Kubica (caffecoder) <caffecoder@kaizen-step.com>
2
+ # @author: Adam Kubica (xcdr) <xcdr@kaizen-step.com>
3
3
  #
4
4
 
5
5
  require 'file_distribution'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_distribution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Kubica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-16 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 10.0.0
33
33
  description: Simple library that allows organize distribution of files within hex
34
34
  based tree.
35
- email: caffecoder@kaizen-step.com
35
+ email: xcdr@kaizen-step.com
36
36
  executables: []
37
37
  extensions: []
38
38
  extra_rdoc_files: []
@@ -41,7 +41,7 @@ files:
41
41
  - Rakefile
42
42
  - lib/file_distribution.rb
43
43
  - test/test_file_distribution.rb
44
- homepage: http://github.org/caffecoder/fdist-ruby
44
+ homepage: https://github.com/xcdr/fdist-ruby
45
45
  licenses:
46
46
  - MIT
47
47
  metadata: {}
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  requirements: []
64
64
  rubyforge_project:
65
- rubygems_version: 2.5.1
65
+ rubygems_version: 2.6.11
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: Simple file distribution library.