scaf-generator 0.2.5 → 0.2.6

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/controls, ADDED
File without changes
data/error ADDED
File without changes
data/help-inline ADDED
File without changes
data/input-medium} ADDED
File without changes
@@ -8,18 +8,15 @@ class PruebaGenerator < Rails::Generators::Base
8
8
  argument :name, :type => :string, :required => true, :banner => 'Nombre'
9
9
  argument :args, :type => :array , :default => [] , :banner => 'Atributos'
10
10
 
11
- class_option :orden , :desc => 'Soporte para Ordenable.' , :type => :boolean, :aliases => "-o", :default => false
12
- class_option :slug , :desc => 'Soporte pare FriendlyId.' , :type => :boolean, :aliases => "-i", :default => false
13
- class_option :archivo , :desc => 'Soporte para tener un archivo.', :type => :boolean, :aliases => "-a", :default => false
14
-
11
+ class_option :orden , :desc => 'Soporte para Ordenable.' , :type => :boolean, :aliases => "-o", :default => false
12
+ class_option :slug , :desc => 'Soporte pare FriendlyId.' , :type => :boolean, :aliases => "-i", :default => false
15
13
 
16
14
  def initialize(*arguments, &block)
17
15
  super
18
16
 
19
17
  @con_orden = options.orden?
20
18
  @con_slug = options.slug?
21
- @con_archivo = options.foto?
22
-
19
+
23
20
  @singular = @name.downcase
24
21
  @plural = @singular.pluralize
25
22
  @class = @name.camelize
@@ -37,7 +34,6 @@ class PruebaGenerator < Rails::Generators::Base
37
34
  @atributos << Atributo.new(arg)
38
35
  end
39
36
  @identificador = @atributos.first.nombre
40
- info #TODO: sacar de aca!.
41
37
 
42
38
  end
43
39
 
@@ -77,28 +73,6 @@ class PruebaGenerator < Rails::Generators::Base
77
73
  Time.now.utc.strftime("%Y%m%d%H%M%S")
78
74
  end
79
75
 
80
- # Este metodo es usado solo para testear.
81
- # TODO: Eliminar metodo.
82
- def info
83
- say "Singular:#{@singular}. Plural:#{@plural}. Class:#{@class}. Classes:#{@classes}"
84
-
85
- say '--- Opciones ---'
86
- say "Con Orden" if @con_orden
87
- say "Con Slug" if @con_slug
88
- say "Con Archivo" if @con_archivo
89
-
90
- say '--- Atributos ---'
91
- @atributos.each do |a|
92
- say a.show
93
- end
94
-
95
- say '--- Paths ---'
96
- say "singular_path #{@singular_path}"
97
- say "plural_path #{@plural_path}"
98
- say "new_path #{@new_path}"
99
- say "edit_path #{@edit_path}"
100
- end
101
-
102
76
  def atributos_con_referencia
103
77
  @atributos.select {|a| a.clase == :references}
104
78
  end
@@ -1,4 +1,4 @@
1
1
  <%%= mini_form_for <%= @singular %>, :url => url, :remote => true do |f| %>
2
- <%%= f.input :<%= @identificador %> %>
2
+ <%%= f.input :<%= @identificador %>, :placeholder => '<%= @identificador %>' %>
3
3
  <%%= f.button :submit, :name => nil, :disable_with => t("espere") %>
4
4
  <%%- end -%>
@@ -16,4 +16,4 @@
16
16
  </tbody>
17
17
  </table>
18
18
 
19
- <%%= hidden_field_tag :url, <%= @reordenar_path %>, :class => :url %>
19
+ <%= "<%= hidden_field_tag :url, #{@reordenar_path} , :class => :url %\>" if @con_orden %>
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Scaf
2
2
  module Generator
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  end
Binary file
data/span ADDED
File without changes
data/span, ADDED
File without changes
data/{ ADDED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scaf-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-07 00:00:00.000000000 Z
12
+ date: 2012-03-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Scaffold adaptado a las necesidades de Xaver
15
15
  email:
@@ -22,6 +22,10 @@ files:
22
22
  - Gemfile
23
23
  - README.md
24
24
  - Rakefile
25
+ - controls,
26
+ - error
27
+ - help-inline
28
+ - input-medium}
25
29
  - lib/generators/mini_form/USAGE
26
30
  - lib/generators/mini_form/mini_form_generator.rb
27
31
  - lib/generators/mini_form/templates/mini_form.rb
@@ -61,7 +65,11 @@ files:
61
65
  - pkg/scaf-generator-0.2.1.gem
62
66
  - pkg/scaf-generator-0.2.2.gem
63
67
  - pkg/scaf-generator-0.2.4.gem
68
+ - pkg/scaf-generator-0.2.5.gem
64
69
  - scaf-generator.gemspec
70
+ - span
71
+ - span,
72
+ - ! '{'
65
73
  homepage: http://github.com/nicanorperera/scaf-generator
66
74
  licenses: []
67
75
  post_install_message: