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 ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
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
@@ -0,0 +1,7 @@
1
+ = rotten
2
+
3
+ Description goes here.
4
+
5
+ == Copyright
6
+
7
+ Copyright (c) 2009 Peter Coulton. See LICENSE for details.
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
@@ -0,0 +1,9 @@
1
+ Feature: something something
2
+ In order to something something
3
+ A user something something
4
+ something something something
5
+
6
+ Scenario: something something
7
+ Given inspiration
8
+ When I create a sweet new gem
9
+ Then everyone should see how awesome I am
File without changes
@@ -0,0 +1,4 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
+ require 'rotten_generators'
3
+
4
+ require 'spec/expectations'
@@ -0,0 +1,3 @@
1
+ module RottenGenerators
2
+ # nothing to see here, the real action is under rails_generators
3
+ end
@@ -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,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
@@ -0,0 +1,7 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Rotten" do
4
+ it "fails" do
5
+ fail "hey buddy, you should probably rename this file and start specing for real"
6
+ end
7
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,3 @@
1
+ --colour
2
+ --format specdoc
3
+ --format html:spec/spec_report.html
@@ -0,0 +1,9 @@
1
+ require 'spec'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ require 'rotten_generators'
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
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