firstkiss 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1ebc9e1b9b1873d80d1c65ccde316bbbf48da21
4
- data.tar.gz: c7274d8f1155b507dd2bd5f1e50a4583b466dbb8
3
+ metadata.gz: 967a22fb293761e1f559c21308b731c744a897b8
4
+ data.tar.gz: 363c99a50a3204f0e88e37c106104ae1e0854848
5
5
  SHA512:
6
- metadata.gz: 83bb6d25219a5505a508d84b759ac12c66afe546e46a05ac5944f06248be1e3de89a4fde943156367a1f54bb776e217207c73df4d2b41de520ff89ffca34e2c5
7
- data.tar.gz: 6568b27aa38f6950e257521b42c2beb3752a0381953c174bf7a61064f1a1658f3e52ea2c056388fcd1c813f8aebb5798890b67bb133955776b2687b858cf51e3
6
+ metadata.gz: 8845df52912e7b1938ae8606125ebef1b45c2924f7a9ecef25265e443824fbae34684c844b4ff29a36cd032244731a78970bccac1b95463f59e45db93b660f48
7
+ data.tar.gz: b1478bf69a6ec62b91c62ddc74f140b6416050c5c1d034011faadfc94a383b91c6db70268c93240958b998cf875bc4c12ffb7c5171385a6b7bde0fc2e6cb850d
@@ -0,0 +1,6 @@
1
+ class FirstkissGenerator < Rails::Generators::NamedBase
2
+ source_root File.expand_path('../templates', __FILE__)
3
+ def create_initializer_file
4
+ create_file "hi.rb", "# Testing testing 1, 2, 3..."
5
+ end
6
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ Explain the generator
3
+
4
+ Example:
5
+ rails generate layout Thing
6
+
7
+ This will create:
8
+ what/will/it/create
@@ -0,0 +1,16 @@
1
+ class LayoutGenerator < Rails::Generators::Base
2
+ source_root File.expand_path('../templates', __FILE__)
3
+ argument :layout_name, :type => :string, :default => "application"
4
+ class_option :stylesheet, :type => :boolean, :default => true, :desc => "Include stylesheet file."
5
+
6
+ def generate_layout
7
+ copy_file "stylesheet.css", "public/stylesheets/#{file_name}.css" if options.stylesheet?
8
+ template "layout.html.erb", "app/views/layouts/#{file_name}.html.erb"
9
+ end
10
+
11
+ private
12
+
13
+ def file_name
14
+ layout_name.underscore
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Untitled</title>
5
+ <%- if options.stylesheet? -%>
6
+ <%%= stylesheet_link_tag "<%= file_name %>" %>
7
+ <%- end -%>
8
+ <%%= javascript_include_tag :defaults %>
9
+ <%%= csrf_meta_tag %>
10
+ <%%= yield(:head) %>
11
+ </head>
12
+ <body>
13
+ <div id="container">
14
+ <%% flash.each do |name, msg| %>
15
+ <%%= content_tag :div, msg, :id => "flash_#{name}" %>
16
+ <%% end %>
17
+ <%%= yield %>
18
+ </div>
19
+ </body>
20
+ </html>
@@ -0,0 +1,3 @@
1
+ body {
2
+ background: dodgerblue;
3
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firstkiss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allan Sachs
@@ -21,7 +21,12 @@ files:
21
21
  - lib/firstkiss.rb
22
22
  - lib/firstkiss/generators/firstkiss/USAGE
23
23
  - lib/firstkiss/generators/firstkiss/firstkiss_generator.rb
24
+ - lib/firstkiss/generators/melonjs/firstkiss_generator.rb
24
25
  - lib/firstkiss/translator.rb
26
+ - lib/generators/layout/USAGE
27
+ - lib/generators/layout/layout_generator.rb
28
+ - lib/generators/layout/templates/layout.html.erb
29
+ - lib/generators/layout/templates/stylesheet.css
25
30
  homepage: http://rubygems.org/gems/firstkiss
26
31
  licenses:
27
32
  - MIT