template 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 2.0.0
@@ -1,13 +1,11 @@
1
+ require 'rake'
1
2
  require 'rails/generators'
2
- require 'Rake' #need rake to be able to execute shell commands
3
3
  module Template
4
- #kudos to Mike Farmer from stackoverflow http://stackoverflow.com/users/4082/mike-farmer
5
4
  class InstallGenerator < Rails::Generators::Base
6
- desc "Creates some basic files for a rails 3 app"
5
+ desc "Installs some simple files needed for a rails 3 app"
7
6
 
8
- # Add some extra options here:
9
7
  # Commandline options can be defined here using Thor-like options:
10
- # class_option :my_opt, :type => :boolean, :default => false, :desc => "My Option"
8
+ class_option :my_opt, :type => :boolean, :default => false, :desc => "My Option"
11
9
 
12
10
  # I can later access that option using:
13
11
  # options[:my_opt]
@@ -17,6 +15,8 @@ module Template
17
15
  @source_root ||= File.join(File.dirname(__FILE__), 'templates')
18
16
  end
19
17
 
18
+ # Generator Code. Remember this is just suped-up Thor so methods are executed in order
19
+
20
20
  def copy_template_files
21
21
  copy_file 'app/controllers/welcome_controller.rb','app/controllers/welcome_controller.rb'
22
22
  template 'app/views/layouts/application.html.erb'
@@ -60,8 +60,5 @@ module Template
60
60
  end
61
61
  end
62
62
 
63
-
64
-
65
-
66
63
  end
67
64
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{template}
8
- s.version = "1.4.0"
8
+ s.version = "2.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yule"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: template
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
- - 1
8
- - 4
7
+ - 2
9
8
  - 0
10
- version: 1.4.0
9
+ - 0
10
+ version: 2.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yule