yac 1.4.3 → 1.4.4
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.
- data/CHANGELOG +0 -0
- data/Manifest +0 -0
- data/Rakefile +0 -0
- data/lib/git.rb +0 -0
- data/lib/symbol.rb +0 -0
- data/lib/yac.rb +5 -5
- data/yac.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
File without changes
|
data/Manifest
CHANGED
File without changes
|
data/Rakefile
CHANGED
File without changes
|
data/lib/git.rb
CHANGED
File without changes
|
data/lib/symbol.rb
CHANGED
File without changes
|
data/lib/yac.rb
CHANGED
@@ -5,7 +5,7 @@ module Yac
|
|
5
5
|
include Format
|
6
6
|
extend self
|
7
7
|
|
8
|
-
VERSION = '1.4.
|
8
|
+
VERSION = '1.4.4'
|
9
9
|
|
10
10
|
@color = {
|
11
11
|
'head1' => "1;31",
|
@@ -133,10 +133,10 @@ module Yac
|
|
133
133
|
(colorful("Usage:\nyac mv [orign_name] [new_name]","warn");exit) unless args.size == 2
|
134
134
|
file = search_name(args[0],"Rename")
|
135
135
|
|
136
|
-
# You can use $ yac
|
137
|
-
new_filename = args[1]
|
136
|
+
# You can use $ yac -m linux linux/ to rename linux to linux/linux
|
137
|
+
new_filename = (args[1] !~ /\/$/) ? args[1] : args[1] + file.match(/[^\/]*$/).to_s.sub(/\.\w*$/,'')
|
138
138
|
new_filename = '@' + new_filename if file =~ /^#{@main_path}/
|
139
|
-
new_name = add_file(new_filename)
|
139
|
+
new_name = add_file(new_filename,'.yac')
|
140
140
|
|
141
141
|
if new_name && confirm("You Are Renaming #{file} To #{new_name}")
|
142
142
|
Git.mv(file,new_name)
|
@@ -265,7 +265,7 @@ module Yac
|
|
265
265
|
|
266
266
|
def trancate_filename(name)
|
267
267
|
name = name.sub(/\..*$/,'').sub(/^@/,'')
|
268
|
-
content = name.size > 22 ?
|
268
|
+
content = name.size > 22 ? name + "\n" : name
|
269
269
|
end
|
270
270
|
|
271
271
|
def choose_range(size)
|
data/yac.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{yac}
|
5
|
-
s.version = "1.4.
|
5
|
+
s.version = "1.4.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jinzhu Zhang"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-05-13}
|
10
10
|
s.default_executable = %q{yac}
|
11
11
|
s.description = %q{Yet Another Cheat: sexy command line tool for cheat sheet.}
|
12
12
|
s.email = %q{wosmvp@gmail.com}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jinzhu Zhang
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-13 00:00:00 +08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|