rhj_init 0.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class InitGenerator < Rails::Generators::Base
|
2
|
+
def self.source_root
|
3
|
+
@source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
4
|
+
end
|
5
|
+
|
6
|
+
def init_generator
|
7
|
+
# move application.html.erb + application_helper.rb templates
|
8
|
+
copy_file 'application.html.erb', 'app/views/layouts/application.html.erb'
|
9
|
+
copy_file 'application_helper.rb', 'app/helpers/application_helper.rb'
|
10
|
+
|
11
|
+
# get newest rails <-> jquery bridge
|
12
|
+
get 'http://github.com/rails/jquery-ujs/raw/master/src/rails.js', 'public/javascripts/rails.js'
|
13
|
+
|
14
|
+
# create application css + js file
|
15
|
+
create_file 'public/stylesheets/application.css'
|
16
|
+
create_file 'public/javascripts/application.js'
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Title<%= getTitle yield :title %></title>
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<meta name="author" content="">
|
7
|
+
<meta name="description" content="<%= getDescription yield :pageDescription %>">
|
8
|
+
|
9
|
+
<%= stylesheet_link_tag 'application' %>
|
10
|
+
<%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application' %>
|
11
|
+
<%= yield :head %>
|
12
|
+
|
13
|
+
<link rel="shortcut icon" href="/favicon.ico">
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<%= yield %>
|
17
|
+
</body>
|
18
|
+
</html>
|
metadata
CHANGED
@@ -4,11 +4,12 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
8
|
-
|
7
|
+
- 2
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
9
10
|
platform: ruby
|
10
|
-
authors:
|
11
|
-
|
11
|
+
authors:
|
12
|
+
- Mendel Looije
|
12
13
|
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
@@ -40,8 +41,10 @@ extensions: []
|
|
40
41
|
extra_rdoc_files: []
|
41
42
|
|
42
43
|
files:
|
43
|
-
- lib/init/init_generator.rb
|
44
|
-
- lib/init/
|
44
|
+
- lib/generators/init/init_generator.rb
|
45
|
+
- lib/generators/init/templates/application.html.erb
|
46
|
+
- lib/generators/init/templates/application_helper.rb
|
47
|
+
- lib/generators/init/USAGE
|
45
48
|
has_rdoc: true
|
46
49
|
homepage:
|
47
50
|
licenses: []
|
@@ -71,6 +74,6 @@ rubyforge_project:
|
|
71
74
|
rubygems_version: 1.3.6
|
72
75
|
signing_key:
|
73
76
|
specification_version: 3
|
74
|
-
summary: Rails 3, HTML5, jQuery
|
77
|
+
summary: Rails 3, HTML5, jQuery based project files generator
|
75
78
|
test_files: []
|
76
79
|
|
data/lib/init/init_generator.rb
DELETED
File without changes
|