faalis 1.0.0.alpha1 → 1.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -10
  3. data/Rakefile +6 -2
  4. data/app/assets/javascripts/faalis/angular-manifest.js +3 -0
  5. data/app/assets/javascripts/faalis/application.js +0 -1
  6. data/app/assets/javascripts/faalis/dashboard/app.js +20 -6
  7. data/app/assets/javascripts/faalis/dashboard/application.js.erb +5 -1
  8. data/app/assets/javascripts/faalis/dashboard/controllers/group.js.coffee +42 -0
  9. data/app/assets/javascripts/faalis/dashboard/functions.js.erb +20 -0
  10. data/app/assets/javascripts/faalis/dashboard/init.js +1 -1
  11. data/app/assets/javascripts/faalis/dashboard/lib/button.js.coffee +17 -0
  12. data/app/assets/javascripts/faalis/dashboard/lib/controllers.js.coffee +11 -0
  13. data/app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee +14 -0
  14. data/app/assets/javascripts/faalis/dashboard/lib/controllers/generic_add_controller.js.coffee +33 -0
  15. data/app/assets/javascripts/faalis/dashboard/lib/controllers/generic_index_controller.js.coffee +85 -0
  16. data/app/assets/javascripts/faalis/dashboard/lib/fields/base.js.coffee +6 -0
  17. data/app/assets/javascripts/faalis/dashboard/lib/fields/has_many_field.js.coffee +4 -0
  18. data/app/assets/javascripts/faalis/dashboard/lib/fields/string_field.js.coffee +2 -0
  19. data/app/assets/javascripts/faalis/dashboard/lib/resource.js.coffee +147 -0
  20. data/app/assets/javascripts/faalis/dashboard/modules/auth/auth.js +5 -3
  21. data/app/assets/javascripts/faalis/dashboard/modules/auth/profile.js +6 -5
  22. data/app/assets/javascripts/faalis/dashboard/modules/auth/user.js +12 -10
  23. data/app/assets/javascripts/faalis/dashboard/modules/conversations.js +2 -1
  24. data/app/assets/javascripts/faalis/dashboard/modules/fields/#image.js# +43 -0
  25. data/app/assets/javascripts/faalis/dashboard/modules/fields/date.js +51 -0
  26. data/app/assets/javascripts/faalis/dashboard/modules/fields/datetime.js +26 -15
  27. data/app/assets/javascripts/faalis/dashboard/modules/fields/fields.js +3 -1
  28. data/app/assets/javascripts/faalis/dashboard/modules/fields/file.js +43 -0
  29. data/app/assets/javascripts/faalis/dashboard/modules/fields/image.js +33 -46
  30. data/app/assets/javascripts/faalis/dashboard/modules/fields/relation.js +7 -4
  31. data/app/assets/javascripts/faalis/dashboard/modules/fields/tag.js +5 -11
  32. data/app/assets/javascripts/faalis/dashboard/modules/fields/time.js +34 -122
  33. data/app/assets/javascripts/faalis/dashboard/modules/logs.js +5 -4
  34. data/app/assets/javascripts/faalis/dashboard/modules/permissions.js.coffee +38 -0
  35. data/app/assets/javascripts/faalis/dashboard/resources/group_resource.js.coffee +8 -0
  36. data/app/assets/javascripts/faalis/dashboard/resources/permission_resource.js.coffee +6 -0
  37. data/app/assets/javascripts/faalis/dashboard/services/api.js.coffee +73 -0
  38. data/app/assets/javascripts/faalis/dashboard/services/resource_factory.js.coffee +48 -0
  39. data/app/assets/javascripts/faalis/dashboard/services/user.js.coffee +4 -0
  40. data/app/assets/javascripts/faalis/dashboard/variables.js.erb +5 -0
  41. data/app/assets/javascripts/faalis/{locales → locale}/en.json +0 -0
  42. data/app/assets/javascripts/faalis/{locales → locale}/fa.json +0 -0
  43. data/app/assets/javascripts/faalis/{locales → locale}/translations.fa.js +0 -0
  44. data/app/controllers/faalis/api/v1/groups_controller.rb +53 -57
  45. data/app/controllers/faalis/api/v1/permissions_controller.rb +29 -12
  46. data/app/controllers/faalis/api_controller.rb +19 -12
  47. data/app/controllers/faalis/application_controller.rb +8 -7
  48. data/app/controllers/faalis/dashboard_controller.rb +5 -11
  49. data/app/models/faalis/{user → concerns/user}/auth_definitions.rb +6 -1
  50. data/app/models/faalis/{user → concerns/user}/mongoid_fields.rb +8 -2
  51. data/app/models/faalis/concerns/user/permission.rb +24 -0
  52. data/app/models/faalis/concerns/user/user_roles.rb +20 -0
  53. data/app/models/faalis/group.rb +13 -15
  54. data/app/models/faalis/permission.rb +15 -1
  55. data/app/models/faalis/user.rb +44 -20
  56. data/app/policies/faalis/admin_only_policy.rb +66 -0
  57. data/app/policies/faalis/application_policy.rb +40 -0
  58. data/app/policies/faalis/group_policy.rb +8 -0
  59. data/app/policies/faalis/user_policy.rb +9 -0
  60. data/app/views/{angularjs_templates → angular}/auth/groups/details.html +0 -0
  61. data/app/views/{angularjs_templates → angular}/auth/groups/index.html +0 -0
  62. data/app/views/{angularjs_templates → angular}/auth/groups/new.html +0 -0
  63. data/app/views/{angularjs_templates → angular}/auth/index.html +0 -0
  64. data/app/views/{angularjs_templates → angular}/auth/profile/edit.html +0 -0
  65. data/app/views/{angularjs_templates → angular}/auth/users/details.html +0 -0
  66. data/app/views/{angularjs_templates → angular}/auth/users/index.html +0 -0
  67. data/app/views/{angularjs_templates → angular}/auth/users/new.html +0 -0
  68. data/app/views/{angularjs_templates → angular}/conversations/details.html +0 -0
  69. data/app/views/{angularjs_templates → angular}/conversations/index.html +0 -0
  70. data/app/views/{angularjs_templates → angular}/conversations/new.html +0 -0
  71. data/app/views/{angularjs_templates → angular}/conversations/show.html +0 -0
  72. data/app/views/{angularjs_templates → angular}/conversations/show_details.html +0 -0
  73. data/app/views/angular/faalis/views/generic_add_view.html.slim +5 -0
  74. data/app/views/{angularjs_templates → angular}/fields/boolean/boolean.html +0 -0
  75. data/app/views/{angularjs_templates → angular}/fields/control-combo/control-list.html +0 -0
  76. data/app/views/{angularjs_templates → angular}/fields/datetime/datetime.html +0 -0
  77. data/app/views/{angularjs_templates → angular}/fields/datetime/time.html +0 -0
  78. data/app/views/angular/fields/file/file.html.slim +0 -0
  79. data/app/views/{angularjs_templates → angular}/fields/float/float.html +0 -0
  80. data/app/views/{angularjs_templates → angular}/fields/image/image.html +0 -0
  81. data/app/views/{angularjs_templates → angular}/fields/integer/integer.html +0 -0
  82. data/app/views/{angularjs_templates → angular}/fields/relation/relation.html +0 -0
  83. data/app/views/{angularjs_templates → angular}/fields/string/string.html +0 -0
  84. data/app/views/{angularjs_templates → angular}/fields/tag/tag.html +0 -0
  85. data/app/views/{angularjs_templates → angular}/fields/text/text.html +0 -0
  86. data/app/views/{angularjs_templates → angular}/filter/index.html +0 -0
  87. data/app/views/{angularjs_templates → angular}/index.html +0 -0
  88. data/app/views/{angularjs_templates → angular}/locale/fa.po +0 -0
  89. data/app/views/{angularjs_templates → angular}/locale/templates.pot +0 -0
  90. data/app/views/{angularjs_templates → angular}/logs/index.html +0 -0
  91. data/app/views/angular/modules.html +0 -0
  92. data/app/views/{angularjs_templates → angular}/nav.html.erb +0 -0
  93. data/app/views/faalis/api/v1/groups/index.json.jbuilder +1 -1
  94. data/app/views/faalis/api/v1/permissions/index.json.jbuilder +1 -1
  95. data/app/views/faalis/dashboard/index.html.erb +1 -1
  96. data/app/views/layouts/faalis/application.html.erb +1 -1
  97. data/config/routes.rb +1 -7
  98. data/config/spring.rb +1 -0
  99. data/db/migrate/20131013091000_devise_create_faalis_users.rb +4 -4
  100. data/db/migrate/20131020124701_create_faalis_groups.rb +3 -0
  101. data/db/migrate/20131021170923_create_faalis_permissions.rb +2 -0
  102. data/db/seeds.rb +15 -13
  103. data/lib/faalis.rb +2 -2
  104. data/lib/faalis/concerns/authorizable.rb +1 -0
  105. data/lib/faalis/engine.rb +15 -16
  106. data/lib/faalis/{extensions.rb → extension.rb} +1 -1
  107. data/lib/faalis/{extensions → extension}/base.rb +0 -0
  108. data/lib/faalis/fake_assets.rb +2 -0
  109. data/lib/faalis/generators/concerns.rb +1 -1
  110. data/lib/faalis/generators/concerns/angular.rb +1 -1
  111. data/lib/faalis/generators/concerns/bulk.rb +1 -2
  112. data/lib/faalis/generators/concerns/input_file.rb +49 -0
  113. data/lib/faalis/generators/concerns/resource_fields.rb +4 -0
  114. data/lib/faalis/generators/concerns/tabs.rb +1 -1
  115. data/lib/faalis/generators/dashboard_scaffold.rb +3 -1
  116. data/lib/faalis/i18n.rb +1 -0
  117. data/lib/faalis/route.rb +26 -9
  118. data/lib/faalis/version.rb +1 -1
  119. data/lib/faalis_application.rb +442 -0
  120. data/lib/generators/faalis/install_generator.rb +4 -2
  121. data/lib/generators/faalis/js/list_view_generator.rb +3 -22
  122. data/lib/generators/faalis/scaffold_generator.rb +7 -10
  123. data/lib/generators/faalis/templates/README +0 -7
  124. data/lib/generators/faalis/templates/angularjs/module.js.erb +4 -1
  125. data/lib/generators/faalis/templates/api/controller.rb.erb +18 -21
  126. data/lib/generators/faalis/templates/application.js +14 -1
  127. data/lib/generators/faalis/templates/faalis.rb +3 -1
  128. data/lib/generators/faalis/templates/i18n/Gruntfile.js.erb +2 -2
  129. data/lib/generators/faalis/templates/js/list_view/partials/add_controller.js.erb +3 -3
  130. data/lib/generators/faalis/views_generator.rb +1 -1
  131. data/lib/tasks/docs.rake +6 -0
  132. data/lib/tasks/faalis_tasks.rake +1 -0
  133. data/lib/tasks/grunt/Gruntfile.js +3 -3
  134. data/spec/dummy/app/controllers/api_controller.rb +5 -0
  135. data/spec/dummy/config/initializers/faalis.rb +3 -3
  136. data/spec/dummy/db/development.sqlite3 +0 -0
  137. data/spec/dummy/db/migrate/20150121060012_create_application_models.model_discovery_engine.rb +10 -0
  138. data/spec/dummy/db/schema.rb +71 -0
  139. data/spec/dummy/db/test.sqlite3 +0 -0
  140. data/spec/dummy/log/development.log +544 -0
  141. data/spec/dummy/log/test.log +12354 -0
  142. data/spec/factories/faalis/groups.rb +31 -0
  143. data/spec/factories/faalis/permissions.rb +16 -0
  144. data/spec/factories/faalis/users.rb +23 -0
  145. data/spec/models/faalis/group_spec.rb +32 -0
  146. data/spec/models/faalis/permission_spec.rb +15 -0
  147. data/spec/models/faalis/user_spec.rb +100 -0
  148. data/spec/policies/faalis/admin_only_policy_spec.rb +39 -0
  149. data/spec/policies/faalis/application_policy_spec.rb +49 -0
  150. data/spec/spec_helper.rb +26 -5
  151. data/spec/support/factory_girl.rb +3 -0
  152. metadata +225 -102
  153. data/app/assets/javascripts/faalis/dashboard/modules/auth/group.js +0 -155
  154. data/app/assets/javascripts/faalis/dashboard/modules/permissions.js +0 -52
  155. data/app/controllers/faalis/#api_controller.rb# +0 -51
  156. data/app/controllers/faalis/#dashboard_controller.rb# +0 -65
  157. data/app/models/ability.rb +0 -40
  158. data/app/models/faalis/user/permission.rb +0 -21
  159. data/app/views/angularjs_templates/modules.html +0 -17
  160. data/db/migrate/20140617124019_faalis_groups_users.rb +0 -4
  161. data/lib/faalis/generators/concerns/json_input.rb +0 -41
  162. data/lib/faalis/generators/fields/#relation.rb# +0 -61
  163. data/lib/faalis/patches/models.rb +0 -7
@@ -0,0 +1,31 @@
1
+ # Read about factories at https://github.com/thoughtbot/factory_girl
2
+
3
+ def group(role)
4
+ # get existing group or create new one
5
+ Faalis::Group.where(role: role).first || FactoryGirl.create("#{role}_group")
6
+ end
7
+
8
+ FactoryGirl.define do
9
+ factory :guest_group, :class => 'Faalis::Group' do |f|
10
+ name 'Guest'
11
+ role 'guest'
12
+ end
13
+
14
+ factory :admin_group, :class => 'Faalis::Group' do
15
+ name 'Admin'
16
+ role 'admin'
17
+ end
18
+
19
+ # This is a random group
20
+ factory :manager_group, :class => 'Faalis::Group' do
21
+ name 'Manager'
22
+ role 'manager'
23
+
24
+ permissions do
25
+ [:index, :show, :update, :create, :destroy].map do |x|
26
+ define_permission(x, :group)
27
+ end
28
+ end
29
+ end
30
+
31
+ end
@@ -0,0 +1,16 @@
1
+ # Read about factories at https://github.com/thoughtbot/factory_girl
2
+
3
+ def define_permission(action, model)
4
+ perm = Faalis::Permission.find_by(permission_type: action,
5
+ model: "Faalis::#{model.to_s.titleize}")
6
+ perm || FactoryGirl.create("#{action}_#{model}")
7
+ end
8
+
9
+ FactoryGirl.define do
10
+ [:index, :show, :update, :create, :destroy].each do |action|
11
+ factory "#{action}_group".to_sym, :class => 'Faalis::Permission' do
12
+ model 'Faalis::Group'
13
+ permission_type action
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,23 @@
1
+ # Read about factories at https://github.com/thoughtbot/factory_girl
2
+
3
+ FactoryGirl.define do
4
+ factory :user, 'class'.to_sym => 'Faalis::User' do
5
+ first_name Faker::Name.first_name
6
+ last_name Faker::Name.first_name
7
+ sequence :email do |n|
8
+ "person#{n}@example.com"
9
+ end
10
+
11
+ factory :admin do
12
+ groups { [group(:admin)] }
13
+ end
14
+
15
+ factory :manager do
16
+ groups { [group(:manager)] }
17
+ end
18
+
19
+ factory :guest do
20
+ groups { [group(:guest)] }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,32 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: faalis_groups
4
+ #
5
+ # id :integer not null, primary key
6
+ # name :string
7
+ # role :string
8
+ # created_at :datetime
9
+ # updated_at :datetime
10
+ #
11
+
12
+ require 'spec_helper'
13
+
14
+ describe Faalis::Group do
15
+
16
+ context 'Validation' do
17
+ it 'would not be valid if group already exists' do
18
+ group(:admin)
19
+ group = build(:admin_group)
20
+
21
+ expect(group).not_to be_valid
22
+ end
23
+
24
+ it 'would not be valid without a name and role name' do
25
+ group1 = build(:admin_group, name: '')
26
+ group2 = build(:admin_group, role: '')
27
+
28
+ expect(group1).not_to be_valid
29
+ expect(group2).not_to be_valid
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,15 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: faalis_permissions
4
+ #
5
+ # id :integer not null, primary key
6
+ # model :string
7
+ # permission_type :string
8
+ # created_at :datetime
9
+ # updated_at :datetime
10
+ #
11
+
12
+ require 'spec_helper'
13
+
14
+ describe Faalis::Permission do
15
+ end
@@ -0,0 +1,100 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: faalis_users
4
+ #
5
+ # id :integer not null, primary key
6
+ # email :string default(""), not null
7
+ # encrypted_password :string default(""), not null
8
+ # reset_password_token :string
9
+ # reset_password_sent_at :datetime
10
+ # remember_created_at :datetime
11
+ # sign_in_count :integer default("0")
12
+ # current_sign_in_at :datetime
13
+ # last_sign_in_at :datetime
14
+ # current_sign_in_ip :string
15
+ # last_sign_in_ip :string
16
+ # first_name :string
17
+ # last_name :string
18
+ # group_id :integer default("2")
19
+ # failed_attempts :integer default("0")
20
+ # unlock_token :string
21
+ # locked_at :datetime
22
+ # created_at :datetime
23
+ # updated_at :datetime
24
+ #
25
+
26
+ require 'spec_helper'
27
+
28
+ describe Faalis::User do
29
+
30
+
31
+ let(:fake_password) { Faker::Internet.password(8) }
32
+
33
+ before :all do
34
+ group(:admin)
35
+ group(:guest)
36
+ end
37
+
38
+ context 'Validation' do
39
+ it 'is not valid without a password' do
40
+ expect(build(:user)).not_to be_valid
41
+ end
42
+
43
+
44
+ it 'is not valid without of a valid email' do
45
+ user1 = build(:user, password: fake_password, email: '')
46
+ user2 = build(:user, password: fake_password, email: 'some_email')
47
+
48
+ expect(user1).not_to be_valid
49
+ expect(user2).not_to be_valid
50
+ end
51
+ end
52
+
53
+ describe 'Groups & Roles' do
54
+
55
+ it 'have a "roles" method which returns an array of its roles.' do
56
+ user = create(:user, password: fake_password)
57
+
58
+ expect(user.roles).to be_a_kind_of(Array)
59
+ expect(user.roles).to include('guest')
60
+ end
61
+
62
+ it 'are in "Guest" group if no group provided' do
63
+ user = create(:user, password: fake_password)
64
+ expect(user.groups.size).to eq(1)
65
+ #expect(user.groups.first).to be_a_kind_of(Faalis::Group)
66
+ end
67
+
68
+ it 'have a functional many to many to group' do
69
+ user = create(:user, groups: [group(:admin)],
70
+ password: fake_password)
71
+
72
+ expect(user.groups.size).to eq(1)
73
+ expect(user.groups.first).to be_a_kind_of(Faalis::Group)
74
+ end
75
+
76
+ it 'can be in serveral groups' do
77
+ user1 = create(:user,
78
+ groups: [group(:admin), group(:guest)],
79
+ password: fake_password)
80
+
81
+ user2 = create(:user,
82
+ password: fake_password)
83
+
84
+ user2.groups << group(:admin)
85
+
86
+ expect(user1.groups.size).to eq(2)
87
+ expect(user2.groups.size).to eq(2)
88
+
89
+ end
90
+
91
+ it 'should not join to `guest` group when using build' do
92
+ user = build(:user,
93
+ password: fake_password)
94
+ expect(user.groups.size).to eq(0)
95
+
96
+ user.save
97
+ expect(user.groups.size).to eq(1)
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+
3
+ describe Faalis::AdminOnlyPolicy do
4
+ subject { Faalis::AdminOnlyPolicy.new(user, entity) }
5
+
6
+ # We use Group as an entity because we don't have
7
+ # too much models
8
+ let(:entity) { group(:admin) }
9
+
10
+ context 'for visitors' do
11
+ let(:user) { nil }
12
+
13
+ [:index, :show, :update, :create, :destroy].each do |action|
14
+ it "denies access to #{action} on the protected entity" do
15
+ expect(subject.send("#{action}?")).not_to be(true)
16
+ end
17
+ end
18
+ end
19
+
20
+ context 'for guest users' do
21
+ let(:user) { create(:user, password: '123123123') }
22
+
23
+ [:index, :show, :update, :create, :destroy].each do |action|
24
+ it "denies access to #{action} on the protected entity" do
25
+ expect(subject.send("#{action}?")).not_to be(true)
26
+ end
27
+ end
28
+ end
29
+
30
+ context 'for admin users' do
31
+ let(:user) { create(:admin, password: '123123123') }
32
+
33
+ [:index, :show, :update, :create, :destroy].each do |action|
34
+ it "denies access to #{action} on the protected entity" do
35
+ expect(subject.send("#{action}?")).to be(true)
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,49 @@
1
+ require 'spec_helper'
2
+
3
+ describe Faalis::ApplicationPolicy do
4
+ subject { Faalis::ApplicationPolicy.new(user, entity) }
5
+
6
+ # We use Group as an entity because we don't have
7
+ # too much models
8
+ let(:entity) { group(:admin) }
9
+
10
+ context 'for visitors' do
11
+ let(:user) { nil }
12
+
13
+ [:index, :show, :update, :create, :destroy].each do |action|
14
+ it "denies access to #{action} on the protected entity" do
15
+ expect(subject.send("#{action}?")).not_to be(true)
16
+ end
17
+ end
18
+ end
19
+
20
+ context 'for guest users' do
21
+ let(:user) { create(:user, password: '123123123') }
22
+
23
+ [:index, :show, :update, :create, :destroy].each do |action|
24
+ it "denies access to #{action} on the protected entity" do
25
+ expect(subject.send("#{action}?")).not_to be(true)
26
+ end
27
+ end
28
+ end
29
+
30
+ context 'for admin users' do
31
+ let(:user) { create(:admin, password: '123123123') }
32
+
33
+ [:index, :show, :update, :create, :destroy].each do |action|
34
+ it "grants access to #{action} on the protected entity" do
35
+ expect(subject.send("#{action}?")).to be(true)
36
+ end
37
+ end
38
+ end
39
+
40
+ context 'for users who have the right' do
41
+ let(:user) { create(:manager, password: '123123123') }
42
+
43
+ [:index, :show, :update, :create, :destroy].each do |action|
44
+ it "denies access to #{action} on the protected entity" do
45
+ expect(subject.send("#{action}?")).to be(true)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -1,10 +1,17 @@
1
+ require 'codeclimate-test-reporter'
2
+ CodeClimate::TestReporter.start
3
+
1
4
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
3
- require File.expand_path("../../config/environment", __FILE__)
5
+ ENV['RAILS_ENV'] ||= 'test'
6
+ require File.expand_path('../dummy/config/environment', __FILE__)
7
+
4
8
  require 'rspec/rails'
5
- require 'rspec/autorun'
6
9
  require 'factory_girl_rails'
10
+ require 'database_cleaner'
11
+ require 'capybara/rspec'
12
+ require 'pundit/rspec'
7
13
 
14
+ FAALIS = File.join(File.dirname(__FILE__), '../')
8
15
 
9
16
  Rails.backtrace_cleaner.remove_silencers!
10
17
 
@@ -15,7 +22,7 @@ Rails.backtrace_cleaner.remove_silencers!
15
22
  # run twice. It is recommended that you do not name files matching this glob to
16
23
  # end with _spec.rb. You can configure this pattern with with the --pattern
17
24
  # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
18
- Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
25
+ Dir[File.join(FAALIS, 'spec/support/**/*.rb')].each { |f| require f }
19
26
 
20
27
  # Checks for pending migrations before tests are run.
21
28
  # If you are not using ActiveRecord, you can remove this line.
@@ -48,5 +55,19 @@ RSpec.configure do |config|
48
55
  # order dependency and want to debug it, you can fix the order by providing
49
56
  # the seed, which is printed after each run.
50
57
  # --seed 1234
51
- config.order = "random"
58
+ config.order = 'random'
59
+
60
+ config.before(:suite) do
61
+ begin
62
+ DatabaseCleaner.start
63
+ #FactoryGirl.lint
64
+ ensure
65
+ DatabaseCleaner.clean
66
+ end
67
+ end
68
+
69
+ config.after(:each) do
70
+ DatabaseCleaner.clean
71
+ end
72
+
52
73
  end
@@ -0,0 +1,3 @@
1
+ RSpec.configure do |config|
2
+ config.include FactoryGirl::Syntax::Methods
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faalis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha1
4
+ version: 1.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sameer Rahmani
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-05 00:00:00.000000000 Z
12
+ date: 2015-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 4.1.1
20
+ version: 4.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 4.1.1
27
+ version: 4.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: omniauth
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -45,16 +45,16 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 3.2.0
48
+ version: 3.4.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 3.2.0
55
+ version: 3.4.0
56
56
  - !ruby/object:Gem::Dependency
57
- name: cancan
57
+ name: pundit
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
@@ -97,20 +97,6 @@ dependencies:
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: sass-rails
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - "~>"
103
- - !ruby/object:Gem::Version
104
- version: 4.0.0
105
- type: :runtime
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: 4.0.0
112
- - !ruby/object:Gem::Dependency
113
- name: compass-rails
114
100
  requirement: !ruby/object:Gem::Requirement
115
101
  requirements:
116
102
  - - ">="
@@ -124,35 +110,35 @@ dependencies:
124
110
  - !ruby/object:Gem::Version
125
111
  version: '0'
126
112
  - !ruby/object:Gem::Dependency
127
- name: sprockets
113
+ name: coffee-rails
128
114
  requirement: !ruby/object:Gem::Requirement
129
115
  requirements:
130
- - - "~>"
116
+ - - ">="
131
117
  - !ruby/object:Gem::Version
132
- version: 2.11.0
118
+ version: '0'
133
119
  type: :runtime
134
120
  prerelease: false
135
121
  version_requirements: !ruby/object:Gem::Requirement
136
122
  requirements:
137
- - - "~>"
123
+ - - ">="
138
124
  - !ruby/object:Gem::Version
139
- version: 2.11.0
125
+ version: '0'
140
126
  - !ruby/object:Gem::Dependency
141
- name: foundation-rails
127
+ name: slim-rails
142
128
  requirement: !ruby/object:Gem::Requirement
143
129
  requirements:
144
- - - "~>"
130
+ - - ">="
145
131
  - !ruby/object:Gem::Version
146
- version: 5.2.0
132
+ version: '0'
147
133
  type: :runtime
148
134
  prerelease: false
149
135
  version_requirements: !ruby/object:Gem::Requirement
150
136
  requirements:
151
- - - "~>"
137
+ - - ">="
152
138
  - !ruby/object:Gem::Version
153
- version: 5.2.0
139
+ version: '0'
154
140
  - !ruby/object:Gem::Dependency
155
- name: font-awesome-rails
141
+ name: sprockets
156
142
  requirement: !ruby/object:Gem::Requirement
157
143
  requirements:
158
144
  - - ">="
@@ -207,6 +193,20 @@ dependencies:
207
193
  - - "~>"
208
194
  - !ruby/object:Gem::Version
209
195
  version: '2.4'
196
+ - !ruby/object:Gem::Dependency
197
+ name: rails-assets-sugar
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - '='
201
+ - !ruby/object:Gem::Version
202
+ version: 1.4.1
203
+ type: :runtime
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - '='
208
+ - !ruby/object:Gem::Version
209
+ version: 1.4.1
210
210
  - !ruby/object:Gem::Dependency
211
211
  name: execjs
212
212
  requirement: !ruby/object:Gem::Requirement
@@ -221,6 +221,20 @@ dependencies:
221
221
  - - ">="
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
+ - !ruby/object:Gem::Dependency
225
+ name: fast_gettext
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - ">="
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ">="
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
224
238
  - !ruby/object:Gem::Dependency
225
239
  name: rails-assets-angular-gettext
226
240
  requirement: !ruby/object:Gem::Requirement
@@ -319,6 +333,34 @@ dependencies:
319
333
  - - "~>"
320
334
  - !ruby/object:Gem::Version
321
335
  version: 2.4.2
336
+ - !ruby/object:Gem::Dependency
337
+ name: rails-assets-angular-ui-router
338
+ requirement: !ruby/object:Gem::Requirement
339
+ requirements:
340
+ - - ">="
341
+ - !ruby/object:Gem::Version
342
+ version: '0'
343
+ type: :runtime
344
+ prerelease: false
345
+ version_requirements: !ruby/object:Gem::Requirement
346
+ requirements:
347
+ - - ">="
348
+ - !ruby/object:Gem::Version
349
+ version: '0'
350
+ - !ruby/object:Gem::Dependency
351
+ name: rails-assets-angular-loading-bar
352
+ requirement: !ruby/object:Gem::Requirement
353
+ requirements:
354
+ - - ">="
355
+ - !ruby/object:Gem::Version
356
+ version: '0'
357
+ type: :runtime
358
+ prerelease: false
359
+ version_requirements: !ruby/object:Gem::Requirement
360
+ requirements:
361
+ - - ">="
362
+ - !ruby/object:Gem::Version
363
+ version: '0'
322
364
  - !ruby/object:Gem::Dependency
323
365
  name: gettext
324
366
  requirement: !ruby/object:Gem::Requirement
@@ -409,14 +451,14 @@ dependencies:
409
451
  requirements:
410
452
  - - "~>"
411
453
  - !ruby/object:Gem::Version
412
- version: 3.0.0.beta
454
+ version: 3.1.0
413
455
  type: :development
414
456
  prerelease: false
415
457
  version_requirements: !ruby/object:Gem::Requirement
416
458
  requirements:
417
459
  - - "~>"
418
460
  - !ruby/object:Gem::Version
419
- version: 3.0.0.beta
461
+ version: 3.1.0
420
462
  - !ruby/object:Gem::Dependency
421
463
  name: capybara
422
464
  requirement: !ruby/object:Gem::Requirement
@@ -431,6 +473,20 @@ dependencies:
431
473
  - - ">="
432
474
  - !ruby/object:Gem::Version
433
475
  version: '0'
476
+ - !ruby/object:Gem::Dependency
477
+ name: database_cleaner
478
+ requirement: !ruby/object:Gem::Requirement
479
+ requirements:
480
+ - - ">="
481
+ - !ruby/object:Gem::Version
482
+ version: '0'
483
+ type: :development
484
+ prerelease: false
485
+ version_requirements: !ruby/object:Gem::Requirement
486
+ requirements:
487
+ - - ">="
488
+ - !ruby/object:Gem::Version
489
+ version: '0'
434
490
  - !ruby/object:Gem::Dependency
435
491
  name: factory_girl_rails
436
492
  requirement: !ruby/object:Gem::Requirement
@@ -445,6 +501,20 @@ dependencies:
445
501
  - - ">="
446
502
  - !ruby/object:Gem::Version
447
503
  version: '0'
504
+ - !ruby/object:Gem::Dependency
505
+ name: annotate
506
+ requirement: !ruby/object:Gem::Requirement
507
+ requirements:
508
+ - - ">="
509
+ - !ruby/object:Gem::Version
510
+ version: '0'
511
+ type: :development
512
+ prerelease: false
513
+ version_requirements: !ruby/object:Gem::Requirement
514
+ requirements:
515
+ - - ">="
516
+ - !ruby/object:Gem::Version
517
+ version: '0'
448
518
  description: Faalis is a ruby on rails engine which provides a very basic web application
449
519
  to use with other ruby on rails applications.
450
520
  email:
@@ -476,21 +546,33 @@ files:
476
546
  - app/assets/javascripts/faalis/application.js
477
547
  - app/assets/javascripts/faalis/dashboard/app.js
478
548
  - app/assets/javascripts/faalis/dashboard/application.js.erb
549
+ - app/assets/javascripts/faalis/dashboard/controllers/group.js.coffee
479
550
  - app/assets/javascripts/faalis/dashboard/functions.js.erb
480
551
  - app/assets/javascripts/faalis/dashboard/init.js
552
+ - app/assets/javascripts/faalis/dashboard/lib/button.js.coffee
553
+ - app/assets/javascripts/faalis/dashboard/lib/controllers.js.coffee
554
+ - app/assets/javascripts/faalis/dashboard/lib/controllers/base_controller.js.coffee
555
+ - app/assets/javascripts/faalis/dashboard/lib/controllers/generic_add_controller.js.coffee
556
+ - app/assets/javascripts/faalis/dashboard/lib/controllers/generic_index_controller.js.coffee
557
+ - app/assets/javascripts/faalis/dashboard/lib/fields/base.js.coffee
558
+ - app/assets/javascripts/faalis/dashboard/lib/fields/has_many_field.js.coffee
559
+ - app/assets/javascripts/faalis/dashboard/lib/fields/string_field.js.coffee
560
+ - app/assets/javascripts/faalis/dashboard/lib/resource.js.coffee
481
561
  - app/assets/javascripts/faalis/dashboard/locale/translations.js
482
562
  - app/assets/javascripts/faalis/dashboard/modules/anim.js
483
563
  - app/assets/javascripts/faalis/dashboard/modules/api.js
484
564
  - app/assets/javascripts/faalis/dashboard/modules/auth/auth.js
485
- - app/assets/javascripts/faalis/dashboard/modules/auth/group.js
486
565
  - app/assets/javascripts/faalis/dashboard/modules/auth/profile.js
487
566
  - app/assets/javascripts/faalis/dashboard/modules/auth/user.js
488
567
  - app/assets/javascripts/faalis/dashboard/modules/conversations.js
489
568
  - app/assets/javascripts/faalis/dashboard/modules/errors.js
569
+ - app/assets/javascripts/faalis/dashboard/modules/fields/#image.js#
490
570
  - app/assets/javascripts/faalis/dashboard/modules/fields/boolean.js
491
571
  - app/assets/javascripts/faalis/dashboard/modules/fields/controlcombo-field.js
572
+ - app/assets/javascripts/faalis/dashboard/modules/fields/date.js
492
573
  - app/assets/javascripts/faalis/dashboard/modules/fields/datetime.js
493
574
  - app/assets/javascripts/faalis/dashboard/modules/fields/fields.js
575
+ - app/assets/javascripts/faalis/dashboard/modules/fields/file.js
494
576
  - app/assets/javascripts/faalis/dashboard/modules/fields/float.js
495
577
  - app/assets/javascripts/faalis/dashboard/modules/fields/image.js
496
578
  - app/assets/javascripts/faalis/dashboard/modules/fields/input-grid.js
@@ -503,9 +585,14 @@ files:
503
585
  - app/assets/javascripts/faalis/dashboard/modules/fields/time.js
504
586
  - app/assets/javascripts/faalis/dashboard/modules/filter.js
505
587
  - app/assets/javascripts/faalis/dashboard/modules/logs.js
506
- - app/assets/javascripts/faalis/dashboard/modules/permissions.js
588
+ - app/assets/javascripts/faalis/dashboard/modules/permissions.js.coffee
507
589
  - app/assets/javascripts/faalis/dashboard/modules/services/upload_service.js
508
590
  - app/assets/javascripts/faalis/dashboard/objects.js
591
+ - app/assets/javascripts/faalis/dashboard/resources/group_resource.js.coffee
592
+ - app/assets/javascripts/faalis/dashboard/resources/permission_resource.js.coffee
593
+ - app/assets/javascripts/faalis/dashboard/services/api.js.coffee
594
+ - app/assets/javascripts/faalis/dashboard/services/resource_factory.js.coffee
595
+ - app/assets/javascripts/faalis/dashboard/services/user.js.coffee
509
596
  - app/assets/javascripts/faalis/dashboard/templates/application.handlebars.erb
510
597
  - app/assets/javascripts/faalis/dashboard/templates/auth/groups/details.handlebars.erb
511
598
  - app/assets/javascripts/faalis/dashboard/templates/auth/groups/index.handlebars.erb
@@ -523,14 +610,12 @@ files:
523
610
  - app/assets/javascripts/faalis/groups.js
524
611
  - app/assets/javascripts/faalis/home.js
525
612
  - app/assets/javascripts/faalis/i18n.js
526
- - app/assets/javascripts/faalis/locales/en.json
527
- - app/assets/javascripts/faalis/locales/fa.json
528
- - app/assets/javascripts/faalis/locales/translations.fa.js
613
+ - app/assets/javascripts/faalis/locale/en.json
614
+ - app/assets/javascripts/faalis/locale/fa.json
615
+ - app/assets/javascripts/faalis/locale/translations.fa.js
529
616
  - app/assets/javascripts/faalis/users.js
530
617
  - app/assets/locale/templates.fa.pot
531
618
  - app/assets/locale/templates.pot
532
- - app/controllers/faalis/#api_controller.rb#
533
- - app/controllers/faalis/#dashboard_controller.rb#
534
619
  - app/controllers/faalis/api/v1/conversations_controller.rb
535
620
  - app/controllers/faalis/api/v1/groups_controller.rb
536
621
  - app/controllers/faalis/api/v1/logs_controller.rb
@@ -547,46 +632,52 @@ files:
547
632
  - app/helpers/faalis/groups_helper.rb
548
633
  - app/helpers/faalis/home_helper.rb
549
634
  - app/helpers/faalis/users_helper.rb
550
- - app/models/ability.rb
551
635
  - app/models/faalis/concerns/assignment.rb
636
+ - app/models/faalis/concerns/user/auth_definitions.rb
637
+ - app/models/faalis/concerns/user/mongoid_fields.rb
638
+ - app/models/faalis/concerns/user/permission.rb
639
+ - app/models/faalis/concerns/user/user_roles.rb
552
640
  - app/models/faalis/group.rb
553
641
  - app/models/faalis/permission.rb
554
642
  - app/models/faalis/permissions/auth.rb
555
643
  - app/models/faalis/user.rb
556
- - app/models/faalis/user/auth_definitions.rb
557
- - app/models/faalis/user/mongoid_fields.rb
558
- - app/models/faalis/user/permission.rb
559
- - app/views/angularjs_templates/auth/groups/details.html
560
- - app/views/angularjs_templates/auth/groups/index.html
561
- - app/views/angularjs_templates/auth/groups/new.html
562
- - app/views/angularjs_templates/auth/index.html
563
- - app/views/angularjs_templates/auth/profile/edit.html
564
- - app/views/angularjs_templates/auth/users/details.html
565
- - app/views/angularjs_templates/auth/users/index.html
566
- - app/views/angularjs_templates/auth/users/new.html
567
- - app/views/angularjs_templates/conversations/details.html
568
- - app/views/angularjs_templates/conversations/index.html
569
- - app/views/angularjs_templates/conversations/new.html
570
- - app/views/angularjs_templates/conversations/show.html
571
- - app/views/angularjs_templates/conversations/show_details.html
572
- - app/views/angularjs_templates/fields/boolean/boolean.html
573
- - app/views/angularjs_templates/fields/control-combo/control-list.html
574
- - app/views/angularjs_templates/fields/datetime/datetime.html
575
- - app/views/angularjs_templates/fields/datetime/time.html
576
- - app/views/angularjs_templates/fields/float/float.html
577
- - app/views/angularjs_templates/fields/image/image.html
578
- - app/views/angularjs_templates/fields/integer/integer.html
579
- - app/views/angularjs_templates/fields/relation/relation.html
580
- - app/views/angularjs_templates/fields/string/string.html
581
- - app/views/angularjs_templates/fields/tag/tag.html
582
- - app/views/angularjs_templates/fields/text/text.html
583
- - app/views/angularjs_templates/filter/index.html
584
- - app/views/angularjs_templates/index.html
585
- - app/views/angularjs_templates/locale/fa.po
586
- - app/views/angularjs_templates/locale/templates.pot
587
- - app/views/angularjs_templates/logs/index.html
588
- - app/views/angularjs_templates/modules.html
589
- - app/views/angularjs_templates/nav.html.erb
644
+ - app/policies/faalis/admin_only_policy.rb
645
+ - app/policies/faalis/application_policy.rb
646
+ - app/policies/faalis/group_policy.rb
647
+ - app/policies/faalis/user_policy.rb
648
+ - app/views/angular/auth/groups/details.html
649
+ - app/views/angular/auth/groups/index.html
650
+ - app/views/angular/auth/groups/new.html
651
+ - app/views/angular/auth/index.html
652
+ - app/views/angular/auth/profile/edit.html
653
+ - app/views/angular/auth/users/details.html
654
+ - app/views/angular/auth/users/index.html
655
+ - app/views/angular/auth/users/new.html
656
+ - app/views/angular/conversations/details.html
657
+ - app/views/angular/conversations/index.html
658
+ - app/views/angular/conversations/new.html
659
+ - app/views/angular/conversations/show.html
660
+ - app/views/angular/conversations/show_details.html
661
+ - app/views/angular/faalis/views/generic_add_view.html.slim
662
+ - app/views/angular/fields/boolean/boolean.html
663
+ - app/views/angular/fields/control-combo/control-list.html
664
+ - app/views/angular/fields/datetime/datetime.html
665
+ - app/views/angular/fields/datetime/time.html
666
+ - app/views/angular/fields/file/file.html.slim
667
+ - app/views/angular/fields/float/float.html
668
+ - app/views/angular/fields/image/image.html
669
+ - app/views/angular/fields/integer/integer.html
670
+ - app/views/angular/fields/relation/relation.html
671
+ - app/views/angular/fields/string/string.html
672
+ - app/views/angular/fields/tag/tag.html
673
+ - app/views/angular/fields/text/text.html
674
+ - app/views/angular/filter/index.html
675
+ - app/views/angular/index.html
676
+ - app/views/angular/locale/fa.po
677
+ - app/views/angular/locale/templates.pot
678
+ - app/views/angular/logs/index.html
679
+ - app/views/angular/modules.html
680
+ - app/views/angular/nav.html.erb
590
681
  - app/views/devise/confirmations/new.html.erb
591
682
  - app/views/devise/mailer/confirmation_instructions.html.erb
592
683
  - app/views/devise/mailer/reset_password_instructions.html.erb
@@ -646,12 +737,12 @@ files:
646
737
  - config/locales/fa/messages.mo
647
738
  - config/locales/faalis.pot
648
739
  - config/routes.rb
740
+ - config/spring.rb
649
741
  - db/migrate/20131013091000_devise_create_faalis_users.rb
650
742
  - db/migrate/20131020124701_create_faalis_groups.rb
651
743
  - db/migrate/20131021170923_create_faalis_permissions.rb
652
744
  - db/migrate/20131123120422_add_permissions_groups_table.rb
653
745
  - db/migrate/20140613120923_add_users_groups_table.rb
654
- - db/migrate/20140617124019_faalis_groups_users.rb
655
746
  - db/seeds.rb
656
747
  - lib/faalis.rb
657
748
  - lib/faalis/api.rb
@@ -674,8 +765,8 @@ files:
674
765
  - lib/faalis/discovery/permissions.rb
675
766
  - lib/faalis/engine.rb
676
767
  - lib/faalis/exceptions.rb
677
- - lib/faalis/extensions.rb
678
- - lib/faalis/extensions/base.rb
768
+ - lib/faalis/extension.rb
769
+ - lib/faalis/extension/base.rb
679
770
  - lib/faalis/fake_assets.rb
680
771
  - lib/faalis/generators.rb
681
772
  - lib/faalis/generators/concerns.rb
@@ -687,7 +778,7 @@ files:
687
778
  - lib/faalis/generators/concerns/fieldset.rb
688
779
  - lib/faalis/generators/concerns/globalize.rb
689
780
  - lib/faalis/generators/concerns/hstore.rb
690
- - lib/faalis/generators/concerns/json_input.rb
781
+ - lib/faalis/generators/concerns/input_file.rb
691
782
  - lib/faalis/generators/concerns/menu.rb
692
783
  - lib/faalis/generators/concerns/model.rb
693
784
  - lib/faalis/generators/concerns/parent.rb
@@ -698,7 +789,6 @@ files:
698
789
  - lib/faalis/generators/concerns/tabs.rb
699
790
  - lib/faalis/generators/concerns/where.rb
700
791
  - lib/faalis/generators/dashboard_scaffold.rb
701
- - lib/faalis/generators/fields/#relation.rb#
702
792
  - lib/faalis/generators/fields/relation.rb
703
793
  - lib/faalis/i18n.rb
704
794
  - lib/faalis/initialize.rb
@@ -707,9 +797,9 @@ files:
707
797
  - lib/faalis/omniauth.rb
708
798
  - lib/faalis/omniauth/callbacks.rb
709
799
  - lib/faalis/orm.rb
710
- - lib/faalis/patches/models.rb
711
800
  - lib/faalis/route.rb
712
801
  - lib/faalis/version.rb
802
+ - lib/faalis_application.rb
713
803
  - lib/faalis_plugin.rb
714
804
  - lib/generators/faalis/USAGE
715
805
  - lib/generators/faalis/angularjs_resource_generator.rb
@@ -765,6 +855,7 @@ files:
765
855
  - lib/generators/faalis/templates/views/show.json.jbuilder.erb
766
856
  - lib/generators/faalis/templates/views/update.json.jbuilder.erb
767
857
  - lib/generators/faalis/views_generator.rb
858
+ - lib/tasks/docs.rake
768
859
  - lib/tasks/faalis_tasks.rake
769
860
  - lib/tasks/grunt/Gruntfile.js
770
861
  - lib/tasks/sync.rake
@@ -772,6 +863,7 @@ files:
772
863
  - spec/dummy/Rakefile
773
864
  - spec/dummy/app/assets/javascripts/application.js
774
865
  - spec/dummy/app/assets/stylesheets/application.css
866
+ - spec/dummy/app/controllers/api_controller.rb
775
867
  - spec/dummy/app/controllers/application_controller.rb
776
868
  - spec/dummy/app/helpers/application_helper.rb
777
869
  - spec/dummy/app/views/layouts/application.html.erb
@@ -796,11 +888,26 @@ files:
796
888
  - spec/dummy/config/initializers/wrap_parameters.rb
797
889
  - spec/dummy/config/locales/en.yml
798
890
  - spec/dummy/config/routes.rb
891
+ - spec/dummy/db/development.sqlite3
892
+ - spec/dummy/db/migrate/20150121060012_create_application_models.model_discovery_engine.rb
893
+ - spec/dummy/db/schema.rb
894
+ - spec/dummy/db/test.sqlite3
895
+ - spec/dummy/log/development.log
896
+ - spec/dummy/log/test.log
799
897
  - spec/dummy/public/404.html
800
898
  - spec/dummy/public/422.html
801
899
  - spec/dummy/public/500.html
802
900
  - spec/dummy/public/favicon.ico
901
+ - spec/factories/faalis/groups.rb
902
+ - spec/factories/faalis/permissions.rb
903
+ - spec/factories/faalis/users.rb
904
+ - spec/models/faalis/group_spec.rb
905
+ - spec/models/faalis/permission_spec.rb
906
+ - spec/models/faalis/user_spec.rb
907
+ - spec/policies/faalis/admin_only_policy_spec.rb
908
+ - spec/policies/faalis/application_policy_spec.rb
803
909
  - spec/spec_helper.rb
910
+ - spec/support/factory_girl.rb
804
911
  homepage: https://github.com/Yellowen/Faalis
805
912
  licenses:
806
913
  - GPL-2
@@ -827,37 +934,53 @@ specification_version: 4
827
934
  summary: Faalis is a ruby on rails engine which provides a very basic web application
828
935
  to use with other ruby on rails applications.
829
936
  test_files:
937
+ - spec/support/factory_girl.rb
830
938
  - spec/spec_helper.rb
831
- - spec/dummy/app/controllers/application_controller.rb
939
+ - spec/models/faalis/group_spec.rb
940
+ - spec/models/faalis/permission_spec.rb
941
+ - spec/models/faalis/user_spec.rb
942
+ - spec/factories/faalis/permissions.rb
943
+ - spec/factories/faalis/users.rb
944
+ - spec/factories/faalis/groups.rb
945
+ - spec/dummy/log/development.log
946
+ - spec/dummy/log/test.log
947
+ - spec/dummy/public/500.html
948
+ - spec/dummy/public/404.html
949
+ - spec/dummy/public/422.html
950
+ - spec/dummy/public/favicon.ico
951
+ - spec/dummy/config.ru
952
+ - spec/dummy/README.rdoc
953
+ - spec/dummy/db/schema.rb
954
+ - spec/dummy/db/migrate/20150121060012_create_application_models.model_discovery_engine.rb
955
+ - spec/dummy/db/test.sqlite3
956
+ - spec/dummy/db/development.sqlite3
832
957
  - spec/dummy/app/views/layouts/application.html.erb
833
- - spec/dummy/app/helpers/application_helper.rb
834
958
  - spec/dummy/app/assets/javascripts/application.js
835
959
  - spec/dummy/app/assets/stylesheets/application.css
960
+ - spec/dummy/app/controllers/api_controller.rb
961
+ - spec/dummy/app/controllers/application_controller.rb
962
+ - spec/dummy/app/helpers/application_helper.rb
963
+ - spec/dummy/Rakefile
964
+ - spec/dummy/bin/rake
836
965
  - spec/dummy/bin/bundle
837
966
  - spec/dummy/bin/rails
838
- - spec/dummy/bin/rake
839
- - spec/dummy/public/404.html
840
- - spec/dummy/public/422.html
841
- - spec/dummy/public/500.html
842
- - spec/dummy/public/favicon.ico
843
- - spec/dummy/config.ru
844
967
  - spec/dummy/config/application.rb
845
- - spec/dummy/config/environments/development.rb
846
968
  - spec/dummy/config/environments/test.rb
969
+ - spec/dummy/config/environments/development.rb
847
970
  - spec/dummy/config/environments/production.rb
848
- - spec/dummy/config/initializers/backtrace_silencers.rb
849
- - spec/dummy/config/initializers/filter_parameter_logging.rb
850
- - spec/dummy/config/initializers/secret_token.rb
851
- - spec/dummy/config/initializers/session_store.rb
852
- - spec/dummy/config/initializers/wrap_parameters.rb
853
- - spec/dummy/config/initializers/faalis.rb
854
- - spec/dummy/config/initializers/mime_types.rb
855
- - spec/dummy/config/initializers/inflections.rb
971
+ - spec/dummy/config/routes.rb
856
972
  - spec/dummy/config/environment.rb
857
973
  - spec/dummy/config/database.yml
858
974
  - spec/dummy/config/locales/en.yml
859
- - spec/dummy/config/routes.rb
860
975
  - spec/dummy/config/boot.rb
861
- - spec/dummy/README.rdoc
862
- - spec/dummy/Rakefile
976
+ - spec/dummy/config/initializers/session_store.rb
977
+ - spec/dummy/config/initializers/backtrace_silencers.rb
978
+ - spec/dummy/config/initializers/wrap_parameters.rb
979
+ - spec/dummy/config/initializers/inflections.rb
980
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
981
+ - spec/dummy/config/initializers/mime_types.rb
982
+ - spec/dummy/config/initializers/secret_token.rb
983
+ - spec/dummy/config/initializers/faalis.rb
984
+ - spec/policies/faalis/admin_only_policy_spec.rb
985
+ - spec/policies/faalis/application_policy_spec.rb
863
986
  has_rdoc: