templater 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -34,9 +34,6 @@ spec = Gem::Specification.new do |s|
34
34
 
35
35
  s.add_dependency "highline", ">= 1.4.0"
36
36
  s.add_dependency "diff-lcs", ">= 1.1.2"
37
- # Templater uses facets only for a single instance_exec. This dependency might be a bit stupid.
38
- # s.add_dependency "facets", ">= 2.2.0"
39
- # FIXME: I've commented this out since it keeps installing Facets 2.4.1 which seems to be broken in some ways.
40
37
  end
41
38
 
42
39
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -0,0 +1,14 @@
1
+ module Kernel
2
+ unless (RUBY_VERSION[0,3] == '1.9')
3
+ def instance_exec(*args, &block)
4
+ mname = "__instance_exec_#{Thread.current.object_id.abs}_#{object_id.abs}"
5
+ Object.class_eval{ define_method(mname, &block) }
6
+ begin
7
+ ret = send(mname, *args)
8
+ ensure
9
+ Object.class_eval{ undef_method(mname) } rescue nil
10
+ end
11
+ ret
12
+ end
13
+ end
14
+ end
data/lib/templater.rb CHANGED
@@ -4,7 +4,6 @@ require 'rubygems'
4
4
  require 'highline'
5
5
  require "highline/import"
6
6
  require 'diff/lcs'
7
- require 'facets'
8
7
 
9
8
 
10
9
  require path + 'capture_helpers'
@@ -18,6 +17,7 @@ require path + 'cli/parser'
18
17
  require path + 'cli/manifold'
19
18
  require path + 'cli/generator'
20
19
  require path + 'core_ext/string'
20
+ require path + 'core_ext/kernel'
21
21
 
22
22
  require 'erb'
23
23
 
@@ -40,6 +40,6 @@ module Templater
40
40
  class MalformattedArgumentError < ArgumentError #:nodoc:
41
41
  end
42
42
 
43
- VERSION = '0.1.2'
43
+ VERSION = '0.1.3'
44
44
 
45
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: templater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Nicklas
@@ -9,7 +9,7 @@ autorequire: templater
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-22 00:00:00 +02:00
12
+ date: 2008-07-24 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -54,6 +54,7 @@ files:
54
54
  - lib/templater/cli/manifold.rb
55
55
  - lib/templater/cli/parser.rb
56
56
  - lib/templater/core_ext
57
+ - lib/templater/core_ext/kernel.rb
57
58
  - lib/templater/core_ext/string.rb
58
59
  - lib/templater/empty_directory.rb
59
60
  - lib/templater/file.rb