utils 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.28
1
+ 0.0.29
data/bin/strip_spaces CHANGED
@@ -22,6 +22,7 @@ find(*pathes) do |filename|
22
22
  config.strip_spaces.prune?(bn) and prune
23
23
  next
24
24
  end
25
+ s.file?(filename) or next
25
26
  config.strip_spaces.skip?(bn) and next
26
27
  File.ascii?(filename) or next
27
28
  STDOUT.puts "Stripping spaces from #{filename.inspect}."
@@ -450,16 +450,26 @@ def ls(*args)
450
450
  puts `ls #{args.map { |x| "'#{x}'" } * ' '}`
451
451
  end
452
452
 
453
- if RUBY_VERSION < '1.9' && defined?(ActiveRecord::Base)
454
- require 'logger'
455
- $real_logger = Logger.new(STDERR)
456
- $logger = Tins::NULL
453
+ if defined?(ActiveRecord::Base)
454
+ $logger = Logger.new(STDERR)
457
455
  def irb_toggle_logging
458
- case $logger
459
- when Tins::NULL
460
- $logger = $real_logger
461
- when Logger
462
- $logger = Tins::NULL
456
+ require 'logger'
457
+ if ActiveRecord::Base.logger != $logger
458
+ $old_logger = ActiveRecord::Base.logger
459
+ ActiveRecord::Base.logger = $logger
460
+ true
461
+ else
462
+ ActiveRecord::Base.logger = $old_logger
463
+ false
464
+ end
465
+ end
466
+
467
+ end
468
+
469
+ if defined?(ActiveRecord::Relation)
470
+ class ActiveRecord::Relation
471
+ def explain
472
+ connection.select_all("EXPLAIN #{to_sql}")
463
473
  end
464
474
  end
465
475
  end
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.0.28'
3
+ VERSION = '0.0.29'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "utils"
5
- s.version = "0.0.28"
5
+ s.version = "0.0.29"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Florian Frank"]
9
- s.date = "2011-12-09"
9
+ s.date = "2011-12-18"
10
10
  s.description = "This ruby gem provides some useful command line utilities"
11
11
  s.email = "flori@ping.de"
12
- s.executables = ["untest", "chroot-libs", "edit_wait", "chroot-exec", "number_files", "search", "strip_spaces", "path", "enum", "edit", "git-empty", "classify", "utils-install-config", "xmp", "discover", "sshscreen", "myex", "probe", "errf", "same_files", "utils-utilsrc", "unquarantine_apps", "vacuum_firefox_sqlite", "sedit"]
13
- s.extra_rdoc_files = ["README.rdoc", "lib/utils/config/config_file.rb", "lib/utils/finder.rb", "lib/utils/version.rb", "lib/utils/find.rb", "lib/utils/config.rb", "lib/utils/editor.rb", "lib/utils/grepper.rb", "lib/utils/file_xt.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils.rb"]
12
+ s.executables = ["chroot-exec", "chroot-libs", "classify", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "myex", "number_files", "path", "probe", "same_files", "search", "sedit", "sshscreen", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
13
+ s.extra_rdoc_files = ["README.rdoc", "lib/utils/config/config_file.rb", "lib/utils/config.rb", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/find.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "lib/utils.rb"]
14
14
  s.files = [".gitignore", "COPYING", "Gemfile", "README.rdoc", "Rakefile", "TODO", "VERSION", "bin/chroot-exec", "bin/chroot-libs", "bin/classify", "bin/discover", "bin/edit", "bin/edit_wait", "bin/enum", "bin/errf", "bin/git-empty", "bin/myex", "bin/number_files", "bin/path", "bin/probe", "bin/same_files", "bin/search", "bin/sedit", "bin/sshscreen", "bin/strip_spaces", "bin/unquarantine_apps", "bin/untest", "bin/utils-install-config", "bin/utils-utilsrc", "bin/vacuum_firefox_sqlite", "bin/xmp", "lib/utils.rb", "lib/utils/config.rb", "lib/utils/config/config_file.rb", "lib/utils/config/gdb/asm", "lib/utils/config/gdb/ruby", "lib/utils/config/gdbinit", "lib/utils/config/irbrc", "lib/utils/config/rdebugrc", "lib/utils/config/screenrc", "lib/utils/config/utilsrc", "lib/utils/config/vim/autoload/Align.vim", "lib/utils/config/vim/autoload/AlignMaps.vim", "lib/utils/config/vim/autoload/rails.vim", "lib/utils/config/vim/autoload/rubycomplete.vim", "lib/utils/config/vim/autoload/sqlcomplete.vim", "lib/utils/config/vim/autoload/vimball.vim", "lib/utils/config/vim/colors/flori.vim", "lib/utils/config/vim/compiler/eruby.vim", "lib/utils/config/vim/compiler/ruby.vim", "lib/utils/config/vim/compiler/rubyunit.vim", "lib/utils/config/vim/ftdetect/ragel.vim", "lib/utils/config/vim/ftdetect/ruby.vim", "lib/utils/config/vim/ftplugin/eruby.vim", "lib/utils/config/vim/ftplugin/ruby.vim", "lib/utils/config/vim/ftplugin/xml.vim", "lib/utils/config/vim/indent/IndentAnything_html.vim", "lib/utils/config/vim/indent/eruby.vim", "lib/utils/config/vim/indent/javascript.vim", "lib/utils/config/vim/indent/ruby.vim", "lib/utils/config/vim/plugin/AlignMapsPlugin.vim", "lib/utils/config/vim/plugin/AlignPlugin.vim", "lib/utils/config/vim/plugin/Decho.vim", "lib/utils/config/vim/plugin/IndentAnything.vim", "lib/utils/config/vim/plugin/bufexplorer.vim", "lib/utils/config/vim/plugin/cecutil.vim", "lib/utils/config/vim/plugin/fugitive.vim", "lib/utils/config/vim/plugin/lusty-explorer.vim", "lib/utils/config/vim/plugin/rails.vim", "lib/utils/config/vim/plugin/rubyextra.vim", "lib/utils/config/vim/plugin/surround.vim", "lib/utils/config/vim/plugin/taglist.vim", "lib/utils/config/vim/plugin/test/IndentAnything/test.js", "lib/utils/config/vim/plugin/vimballPlugin.vim", "lib/utils/config/vim/syntax/Decho.vim", "lib/utils/config/vim/syntax/eruby.vim", "lib/utils/config/vim/syntax/javascript.vim", "lib/utils/config/vim/syntax/ragel.vim", "lib/utils/config/vim/syntax/ruby.vim", "lib/utils/config/vimrc", "lib/utils/editor.rb", "lib/utils/file_xt.rb", "lib/utils/find.rb", "lib/utils/finder.rb", "lib/utils/grepper.rb", "lib/utils/md5.rb", "lib/utils/patterns.rb", "lib/utils/version.rb", "utils.gemspec"]
15
15
  s.homepage = "http://github.com/flori/utils"
16
16
  s.rdoc_options = ["--title", "Utils - Some useful command line utilities", "--main", "README.rdoc"]
@@ -22,18 +22,18 @@ Gem::Specification.new do |s|
22
22
  s.specification_version = 3
23
23
 
24
24
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
- s.add_development_dependency(%q<gem_hadar>, ["~> 0.1.4"])
25
+ s.add_development_dependency(%q<gem_hadar>, ["~> 0.1.1"])
26
26
  s.add_runtime_dependency(%q<tins>, ["~> 0.3"])
27
27
  s.add_runtime_dependency(%q<term-ansicolor>, ["~> 1.0"])
28
28
  s.add_runtime_dependency(%q<dslkit>, ["~> 0.2"])
29
29
  else
30
- s.add_dependency(%q<gem_hadar>, ["~> 0.1.4"])
30
+ s.add_dependency(%q<gem_hadar>, ["~> 0.1.1"])
31
31
  s.add_dependency(%q<tins>, ["~> 0.3"])
32
32
  s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
33
33
  s.add_dependency(%q<dslkit>, ["~> 0.2"])
34
34
  end
35
35
  else
36
- s.add_dependency(%q<gem_hadar>, ["~> 0.1.4"])
36
+ s.add_dependency(%q<gem_hadar>, ["~> 0.1.1"])
37
37
  s.add_dependency(%q<tins>, ["~> 0.3"])
38
38
  s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
39
39
  s.add_dependency(%q<dslkit>, ["~> 0.2"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-09 00:00:00.000000000 Z
12
+ date: 2011-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gem_hadar
16
- requirement: &80082460 !ruby/object:Gem::Requirement
16
+ requirement: &2162524720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.1.4
21
+ version: 0.1.1
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *80082460
24
+ version_requirements: *2162524720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: tins
27
- requirement: &80081600 !ruby/object:Gem::Requirement
27
+ requirement: &2162524280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.3'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *80081600
35
+ version_requirements: *2162524280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: term-ansicolor
38
- requirement: &80080980 !ruby/object:Gem::Requirement
38
+ requirement: &2162523860 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *80080980
46
+ version_requirements: *2162523860
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: dslkit
49
- requirement: &80080010 !ruby/object:Gem::Requirement
49
+ requirement: &2162523440 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,47 +54,47 @@ dependencies:
54
54
  version: '0.2'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *80080010
57
+ version_requirements: *2162523440
58
58
  description: This ruby gem provides some useful command line utilities
59
59
  email: flori@ping.de
60
60
  executables:
61
- - untest
61
+ - chroot-exec
62
62
  - chroot-libs
63
+ - classify
64
+ - discover
65
+ - edit
63
66
  - edit_wait
64
- - chroot-exec
65
- - number_files
66
- - search
67
- - strip_spaces
68
- - path
69
67
  - enum
70
- - edit
68
+ - errf
71
69
  - git-empty
72
- - classify
73
- - utils-install-config
74
- - xmp
75
- - discover
76
- - sshscreen
77
70
  - myex
71
+ - number_files
72
+ - path
78
73
  - probe
79
- - errf
80
74
  - same_files
81
- - utils-utilsrc
75
+ - search
76
+ - sedit
77
+ - sshscreen
78
+ - strip_spaces
82
79
  - unquarantine_apps
80
+ - untest
81
+ - utils-install-config
82
+ - utils-utilsrc
83
83
  - vacuum_firefox_sqlite
84
- - sedit
84
+ - xmp
85
85
  extensions: []
86
86
  extra_rdoc_files:
87
87
  - README.rdoc
88
88
  - lib/utils/config/config_file.rb
89
- - lib/utils/finder.rb
90
- - lib/utils/version.rb
91
- - lib/utils/find.rb
92
89
  - lib/utils/config.rb
93
90
  - lib/utils/editor.rb
94
- - lib/utils/grepper.rb
95
91
  - lib/utils/file_xt.rb
92
+ - lib/utils/find.rb
93
+ - lib/utils/finder.rb
94
+ - lib/utils/grepper.rb
96
95
  - lib/utils/md5.rb
97
96
  - lib/utils/patterns.rb
97
+ - lib/utils/version.rb
98
98
  - lib/utils.rb
99
99
  files:
100
100
  - .gitignore