faalis 2.0.8 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +2 -0
  3. data.tar.gz.sig +0 -0
  4. data/Rakefile +15 -9
  5. data/app/assets/javascripts/faalis/dashboard/application.js.erb +4 -3
  6. data/app/assets/javascripts/faalis/dashboard/init.js.coffee +1 -1
  7. data/{spec/dummy/public/favicon.ico → app/assets/javascripts/faalis/dashboard/lib/amd.js.coffee.erb} +0 -0
  8. data/app/assets/stylesheets/faalis/dashboard/share.scss +5 -0
  9. data/app/controllers/faalis/assets_controller.rb +6 -0
  10. data/app/controllers/faalis/dashboard/user_messages_controller.rb +27 -0
  11. data/app/models/application_record.rb +3 -0
  12. data/app/models/faalis/group.rb +4 -3
  13. data/app/models/faalis/permission.rb +2 -2
  14. data/app/models/faalis/user.rb +1 -7
  15. data/app/models/faalis/user_message.rb +6 -0
  16. data/app/policies/faalis/user_message_policy.rb +9 -0
  17. data/app/policies/faalis/user_policy.rb +1 -1
  18. data/app/views/faalis/dashboard/resource/edit.html.slim +1 -1
  19. data/app/views/faalis/dashboard/resource/show.html.slim +1 -2
  20. data/app/views/faalis/dashboard/shared/_header.html.erb +2 -2
  21. data/app/views/faalis/dashboard/user_messages/_form.html.slim +0 -0
  22. data/app/views/faalis/dashboard/user_messages/create.js.erb +0 -0
  23. data/app/views/faalis/dashboard/user_messages/destroy.js.erb +0 -0
  24. data/app/views/faalis/dashboard/user_messages/new.html.slim +72 -0
  25. data/app/views/layouts/faalis/dashboard.html.erb +2 -1
  26. data/config/locales/faalis.en.yml +2 -1
  27. data/config/routes.rb +6 -21
  28. data/db/migrate/20160310105736_create_faalis_user_messages.rb +16 -0
  29. data/lib/faalis.rb +1 -1
  30. data/lib/faalis/configuration.rb +79 -52
  31. data/lib/faalis/dashboard/dsl.rb +1 -0
  32. data/lib/faalis/dashboard/models/sidebar.rb +42 -16
  33. data/lib/faalis/dashboard/sections/resource.rb +152 -130
  34. data/lib/faalis/dashboard/sections/resource_create.rb +1 -3
  35. data/lib/faalis/engine.rb +7 -5
  36. data/lib/faalis/orm.rb +5 -5
  37. data/lib/faalis/version.rb +1 -1
  38. data/{spec → test}/dummy/README.rdoc +0 -0
  39. data/{spec → test}/dummy/Rakefile +0 -0
  40. data/{spec → test}/dummy/app/assets/javascripts/application.js +0 -0
  41. data/{spec → test}/dummy/app/assets/javascripts/dashboard/application.js +0 -0
  42. data/{spec → test}/dummy/app/assets/stylesheets/application.css +0 -0
  43. data/{spec → test}/dummy/app/assets/stylesheets/dashboard/ltr/application.css +0 -0
  44. data/{spec → test}/dummy/app/assets/stylesheets/dashboard/rtl/application.css +0 -0
  45. data/{spec → test}/dummy/app/assets/stylesheets/ltr/application.css +0 -0
  46. data/{spec → test}/dummy/app/assets/stylesheets/rtl/application.css +0 -0
  47. data/{spec → test}/dummy/app/controllers/api_controller.rb +0 -0
  48. data/{spec → test}/dummy/app/controllers/application_controller.rb +0 -0
  49. data/{spec → test}/dummy/app/controllers/dashboard/application_controller.rb +0 -0
  50. data/{spec → test}/dummy/app/helpers/application_helper.rb +0 -0
  51. data/{spec → test}/dummy/app/policies/application_policy.rb +0 -0
  52. data/{spec → test}/dummy/app/views/layouts/application.html.erb +0 -0
  53. data/{spec → test}/dummy/bin/bundle +0 -0
  54. data/{spec → test}/dummy/bin/rails +0 -0
  55. data/{spec → test}/dummy/bin/rake +0 -0
  56. data/{spec → test}/dummy/config.ru +0 -0
  57. data/{spec → test}/dummy/config/application.rb +0 -0
  58. data/{spec → test}/dummy/config/boot.rb +0 -0
  59. data/{spec → test}/dummy/config/database.yml +0 -0
  60. data/{spec → test}/dummy/config/environment.rb +0 -0
  61. data/{spec → test}/dummy/config/environments/development.rb +0 -0
  62. data/{spec → test}/dummy/config/environments/production.rb +0 -0
  63. data/{spec → test}/dummy/config/environments/test.rb +2 -0
  64. data/{spec → test}/dummy/config/initializers/backtrace_silencers.rb +0 -0
  65. data/{spec → test}/dummy/config/initializers/devise.rb +0 -0
  66. data/{spec → test}/dummy/config/initializers/faalis.rb +0 -0
  67. data/{spec → test}/dummy/config/initializers/faalis_assets.rb +0 -0
  68. data/{spec → test}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  69. data/{spec → test}/dummy/config/initializers/formstatic.rb +0 -0
  70. data/{spec → test}/dummy/config/initializers/formtastic.rb +0 -0
  71. data/{spec → test}/dummy/config/initializers/inflections.rb +0 -0
  72. data/{spec → test}/dummy/config/initializers/kaminari_config.rb +0 -0
  73. data/{spec → test}/dummy/config/initializers/mime_types.rb +0 -0
  74. data/{spec → test}/dummy/config/initializers/secret_token.rb +0 -0
  75. data/{spec → test}/dummy/config/initializers/session_store.rb +0 -0
  76. data/{spec → test}/dummy/config/initializers/wrap_parameters.rb +0 -0
  77. data/{spec → test}/dummy/config/locales/en.yml +0 -0
  78. data/{spec → test}/dummy/config/routes.rb +0 -0
  79. data/test/dummy/db/test.sqlite3 +0 -0
  80. data/{spec → test}/dummy/lib/templates/slim/scaffold/_form.html.slim +0 -0
  81. data/test/dummy/log/test.log +0 -0
  82. data/{spec → test}/dummy/public/404.html +0 -0
  83. data/{spec → test}/dummy/public/422.html +0 -0
  84. data/{spec → test}/dummy/public/500.html +0 -0
  85. data/test/dummy/public/favicon.ico +0 -0
  86. data/test/fabricators/faalis/groups.rb +27 -0
  87. data/test/fabricators/faalis/permissions.rb +14 -0
  88. data/test/fabricators/faalis/users.rb +17 -0
  89. data/test/generators/install_generator_test.rb +84 -0
  90. data/test/integration/faalis/authentication_test.rb +36 -0
  91. data/test/integration/faalis/dashboard_test.rb +64 -0
  92. data/test/test_helper.rb +72 -0
  93. metadata +291 -150
  94. metadata.gz.sig +1 -0
  95. data/app/controllers/faalis/api/v1/conversations_controller.rb +0 -120
  96. data/app/controllers/faalis/api/v1/groups_controller.rb +0 -71
  97. data/app/controllers/faalis/api/v1/logs_controller.rb +0 -12
  98. data/app/controllers/faalis/api/v1/permissions_controller.rb +0 -61
  99. data/app/controllers/faalis/api/v1/profiles_controller.rb +0 -42
  100. data/app/controllers/faalis/api/v1/users_controller.rb +0 -75
  101. data/lib/faalis_application.rb +0 -446
  102. data/lib/faalis_plugin.rb +0 -477
  103. data/spec/factories/faalis/groups.rb +0 -31
  104. data/spec/factories/faalis/permissions.rb +0 -16
  105. data/spec/factories/faalis/users.rb +0 -23
  106. data/spec/features/dashboard_spec.rb +0 -36
  107. data/spec/features/record_not_found_spec.rb +0 -24
  108. data/spec/features/sign_in_spec.rb +0 -37
  109. data/spec/generators/install_spec.rb +0 -58
  110. data/spec/models/faalis/group_spec.rb +0 -32
  111. data/spec/models/faalis/permission_spec.rb +0 -15
  112. data/spec/models/faalis/user_spec.rb +0 -100
  113. data/spec/policies/faalis/admin_only_policy_spec.rb +0 -39
  114. data/spec/policies/faalis/application_policy_spec.rb +0 -49
  115. data/spec/spec_helper.rb +0 -89
  116. data/spec/support/factory_girl.rb +0 -3
@@ -1,89 +0,0 @@
1
- require 'codeclimate-test-reporter'
2
- CodeClimate::TestReporter.start
3
-
4
- # This file is copied to spec/ when you run 'rails generate rspec:install'
5
- ENV['RAILS_ENV'] ||= 'test'
6
- require File.expand_path('../dummy/config/environment', __FILE__)
7
-
8
- require 'rspec/rails'
9
- require 'factory_girl_rails'
10
- require 'database_cleaner'
11
- require 'capybara/rails'
12
- require 'capybara/rspec'
13
- require 'pundit/rspec'
14
- require 'sass-rails'
15
-
16
- FAALIS = File.join(File.dirname(__FILE__), '../')
17
-
18
- Rails.backtrace_cleaner.remove_silencers!
19
-
20
- # Requires supporting ruby files with custom matchers and macros, etc, in
21
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
22
- # run as spec files by default. This means that files in spec/support that end
23
- # in _spec.rb will both be required and run as specs, causing the specs to be
24
- # run twice. It is recommended that you do not name files matching this glob to
25
- # end with _spec.rb. You can configure this pattern with with the --pattern
26
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
27
- Dir[File.join(FAALIS, 'spec/support/**/*.rb')].each { |f| require f }
28
-
29
- # Checks for pending migrations before tests are run.
30
- # If you are not using ActiveRecord, you can remove this line.
31
- ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
32
-
33
- Capybara.javascript_driver = :webkit
34
-
35
- RSpec.configure do |config|
36
- config.include Warden::Test::Helpers
37
- # ## Mock Framework
38
- #
39
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
40
- #
41
- # config.mock_with :mocha
42
- # config.mock_with :flexmock
43
- # config.mock_with :rr
44
- config.mock_with :rspec
45
-
46
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
47
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
48
-
49
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
50
- # examples within a transaction, remove the following line or assign false
51
- # instead of true.
52
- config.use_transactional_fixtures = false
53
-
54
- # If true, the base class of anonymous controllers will be inferred
55
- # automatically. This will be the default behavior in future versions of
56
- # rspec-rails.
57
- config.infer_base_class_for_anonymous_controllers = false
58
-
59
- # Run specs in random order to surface order dependencies. If you find an
60
- # order dependency and want to debug it, you can fix the order by providing
61
- # the seed, which is printed after each run.
62
- # --seed 1234
63
- config.order = 'random'
64
-
65
- config.before(:suite) do
66
- Warden.test_mode!
67
- DatabaseCleaner.clean_with(:truncation)
68
-
69
- begin
70
- DatabaseCleaner.start
71
- ensure
72
- DatabaseCleaner.clean
73
- end
74
- end
75
-
76
- config.before(:each) do |example|
77
- Capybara.app_host = 'http://localhost:3000'
78
- Capybara.server_host = 'localhost'
79
- Capybara.server_port = '3000'
80
-
81
- #Capybara.run_server = false
82
-
83
- DatabaseCleaner.strategy = example.metadata[:js] ? :truncation : :transaction
84
- end
85
-
86
- config.after(:each) do
87
- DatabaseCleaner.clean
88
- end
89
- end
@@ -1,3 +0,0 @@
1
- RSpec.configure do |config|
2
- config.include FactoryGirl::Syntax::Methods
3
- end