cmd_tools 4.1.1 → 4.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/cmd_tools.gemspec CHANGED
@@ -2,6 +2,7 @@ require 'ruby_patch'
2
2
 
3
3
  gem_name = File.basename(__DIR__)
4
4
  require "./lib/#{gem_name}/version"
5
+ require "./lib/#{gem_name}/recommended_shell_settings"
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.files = `git ls-files`.split
@@ -20,31 +21,6 @@ $ cmd_tools help
20
21
  to see details.
21
22
  EOS
22
23
  s.executables << 'cmd_tools'
23
- s.post_install_message = <<-EOS
24
-
25
- # CmdTools
26
- alias bak='cmd_tools backup'
27
- alias tsh='cmd_tools trash'
28
- alias emacs_stop='cmd_tools emacs_stop'
29
- case $(uname) in
30
- # emacs_launch do not work satisfactory on Mac.
31
- "Darwin")
32
- function e(){
33
- files=$@
34
- for file in ${files}
35
- do
36
- [ -e ${file} ] || touch ${file}
37
- done
38
- open -a /Applications/MacPorts/Emacs.app ${files}
39
- }
40
- alias em='/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs --no-window-system --no-init-file'
41
- ;;
42
- *)
43
- alias e='cmd_tools emacs_launch --mode=gui'
44
- alias em='cmd_tools emacs_launch --mode=cui'
45
- ;;
46
- esac
47
-
48
- EOS
24
+ s.post_install_message = "\n#{::CmdTools::RECOMMENDED_SHELL_SETTINGS}\n"
49
25
  s.required_ruby_version = '~> 1.9'
50
26
  end
@@ -0,0 +1,26 @@
1
+ module CmdTools
2
+ RECOMMENDED_SHELL_SETTINGS = <<-EOS
3
+ # CmdTools
4
+ alias bak='cmd_tools backup'
5
+ alias tsh='cmd_tools trash'
6
+ alias emacs_stop='cmd_tools emacs_stop'
7
+ case $(uname) in
8
+ # emacs_launch do not work satisfactory on Mac.
9
+ "Darwin")
10
+ function e(){
11
+ files=$@
12
+ for file in ${files}
13
+ do
14
+ [ -e ${file} ] || touch ${file}
15
+ done
16
+ open -a /Applications/MacPorts/Emacs.app ${files}
17
+ }
18
+ alias em='/Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs --no-window-system --no-init-file'
19
+ ;;
20
+ *)
21
+ alias e='cmd_tools emacs_launch --mode=gui'
22
+ alias em='cmd_tools emacs_launch --mode=cui'
23
+ ;;
24
+ esac
25
+ EOS
26
+ end
@@ -1,3 +1,3 @@
1
1
  module CmdTools
2
- VERSION = '4.1.1'
2
+ VERSION = '4.1.2'
3
3
  end
data/lib/cmd_tools.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module CmdTools
2
2
  require 'cmd_tools/version'
3
+ require 'cmd_tools/recommended_shell_settings'
3
4
  require 'ruby_patch'
4
5
  extend ::RubyPatch::AutoLoad
5
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmd_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-11-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_patch
16
- requirement: &2152145400 !ruby/object:Gem::Requirement
16
+ requirement: &2153631100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152145400
24
+ version_requirements: *2153631100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &2152011080 !ruby/object:Gem::Requirement
27
+ requirement: &2153630520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0.16'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2152011080
35
+ version_requirements: *2153630520
36
36
  description: ! 'Command line tools. Please type
37
37
 
38
38
 
@@ -58,6 +58,7 @@ files:
58
58
  - lib/cmd_tools/commands/emacs_launch.rb
59
59
  - lib/cmd_tools/commands/trash.rb
60
60
  - lib/cmd_tools/config.rb
61
+ - lib/cmd_tools/recommended_shell_settings.rb
61
62
  - lib/cmd_tools/version.rb
62
63
  homepage:
63
64
  licenses: []