usman 0.2.7 → 0.2.8

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: e94f0975fd0fa28f10f87c0c643e54dc3015967d
4
- data.tar.gz: 1fd689c72b2e93164649248a4d6147f2a60fe2f2
3
+ metadata.gz: ff2c2e73b9c8b00c581ef971d7cd6c127670ddda
4
+ data.tar.gz: 8e668968dffd496acf7ec1c25b201c6661bf3a3b
5
5
  SHA512:
6
- metadata.gz: c6f2a9c9de37d681ce5cfb3c88a7b2ebc14446a3c70fac683ee79a27d9e6821bb7d2285d1a67b211cd401003a5c70692bd816973e7aa9d8685e2b65599d01e06
7
- data.tar.gz: 4b34bc3cc5e41ecd998da6ff9d897c8b1424bbbb55752415541e0f6cff04744fa6de5c3257715e1c3cf83e29d103c74c33bdd5c8b8ffa446d3ac20faa7e28b63
6
+ metadata.gz: 8634420f0fb667e93af6eaf54b3d0ab0d180635bc722f8bb8a6b761244bff0d8e1984e6d1b17d5e4f4a6eda23ac3ce71d0fa4d9e9c926019b07a293fe87658d5
7
+ data.tar.gz: 2c00c51c0e6fa9f2357eb9a710af0527f58aee79c55afec461c3282309b5e6354ef58cbb427499c122273cdf8208b894fef6737a314293fd1e17094588455a65
@@ -4,8 +4,7 @@ module Usman
4
4
  class ProfileController < Usman::Api::V1::BaseController
5
5
 
6
6
  def create_profile
7
- #proc_code = Proc.new do
8
- #binding.pry
7
+ proc_code = Proc.new do
9
8
  if @current_registration
10
9
  if @current_user
11
10
  @success = false
@@ -56,7 +55,6 @@ module Usman
56
55
  message: I18n.translate("api.profile.registration_details_missing.message")
57
56
  }
58
57
  end
59
- proc_code = Proc.new do
60
58
  end
61
59
  render_json_response(proc_code)
62
60
  end
@@ -49,10 +49,10 @@ module Usman
49
49
  def breadcrumbs_configuration
50
50
  {
51
51
  heading: "Manage Registrations",
52
- icon: "fa-lock",
52
+ icon: "linecons-mobile",
53
53
  description: "Listing all Registrations",
54
54
  links: [{name: "Home", link: dashboard_path, icon: 'fa-home'},
55
- {name: "Manage Registrations", link: registrations_path, icon: 'fa-calendar', active: true}]
55
+ {name: "Manage Registrations", link: registrations_path, icon: 'linecons-mobile', active: true}]
56
56
  }
57
57
  end
58
58
 
@@ -46,15 +46,15 @@ class Feature < Usman::ApplicationRecord
46
46
 
47
47
  def self.save_row_data(hsh)
48
48
 
49
- return if hsh[:name].blank?
49
+ # Initializing error hash for displaying all errors altogether
50
+ error_object = Kuppayam::Importer::ErrorHash.new
51
+
52
+ return error_object if hsh[:name].blank?
50
53
 
51
54
  feature = Feature.find_by_name(hsh[:name]) || Feature.new
52
55
  feature.name = hsh[:name]
53
56
  feature.status = Feature::UNPUBLISHED
54
57
 
55
- # Initializing error hash for displaying all errors altogether
56
- error_object = Kuppayam::Importer::ErrorHash.new
57
-
58
58
  if feature.valid?
59
59
  begin
60
60
  feature.save!
@@ -19,7 +19,7 @@
19
19
 
20
20
  <td class="feature-image"></td>
21
21
 
22
- <td class="feature-image">
22
+ <td class="feature-image" style="text-align: center;">
23
23
  <%= link_to(feature_path(feature), remote: true) do %>
24
24
  <%= display_image(feature, "feature_image.image.small.url", width: "32", height: "auto", class: "img-rectangle", alt: feature.display_name) %>
25
25
  <% end %>
@@ -2,7 +2,9 @@
2
2
  <% delete_link = feature_path(id: feature.id) %>
3
3
 
4
4
  <tr id="tr_feature_<%= feature.id %>">
5
-
5
+
6
+ <td class="feature-image"></td>
7
+
6
8
  <td class="feature-image">
7
9
  <%= link_to(feature_path(feature), remote: true) do %>
8
10
  <%= display_image(feature, "feature_image.image.small.url", width: "32", height: "auto", class: "img-rectangle", alt: feature.display_name) %>
@@ -41,7 +43,7 @@
41
43
  <!-- Approve -->
42
44
  <%= link_to raw("<i class=\"fa fa-circle-o mr-5\"></i> Publish"), update_status_feature_path(:id =>feature.id, :status =>'published'), :method =>'PUT', :remote=>true, role: "menuitem", tabindex: "-1",:class=>"feature_status" %>
43
45
  <% end %>
44
-
46
+
45
47
  </td>
46
48
 
47
49
  <td class="action-links" style="width:10%">
data/config/routes.rb CHANGED
@@ -14,30 +14,34 @@ Usman::Engine.routes.draw do
14
14
  get '/my_account', to: "my_account#index", as: :my_account
15
15
  get '/dashboard/usman', to: "dashboard#index", as: :dashboard
16
16
 
17
- resources :registrations, only: [:index, :show] do
18
- resources :devices, :controller => "registration_devices"
19
- end
17
+ scope :admin do
20
18
 
21
- resources :users do
22
- member do
23
- put :masquerade, as: :masquerade
24
- put :update_status, as: :update_status
25
- put :make_super_admin, as: :make_super_admin
26
- put :remove_super_admin, as: :remove_super_admin
19
+ resources :registrations, only: [:index, :show] do
20
+ resources :devices, :controller => "registration_devices"
27
21
  end
28
- end
29
22
 
30
- resources :roles do
31
- resources :users, :controller => "user_roles"
32
- end
23
+ resources :users do
24
+ member do
25
+ put :masquerade, as: :masquerade
26
+ put :update_status, as: :update_status
27
+ put :make_super_admin, as: :make_super_admin
28
+ put :remove_super_admin, as: :remove_super_admin
29
+ end
30
+ end
33
31
 
34
- resources :features do
35
- member do
36
- put :update_status, as: :update_status
32
+ resources :roles do
33
+ resources :users, :controller => "user_roles"
34
+ end
35
+
36
+ resources :features do
37
+ member do
38
+ put :update_status, as: :update_status
39
+ end
37
40
  end
38
- end
39
41
 
40
- resources :permissions
42
+ resources :permissions
43
+
44
+ end
41
45
 
42
46
  namespace :api do
43
47
  namespace :v1 do
@@ -0,0 +1,7 @@
1
+ # This is to expose the factories in this gem
2
+ # By default, only files in /lib is exported
3
+ # hence this hack.
4
+ # Read More: https://stackoverflow.com/questions/31700345/how-can-i-share-the-factories-that-i-have-in-a-gem-and-use-it-in-other-project
5
+
6
+ GEM_USMAN_ROOT = File.dirname(File.dirname(File.dirname(__FILE__)))
7
+ Dir[File.join(GEM_USMAN_ROOT, 'spec', 'dummy', 'spec', 'factories', '*.rb')].each { |file| require(file) }
data/lib/usman/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Usman
2
- VERSION = '0.2.7'
2
+ VERSION = '0.2.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - kpvarma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-07 00:00:00.000000000 Z
11
+ date: 2017-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -90,28 +90,28 @@ dependencies:
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: 0.1.10
93
+ version: 0.1.11
94
94
  type: :runtime
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - "~>"
99
99
  - !ruby/object:Gem::Version
100
- version: 0.1.10
100
+ version: 0.1.11
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: pattana
103
103
  requirement: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: 0.1.5
107
+ version: 0.1.6
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: 0.1.5
114
+ version: 0.1.6
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: bcrypt
117
117
  requirement: !ruby/object:Gem::Requirement
@@ -486,6 +486,7 @@ files:
486
486
  - lib/temp/users.rake
487
487
  - lib/usman.rb
488
488
  - lib/usman/engine.rb
489
+ - lib/usman/factories.rb
489
490
  - lib/usman/version.rb
490
491
  homepage: https://github.com/right-solutions/usman
491
492
  licenses: