ruby_captivate 1.0.23 → 1.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,11 +3,12 @@ module Ruby_Captivate
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path('../../../templates', __FILE__)
5
5
  class_option :template_engine
6
- require 'thor'
6
+ include Thor
7
+
7
8
 
8
- def copy_files
9
9
  copy_file 'ruby_captivate.rb', 'config/initializers/ruby_captivate.rb'
10
- end
10
+
11
11
 
12
12
  end
13
+
13
14
  end
@@ -3,10 +3,24 @@ module Ruby_Captivate
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path('../../../templates', __FILE__)
5
5
  class_option :template_engine
6
+ require 'thor'
7
+
6
8
 
7
- def copy_files
8
9
  copy_file 'ruby_captivate.rb', 'config/initializers/ruby_captivate.rb'
9
- end
10
+
10
11
 
11
12
  end
13
+
14
+ def copy_file(source, *args, &block)
15
+ config = args.last.is_a?(Hash) ? args.pop : {}
16
+ destination = args.first || source
17
+ source = File.expand_path(find_in_source_paths(source.to_s))
18
+
19
+ create_file destination, nil, config do
20
+ content = File.binread(source)
21
+ content = block.call(content) if block
22
+ content
23
+ end
24
+ end
25
+
12
26
  end
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ruby_captivate"
5
- s.version = "1.0.23"
5
+ s.version = "1.0.24"
6
6
  s.authors = ["Michael Leveton"]
7
7
  s.date = %q{2012-01-27}
8
8
  s.description = 'Adobe Captivate reporting for Ruby'
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "ruby_captivate"
5
- s.version = "1.0.22"
5
+ s.version = "1.0.23"
6
6
  s.authors = ["Michael Leveton"]
7
7
  s.date = %q{2012-01-27}
8
8
  s.description = 'Adobe Captivate reporting for Ruby'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_captivate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.23
4
+ version: 1.0.24
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &12173000 !ruby/object:Gem::Requirement
16
+ requirement: &12245580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *12173000
24
+ version_requirements: *12245580
25
25
  description: Adobe Captivate reporting for Ruby
26
26
  email: mleveton@prepcloud.com
27
27
  executables:
@@ -135,7 +135,6 @@ files:
135
135
  - pkg/ruby_captivate-1.0.7/bin/ruby_captivate
136
136
  - pkg/ruby_captivate-1.0.7/lib/ruby_captivate.rb
137
137
  - pkg/ruby_captivate-1.0.7/test/test_ruby_captivate.rb
138
- - ruby_captivate-1.0.22.gem
139
138
  - ruby_captivate.gemspec
140
139
  - ruby_captivate.gemspec~
141
140
  - test/test_ruby_captivate.rb
Binary file