active_leonardo 0.2.1 → 0.2.2

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: 9861c478ee36e9f28ce46cf11bde71aaedeeaf63
4
- data.tar.gz: 8eb59d3270843f41efe6c2e0f0bb5c2994a5750c
3
+ metadata.gz: 4ed43cceaa12e2fb49d8596d40108d1556237036
4
+ data.tar.gz: ef2f16bd7946187764a3c7f82bb437cd22ad8841
5
5
  SHA512:
6
- metadata.gz: c1e22f6f013f32ab6418464aa8cb38aed8eec7be42621c5af2b9571a9f45e78bac29d6924d7d508f23d82a5655af88c07e7000edb80f205863953afcda8022a5
7
- data.tar.gz: 0083395607802cb80e405663fd454af8e20900953abaee7d18f6c2c409958419d7d02020b2cf659d5e46af183ac8c6c8eede8835d6d3137da248c2ef04c961e4
6
+ metadata.gz: d4135cc1e61eebc8ec5d6fbcf40cf1edee7f862195e82b156356c3b8c68fa63fe39fce4a594fd3625efe1a3a7e6269d69c1603c8978b7af11560ebcd24a83789
7
+ data.tar.gz: 2d621a882ea57190b99eece3ea93bee59ea45e6e1571fab5685008271091279f545f0967f6242c23df60e3b474ec45a29324a38ec46910091a66c91237edcd43
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 0.2.2.pre [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.2.1...v0.2.2) March 12th, 2014
2
+ ------------------------------
3
+ * Added suite test
4
+ * Travis integration
5
+
1
6
  0.2.1 [☰](https://github.com/marcomd/Active_Leonardo/compare/v0.2.0...v0.2.1) March 11th, 2014
2
7
  ------------------------------
3
8
  * Turbolinks now working with ActiveAdmin
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Leolay Generators
2
2
 
3
- [![Version ](http://img.shields.io/gem/v/active_leonardo.svg) ](https://rubygems.org/gems/active_leonardo)
3
+ [![Version ](http://img.shields.io/gem/v/active_leonardo.svg) ](https://rubygems.org/gems/active_leonardo)
4
+ [![Travis CI ](http://img.shields.io/travis/marcomd/Active_Leonardo/master.svg) ](https://travis-ci.org/marcomd/Active_Leonardo)
4
5
  [![Quality ](http://img.shields.io/codeclimate/github/marcomd/Active_Leonardo.svg)](https://codeclimate.com/github/marcomd/Active_Leonardo)
5
6
 
6
7
  A layout and customized scaffold generator for Rails to combine with active admin gem
data/active_template.rb CHANGED
@@ -14,9 +14,15 @@ puts '*' * 40
14
14
  puts "* Processing template..."
15
15
  puts '*' * 40
16
16
 
17
- use_git = yes?("Do you use git ?")
17
+ test_mode = nil
18
+ ARGV.each{|arg| test_mode = true if arg == "test_mode"}
19
+ puts "**** Starting in test mode! ****" if test_mode
20
+
21
+ use_git = test_mode || yes?("Do you use git ?")
22
+
18
23
  if use_git
19
24
  git :init
25
+ remove_file ".gitignore"
20
26
  file ".gitignore", <<-EOS.gsub(/^ /, '')
21
27
  # See http://help.github.com/ignore-files/ for more about ignoring files.
22
28
  #
@@ -45,24 +51,11 @@ gem "active_leonardo"
45
51
  gem "jquery-turbolinks"
46
52
  gem "bourbon"
47
53
 
48
- easy_develop = yes?("Do you want to make development easier?")
54
+ easy_develop = test_mode || yes?("Do you want to make development easier?")
49
55
  if easy_develop
50
56
  gem "rack-mini-profiler", :group => :development
51
- gem "better_errors", :group => :development
52
- gem "awesome_print", :group => :development
53
- end
54
-
55
- #use_editor = yes?("Do you want a wysihtml editor?")
56
- #if use_editor
57
- # gem 'activeadmin-dragonfly', git: 'http://192.30.252.131/stefanoverna/activeadmin-dragonfly'
58
- # gem 'activeadmin-wysihtml5', git: 'http://192.30.252.131/stefanoverna/activeadmin-wysihtml5'
59
- #end
60
-
61
- easy_develop = yes?("Do you want to make development easier?")
62
- if easy_develop
63
- gem "rack-mini-profiler"
64
- gem "jquery-turbolinks"
65
- gem "awesome_print"
57
+ gem "better_errors", :group => :development
58
+ gem "awesome_print", :group => :development
66
59
  end
67
60
 
68
61
  #use_editor = yes?("Do you want a wysihtml editor?")
@@ -71,25 +64,25 @@ end
71
64
  # gem 'activeadmin-wysihtml5', git: 'https://github.com/stefanoverna/activeadmin-wysihtml5'
72
65
  #end
73
66
 
74
- rspec = yes?("Add rspec as testing framework ?")
67
+ rspec = test_mode || yes?("Add rspec as testing framework ?")
75
68
  if rspec
76
- gem 'rspec-rails', :group => [:test, :development]
77
- gem 'capybara', :group => :test
78
- gem 'launchy', :group => :test
79
- gem 'database_cleaner', :group => :test
69
+ gem 'rspec-rails', :group => [:test, :development]
70
+ gem 'capybara', :group => :test
71
+ gem 'launchy', :group => :test
72
+ gem 'database_cleaner', :group => :test
80
73
  if /1.8.*/ === RUBY_VERSION
81
- gem 'factory_girl', '2.6.4', :group => :test
82
- gem 'factory_girl_rails', '1.7.0', :group => :test
74
+ gem 'factory_girl', '2.6.4', :group => :test
75
+ gem 'factory_girl_rails', '1.7.0', :group => :test
83
76
  else
84
- gem 'factory_girl_rails', :group => :test
77
+ gem 'factory_girl_rails', :group => :test
85
78
  end
86
79
  end
87
80
 
88
- authentication = yes?("Authentication ?")
81
+ authentication = test_mode || yes?("Authentication ?")
89
82
  model_name = authorization = nil
90
83
  if authentication
91
84
  default_model_name = "User"
92
- model_name = ask(" Insert model name: [#{default_model_name}]")
85
+ model_name = test_mode ? "" : ask(" Insert model name: [#{default_model_name}]")
93
86
  if model_name.empty? || model_name == 'y'
94
87
  model_name = default_model_name
95
88
  else
@@ -104,19 +97,19 @@ if authentication
104
97
  p stdout
105
98
  end
106
99
 
107
- authorization = yes?("Authorization ?")
100
+ authorization = test_mode || yes?("Authorization ?")
108
101
  if authorization
109
102
  gem "cancan"
110
103
  end
111
104
  end
112
105
 
113
- gem 'state_machine' if yes?("Do you have to handle states ?")
106
+ gem 'state_machine' if test_mode || yes?("Do you have to handle states ?")
114
107
 
115
- dashboard_root = yes?("Would you use dashboard as root ? (recommended)")
116
- home = yes?("Ok. Would you create home controller as root ?") unless dashboard_root
108
+ dashboard_root = test_mode || yes?("Would you use dashboard as root ? (recommended)")
109
+ home = test_mode || yes?("Ok. Would you create home controller as root ?") unless dashboard_root
117
110
 
118
- if yes?("Bundle install ?")
119
- dir = ask(" Insert folder name to install locally: [blank=default gems path]")
111
+ if test_mode || yes?("Bundle install ?")
112
+ dir = test_mode ? "" : ask(" Insert folder name to install locally: [blank=default gems path]")
120
113
  run "bundle install #{"--path=#{dir}" unless dir.empty? || dir=='y'}"
121
114
  end
122
115
 
@@ -134,7 +127,8 @@ generate "leolay",
134
127
  "--auth_class=#{model_name}",
135
128
  (rspec ? nil : "--skip-rspec"),
136
129
  (authorization ? nil : "--skip-authorization"),
137
- (authentication ? nil : "--skip-authentication")
130
+ (authentication ? nil : "--skip-authentication"),
131
+ (test_mode ? "--no-verbose" : nil)
138
132
 
139
133
 
140
134
  if dashboard_root
@@ -154,4 +148,4 @@ if use_git
154
148
  git :commit => %Q{ -m "Initial commit" }
155
149
  end
156
150
 
157
- puts "ENJOY!"
151
+ puts "ENJOY!"
@@ -10,12 +10,12 @@ module Erb
10
10
  #puts 'erb:leosca'
11
11
 
12
12
  source_root File.expand_path('../templates', __FILE__)
13
- class_option :authorization, :type => :boolean, :default => true, :description => "Add code to manage authorization with cancan"
14
- #class_option :remote, :type => :boolean, :default => true, :description => "Enable ajax. You can also do later set remote to true into index view."
15
- #class_option :formtastic, :type => :boolean, :default => true, :description => "Create forms to manage with formtastic gem"
16
- #class_option :under, :type => :string, :default => "", :banner => "brand/category", :desc => "To nest a resource under another(s)"
17
- #class_option :leospace, :type => :string, :default => "", :banner => ":admin", :desc => "To nest a resource under namespace(s)"
18
- class_option :auth_class, :type => :boolean, :default => 'user', :desc => "Set the authentication class name"
13
+ class_option :authorization, :type => :boolean, :default => true, :desc => "Add code to manage authorization with cancan"
14
+ class_option :auth_class, :type => :boolean, :default => 'user', :desc => "Set the authentication class name"
15
+ #class_option :remote, :type => :boolean, :default => true, :desc => "Enable ajax. You can also do later set remote to true into index view."
16
+ #class_option :formtastic, :type => :boolean, :default => true, :desc => "Create forms to manage with formtastic gem"
17
+ #class_option :under, :type => :string, :default => "", :banner => "brand/category", :desc => "To nest a resource under another(s)"
18
+ #class_option :leospace, :type => :string, :default => "", :banner => ":admin", :desc => "To nest a resource under namespace(s)"
19
19
 
20
20
  #override
21
21
  #def copy_view_files
@@ -4,103 +4,46 @@ class LeolayGenerator < Rails::Generators::Base
4
4
  include ::ActiveLeonardo::Base
5
5
 
6
6
  source_root File.expand_path('../templates', __FILE__)
7
- argument :style, :type => :string, :default => "active"
8
- #class_option :pagination, :type => :boolean, :default => true, :desc => "Include pagination files"
9
- class_option :main_color, :type => :string, :default => nil, :desc => "Force a main color for the stylesheet"
10
- class_option :second_color, :type => :string, :default => nil, :desc => "Force a secondary color for the stylesheet"
11
- class_option :authentication, :type => :boolean, :default => true, :desc => "Add code to manage authentication with devise"
12
- class_option :authorization, :type => :boolean, :default => true, :desc => "Add code to manage authorization with cancan"
13
- class_option :activeadmin, :type => :boolean, :default => true, :desc => "Add code to manage activeadmin gem"
14
- class_option :auth_class, :type => :string, :default => 'User', :desc => "Set the authentication class name"
15
- #class_option :formtastic, :type => :boolean, :default => true, :desc => "Copy formtastic files into leosca custom folder (inside project)"
16
- #class_option :jquery_ui, :type => :boolean, :default => true, :desc => "To use jQuery ui improvement"
17
- class_option :rspec, :type => :boolean, :default => true, :desc => "Include custom rspec generator and custom templates"
18
- #class_option :old_views, :type => :boolean, :default => false, :desc => "Include old management"
19
-
20
- #def generate_layout
21
- # template "config.rb", "config/initializers/config.rb"
22
- #
23
- # template "styles/#{style_name}/stylesheets/app/stylesheet.sass", "app/assets/stylesheets/#{style_name}.sass"
24
- # copy_file "styles/#{style_name}/stylesheets/app/states.sass", "app/assets/stylesheets/states.sass"
25
- #
26
- # copy_file "app/helpers/layout_helper.rb", "app/helpers/layout_helper.rb"
27
- #
28
- # copy_file "styles/#{style_name}/views/layout/application.html.erb", "app/views/layouts/application.html.erb", :force => true
29
- # template "styles/#{style_name}/views/layout/_layout.html.erb", "app/views/layouts/_#{style_name}.html.erb"
30
- # copy_file "styles/#{style_name}/views/layout/_message.html.erb", "app/views/application/_message.html.erb"
31
- # copy_file "styles/#{style_name}/views/layout/_session.html.erb", "app/views/application/_session.html.erb" if options.authentication?
32
- #
33
- # locale_path = "config/locales"
34
- # source_paths.each do |source_path|
35
- # files = Dir["#{source_path}/#{locale_path}/??.yml"]
36
- # files.each do |f|
37
- # copy_file f, "#{locale_path}/#{File.basename(f)}"
38
- # end
39
- # break if files.any?
40
- # end
41
- #
42
- # copy_file "lib/utility.rb", "lib/extras/utility.rb"
43
- #
44
- # if options.pagination?
45
- # source_paths.each do |source_path|
46
- # files = Dir["#{source_path}/#{locale_path}/kaminari.??.yml"]
47
- # files.each do |f|
48
- # copy_file f, "#{locale_path}/#{File.basename(f)}"
49
- # end
50
- # break if files.any?
51
- # end
52
- #
53
- # directory "styles/#{style_name}/views/kaminari", "app/views/kaminari"
54
- #
55
- # directory "styles/#{style_name}/images/kaminari", "app/assets/images/styles/#{style_name}/kaminari"
56
- # end
57
- #
58
- # directory "styles/#{style_name}/images/style", "app/assets/images/styles/#{style_name}"
59
- #
60
- # directory "styles/#{style_name}/images/jquery-ui", "app/assets/images/styles/#{style_name}/jquery-ui" if options.jquery_ui?
61
- #
62
- # if options.authentication?
63
- # source_paths.each do |source_path|
64
- # files = Dir["#{source_path}/#{locale_path}/devise.??.yml"]
65
- # files.each do |f|
66
- # copy_file f, "#{locale_path}/#{File.basename(f)}"
67
- # end
68
- # break if files.any?
69
- # end
70
- # directory "app/views/devise", "app/views/devise"
71
- # end
72
- #end
7
+ argument :style, :type => :string, :default => "active"
8
+ #class_option :pagination, :type => :boolean, :default => true, :desc => "Include pagination files"
9
+ class_option :main_color, :type => :string, :default => nil, :desc => "Force a main color for the stylesheet"
10
+ class_option :second_color, :type => :string, :default => nil, :desc => "Force a secondary color for the stylesheet"
11
+ class_option :authentication, :type => :boolean, :default => true, :desc => "Add code to manage authentication with devise"
12
+ class_option :authorization, :type => :boolean, :default => true, :desc => "Add code to manage authorization with cancan"
13
+ class_option :activeadmin, :type => :boolean, :default => true, :desc => "Add code to manage activeadmin gem"
14
+ class_option :auth_class, :type => :string, :default => 'User', :desc => "Set the authentication class name"
15
+ #class_option :formtastic, :type => :boolean, :default => true, :desc => "Copy formtastic files into leosca custom folder (inside project)"
16
+ #class_option :jquery_ui, :type => :boolean, :default => true, :desc => "To use jQuery ui improvement"
17
+ class_option :rspec, :type => :boolean, :default => true, :desc => "Include custom rspec generator and custom templates"
18
+ class_option :verbose, :type => :boolean, :default => true, :desc => "Run interactive mode"
19
+
73
20
  def generate_layout
74
- template "styles/#{style_name}/stylesheets/app/stylesheet.css.scss", "app/assets/stylesheets/#{style_name}.css.scss"
21
+ template "styles/#{style_name}/stylesheets/app/stylesheet.css.scss", "app/assets/stylesheets/#{style_name}.css.scss"
75
22
  template "styles/#{style_name}/stylesheets/app/custom_active_admin.css.scss", "app/assets/stylesheets/custom_active_admin.css.scss"
76
- template "styles/#{style_name}/stylesheets/app/_enviroment.css.scss", "app/assets/stylesheets/_enviroment.css.scss"
23
+ template "styles/#{style_name}/stylesheets/app/_enviroment.css.scss", "app/assets/stylesheets/_enviroment.css.scss"
77
24
 
78
- copy_file "app/helpers/layout_helper.rb", "app/helpers/layout_helper.rb"
79
- directory "styles/#{style_name}/images", "app/assets/images/styles/#{style_name}"
80
- copy_file "styles/#{style_name}/favicon.ico", "app/assets/images/favicon.ico"
25
+ copy_file "app/helpers/layout_helper.rb", "app/helpers/layout_helper.rb", :force => !options.verbose?
26
+ directory "styles/#{style_name}/images", "app/assets/images/styles/#{style_name}", :force => !options.verbose?
27
+ copy_file "styles/#{style_name}/favicon.ico", "app/assets/images/favicon.ico", :force => !options.verbose?
81
28
 
82
- copy_file "styles/#{style_name}/views/layout/application.html.erb", "app/views/layouts/application.html.erb", :force => true
83
- copy_file "styles/#{style_name}/views/layout/_message.html.erb", "app/views/application/_message.html.erb"
84
- copy_file "styles/#{style_name}/views/layout/_session.html.erb", "app/views/application/_session.html.erb" if options.authentication?
29
+ copy_file "styles/#{style_name}/views/layout/application.html.erb", "app/views/layouts/application.html.erb", :force => true
30
+ copy_file "styles/#{style_name}/views/layout/_message.html.erb", "app/views/application/_message.html.erb", :force => !options.verbose?
31
+ copy_file "styles/#{style_name}/views/layout/_session.html.erb", "app/views/application/_session.html.erb", :force => !options.verbose? if options.authentication?
85
32
 
86
- copy_file "config/initializers/config.rb", "config/initializers/config.rb"
33
+ copy_file "config/initializers/config.rb", "config/initializers/config.rb", :force => !options.verbose?
87
34
  template "config/config.yml", "config/config.yml"
35
+
88
36
  locale_path = "config/locales"
89
37
  source_paths.each do |source_path|
90
- files = Dir["#{source_path}/#{locale_path}/??.yml"]
38
+ files = Dir["#{source_path}/#{locale_path}/*.yml"]
91
39
  files.each do |f|
92
- copy_file f, "#{locale_path}/#{File.basename(f)}"
93
- end
94
- break if files.any?
95
- end
96
- if options.authentication?
97
- source_paths.each do |source_path|
98
- files = Dir["#{source_path}/#{locale_path}/devise.??.yml"]
99
- files.each do |f|
100
- copy_file f, "#{locale_path}/#{File.basename(f)}"
40
+ if f.include?("devise")
41
+ copy_file f, "#{locale_path}/#{File.basename(f)}", :force => !options.verbose? if options.authentication?
42
+ else
43
+ copy_file f, "#{locale_path}/#{File.basename(f)}", :force => !options.verbose?
101
44
  end
102
- break if files.any?
103
45
  end
46
+ break if files.any?
104
47
  end
105
48
  end
106
49
 
@@ -148,23 +91,6 @@ class LeolayGenerator < Rails::Generators::Base
148
91
  end
149
92
  end
150
93
 
151
- #file = "app/helpers/application_helper.rb"
152
- #if File.exists?(file)
153
- # inject_into_file file, :after => "module ApplicationHelper" do
154
- # <<-FILE.gsub(/^ /, '')
155
- #
156
- # def sortable(column, title = nil, remote = nil, path = nil, *params)
157
- # column = column.to_s
158
- # title ||= column.titleize
159
- # css_class = (column == sort_column) ? "sorted \#{sort_direction}" : nil
160
- # direction = (column == sort_column && sort_direction == "asc") ? "desc" : "asc"
161
- # params << "{:sort => column, :direction => direction}"
162
- # path = path ? eval("#\{path}(\#{params.join(',')})") : {:sort => column, :direction => direction}
163
- # link_to(title, path, :remote => true, :disable_with => t(:loading), :class => css_class)
164
- # end
165
- # FILE
166
- # end
167
- #end
168
94
  end
169
95
 
170
96
  def setup_authentication
@@ -239,33 +165,13 @@ class LeolayGenerator < Rails::Generators::Base
239
165
  #def setup_formtastic
240
166
  # return unless options.formtastic?
241
167
  #
242
- # path = "styles/#{style_name}/stylesheets/vendor/formtastic"
243
- # dest_path = "vendor/assets/stylesheets/formtastic"
244
- #
245
- # path = dest_path unless File.exists?(path)
246
- #
247
- # file = "#{path}/formtastic.css"
248
- # copy_file file, file unless File.exists?(file)
249
- # file = "#{path}/formtastic_changes.css"
250
- # copy_file file, file
251
- #
252
- # file = "config/initializers/formtastic.rb"
253
- # inject_into_file file, :after => "# Formtastic::FormBuilder.i18n_lookups_by_default = false" do
254
- # <<-FILE.gsub(/^ /, '')
255
- #
256
- # Formtastic::FormBuilder.i18n_lookups_by_default = true
257
- # FILE
258
- # end if File.exists?(file)
259
- #
260
- # path = "lib/templates/erb/"
261
- # remove_file path if File.exists?(path)
262
168
  #end
263
169
 
264
170
  def setup_javascript
265
171
  app_path = "app/assets/javascripts"
266
172
 
267
173
  file = "#{app_path}/custom.js.coffee"
268
- copy_file file, file
174
+ copy_file file, file, :force => !options.verbose?
269
175
 
270
176
  file = "#{app_path}/active_admin.js.coffee"
271
177
  #gsub_file file, "#= require active_admin/base" do
@@ -284,36 +190,6 @@ class LeolayGenerator < Rails::Generators::Base
284
190
  end
285
191
 
286
192
  #def setup_stylesheets
287
- # app_path = "app/assets/stylesheets"
288
- # vendor_path = "vendor/assets/stylesheets"
289
- #
290
- # file = "#{vendor_path}/vendor.css"
291
- # copy_file file, file
292
- #
293
- # if options.jquery_ui?
294
- # directory "styles/#{style_name}/stylesheets/vendor/jquery-ui", "vendor/assets/stylesheets/jquery-ui"
295
- #
296
- # file = "#{app_path}/application.css"
297
- # inject_into_file file, :before => "*/" do
298
- # <<-FILE.gsub(/^ /, '')
299
- # *= require vendor
300
- # FILE
301
- # end
302
- #
303
- # file = "#{vendor_path}/vendor.css"
304
- # inject_into_file file, :before => "*/" do
305
- # <<-FILE.gsub(/^ /, '')
306
- # *= require_tree ./jquery-ui
307
- # FILE
308
- # end
309
- # end
310
- #
311
- # file = "#{vendor_path}/vendor.css"
312
- # inject_into_file file, :before => "*/" do
313
- # <<-FILE.gsub(/^ /, '')
314
- # *= require_tree ./formtastic
315
- # FILE
316
- # end if options.formtastic?
317
193
  #end
318
194
 
319
195
  def setup_rspec
@@ -353,16 +229,16 @@ class LeolayGenerator < Rails::Generators::Base
353
229
  end
354
230
 
355
231
  file = "spec/factories.rb"
356
- copy_file file, file
232
+ copy_file file, file, :force => !options.verbose?
357
233
  file = "spec/support/devise.rb"
358
- copy_file file, file
234
+ copy_file file, file, :force => !options.verbose?
359
235
  file = "spec/helpers/application_helpers.rb"
360
- copy_file file, file
236
+ copy_file file, file, :force => !options.verbose?
361
237
 
362
238
  end
363
239
 
364
240
  def setup_extras
365
- copy_file "lib/upd_array.rb", "lib/extras/upd_array.rb"
241
+ copy_file "lib/upd_array.rb", "lib/extras/upd_array.rb", :force => !options.verbose?
366
242
  end
367
243
 
368
244
  def setup_activeadmin
@@ -9,19 +9,16 @@ module Rails
9
9
  class LeoscaControllerGenerator < ::Rails::Generators::ScaffoldControllerGenerator
10
10
  include ::ActiveLeonardo::Base
11
11
  include ::ActiveLeonardo::Leosca
12
- #include ::Leonardo::Nested
13
- #include ::Leonardo::Nested::Test
14
- #puts 'rails:leosca_controller'
15
12
 
16
13
  source_root File.expand_path('../templates', __FILE__)
17
- argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
18
- class_option :seeds, :type => :boolean, :default => true, :desc => "Create seeds to run with rake db:seed"
19
- class_option :seeds_elements, :type => :string, :default => "30", :desc => "Choose seeds elements", :banner => "NUMBER"
20
- #class_option :remote, :type => :boolean, :default => true, :desc => "Enable ajax. You can also do later set remote to true into index view."
21
- #class_option :under, :type => :string, :default => "", :banner => "brand/category", :desc => "To nest a resource under another(s)"
22
- #class_option :leospace, :type => :string, :default => "", :banner => ":admin", :desc => "To nest a resource under namespace(s)"
23
- class_option :auth_class, :type => :string, :default => 'User', :desc => "Set the authentication class name"
24
- class_option :activeadmin, :type => :boolean, :default => true, :desc => "Add code to manage activeadmin gem"
14
+ argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
15
+ class_option :seeds, :type => :boolean, :default => true, :desc => "Create seeds to run with rake db:seed"
16
+ class_option :seeds_elements, :type => :string, :default => "30", :banner => "NUMBER", :desc => "Choose seeds elements"
17
+ #class_option :remote, :type => :boolean, :default => true, :desc => "Enable ajax. You can also do later set remote to true into index view."
18
+ #class_option :under, :type => :string, :default => "", :banner => "brand/category", :desc => "To nest a resource under another(s)"
19
+ #class_option :leospace, :type => :string, :default => "", :banner => ":admin", :desc => "To nest a resource under namespace(s)"
20
+ class_option :auth_class, :type => :string, :default => 'User', :desc => "Set the authentication class name"
21
+ class_option :activeadmin, :type => :boolean, :default => true, :desc => "Add code to manage activeadmin gem"
25
22
 
26
23
  #Override
27
24
  def create_controller_files
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_leonardo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Mastrodonato, Marco Longhitano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 3.2.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: 3.2.0
27
- - !ruby/object:Gem::Dependency
28
- name: activeadmin
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: 0.6.3
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: 0.6.3
11
+ date: 2014-03-14 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: This generator help you to create new Rails applications to combine with
42
14
  active admin gem. It generates application structure to easily get the internationalization
43
15
  and authorization.