faalis 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/faalis/#1.sh# +0 -0
- data/app/controllers/faalis/api_controller.rb +2 -2
- data/app/controllers/faalis/home_controller.rb +2 -2
- data/app/views/layouts/faalis/application.html.erb +1 -1
- data/app/views/layouts/faalis/dashboard.html.erb +1 -2
- data/lib/faalis/engine.rb +6 -6
- data/lib/faalis/version.rb +1 -1
- data/lib/generators/faalis/install_generator.rb +17 -13
- data/lib/generators/faalis/templates/js/list_view/partials/menu.js.erb +1 -1
- data/lib/generators/faalis/templates/stylesheets/dashboard/ltr/application.css +1 -0
- data/lib/generators/faalis/templates/stylesheets/dashboard/rtl/application.css +1 -0
- data/lib/generators/faalis/templates/stylesheets/ltr/application.css +1 -0
- data/lib/generators/faalis/templates/stylesheets/rtl/application.css +1 -0
- metadata +16 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7d3bb0fdba2d895f1cd67581646ec7d7e514c7b
|
4
|
+
data.tar.gz: b89748c70348e974d464b913e24ab30736df77d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b4804983d000754b174e9af61596def605d98324b41a0bf4c41d44944dc7ccf6cb5e4a5dcd6f25210bf20704eaab621aaf2f4d3094188ea351aa8a8327ba2f
|
7
|
+
data.tar.gz: df429b636e2ba6d925f303177d1b9a5c6420e12ce4d6abfd308978a389dab04effb84ec51627a256edd91db9666809bbc3fa58fe6201fe222a814dd8f120c116
|
File without changes
|
@@ -72,7 +72,7 @@ class Faalis::APIController < Faalis::ApplicationController
|
|
72
72
|
# If any query string parameter provided and allow fields specified
|
73
73
|
if not request.query_parameters.empty? and not allowed_fields.empty?
|
74
74
|
#load_resource
|
75
|
-
|
75
|
+
logger.info ("Load resource by query parameters")
|
76
76
|
# Iterate over parameters in query string
|
77
77
|
request.query_parameters.each do |key, value|
|
78
78
|
# each key can be like filename[__querytype]=value
|
@@ -114,6 +114,7 @@ class Faalis::APIController < Faalis::ApplicationController
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
else
|
117
|
+
logger.info("Load resource using `load_resource`")
|
117
118
|
self.class.load_resource
|
118
119
|
end
|
119
120
|
end
|
@@ -129,7 +130,6 @@ class Faalis::APIController < Faalis::ApplicationController
|
|
129
130
|
@@allowed_fields = args.to_a.collect { |x| x.to_s }
|
130
131
|
end
|
131
132
|
|
132
|
-
|
133
133
|
protected
|
134
134
|
|
135
135
|
# Model class related to this controller.
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title><%= Faalis::Engine.site_title %></title>
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
-
<%= stylesheet_link_tag
|
6
|
+
<%= stylesheet_link_tag Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
|
7
7
|
<%= javascript_include_tag :modernizr %>
|
8
8
|
<%= csrf_meta_tags %>
|
9
9
|
</head>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<title><%= Faalis::Engine.site_title %></title>
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
|
-
<%= stylesheet_link_tag "
|
6
|
+
<%= stylesheet_link_tag "dashboard/" + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
|
7
7
|
<%= javascript_include_tag :modernizr %>
|
8
8
|
<%= csrf_meta_tags %>
|
9
9
|
</head>
|
@@ -16,6 +16,5 @@
|
|
16
16
|
<p class="notice"><%= notice %></p>
|
17
17
|
<p class="alert"><%= alert %></p>
|
18
18
|
</div>
|
19
|
-
|
20
19
|
</body>
|
21
20
|
</html>
|
data/lib/faalis/engine.rb
CHANGED
@@ -19,8 +19,8 @@
|
|
19
19
|
require 'fast_gettext'
|
20
20
|
require 'modernizr-rails'
|
21
21
|
require "compass-rails"
|
22
|
-
require 'zurb-foundation'
|
23
|
-
|
22
|
+
#require 'zurb-foundation'
|
23
|
+
require 'foundation-rails'
|
24
24
|
require "font-awesome-rails"
|
25
25
|
require "devise"
|
26
26
|
require "warden"
|
@@ -53,8 +53,8 @@ module Faalis
|
|
53
53
|
mattr_accessor :models_with_permission
|
54
54
|
|
55
55
|
# TODO: create a basic setup for this option
|
56
|
-
@@models_with_permission = [
|
57
|
-
|
56
|
+
@@models_with_permission = ['Faalis::User',
|
57
|
+
'Faalis::Group',
|
58
58
|
]
|
59
59
|
|
60
60
|
def self.models_with_permission=(value)
|
@@ -65,7 +65,6 @@ module Faalis
|
|
65
65
|
mattr_accessor :dashboard_namespace
|
66
66
|
@@dashboard_namespace = :dashboard
|
67
67
|
|
68
|
-
|
69
68
|
# locales
|
70
69
|
mattr_accessor :locales
|
71
70
|
@@locales = ['en', 'fa']
|
@@ -74,7 +73,8 @@ module Faalis
|
|
74
73
|
yield self
|
75
74
|
end
|
76
75
|
|
77
|
-
I18n.
|
76
|
+
I18n.enforce_available_locales = true
|
77
|
+
I18n.locale = :en
|
78
78
|
# Fast Gettext Configuration
|
79
79
|
Object.send(:include, FastGettext::Translation)
|
80
80
|
|
data/lib/faalis/version.rb
CHANGED
@@ -19,44 +19,48 @@
|
|
19
19
|
|
20
20
|
module Faalis
|
21
21
|
module Generators
|
22
|
+
# Generator responsible for `install` generator
|
22
23
|
class InstallGenerator < Rails::Generators::Base
|
23
24
|
source_root File.expand_path('../templates', __FILE__)
|
24
25
|
|
25
|
-
desc
|
26
|
+
desc 'Copy all the necessary files to use Faalis'
|
26
27
|
class_option :orm
|
27
28
|
|
28
29
|
def install_mailboxer
|
29
|
-
invoke
|
30
|
+
invoke 'mailboxer:install'
|
30
31
|
end
|
31
32
|
|
32
33
|
def install_model_discovery
|
33
|
-
rake
|
34
|
+
rake 'model_discovery_engine:install:migrations'
|
34
35
|
end
|
35
36
|
|
36
37
|
def copy_init_files
|
37
|
-
template
|
38
|
-
template
|
39
|
-
template
|
40
|
-
template
|
41
|
-
template
|
42
|
-
template
|
38
|
+
template 'devise.rb', 'config/initializers/devise.rb'
|
39
|
+
template 'faalis.rb', 'config/initializers/faalis.rb'
|
40
|
+
template 'fast_gettext.rb', 'config/initializers/fast_gettext.rb'
|
41
|
+
template 'formtastic.rb', 'config/initializers/formstatic.rb'
|
42
|
+
template 'seeds.rb', 'db/seeds.rb'
|
43
|
+
template 'api_controller.rb', 'app/controllers/api_controller.rb'
|
43
44
|
end
|
44
45
|
|
45
46
|
def copy_js_manifest
|
46
|
-
template
|
47
|
+
template 'application.js', "#{angularjs_app_path}application.js"
|
48
|
+
end
|
49
|
+
|
50
|
+
def copy_scss_manifest
|
51
|
+
directory 'stylesheets', 'app/assets/'
|
47
52
|
end
|
48
53
|
|
49
54
|
def show_readme
|
50
|
-
readme
|
55
|
+
readme 'README' if behavior == :invoke
|
51
56
|
end
|
52
57
|
|
53
58
|
private
|
54
59
|
|
55
60
|
def angularjs_app_path
|
56
|
-
path = Faalis::Engine.dashboard_js_manifest.split(
|
61
|
+
path = Faalis::Engine.dashboard_js_manifest.split('/')[0..-2].join('/')
|
57
62
|
"app/assets/javascripts/#{path}/"
|
58
63
|
end
|
59
|
-
|
60
64
|
end
|
61
65
|
end
|
62
66
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if has_menu? %>
|
2
2
|
<%= resource.pluralize %>.controller("<%= resource %>MenuController", ["gettext", function(gettext){
|
3
3
|
this.menu_items = [<% resource_data["menu"].each do |menu| %>
|
4
|
-
{title: gettext("<%=
|
4
|
+
{title: gettext("<%= menu["title"] %>"), url: "<%= menu["url"] %>"<% if menu.include? "model" %>, permission: {action: "<%= menu["perm_action"] || 'read' %>", model: "<%= menu["model"] %>"}<% end %>},<% end %>
|
5
5
|
];
|
6
6
|
}]);<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require faalis/dashboard/ltr/application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require faalis/dashboard/rtl/application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require faalis/ltr/application
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require faalis/rtl/application
|
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: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.0.
|
20
|
+
version: 4.0.4
|
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.0.
|
27
|
+
version: 4.0.4
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: omniauth
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,19 +138,19 @@ dependencies:
|
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
|
-
name:
|
141
|
+
name: foundation-rails
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
146
|
+
version: '0'
|
147
147
|
type: :runtime
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - "
|
151
|
+
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
153
|
+
version: '0'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: font-awesome-rails
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -460,6 +460,7 @@ files:
|
|
460
460
|
- app/assets/stylesheets/faalis/rtl/foundation_and_overrides.scss.erb
|
461
461
|
- app/assets/stylesheets/faalis/users.css
|
462
462
|
- app/assets/stylesheets/faalis/variables.css.scss
|
463
|
+
- app/controllers/faalis/#1.sh#
|
463
464
|
- app/controllers/faalis/api/v1/conversations_controller.rb
|
464
465
|
- app/controllers/faalis/api/v1/groups_controller.rb
|
465
466
|
- app/controllers/faalis/api/v1/logs_controller.rb
|
@@ -654,6 +655,10 @@ files:
|
|
654
655
|
- lib/generators/faalis/templates/spec/factories/users.rb
|
655
656
|
- lib/generators/faalis/templates/spec/spec_helper.rb
|
656
657
|
- lib/generators/faalis/templates/spec/support/devise.rb
|
658
|
+
- lib/generators/faalis/templates/stylesheets/dashboard/ltr/application.css
|
659
|
+
- lib/generators/faalis/templates/stylesheets/dashboard/rtl/application.css
|
660
|
+
- lib/generators/faalis/templates/stylesheets/ltr/application.css
|
661
|
+
- lib/generators/faalis/templates/stylesheets/rtl/application.css
|
657
662
|
- lib/generators/faalis/templates/views/create.json.jbuilder.erb
|
658
663
|
- lib/generators/faalis/templates/views/destroy.json.jbuilder.erb
|
659
664
|
- lib/generators/faalis/templates/views/index.json.jbuilder.erb
|