template 1.0.0 → 1.2.1
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.
- data/.redcar/tags +2 -1
- data/LICENSE.txt +0 -2
- data/README.rdoc +8 -8
- data/VERSION +1 -1
- data/lib/generators/template/template_generator.rb +14 -0
- data/lib/generators/template/templates/public/stylesheets/screen.css +5 -2
- data/template.gemspec +2 -2
- metadata +5 -5
data/.redcar/tags
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
1298981223
|
2
2
|
TemplateGenerator C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb class TemplateGenerator
|
3
3
|
TestCase C:/Users/paul.brennan/workspace/template/test/helper.rb class Test::Unit::TestCase
|
4
4
|
TestTemplate C:/Users/paul.brennan/workspace/template/test/test_template.rb class TestTemplate
|
5
5
|
add_routes C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb def add_routes
|
6
6
|
copy_template_files C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb def copy_template_files
|
7
7
|
generate_navigation C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb def generate_navigation
|
8
|
+
run_post_install_scripts C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb def run_post_install_scripts
|
8
9
|
setup_db C:/Users/paul.brennan/workspace/template/lib/generators/template/template_generator.rb def setup_db
|
data/LICENSE.txt
CHANGED
data/README.rdoc
CHANGED
@@ -2,16 +2,16 @@ Description:
|
|
2
2
|
Generates some necessary files to start creating webapp from rails
|
3
3
|
|
4
4
|
Example:
|
5
|
-
add to gem file:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
add to gem file:
|
6
|
+
gem 'template'
|
7
|
+
gem 'pg'
|
8
|
+
gem 'simple-navigation'
|
9
|
+
bundle
|
10
|
+
rails g template APPNAME --force
|
11
|
+
rake db:setup
|
12
12
|
rails s
|
13
13
|
== Copyright
|
14
14
|
|
15
|
-
Copyright (c)
|
15
|
+
Copyright (c) 2011 Yule. See LICENSE.txt for
|
16
16
|
further details.
|
17
17
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.1
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'Rake' #need rake to be able to execute shell commands
|
1
2
|
class TemplateGenerator < Rails::Generators::NamedBase
|
2
3
|
source_root File.expand_path('../templates', __FILE__)
|
3
4
|
|
@@ -29,6 +30,19 @@ class TemplateGenerator < Rails::Generators::NamedBase
|
|
29
30
|
|
30
31
|
def setup_db
|
31
32
|
plugin('easypg', :git=>'git://github.com/rahim/easypg.git')
|
33
|
+
end
|
34
|
+
|
35
|
+
def run_post_install_scripts
|
36
|
+
begin
|
37
|
+
sh 'rm public/index.html' #todo other OS.
|
38
|
+
sh 'rake db:setup'
|
39
|
+
rescue
|
40
|
+
puts '----- Unable to run post install scripts. You need to: -------'
|
41
|
+
puts '| - Remove index file in index.html |'
|
42
|
+
puts '| - Run rake db:setup |'
|
43
|
+
puts '| - Start your server: rails server |'
|
44
|
+
puts '---------------------------------------------------------------'
|
45
|
+
end
|
32
46
|
end
|
33
47
|
|
34
48
|
end
|
@@ -4,12 +4,15 @@ html{
|
|
4
4
|
overflow-y: scroll;
|
5
5
|
}
|
6
6
|
|
7
|
-
div
|
7
|
+
/* -- uncomment this div if you want outlines on all divs --*/
|
8
|
+
/*
|
9
|
+
div{
|
8
10
|
border: 1px solid #44dd11;
|
9
11
|
-webkit-border-radius: .3em;
|
10
12
|
-moz-border-radius: .3em;
|
11
13
|
border-radius: .3em;
|
12
14
|
}
|
15
|
+
*/
|
13
16
|
|
14
17
|
body{
|
15
18
|
background-color: #fff;
|
@@ -22,7 +25,7 @@ body{
|
|
22
25
|
}
|
23
26
|
|
24
27
|
#header{
|
25
|
-
height:
|
28
|
+
height: 50px;
|
26
29
|
padding: 20px;
|
27
30
|
|
28
31
|
}
|
data/template.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{template}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Yule"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-01}
|
13
13
|
s.description = %q{Creates a bunch of files that most apps will have. Shoudl be used at the beginning of the project. Stops the tedious job of having to set up page templates etc}
|
14
14
|
s.email = %q{paul.brennan@ahc.uk.com}
|
15
15
|
s.extra_rdoc_files = [
|
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:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 2
|
9
|
+
- 1
|
10
|
+
version: 1.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Yule
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-01 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|