faalis 0.23.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 754b0000eaa8e24bc88fe8dd10d7c42ffba9f76b
4
- data.tar.gz: bea68b02d06aaad4b62f523241b9c3a350f7391f
3
+ metadata.gz: f7d3bb0fdba2d895f1cd67581646ec7d7e514c7b
4
+ data.tar.gz: b89748c70348e974d464b913e24ab30736df77d2
5
5
  SHA512:
6
- metadata.gz: 61bc502a68a1731c514d7e0d4f280f880f5251ade33b42eeabcda8fe018c82cff1f943738049fd6ed0a24f838daaf9131f3a0a020c9f14dd3ba5dff988f56b9d
7
- data.tar.gz: 617ed2af8dac4f2c23cefdaa6983165ed4b0b7a4fd596cbe3cf63f72f717c41471717104ea0cba6295fe493cf4e4b7c13257765d763724d46be25b377c0bf572
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.
@@ -5,9 +5,9 @@ module Faalis
5
5
  include Faalis::Dashboard::Module
6
6
 
7
7
  name = "home"
8
- # priority 100
8
+ #priority 100
9
9
 
10
- # show_me_on :header
10
+ #show_me_on :header
11
11
 
12
12
  def index
13
13
  end
@@ -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 "faalis/" + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
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 "faalis/dashboard/" + Faalis::I18n.direction(I18n.locale) + "/application", media: "all" %>
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
- #require 'foundation-rails'
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 = ["Faalis::User",
57
- "Faalis::Group",
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.locale = :fa
76
+ I18n.enforce_available_locales = true
77
+ I18n.locale = :en
78
78
  # Fast Gettext Configuration
79
79
  Object.send(:include, FastGettext::Translation)
80
80
 
@@ -18,5 +18,5 @@
18
18
  # -----------------------------------------------------------------------------
19
19
 
20
20
  module Faalis
21
- VERSION = "0.23.0"
21
+ VERSION = "0.24.0"
22
22
  end
@@ -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 "Copy all the necessary files to use Faalis"
26
+ desc 'Copy all the necessary files to use Faalis'
26
27
  class_option :orm
27
28
 
28
29
  def install_mailboxer
29
- invoke "mailboxer:install"
30
+ invoke 'mailboxer:install'
30
31
  end
31
32
 
32
33
  def install_model_discovery
33
- rake "model_discovery_engine:install:migrations"
34
+ rake 'model_discovery_engine:install:migrations'
34
35
  end
35
36
 
36
37
  def copy_init_files
37
- template "devise.rb", "config/initializers/devise.rb"
38
- template "faalis.rb", "config/initializers/faalis.rb"
39
- template "fast_gettext.rb", "config/initializers/fast_gettext.rb"
40
- template "formtastic.rb", "config/initializers/formstatic.rb"
41
- template "seeds.rb", "db/seeds.rb"
42
- template "api_controller.rb", "app/controllers/api_controller.rb"
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 "application.js", "#{angularjs_app_path}application.js"
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 "README" if behavior == :invoke
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("/")[0..-2].join("/")
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("<%= meun["title"] %>"), url: "<%= menu["url"] %>"<% if menu.include? "model" %>, permission: {action: "<%= menu["perm_action"] || 'read' %>", model: "<%= menu["model"] %>"}<% end %>},<% end %>
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.23.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-25 00:00:00.000000000 Z
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.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.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: zurb-foundation
141
+ name: foundation-rails
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "~>"
144
+ - - ">="
145
145
  - !ruby/object:Gem::Version
146
- version: 4.0.0
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: 4.0.0
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