faalis 2.0.8 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +15 -9
- data/app/assets/javascripts/faalis/dashboard/application.js.erb +4 -3
- data/app/assets/javascripts/faalis/dashboard/init.js.coffee +1 -1
- data/{spec/dummy/public/favicon.ico → app/assets/javascripts/faalis/dashboard/lib/amd.js.coffee.erb} +0 -0
- data/app/assets/stylesheets/faalis/dashboard/share.scss +5 -0
- data/app/controllers/faalis/assets_controller.rb +6 -0
- data/app/controllers/faalis/dashboard/user_messages_controller.rb +27 -0
- data/app/models/application_record.rb +3 -0
- data/app/models/faalis/group.rb +4 -3
- data/app/models/faalis/permission.rb +2 -2
- data/app/models/faalis/user.rb +1 -7
- data/app/models/faalis/user_message.rb +6 -0
- data/app/policies/faalis/user_message_policy.rb +9 -0
- data/app/policies/faalis/user_policy.rb +1 -1
- data/app/views/faalis/dashboard/resource/edit.html.slim +1 -1
- data/app/views/faalis/dashboard/resource/show.html.slim +1 -2
- data/app/views/faalis/dashboard/shared/_header.html.erb +2 -2
- data/app/views/faalis/dashboard/user_messages/_form.html.slim +0 -0
- data/app/views/faalis/dashboard/user_messages/create.js.erb +0 -0
- data/app/views/faalis/dashboard/user_messages/destroy.js.erb +0 -0
- data/app/views/faalis/dashboard/user_messages/new.html.slim +72 -0
- data/app/views/layouts/faalis/dashboard.html.erb +2 -1
- data/config/locales/faalis.en.yml +2 -1
- data/config/routes.rb +6 -21
- data/db/migrate/20160310105736_create_faalis_user_messages.rb +16 -0
- data/lib/faalis.rb +1 -1
- data/lib/faalis/configuration.rb +79 -52
- data/lib/faalis/dashboard/dsl.rb +1 -0
- data/lib/faalis/dashboard/models/sidebar.rb +42 -16
- data/lib/faalis/dashboard/sections/resource.rb +152 -130
- data/lib/faalis/dashboard/sections/resource_create.rb +1 -3
- data/lib/faalis/engine.rb +7 -5
- data/lib/faalis/orm.rb +5 -5
- data/lib/faalis/version.rb +1 -1
- data/{spec → test}/dummy/README.rdoc +0 -0
- data/{spec → test}/dummy/Rakefile +0 -0
- data/{spec → test}/dummy/app/assets/javascripts/application.js +0 -0
- data/{spec → test}/dummy/app/assets/javascripts/dashboard/application.js +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/dashboard/ltr/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/dashboard/rtl/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/ltr/application.css +0 -0
- data/{spec → test}/dummy/app/assets/stylesheets/rtl/application.css +0 -0
- data/{spec → test}/dummy/app/controllers/api_controller.rb +0 -0
- data/{spec → test}/dummy/app/controllers/application_controller.rb +0 -0
- data/{spec → test}/dummy/app/controllers/dashboard/application_controller.rb +0 -0
- data/{spec → test}/dummy/app/helpers/application_helper.rb +0 -0
- data/{spec → test}/dummy/app/policies/application_policy.rb +0 -0
- data/{spec → test}/dummy/app/views/layouts/application.html.erb +0 -0
- data/{spec → test}/dummy/bin/bundle +0 -0
- data/{spec → test}/dummy/bin/rails +0 -0
- data/{spec → test}/dummy/bin/rake +0 -0
- data/{spec → test}/dummy/config.ru +0 -0
- data/{spec → test}/dummy/config/application.rb +0 -0
- data/{spec → test}/dummy/config/boot.rb +0 -0
- data/{spec → test}/dummy/config/database.yml +0 -0
- data/{spec → test}/dummy/config/environment.rb +0 -0
- data/{spec → test}/dummy/config/environments/development.rb +0 -0
- data/{spec → test}/dummy/config/environments/production.rb +0 -0
- data/{spec → test}/dummy/config/environments/test.rb +2 -0
- data/{spec → test}/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/{spec → test}/dummy/config/initializers/devise.rb +0 -0
- data/{spec → test}/dummy/config/initializers/faalis.rb +0 -0
- data/{spec → test}/dummy/config/initializers/faalis_assets.rb +0 -0
- data/{spec → test}/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/{spec → test}/dummy/config/initializers/formstatic.rb +0 -0
- data/{spec → test}/dummy/config/initializers/formtastic.rb +0 -0
- data/{spec → test}/dummy/config/initializers/inflections.rb +0 -0
- data/{spec → test}/dummy/config/initializers/kaminari_config.rb +0 -0
- data/{spec → test}/dummy/config/initializers/mime_types.rb +0 -0
- data/{spec → test}/dummy/config/initializers/secret_token.rb +0 -0
- data/{spec → test}/dummy/config/initializers/session_store.rb +0 -0
- data/{spec → test}/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/{spec → test}/dummy/config/locales/en.yml +0 -0
- data/{spec → test}/dummy/config/routes.rb +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/{spec → test}/dummy/lib/templates/slim/scaffold/_form.html.slim +0 -0
- data/test/dummy/log/test.log +0 -0
- data/{spec → test}/dummy/public/404.html +0 -0
- data/{spec → test}/dummy/public/422.html +0 -0
- data/{spec → test}/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/fabricators/faalis/groups.rb +27 -0
- data/test/fabricators/faalis/permissions.rb +14 -0
- data/test/fabricators/faalis/users.rb +17 -0
- data/test/generators/install_generator_test.rb +84 -0
- data/test/integration/faalis/authentication_test.rb +36 -0
- data/test/integration/faalis/dashboard_test.rb +64 -0
- data/test/test_helper.rb +72 -0
- metadata +291 -150
- metadata.gz.sig +1 -0
- data/app/controllers/faalis/api/v1/conversations_controller.rb +0 -120
- data/app/controllers/faalis/api/v1/groups_controller.rb +0 -71
- data/app/controllers/faalis/api/v1/logs_controller.rb +0 -12
- data/app/controllers/faalis/api/v1/permissions_controller.rb +0 -61
- data/app/controllers/faalis/api/v1/profiles_controller.rb +0 -42
- data/app/controllers/faalis/api/v1/users_controller.rb +0 -75
- data/lib/faalis_application.rb +0 -446
- data/lib/faalis_plugin.rb +0 -477
- data/spec/factories/faalis/groups.rb +0 -31
- data/spec/factories/faalis/permissions.rb +0 -16
- data/spec/factories/faalis/users.rb +0 -23
- data/spec/features/dashboard_spec.rb +0 -36
- data/spec/features/record_not_found_spec.rb +0 -24
- data/spec/features/sign_in_spec.rb +0 -37
- data/spec/generators/install_spec.rb +0 -58
- data/spec/models/faalis/group_spec.rb +0 -32
- data/spec/models/faalis/permission_spec.rb +0 -15
- data/spec/models/faalis/user_spec.rb +0 -100
- data/spec/policies/faalis/admin_only_policy_spec.rb +0 -39
- data/spec/policies/faalis/application_policy_spec.rb +0 -49
- data/spec/spec_helper.rb +0 -89
- data/spec/support/factory_girl.rb +0 -3
data/spec/spec_helper.rb
DELETED
@@ -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
|