renumber 0.0.4 → 0.0.5

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: 7eda81eb28a118584c94d7fbd8232b70b288c6af
4
- data.tar.gz: 650cd776c5417d2a2eb30f5dd623f813f806c9c6
3
+ metadata.gz: db026d4d2553cc673613f6259d6e4aa373021cfb
4
+ data.tar.gz: e4e5d4043645163f0f432d257e440ada659025f6
5
5
  SHA512:
6
- metadata.gz: e36142f41fe19cfb472f0e78d329d673dcc1273468f30deb57405ef5f7df869157cc9c0eefc584ad14effd0ba714041bc68c2a70bbb2b1ac2398cd5f35f7e266
7
- data.tar.gz: 2018a8be7fb4bbfc76430dbc53059dfd5152cc020cd4d290c6f429baeb78998b94c647ce1771db277a29841073d6af3517191dd49a1d271d23214aa261692aaf
6
+ metadata.gz: 7b9741b79c6c7e28d0f903070af619418fe804951e2e66a914942ba01087253704749fe37d1624aca001654acd55c911ca6c3292a534481fc7d76809808acf28
7
+ data.tar.gz: 8c441232e3c9f2f9cfe5e7bb2008689cebf3498234eb00725611349a4493980ab66754b615e6964973fd078db122d2f02844b27932297cab25a01c6eb43e7d57
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Renumber
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/renumber`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This simple utility allows renaming non-sequential files to be sequentially numbered.
4
+ For example given input files: input00.txt, input03.txt, input99.txt it changes their
5
+ name to: f0.text, f1.text, f2.text
6
6
 
7
7
  ## Installation
8
8
 
@@ -22,14 +22,9 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- ```ruby
26
- require 'renumber'
27
- include Renumber
28
-
29
- sorted_files '.' # -> 0, 3, 4
25
+ Given
30
26
 
31
- change_files '.', 'prefix', '.txt' # -> prefix0.txt, prefix1.txt, prefix2.txt
32
- ```
27
+ $ renumber directory_name [prefix] [suffix]
33
28
 
34
29
  ## Contributing
35
30
 
data/bin/renumber ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'renumber'
4
+
5
+ include Renumber
6
+
7
+ puts 'Usage: renumber directory_name [prefix] [suffix]' unless ARGV[0]
8
+
9
+ change_files ARGV[0], ARGV[1], ARGV[2]
@@ -1,3 +1,3 @@
1
1
  module Renumber
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
data/renumber.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['nick.aschenbach@gmail.com']
11
11
 
12
12
  spec.summary = %q{Simple file utility to renumber sequential files in a directory}
13
- spec.description = %q{Allows renumbering non-sequential files sequentially. For example f00.txt, f03.txt, f99.txt -> f0.txt, f1.txt, f2.txt}
13
+ spec.description = %q{Allows renumbering non-sequential files sequentially. For example f00.txt, f03.txt, f99.txt -> f0.txt, f1.txt, f2.txt. Usage: renumber directory_name [prefix] [suffix]}
14
14
  spec.homepage = 'https://github.com/nick-aschenbach/renumber'
15
15
  spec.license = 'MIT'
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Aschenbach
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-03 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,8 +52,9 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description: Allows renumbering non-sequential files sequentially. For example f00.txt,
56
- f03.txt, f99.txt -> f0.txt, f1.txt, f2.txt
55
+ description: 'Allows renumbering non-sequential files sequentially. For example f00.txt,
56
+ f03.txt, f99.txt -> f0.txt, f1.txt, f2.txt. Usage: renumber directory_name [prefix]
57
+ [suffix]'
57
58
  email:
58
59
  - nick.aschenbach@gmail.com
59
60
  executables: []
@@ -69,6 +70,7 @@ files:
69
70
  - LICENSE.txt
70
71
  - README.md
71
72
  - Rakefile
73
+ - bin/renumber
72
74
  - lib/renumber.rb
73
75
  - lib/renumber/version.rb
74
76
  - renumber.gemspec