mharris_ext 1.6.0 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 6
3
+ :minor: 7
4
4
  :patch: 0
5
5
  :build:
@@ -1,6 +1,22 @@
1
- def ec(cmd)
2
- puts cmd
3
- res = `#{cmd}`
4
- puts res
1
+ def has_bundler?
2
+ Bundler
3
+ true
4
+ rescue => exp
5
+ return false
6
+ end
7
+
8
+ def ec(cmd,ops={})
9
+ puts cmd unless ops[:silent]
10
+ res = nil
11
+ if has_bundler?
12
+ Bundler.with_clean_env do
13
+ res = `#{cmd}`
14
+ end
15
+ else
16
+ res = `#{cmd}`
17
+ end
18
+
19
+ raise "bad cmd #{$?.to_i} #{cmd} #{res}" unless $?.to_i == 0
20
+ puts res unless ops[:silent]
5
21
  res
6
- end
22
+ end
@@ -0,0 +1,8 @@
1
+ class Object
2
+ def blank?
3
+ to_s.strip == ''
4
+ end
5
+ def present?
6
+ !blank?
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ def bt
2
+ raise 'foo'
3
+ rescue => exp
4
+ puts exp.backtrace.join("\n")
5
+ end
data/mharris_ext.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "mharris_ext"
8
- s.version = "1.6.0"
8
+ s.version = "1.7.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mike Harris"]
12
- s.date = "2012-11-13"
12
+ s.date = "2013-04-12"
13
13
  s.description = "mharris717 utlity methods"
14
14
  s.email = "mharris717@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -35,16 +35,18 @@ Gem::Specification.new do |s|
35
35
  "lib/mharris_ext/gems.rb",
36
36
  "lib/mharris_ext/methods.rb",
37
37
  "lib/mharris_ext/object.rb",
38
+ "lib/mharris_ext/present.rb",
38
39
  "lib/mharris_ext/regexp.rb",
39
40
  "lib/mharris_ext/string.rb",
40
41
  "lib/mharris_ext/time.rb",
42
+ "lib/mharris_ext/trace.rb",
41
43
  "mharris_ext.gemspec",
42
44
  "test/mharris_ext_test.rb",
43
45
  "test/test_helper.rb"
44
46
  ]
45
47
  s.homepage = "http://github.com/GFunk911/mharris_ext"
46
48
  s.require_paths = ["lib"]
47
- s.rubygems_version = "1.8.24"
49
+ s.rubygems_version = "1.8.23"
48
50
  s.summary = "mharris717 utility methods"
49
51
 
50
52
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mharris_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-13 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fattr
@@ -69,9 +69,11 @@ files:
69
69
  - lib/mharris_ext/gems.rb
70
70
  - lib/mharris_ext/methods.rb
71
71
  - lib/mharris_ext/object.rb
72
+ - lib/mharris_ext/present.rb
72
73
  - lib/mharris_ext/regexp.rb
73
74
  - lib/mharris_ext/string.rb
74
75
  - lib/mharris_ext/time.rb
76
+ - lib/mharris_ext/trace.rb
75
77
  - mharris_ext.gemspec
76
78
  - test/mharris_ext_test.rb
77
79
  - test/test_helper.rb
@@ -95,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
97
  version: '0'
96
98
  requirements: []
97
99
  rubyforge_project:
98
- rubygems_version: 1.8.24
100
+ rubygems_version: 1.8.23
99
101
  signing_key:
100
102
  specification_version: 3
101
103
  summary: mharris717 utility methods