renumber 0.0.2 → 0.0.3

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: b3e6ccb17d5851f28e40ca9af9b2c561b3449401
4
- data.tar.gz: 9d21d21d6a05b9f9c921ae671d1d752ef317b894
3
+ metadata.gz: 8d5ae0d70453c1927e42ab1d872cfd5fcad84619
4
+ data.tar.gz: 29772e091d357bd3eaeca9cd650ec93c95de2c25
5
5
  SHA512:
6
- metadata.gz: 999777a5ee83ed945afb2e133415d0fa2d17013a41e494d0d868a060e0fab4b02024d20285cbb54879a1676824b85b6948f95ecbac84d858276e24484814f94c
7
- data.tar.gz: b0059134f6f8b9c3f2877d2d5a7140ad483b64c34fa9f3e711f6c606f525706fd43905ae0da6fe97c822e9bb92b6d33c2b16f303fd0af4e600c6030eb693dacc
6
+ metadata.gz: c88b6b82c43dc285e5eaba61782f7b82945318928d0782280bc24fe639af9b20273fca746f5d7e292c1f51f8fb03e35586cf3174548be31edcd11f8feafe9e5a
7
+ data.tar.gz: 2e379521ffb75438279d4aefd6fec576eaa42706ec17996704d5629a100dbf4c0253ccef80c7b79272554bbc958d57844cc36a2fedf5428cd118088de4017e3e
@@ -1,3 +1,3 @@
1
1
  module Renumber
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/renumber.rb CHANGED
@@ -4,6 +4,8 @@ module Renumber
4
4
  def sorted_files(path)
5
5
  raise ArgumentError, 'path must be a directory' unless File.directory?(path)
6
6
 
7
+ Dir.chdir(path)
8
+
7
9
  file_entries_from_path(path).sort
8
10
  end
9
11
 
@@ -11,8 +13,6 @@ module Renumber
11
13
  sorted_files = sorted_files(path)
12
14
  return if sorted_files.length == 0
13
15
 
14
- Dir.chdir(path)
15
-
16
16
  zeros_length = Math.log10(sorted_files.length).ceil
17
17
 
18
18
  sorted_files.each_with_index do |file, index|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Aschenbach