generate 0.0.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.
File without changes
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Richard Smith
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.
File without changes
@@ -0,0 +1,11 @@
1
+ require 'rails/generators/base'
2
+
3
+ module Generate
4
+ module Generators
5
+ class Base < Rails::Generators::Base #:nodoc:
6
+ def self.source_root
7
+ @_generate_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'generators', base_name, generator_name, 'templates'))
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ module Assets
2
+ class JqueryGenerator < Generate::Generators::Base
3
+ def copy_layout
4
+ assets_file = File.join('public', 'javascripts')
5
+ init_file = File.join('config', 'initializers', 'jquery.rb')
6
+ assets = [
7
+ 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js',
8
+ 'http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js',
9
+ 'http://github.com/rails/jquery-ujs/raw/master/src/rails.js'
10
+ ]
11
+
12
+ inside(assets_file) { assets.each { |f| run("curl -O #{f}") } }
13
+
14
+ copy_file 'expansion.rb', init_file
15
+ end
16
+ end
17
+ end
@@ -0,0 +1 @@
1
+ ActionView::Helpers::AssetTagHelper.register_javascript_expansion :defaults => %w( jquery jquery-ui rails )
@@ -0,0 +1,9 @@
1
+ module Assets
2
+ class LayoutGenerator < Generate::Generators::Base
3
+ def copy_layout
4
+ layout_file = File.join('app', 'views', 'layouts', 'application.html.erb')
5
+
6
+ copy_file 'layout.html.erb', layout_file
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
+ <title><%= yield(:title) %></title>
7
+ <%= csrf_meta_tag %>
8
+ </head>
9
+ <body>
10
+ <div id="flash">
11
+ <%- flash.each do |type, msg| -%>
12
+ <%= content_tag(:p, msg, :id => type) %>
13
+ <%- end -%>
14
+ </div>
15
+ <%= yield %>
16
+ </body>
17
+ </html>
@@ -0,0 +1,16 @@
1
+ module Assets
2
+ class NineSixtyGenerator < Generate::Generators::Base
3
+ def copy_layout
4
+ files = %w( reset 960 text )
5
+ cmd = 'curl -O http://github.com/nathansmith/960-Grid-System/raw/master/code/css/%s.css'
6
+
7
+ inside File.join('public', 'stylesheets') do
8
+ files.each do |f|
9
+ run(cmd % f)
10
+ end
11
+ end
12
+
13
+ copy_file 'expansion.rb', File.join('config', 'initializers', 'nine_sixty.rb')
14
+ end
15
+ end
16
+ end
@@ -0,0 +1 @@
1
+ ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :nine_sixty => %w( reset 960 text )
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: generate
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Richard Smith
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-03-01 00:00:00 +00:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: A selection of Rails 3 generators. Useful to somebody, maybe.
22
+ email: rich@maycontaincocoa.com
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files:
28
+ - README.rdoc
29
+ - CHANGELOG
30
+ - LICENSE
31
+ files:
32
+ - lib/generate.rb
33
+ - lib/generators/assets/jquery/jquery_generator.rb
34
+ - lib/generators/assets/jquery/templates/expansion.rb
35
+ - lib/generators/assets/layout/layout_generator.rb
36
+ - lib/generators/assets/layout/templates/layout.html.erb
37
+ - lib/generators/assets/nine_sixty/nine_sixty_generator.rb
38
+ - lib/generators/assets/nine_sixty/templates/expansion.rb
39
+ - README.rdoc
40
+ - CHANGELOG
41
+ - LICENSE
42
+ has_rdoc: true
43
+ homepage: http://github.com/rds/generate
44
+ licenses: []
45
+
46
+ post_install_message:
47
+ rdoc_options: []
48
+
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ segments:
63
+ - 0
64
+ version: "0"
65
+ requirements: []
66
+
67
+ rubyforge_project:
68
+ rubygems_version: 1.3.6
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: Rails 3 generators
72
+ test_files: []
73
+