yac 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
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
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.3'
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 mv linux linux/ to rename linux to linux/linux
137
- new_filename = args[1] =~ /\/$/ ? args[1] : args[1] + file.match(/[^\/]$/).to_s
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 ? '..' + name.reverse[0,20].reverse : name
268
+ content = name.size > 22 ? name + "\n" : name
269
269
  end
270
270
 
271
271
  def choose_range(size)
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{yac}
5
- s.version = "1.4.3"
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-03-28}
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.3
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-03-28 00:00:00 +08:00
12
+ date: 2009-05-13 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15