faalis 1.0.0.alpha4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/faalis/angular-manifest.js +1 -0
  3. data/app/assets/javascripts/faalis/dashboard/app.js +1 -2
  4. data/app/assets/javascripts/faalis/dashboard/controllers/group.js.coffee +9 -7
  5. data/app/assets/javascripts/faalis/dashboard/controllers/user.js +11 -0
  6. data/app/assets/javascripts/faalis/dashboard/functions.js.erb +36 -0
  7. data/app/assets/javascripts/faalis/dashboard/lib/controllers/generic_index_controller.js.coffee +13 -6
  8. data/app/assets/javascripts/faalis/dashboard/lib/fields/has_many_field.js.coffee +0 -2
  9. data/app/assets/javascripts/faalis/dashboard/lib/resource.js.coffee +17 -4
  10. data/app/assets/javascripts/faalis/dashboard/modules/auth/user.js +0 -96
  11. data/app/assets/javascripts/faalis/dashboard/modules/fake.js +41 -0
  12. data/app/assets/javascripts/faalis/dashboard/modules/fields/datetime.js +4 -1
  13. data/app/assets/javascripts/faalis/dashboard/resources/group_resource.js.coffee +1 -0
  14. data/app/assets/javascripts/faalis/dashboard/resources/user_resource.js.coffee +0 -0
  15. data/app/assets/javascripts/faalis/dashboard/services/api.js.coffee +8 -6
  16. data/app/assets/javascripts/faalis/dashboard/services/user.js.coffee +0 -4
  17. data/app/assets/javascripts/faalis/dashboard/variables.js.erb +2 -1
  18. data/app/assets/stylesheets/faalis/dashboard/ltr/application.css +4 -2
  19. data/app/assets/stylesheets/faalis/dashboard/rtl/application.css +2 -0
  20. data/app/controllers/faalis/api/v1/permissions_controller.rb +2 -1
  21. data/app/controllers/faalis/api_controller.rb +0 -3
  22. data/app/controllers/faalis/application_controller.rb +3 -0
  23. data/app/controllers/faalis/dashboard/groups_controller.rb +80 -0
  24. data/app/controllers/faalis/dashboard/users_controller.rb +100 -0
  25. data/app/controllers/faalis/dashboard_controller.rb +5 -1
  26. data/app/helpers/faalis/users_helper.rb +4 -0
  27. data/app/models/faalis/concerns/user/permission.rb +5 -0
  28. data/app/models/faalis/group.rb +14 -0
  29. data/app/models/faalis/permission.rb +3 -0
  30. data/app/views/angular/auth/groups/details.html +2 -21
  31. data/app/views/angular/auth/groups/index.html +2 -5
  32. data/app/views/angular/auth/groups/new.html +2 -47
  33. data/app/views/faalis/api/v1/groups/index.json.jbuilder +4 -4
  34. data/app/views/faalis/api/v1/permissions/index.json.jbuilder +1 -1
  35. data/app/views/faalis/dashboard/groups/_form.html.slim +72 -0
  36. data/app/views/faalis/dashboard/groups/create.js.erb +3 -0
  37. data/app/views/faalis/dashboard/groups/edit.html.slim +3 -0
  38. data/app/views/faalis/dashboard/groups/errors.js.erb +3 -0
  39. data/app/views/faalis/dashboard/groups/new.html.slim +2 -0
  40. data/app/views/faalis/dashboard/groups/update.js.erb +3 -0
  41. data/app/views/faalis/dashboard/users/_form.html.slim +80 -0
  42. data/app/views/faalis/dashboard/users/_password_form.html.slim +37 -0
  43. data/app/views/faalis/dashboard/users/create.js.erb +3 -0
  44. data/app/views/faalis/dashboard/users/edit.html.slim +3 -0
  45. data/app/views/faalis/dashboard/users/edit_password.html.slim +1 -0
  46. data/app/views/faalis/dashboard/users/errors.js.erb +3 -0
  47. data/app/views/faalis/dashboard/users/index.html.slim +67 -0
  48. data/app/views/faalis/dashboard/users/new.html.slim +2 -0
  49. data/app/views/faalis/dashboard/users/show.html.slim +6 -0
  50. data/app/views/faalis/dashboard/users/update.js.erb +3 -0
  51. data/app/views/faalis/dashboard/users/update_password.js.erb +3 -0
  52. data/db/migrate/20131013091000_devise_create_faalis_users.rb +0 -3
  53. data/lib/faalis.rb +2 -0
  54. data/lib/faalis/action_dispatch.rb +3 -0
  55. data/lib/faalis/configuration.rb +25 -0
  56. data/lib/faalis/engine.rb +2 -0
  57. data/lib/faalis/fake_assets.rb +1 -0
  58. data/lib/faalis/route.rb +73 -2
  59. data/lib/faalis/version.rb +3 -3
  60. data/lib/faalis_application.rb +10 -6
  61. data/lib/faalis_plugin.rb +5 -4
  62. data/lib/generators/faalis/install_generator.rb +1 -0
  63. data/lib/generators/faalis/js/list_view_generator.rb +4 -0
  64. data/lib/generators/faalis/scaffold_generator.rb +98 -72
  65. data/lib/generators/faalis/templates/angularjs/new.html.erb +10 -10
  66. data/lib/generators/faalis/templates/js/list_view/new.html.erb +10 -10
  67. data/lib/generators/faalis/templates/js/list_view/partials/add_controller.js.erb +4 -4
  68. data/lib/generators/faalis/templates/js/list_view/partials/config.js.erb +11 -8
  69. data/lib/generators/faalis/templates/js/list_view/partials/index_controller.js.erb +5 -5
  70. data/lib/generators/faalis/templates/policy/application_policy.rb +2 -0
  71. data/lib/generators/faalis/templates/policy/policy.rb.erb +2 -0
  72. data/spec/dummy/db/development.sqlite3 +0 -0
  73. data/spec/dummy/db/migrate/{20150121060012_create_application_models.model_discovery_engine.rb → 20150723215115_create_application_models.model_discovery_engine.rb} +0 -0
  74. data/spec/dummy/db/migrate/20150725103007_devise_create_faalis_users.faalis.rb +63 -0
  75. data/spec/dummy/db/migrate/20150725103008_create_faalis_groups.faalis.rb +13 -0
  76. data/spec/dummy/db/migrate/20150725103009_create_faalis_permissions.faalis.rb +13 -0
  77. data/spec/dummy/db/migrate/20150725103010_add_permissions_groups_table.faalis.rb +9 -0
  78. data/spec/dummy/db/migrate/20150725103011_add_users_groups_table.faalis.rb +9 -0
  79. data/spec/dummy/db/schema.rb +5 -2
  80. data/spec/dummy/db/seeds.rb +1 -0
  81. data/spec/dummy/db/test.sqlite3 +0 -0
  82. data/spec/dummy/log/development.log +6474 -466
  83. data/spec/dummy/log/test.log +23493 -9554
  84. data/spec/dummy/tmp/app/assets/javascripts/controlpanel/application.js +22 -0
  85. data/spec/dummy/tmp/app/assets/stylesheets/dashboard/ltr/application.css +3 -0
  86. data/spec/dummy/tmp/app/assets/stylesheets/dashboard/rtl/application.css +3 -0
  87. data/spec/dummy/tmp/app/assets/stylesheets/ltr/application.css +3 -0
  88. data/spec/dummy/tmp/app/assets/stylesheets/rtl/application.css +3 -0
  89. data/spec/dummy/tmp/app/controllers/api_controller.rb +2 -0
  90. data/spec/dummy/tmp/app/controllers/application_controller.rb +0 -0
  91. data/spec/dummy/tmp/app/policies/application_policy.rb +2 -0
  92. data/spec/dummy/tmp/config/initializers/devise.rb +251 -0
  93. data/spec/dummy/tmp/config/initializers/faalis.rb +13 -0
  94. data/spec/dummy/tmp/config/initializers/fast_gettext.rb +4 -0
  95. data/spec/dummy/tmp/config/initializers/formstatic.rb +76 -0
  96. data/spec/dummy/tmp/config/routes.rb +0 -0
  97. data/spec/dummy/tmp/db/seeds.rb +1 -0
  98. metadata +73 -7
@@ -0,0 +1,3 @@
1
+ success_message('<%= _("Group saved successfully.") %>');
2
+ var target = '<%= Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_groups_path".to_sym) %>';
3
+ redirect_to(target);
@@ -0,0 +1,3 @@
1
+ - form_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_groups_update_path".to_sym, @group.id)
2
+ - index = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_groups_path".to_sym)
3
+ = render partial: 'form', locals: { form_target: form_target, method: :put, index: index }
@@ -0,0 +1,3 @@
1
+ var msg = <%= @group.errors.to_json.html_safe %>;
2
+ msg.title = "Please fix these errors first.";
3
+ form_error(msg);
@@ -0,0 +1,2 @@
1
+ - form_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_groups_path".to_sym)
2
+ = render partial: 'form', locals: { form_target: form_target, method: :post, index: form_target }
@@ -0,0 +1,3 @@
1
+ success_message('<%= _("Group updated successfully.") %>');
2
+ var target = '<%= Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_groups_path".to_sym) %>';
3
+ redirect_to(target);
@@ -0,0 +1,80 @@
1
+ = form_tag(form_target, remote: true, method: method) do
2
+ .row
3
+ .col-sm-12.col-lg-12
4
+ .box.box-primary
5
+ .box-header
6
+ .box-title
7
+ - if @user.new_record?
8
+ = _('New User')
9
+ - else
10
+ = _('Edit User')
11
+
12
+ .box-body
13
+ .row
14
+ .col-sm-12.col-lg-6
15
+ .form-group data-name="first_name"
16
+ label for="first_name"
17
+ = _('First name')
18
+ input#group_name.form-control[placeholder==(_('Enter the first name of user')) name="user[first_name]" type="text" required value=(@user.first_name)]
19
+
20
+ .col-sm-12.col-lg-6
21
+ .form-group data-name="last_name"
22
+ label for="last_name"
23
+ = _('Last name')
24
+ input#group_name.form-control[placeholder==(_('Enter the last name of user')) name="user[last_name]" type="text" required value=(@user.last_name)]
25
+
26
+ .row
27
+ .col-sm-12.col-lg-6
28
+ .form-group data-name="email"
29
+ label for="email"
30
+ = _('Email')
31
+ input#group_name.form-control[placeholder==(_('Enter the name of group you want to create')) name="user[email]" type="text" required value=(@user.email)]
32
+
33
+ .row
34
+ .col-sm-12.col-lg-6
35
+ .form-group data-name="password"
36
+ label for="password"
37
+ = _('Password')
38
+ input#group_name.form-control[name="user[password]" type="password"]
39
+
40
+ .col-sm-12.col-lg-6
41
+ .form-group data-name="password_confirmation"
42
+ label for="password_confirmation"
43
+ = _('Password confirmation')
44
+ input#group_name.form-control[name="user[password_confirmation]" type="password"]
45
+
46
+ .row
47
+ .col-sm-12
48
+ h3
49
+ = _('Groups of user')
50
+ .row
51
+ .col-sm-12.col-lg-12
52
+ .form-group data-name="groups"
53
+ label
54
+ = _('Goups')
55
+ select.multiple.select.form-control name="user[groups]" multiple="multiple" placeholder=(_("Start typing the group name"))
56
+ - @groups.each do |group|
57
+ - if @user.member_of? group
58
+ option[value=(group.id) selected]
59
+ = group.name
60
+ - else
61
+ option value=(group.id)
62
+ = group.name
63
+
64
+
65
+ .box-footer
66
+ .row
67
+ .col-sm-2
68
+ button.btn.btn-success.btn-block type="submit"
69
+ i.fa.fa-check
70
+ |
71
+ = _('Save')
72
+
73
+ .col-sm-2.pull-right
74
+
75
+ div.btn.btn-danger.btn-block onclick=("redirect_to('#{index}')")
76
+ i.fa.fa-times
77
+ = _('Cancel')
78
+
79
+ script
80
+ | $(".multiple.select").select2();
@@ -0,0 +1,37 @@
1
+ - form_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_edit_password_path".to_sym, @user.id)
2
+ - index = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym)
3
+ = form_tag(form_target, remote: true, method: :patch) do
4
+ .row
5
+ .col-sm-12
6
+ .box.box-primary
7
+ .box-header
8
+ .box-title
9
+ = _('Change Password')
10
+
11
+ .box-body
12
+ .row
13
+ .col-sm-12.col-lg-6
14
+ .form-group data-name="password"
15
+ label for="password"
16
+ = _('Password')
17
+ input#group_name.form-control[name="user[password]" type="password"]
18
+ .row
19
+ .col-sm-12.col-lg-6
20
+ .form-group data-name="password_confirmation"
21
+ label for="password_confirmation"
22
+ = _('Password confirmation')
23
+ input#group_name.form-control[name="user[password_confirmation]" type="password"]
24
+
25
+ .box-footer
26
+ .row
27
+ .col-sm-2
28
+ button.btn.btn-success.btn-block type="submit"
29
+ i.fa.fa-check
30
+ |
31
+ = _('Save')
32
+
33
+ .col-sm-2.pull-right
34
+
35
+ div.btn.btn-danger.btn-block onclick=("redirect_to('#{index}')")
36
+ i.fa.fa-times
37
+ = _('Cancel')
@@ -0,0 +1,3 @@
1
+ success_message('<%= _("User saved successfully.") %>');
2
+ var target = '<%= Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym) %>';
3
+ redirect_to(target);
@@ -0,0 +1,3 @@
1
+ - form_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_update_path".to_sym, @user.id)
2
+ - index = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym)
3
+ = render partial: 'form', locals: { method: :put, form_target: form_target, index: index }
@@ -0,0 +1 @@
1
+ = render partial: 'password_form'
@@ -0,0 +1,3 @@
1
+ var msg = <%= @user.errors.to_json.html_safe %>;
2
+ msg.title = "Please fix these errors first.";
3
+ form_error(msg);
@@ -0,0 +1,67 @@
1
+ .row
2
+ .col-xs-12
3
+ .box.box-default
4
+ .box-header.with-border
5
+ h3.box-title
6
+ = _('Users')
7
+ .box-tools
8
+ - new_user = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_new_path".to_sym)
9
+ a.btn.btn-success.pull-right.btn-sm href=(faalisify_url(new_user))
10
+ i.fa.fa-plus
11
+ = _('Add user')
12
+
13
+ .box-body.no-padding
14
+ table.table.table-striped
15
+ tbody
16
+ tr
17
+ th
18
+ |#
19
+ th
20
+ = _("First Name")
21
+ th
22
+ =_("Last Name")
23
+ th
24
+ = _("Email")
25
+ th
26
+ = _('Created at')
27
+ th
28
+ =_('Last sing in at')
29
+ th
30
+ = _('Actions')
31
+
32
+ - @users.each do |user|
33
+ - edit_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_edit_path".to_sym, user.id)
34
+ - destroy_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_destroy_path".to_sym, user.id)
35
+ - show_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_show_path".to_sym, user.id)
36
+ tr
37
+
38
+ td
39
+ = user.id
40
+ td
41
+ - if user.first_name.nil?
42
+ |-
43
+ - else
44
+ = user.first_name
45
+ td
46
+ - if user.last_name.nil?
47
+ | -
48
+ - else
49
+ = user.last_name
50
+ td
51
+ a href=(faalisify_url(show_target))
52
+ = user.email
53
+ td
54
+ = user.created_at
55
+ td
56
+ - if user.last_sign_in_at.nil?
57
+ | -
58
+ - else
59
+ = user.last_sign_in_at
60
+ td.btn-user
61
+ a.warning.link.pull-left href=(faalisify_url(edit_target))
62
+ i.fa.fa-edit
63
+ a.pass-change.link.pull-left href=()
64
+ i.fa.fa-key.change-pass
65
+ a.link.pull-left href=(destroy_target) data-remote="true" data-method="delete"
66
+ i.fa.fa-remove.btn-remove
67
+ .box-footer
@@ -0,0 +1,2 @@
1
+ - form_target = Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym)
2
+ = render partial: 'form', locals: { method: :post, form_target: form_target, index: form_target}
@@ -0,0 +1,6 @@
1
+ .row
2
+ .col-xs-12
3
+ .box.box-default
4
+ .box-header.with-border
5
+ h3.box-title
6
+ = "#{@user.first_name} #{@user.last_name}"
@@ -0,0 +1,3 @@
1
+ success_message('<%= _("User updated successfully.") %>');
2
+ var target = '<%= Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym) %>';
3
+ redirect_to(target);
@@ -0,0 +1,3 @@
1
+ success_message('<%= _("Password updated successfully.") %>');
2
+ var target = '<%= Rails.application.routes.url_helpers.send("#{Faalis::Engine.dashboard_namespace}_auth_users_path".to_sym) %>';
3
+ redirect_to(target);
@@ -23,9 +23,6 @@ class DeviseCreateFaalisUsers < ActiveRecord::Migration
23
23
  t.string :first_name
24
24
  t.string :last_name
25
25
 
26
- # Group
27
- t.integer :group_id, :default => 2
28
-
29
26
  if not Devise.omniauth_providers.empty?
30
27
  # Service
31
28
  t.string :provider, :default => ""
@@ -21,6 +21,7 @@ require 'devise'
21
21
 
22
22
  # Faalis Module
23
23
  module Faalis
24
+ autoload :Configuration, 'faalis/configuration'
24
25
  end
25
26
 
26
27
  require 'faalis/engine'
@@ -33,6 +34,7 @@ require 'faalis/i18n'
33
34
  require 'faalis/generators/concerns'
34
35
  require 'faalis/generators'
35
36
  require 'faalis/route'
37
+ require 'faalis/action_dispatch'
36
38
  require 'faalis/discovery'
37
39
  require 'faalis/fake_assets'
38
40
  require 'faalis/version'
@@ -0,0 +1,3 @@
1
+ class ActionDispatch::Routing::Mapper
2
+ include Faalis::RouteHelpers
3
+ end
@@ -0,0 +1,25 @@
1
+ module Faalis
2
+ class Configuration
3
+
4
+ class << self
5
+ attr_accessor :features, :enabled_features
6
+
7
+ def enabled_features
8
+ @enabled_features || []
9
+ end
10
+
11
+ def features
12
+ [:colorize_output]
13
+ end
14
+
15
+ def enable(feature)
16
+ fail "No such feature: '#{feature}'" unless features.include? feature
17
+ features << featue unless enabled_features.include? feature
18
+ end
19
+
20
+ def disable
21
+ fail 'TODO: create a disable method'
22
+ end
23
+ end
24
+ end
25
+ end
@@ -29,8 +29,10 @@ require_relative './middlewares/locale'
29
29
  require 'gettext_i18n_rails' if Rails.env.development?
30
30
 
31
31
  module Faalis
32
+
32
33
  # `Engine` class of **Faalis**.
33
34
  class Engine < ::Rails::Engine
35
+
34
36
  # TODO: Break this class to modules
35
37
  # TODO: Add a facility to allow developers to select
36
38
  # features of faalis
@@ -8,3 +8,4 @@ require 'rails-assets-flow.js'
8
8
  require 'rails-assets-ng-flow'
9
9
  require 'rails-assets-angular-ui-router'
10
10
  require 'rails-assets-sugar'
11
+ require 'rails-assets-angular-loading-bar'
@@ -1,8 +1,79 @@
1
-
2
1
  module Faalis
2
+ module RouteHelpers
3
+
4
+ # routes to be added to dashboard
5
+ def in_dashboard
6
+ namespace Faalis::Engine.dashboard_namespace do
7
+ yield
8
+ end
9
+ end
10
+
11
+ # Allow localized scope
12
+ def localized_scop
13
+ langs = ::I18n.available_locales.join('|')
14
+ scope '(:locale)', locale: Regexp.new(langs) do
15
+ yield
16
+ end
17
+ end
18
+
19
+ # This method allow user to define his routes in api
20
+ # namespace
21
+ def api_routes(version: :v1)
22
+ # TODO: Add a dynamic solution for formats
23
+ namespace :api, defaults: { format: :json } do
24
+ namespace version do
25
+ # Call user given block to define user routes
26
+ # inside this namespace
27
+ yield if block_given?
28
+ end
29
+ end
30
+
31
+ scope 'module'.to_sym => 'faalis' do
32
+ #dashboard = Faalis::Engine.dashboard_namespace
33
+ #get "#{dashboard}/auth/groups/new", to: "#{dashboard}/groups#new"
34
+ in_dashboard do
35
+ get 'auth/groups/new', to: 'groups#new'
36
+ get 'auth/groups/:id', to: 'groups#edit', as: 'auth_groups_edit'
37
+ post 'auth/groups', to: 'groups#create'
38
+ put 'auth/groups/:id', to: 'groups#update', as: 'auth_groups_update'
39
+
40
+ get 'auth/users', to: 'users#index'
41
+ get 'auth/users/new', to: 'users#new'
42
+ get 'auth/users/:id', to: 'users#show', as: 'auth_users_show'
43
+ get 'auth/users/:id/edit', to: 'users#edit', as: 'auth_users_edit'
44
+ post 'auth/users', to: 'users#create'
45
+ put 'auth/users/:id', to: 'users#update', as: 'auth_users_update'
46
+ get('auth/users/:id/password', to: 'users#edit_password',
47
+ as: 'auth_users_edit_password')
48
+
49
+ patch 'auth/users/:id/password', to: 'users#update_password'
50
+ delete 'auth/users/:id', to: 'users#destroy', as: 'auth_users_destroy'
51
+
52
+ end
53
+
54
+ # TODO: Add a dynamic solution for formats
55
+ namespace :api, defaults: { format: :json } do
56
+ namespace version do
57
+ get 'permissions', to: 'permissions#index'
58
+ get 'permissions/user', to: 'permissions#user_permissions'
59
+ resources :groups, except: [:new]
60
+ resources :users, except: [:new]
61
+ resource :profile, except: [:new, :destroy]
62
+
63
+ get 'logs', to: 'logs#index'
64
+ end
65
+
66
+ end
67
+ end
68
+ end
69
+
70
+ end
71
+
72
+
3
73
  class Routes
4
74
 
5
75
  def self.localized_scop(router: Rails.application.routes)
76
+ puts '[Warning]: This method is depricated please just use "localized_scope" in your router.'
6
77
  langs = ::I18n.available_locales.join('|')
7
78
  router.scope '(:locale)', locale: Regexp.new(langs)
8
79
  end
@@ -11,7 +82,7 @@ module Faalis
11
82
  # Router
12
83
  def self.define_api_routes(routes: Rails.application.routes,
13
84
  version: :v1)
14
-
85
+ puts '[Warning]: This method is depricated. Please use "api_routes" directly in your router.'
15
86
  routes.draw do
16
87
  # TODO: Add a dynamic solution for formats
17
88
  namespace :api, defaults: { format: :json } do
@@ -1,6 +1,6 @@
1
1
  # -----------------------------------------------------------------------------
2
- # Faalis - Basic website skel engine
3
- # Copyright (C) 2012-2013 Yellowen
2
+ # Faalis
3
+ # Copyright (C) 2012-2015 Yellowen
4
4
  #
5
5
  # This program is free software; you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -18,5 +18,5 @@
18
18
  # -----------------------------------------------------------------------------
19
19
 
20
20
  module Faalis
21
- VERSION = '1.0.0.alpha4'
21
+ VERSION = '1.0.0'
22
22
  end
@@ -5,7 +5,7 @@ app_name = ask("What's your app name: ").downcase.underscore
5
5
  add_source 'https://rails-assets.org'
6
6
 
7
7
  gem_group :development do
8
- gem 'pry'
8
+ gem 'pry-rails'
9
9
  gem 'annotate'
10
10
  gem 'hirb'
11
11
  gem 'quiet_assets' # unclutters the server log from assets
@@ -13,12 +13,17 @@ gem_group :development do
13
13
  gem 'binding_of_caller'
14
14
  gem 'meta_request'
15
15
  gem 'pry-byebug'
16
- gem 'puma'
16
+ #gem 'puma'
17
17
  end
18
18
 
19
19
  gem 'slim-rails'
20
- gem 'dashstrap'
21
- gem 'faalis'
20
+ gem 'dashstrap', github: 'Yellowen/dashstrap'
21
+ gem 'faalis', github: 'Yellowen/Faalis'
22
+
23
+ inside app_name do
24
+ run 'bundle install'
25
+ run 'rake faalis:install:migrations'
26
+ end
22
27
 
23
28
  application do
24
29
  'config.railties_order = [:main_app, Dashstrap::TemplateEngine, Faalis::Engine, :all]'
@@ -36,7 +41,7 @@ rakefile 'db.rake' do
36
41
  )
37
42
  end
38
43
 
39
- generate 'faalis::install_all'
44
+ generate 'faalis:install_all'
40
45
 
41
46
  initializer 'assets.rb' do
42
47
  %Q(
@@ -48,7 +53,6 @@ initializer 'assets.rb' do
48
53
  )
49
54
  end
50
55
 
51
-
52
56
  git :init
53
57
  create_file "LICENSE" do
54
58
  <<-'CODE'