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: 74633c76276c81f4bb7379f2fe0e74b6ee864988b3cafbd7597b4c48ccc7cdd9
4
- data.tar.gz: 33232d9e917f08fa25b5061dc1cddd55c7b9d86e191299153c84eeb6ebb221f7
3
+ metadata.gz: 8bed65cdf87a43c73899855cd548dd9e890314db874ddf04a026a5501b9893e3
4
+ data.tar.gz: 626770d659f8e13a6bb71cb781e55410bea846e52115f4f414253893dbf3bc13
5
5
  SHA512:
6
- metadata.gz: 73ef17566a7f47fd4f9b19447e48d3adc6db4706bbf8f71e7874182bbd3731eb598cae65230a6acc18269872b3a6eb9c647668cf47fe1cf44ecdad0f147b3cdc
7
- data.tar.gz: f72804442034effdd39b9e0c2e8377a2c4bc5d73acfc55f751c062ec75b04d0b5032b8257c33db1d4b140e315146fabdd7f2547512cb82e71093d6c22343235b
6
+ metadata.gz: b04c46cd1bf4e55eb4cfccfc40f98b50de40e63f356caf4284545741da64911abdb157f89c19babcb42e2348144eeda74098c7c017030ea92cc1ec18fcdaf14b
7
+ data.tar.gz: ecc03af875dbf63258da693d7f557c6bd9b17851525218ee20d628d5e1d3164540f729c3e48a6046803763b9cde8e0028261190e481d1a7ac38a60fac79b017c
data/README.md CHANGED
@@ -36,7 +36,7 @@ app without ActiveRecord
36
36
 
37
37
  ## Add jinda to your Gemfile:
38
38
 
39
- gem 'jinda', '~> 0.2.6'
39
+ gem 'jinda', '~> 0.2.7'
40
40
 
41
41
  For Development (most updated)
42
42
 
@@ -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
- route "root :to => 'jinda#index'"
67
- route "mount Ckeditor::Engine => '/ckeditor'"
68
- route "resources :users"
69
- route "resources :identities"
70
- route "resources :sessions"
71
- route "resources :password_resets"
72
- route "post '/auth/:provider/callback' => 'sessions#create'"
73
- route "get '/auth/:provider/callback' => 'sessions#create'"
74
- route "get '/auth/failure' => 'sessions#failure'"
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
- route "get ':controller(/:action(/:id))(.:format)'"
77
- route "post ':controller(/:action(/:id))(.:format)'"
78
- end
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
- # These are variables.
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
- #redirect_to :action=>'index'
63
- redirect_to :action=>'my'
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
- def load_article
73
+ def load_article
73
74
  @article = Article.find(params.permit(:id))
74
75
  end
75
76
 
@@ -20,7 +20,7 @@
20
20
 
21
21
  %h2 Installation
22
22
  %ul
23
- %li add gem 'jinda', '0.2.6'
23
+ %li add gem 'jinda', '0.2.7'
24
24
  %li bundle
25
25
  %li rails generate jinda:install
26
26
  %li bundle
data/lib/jinda/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
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.6
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-04 00:00:00.000000000 Z
12
+ date: 2018-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler