active_template.rb in active_leonardo-0.5.3 vs active_template.rb in active_leonardo-0.6.0

- old
+ new

@@ -1,8 +1,8 @@ ######################################################### -# 2015 Marco Mastrodonato(c) -# This is a Rails 4.x template to use with activeleonardo gem +# 2016 Marco Mastrodonato(c) +# This is a Rails 5.x template to use with activeleonardo gem # https://rubygems.org/gems/active_leonardo # https://github.com/marcomd/Active_Leonardo # # USAGE: rails new yourappname -m active_template.rb # @@ -47,11 +47,12 @@ /*.dat /config/initializers/secret_token.rb EOS end -gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin.git' +#gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin.git' +gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin', branch: 'rails-5-rspec' if test_mode gem "active_leonardo", path: "../../." else gem "active_leonardo" @@ -91,20 +92,29 @@ rails g leosca Product name price:decimal --auth_class=#{model_name} ************************************************************************* REMEM p stdout end - gem "devise" + if /^5/ === rails_version + gem "devise", git: "https://github.com/plataformatec/devise.git" + else + gem "devise" + end authorization = test_mode || yes?("Authorization ?") if authorization gem "cancan" end end gem 'state_machines' if test_mode || yes?("Do you have to handle states ?") gem 'inherited_resources' +if /^5/ === rails_version + gem 'formtastic', git: 'https://github.com/justinfrench/formtastic.git' +else + gem 'formtastic' +end dashboard_root = test_mode || yes?("Would you use dashboard as root ? (recommended)") home = test_mode || yes?("Ok. Would you create home controller as root ?") unless dashboard_root if test_mode || yes?("Bundle install ?") \ No newline at end of file