PeterCoulton-rotten-generators 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +7 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/cucumber.yml +1 -0
- data/features/rotten.feature +9 -0
- data/features/step_definitions/rotten_steps.rb +0 -0
- data/features/support/env.rb +4 -0
- data/lib/rotten_generators.rb +3 -0
- data/rails_generators/rotten_layout/USAGE +1 -0
- data/rails_generators/rotten_layout/rotten_layout_generator.rb +46 -0
- data/rails_generators/rotten_layout/templates/helper.rb +1 -0
- data/rails_generators/rotten_layout/templates/layout.html.haml +1 -0
- data/rails_generators/rotten_layout/templates/sass/colour.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/form.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/ie.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/layout.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/print.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/reset.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/screen.sass +1 -0
- data/rails_generators/rotten_layout/templates/sass/type.sass +1 -0
- data/rails_generators/rotten_layout/templates/shared_analytics.html.haml +1 -0
- data/rotten-generators.gemspec +65 -0
- data/spec/rotten_spec.rb +7 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +9 -0
- metadata +82 -0
data/.document
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Peter Coulton
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "rotten-generators"
|
8
|
+
gem.summary = "Collection of rails generators"
|
9
|
+
gem.email = "peter@petercoulton.com"
|
10
|
+
gem.homepage = "http://github.com/PeterCoulton/rotten-generators"
|
11
|
+
gem.authors = ["Peter Coulton"]
|
12
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
13
|
+
end
|
14
|
+
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'spec/rake/spectask'
|
20
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
21
|
+
spec.libs << 'lib' << 'spec'
|
22
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
23
|
+
end
|
24
|
+
|
25
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
26
|
+
spec.libs << 'lib' << 'spec'
|
27
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
28
|
+
spec.rcov = true
|
29
|
+
end
|
30
|
+
|
31
|
+
begin
|
32
|
+
require 'cucumber/rake/task'
|
33
|
+
Cucumber::Rake::Task.new(:features)
|
34
|
+
rescue LoadError
|
35
|
+
task :features do
|
36
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
task :default => :spec
|
41
|
+
|
42
|
+
require 'rake/rdoctask'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
if File.exist?('VERSION.yml')
|
45
|
+
config = YAML.load(File.read('VERSION.yml'))
|
46
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
47
|
+
else
|
48
|
+
version = ""
|
49
|
+
end
|
50
|
+
|
51
|
+
rdoc.rdoc_dir = 'rdoc'
|
52
|
+
rdoc.title = "rotten-generators #{version}"
|
53
|
+
rdoc.rdoc_files.include('README*')
|
54
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
55
|
+
end
|
56
|
+
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/cucumber.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
autotest: --format pretty features
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
class RottenLayoutGenerator < Rails::Generator::Base
|
2
|
+
|
3
|
+
def initialize(runtime_args, runtime_options = {})
|
4
|
+
super
|
5
|
+
@name = @args.first || 'application'
|
6
|
+
end
|
7
|
+
|
8
|
+
def manifest
|
9
|
+
record do |m|
|
10
|
+
m.directory 'app/views/layouts'
|
11
|
+
m.directory 'app/stylesheets/public'
|
12
|
+
m.directory 'app/stylesheets/sass'
|
13
|
+
m.directory 'app/helpers'
|
14
|
+
|
15
|
+
|
16
|
+
m.template "layout.html.haml", "app/views/layouts/application.html.haml"
|
17
|
+
m.file "shared_analytics.html.haml", "app/views/shared/_analytics.html.haml"
|
18
|
+
|
19
|
+
m.file "sass/screen.sass", "public/stylesheets/public/screen.sass"
|
20
|
+
m.file "sass/print.sass", "public/stylesheets/public/print.sass"
|
21
|
+
m.file "sass/ie.sass", "public/stylesheets/public/ie.sass"
|
22
|
+
|
23
|
+
m.file "sass/color.sass", "public/stylesheets/sass/color.sass"
|
24
|
+
m.file "sass/form.sass", "public/stylesheets/sass/form.sass"
|
25
|
+
m.file "sass/layout.sass", "public/stylesheets/sass/layout.sass"
|
26
|
+
m.file "sass/reset.sass", "public/stylesheets/sass/reset.sass"
|
27
|
+
m.file "sass/type.sass", "public/stylesheets/sass/type.sass"
|
28
|
+
|
29
|
+
m.file "helper.rb", "app/helpers/layout_helper.rb"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def file_name
|
34
|
+
@name.underscore
|
35
|
+
end
|
36
|
+
|
37
|
+
protected
|
38
|
+
|
39
|
+
def banner
|
40
|
+
<<-EOS
|
41
|
+
Creates generic layout, stylesheet, and helper files.
|
42
|
+
|
43
|
+
USAGE: #{$0} #{spec.name} [layout_name]
|
44
|
+
EOS
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{rotten-generators}
|
5
|
+
s.version = "0.0.1"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Peter Coulton"]
|
9
|
+
s.date = %q{2009-05-29}
|
10
|
+
s.email = %q{peter@petercoulton.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"cucumber.yml",
|
23
|
+
"features/rotten.feature",
|
24
|
+
"features/step_definitions/rotten_steps.rb",
|
25
|
+
"features/support/env.rb",
|
26
|
+
"lib/rotten_generators.rb",
|
27
|
+
"rails_generators/rotten_layout/USAGE",
|
28
|
+
"rails_generators/rotten_layout/rotten_layout_generator.rb",
|
29
|
+
"rails_generators/rotten_layout/templates/helper.rb",
|
30
|
+
"rails_generators/rotten_layout/templates/layout.html.haml",
|
31
|
+
"rails_generators/rotten_layout/templates/sass/colour.sass",
|
32
|
+
"rails_generators/rotten_layout/templates/sass/form.sass",
|
33
|
+
"rails_generators/rotten_layout/templates/sass/ie.sass",
|
34
|
+
"rails_generators/rotten_layout/templates/sass/layout.sass",
|
35
|
+
"rails_generators/rotten_layout/templates/sass/print.sass",
|
36
|
+
"rails_generators/rotten_layout/templates/sass/reset.sass",
|
37
|
+
"rails_generators/rotten_layout/templates/sass/screen.sass",
|
38
|
+
"rails_generators/rotten_layout/templates/sass/type.sass",
|
39
|
+
"rails_generators/rotten_layout/templates/shared_analytics.html.haml",
|
40
|
+
"rotten-generators.gemspec",
|
41
|
+
"spec/rotten_spec.rb",
|
42
|
+
"spec/spec.opts",
|
43
|
+
"spec/spec_helper.rb"
|
44
|
+
]
|
45
|
+
s.has_rdoc = true
|
46
|
+
s.homepage = %q{http://github.com/PeterCoulton/rotten-generators}
|
47
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
48
|
+
s.require_paths = ["lib"]
|
49
|
+
s.rubygems_version = %q{1.3.1}
|
50
|
+
s.summary = %q{Collection of rails generators}
|
51
|
+
s.test_files = [
|
52
|
+
"spec/rotten_spec.rb",
|
53
|
+
"spec/spec_helper.rb"
|
54
|
+
]
|
55
|
+
|
56
|
+
if s.respond_to? :specification_version then
|
57
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
58
|
+
s.specification_version = 2
|
59
|
+
|
60
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
61
|
+
else
|
62
|
+
end
|
63
|
+
else
|
64
|
+
end
|
65
|
+
end
|
data/spec/rotten_spec.rb
ADDED
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: PeterCoulton-rotten-generators
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Coulton
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-05-29 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description:
|
17
|
+
email: peter@petercoulton.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
25
|
+
files:
|
26
|
+
- .document
|
27
|
+
- .gitignore
|
28
|
+
- LICENSE
|
29
|
+
- README.rdoc
|
30
|
+
- Rakefile
|
31
|
+
- VERSION
|
32
|
+
- cucumber.yml
|
33
|
+
- features/rotten.feature
|
34
|
+
- features/step_definitions/rotten_steps.rb
|
35
|
+
- features/support/env.rb
|
36
|
+
- lib/rotten_generators.rb
|
37
|
+
- rails_generators/rotten_layout/USAGE
|
38
|
+
- rails_generators/rotten_layout/rotten_layout_generator.rb
|
39
|
+
- rails_generators/rotten_layout/templates/helper.rb
|
40
|
+
- rails_generators/rotten_layout/templates/layout.html.haml
|
41
|
+
- rails_generators/rotten_layout/templates/sass/colour.sass
|
42
|
+
- rails_generators/rotten_layout/templates/sass/form.sass
|
43
|
+
- rails_generators/rotten_layout/templates/sass/ie.sass
|
44
|
+
- rails_generators/rotten_layout/templates/sass/layout.sass
|
45
|
+
- rails_generators/rotten_layout/templates/sass/print.sass
|
46
|
+
- rails_generators/rotten_layout/templates/sass/reset.sass
|
47
|
+
- rails_generators/rotten_layout/templates/sass/screen.sass
|
48
|
+
- rails_generators/rotten_layout/templates/sass/type.sass
|
49
|
+
- rails_generators/rotten_layout/templates/shared_analytics.html.haml
|
50
|
+
- rotten-generators.gemspec
|
51
|
+
- spec/rotten_spec.rb
|
52
|
+
- spec/spec.opts
|
53
|
+
- spec/spec_helper.rb
|
54
|
+
has_rdoc: true
|
55
|
+
homepage: http://github.com/PeterCoulton/rotten-generators
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options:
|
58
|
+
- --charset=UTF-8
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
66
|
+
version:
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: "0"
|
72
|
+
version:
|
73
|
+
requirements: []
|
74
|
+
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.2.0
|
77
|
+
signing_key:
|
78
|
+
specification_version: 2
|
79
|
+
summary: Collection of rails generators
|
80
|
+
test_files:
|
81
|
+
- spec/rotten_spec.rb
|
82
|
+
- spec/spec_helper.rb
|