jinda 0.2.6 → 0.2.7
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8bed65cdf87a43c73899855cd548dd9e890314db874ddf04a026a5501b9893e3
|
|
4
|
+
data.tar.gz: 626770d659f8e13a6bb71cb781e55410bea846e52115f4f414253893dbf3bc13
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b04c46cd1bf4e55eb4cfccfc40f98b50de40e63f356caf4284545741da64911abdb157f89c19babcb42e2348144eeda74098c7c017030ea92cc1ec18fcdaf14b
|
|
7
|
+
data.tar.gz: ecc03af875dbf63258da693d7f557c6bd9b17851525218ee20d628d5e1d3164540f729c3e48a6046803763b9cde8e0028261190e481d1a7ac38a60fac79b017c
|
data/README.md
CHANGED
|
@@ -63,19 +63,28 @@ module Jinda
|
|
|
63
63
|
end
|
|
64
64
|
# routes created each line as reversed order button up in routes
|
|
65
65
|
def setup_routes
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
route "get '/
|
|
74
|
-
|
|
66
|
+
route "root :to => 'jinda#index'"
|
|
67
|
+
route "resources :jinda, :only => [:index, :new]"
|
|
68
|
+
route "resources :password_resets"
|
|
69
|
+
route "resources :sessions"
|
|
70
|
+
route "resources :identities"
|
|
71
|
+
route "resources :users"
|
|
72
|
+
route "resources :articles"
|
|
73
|
+
route "get '/articles/my/destroy' => 'articles#destroy'"
|
|
74
|
+
route "get '/articles/my' => 'articles/my'"
|
|
75
75
|
route "get '/logout' => 'sessions#destroy', :as => 'logout'"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
route "get '/auth/:provider/callback' => 'sessions#create'"
|
|
77
|
+
route "post '/auth/:provider/callback' => 'sessions#create'"
|
|
78
|
+
route "mount Ckeditor::Engine => '/ckeditor'"
|
|
79
|
+
route "\# end jinda method routes"
|
|
80
|
+
route "post '/jinda/end_form' => 'jinda#end_form'"
|
|
81
|
+
route "post '/jinda/pending' => 'jinda#index'"
|
|
82
|
+
route "post '/jinda/init' => 'jinda#init'"
|
|
83
|
+
route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
|
|
84
|
+
route "jinda_methods += ['init','run','run_do','run_form','end_form']"
|
|
85
|
+
route "jinda_methods = ['pending','status','search','doc','logs','ajax_notice']"
|
|
86
|
+
route "\# start jiinda method routes"
|
|
87
|
+
end
|
|
79
88
|
|
|
80
89
|
def setup_env
|
|
81
90
|
run "mv README.md README.md.bak"
|
|
@@ -14,7 +14,6 @@ class ArticlesController < ApplicationController
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def edit
|
|
17
|
-
@article = Article.find(params[:id])
|
|
18
17
|
@page_title = 'Member Login'
|
|
19
18
|
end
|
|
20
19
|
|
|
@@ -35,7 +34,7 @@ class ArticlesController < ApplicationController
|
|
|
35
34
|
|
|
36
35
|
def update
|
|
37
36
|
# $xvars["select_article"] and $xvars["edit_article"]
|
|
38
|
-
|
|
37
|
+
# These are variables with params when called
|
|
39
38
|
# They contain everything that we get their forms select_article and edit_article
|
|
40
39
|
|
|
41
40
|
article_id = $xvars["select_article"] ? $xvars["select_article"]["title"] : $xvars["p"]["article_id"]
|
|
@@ -48,19 +47,21 @@ class ArticlesController < ApplicationController
|
|
|
48
47
|
end
|
|
49
48
|
|
|
50
49
|
def destroy
|
|
50
|
+
#
|
|
51
51
|
# duplicated from jinda_controller
|
|
52
52
|
# Expected to use in jinda)controller
|
|
53
|
-
#
|
|
54
53
|
current_ma_user = Jinda::User.where(:auth_token => cookies[:auth_token]).first if cookies[:auth_token]
|
|
54
|
+
|
|
55
55
|
if Rails.env.test? #Temp solution until fix test of current_ma_user
|
|
56
56
|
current_ma_user = $xvars["current_ma_user"]
|
|
57
57
|
#current_ma_user = @article.user
|
|
58
58
|
end
|
|
59
|
+
|
|
59
60
|
if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @article.user
|
|
60
61
|
@article.destroy
|
|
61
62
|
end
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
|
|
64
|
+
redirect_to :action=>'my'
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
private
|
|
@@ -69,7 +70,7 @@ class ArticlesController < ApplicationController
|
|
|
69
70
|
@article = Article.find(params.require(:article_id))
|
|
70
71
|
end
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
def load_article
|
|
73
74
|
@article = Article.find(params.permit(:id))
|
|
74
75
|
end
|
|
75
76
|
|
data/lib/jinda/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jinda
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prateep Kul
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-10-
|
|
12
|
+
date: 2018-10-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|