shnell 0.2.3 → 0.2.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.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/shnell +5 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
data/bin/shnell CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
4
4
  require 'commander/import'
5
5
  require 'filander'
6
6
  require File.join(File.dirname(__FILE__), '../lib/shnell')
7
+ require File.join(File.dirname(__FILE__), '../lib/backup')
7
8
 
8
9
  program :name, 'shnell'
9
10
  program :version, File.read(File.join(File.dirname(__FILE__), '../VERSION'))
@@ -15,6 +16,9 @@ default_command :help
15
16
  SCRIPTS_ROOT = Pathname.new(Dir.pwd)
16
17
  CONFIG_FILENAME = File.join(SCRIPTS_ROOT, "config.yml")
17
18
 
19
+ include Filander
20
+ include Backup
21
+
18
22
  def scripts(pattern = nil)
19
23
  if pattern
20
24
  exp = "**/*#{pattern}*.rb"
@@ -93,14 +97,13 @@ command :run do |c|
93
97
  c.action do |args, options|
94
98
  $:.unshift SCRIPTS_ROOT
95
99
  script = args.shift
96
- include Filander
97
100
 
98
- Filander.quiet = options.quiet
99
101
  behavior = :ask
100
102
  behavior = :skip if options.skip
101
103
  behavior = :pretend if options.pretend
102
104
  behavior = :force if options.force
103
105
  Filander.behavior = behavior
106
+ Filander.quiet = options.quiet
104
107
 
105
108
  if script == "all"
106
109
  pattern = args.shift
@@ -128,9 +131,6 @@ command :backup do |c|
128
131
  c.action do |args, options|
129
132
  script = args.shift
130
133
 
131
- require File.join(File.dirname(__FILE__), '../lib/backup')
132
- include Backup
133
-
134
134
  Filander.quiet = options.quiet
135
135
 
136
136
  if script == "all"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Johannes J. Schmidt
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-08 00:00:00 +02:00
17
+ date: 2010-04-09 00:00:00 +02:00
18
18
  default_executable: shnell
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency