gitrubydeploy 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/gitrubydeploy/install_generator.rb +17 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 471b2b3be7a4232fa6b0b7e2a267fec3eba92f22
|
4
|
+
data.tar.gz: b286a6248829779848fbc6f110990473aa4b2346
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f6c816cbbac2edc392c3cd2660b9da8d1e7f431900eb7da2a2957fefc13e72baf64cd64869d5af749e12deff4eca90c4549147b75724ef6bbc18bbccc97bbc9
|
7
|
+
data.tar.gz: c7b5f3159370cc1f419c1b5895e1180fe074123ea132f67a684ee9dbf87a40915bd9a00c2ee438ae25e509894924037f51c26cf928b85f5d6744a93cfea8ebe1
|
@@ -1,25 +1,28 @@
|
|
1
1
|
require 'rails/generators'
|
2
2
|
module GitRubyDeploy
|
3
|
-
|
4
|
-
|
3
|
+
module Generators
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('templates', __FILE__)
|
6
|
+
desc "Generate controllers"
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
+
# Commandline options can be defined here using Thor-like options:
|
9
|
+
# class_option :my_opt, :type => :boolean, :default => false, :desc => "My Option"
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
# I can later access that option using:
|
12
|
+
# options[:my_opt]
|
11
13
|
|
12
14
|
|
13
|
-
|
14
|
-
@source_root ||= File.join(File.dirname(__FILE__), 'templates')
|
15
|
-
|
15
|
+
# def self.source_root
|
16
|
+
# @source_root ||= File.join(File.dirname(__FILE__), 'templates')
|
17
|
+
# end
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
# Generator Code. Remember this is just suped-up Thor so methods are executed in order
|
20
|
+
def copy_files
|
21
|
+
copy_file 'config/controllers/deploy_controller.rb', 'app/controllers/deploy_controller.rb'
|
22
|
+
inject_into_file "post '/deploy', to: 'deploy_controller#deploy'\n", :before => /^end/
|
23
|
+
end
|
22
24
|
|
23
25
|
|
26
|
+
end
|
24
27
|
end
|
25
28
|
end
|