jinda 0.7.0 → 0.7.0.1
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 +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/{jinda.css → jinda.scss} +3 -0
- data/app/views/jinda/index.html.haml +1 -1
- data/lib/generators/jinda/config_generator.rb +7 -6
- data/lib/generators/jinda/install_generator.rb +2 -2
- data/lib/generators/jinda/templates/Dockerfile +4 -2
- data/lib/generators/jinda/templates/app/views/articles/_report.haml +32 -0
- data/lib/generators/jinda/templates/app/views/articles/edit.haml +22 -11
- data/lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb +14 -12
- data/lib/generators/jinda/templates/app/views/articles/index.haml +3 -21
- data/lib/generators/jinda/templates/app/views/articles/my.haml +1 -16
- data/lib/generators/jinda/templates/app/views/articles/new_article/form_article.html.erb +1 -1
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +37 -21
- data/lib/generators/jinda/templates/docker-compose.yml +3 -2
- data/lib/generators/jinda/templates/entrypoint.sh +2 -1
- data/lib/jinda/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ca87efff8bd66514eebb024644656648fd93a4b945a22dbb6659df96026d45e
|
4
|
+
data.tar.gz: 77fdbd475b8c9196e64f097c393519d6345f97822d0f3fde0b9e6bab8bdc12aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ae63a36708f4831d99c564b0ffef7f8f24c48f3753f2ecb8036a988f2720791aa7b5796c53bab21d3c4b2f32a5364d5cabf4a0b91ca551770974dcc796690c9
|
7
|
+
data.tar.gz: a868c134eec359d38bc5f8e7bb5400b20e1e53b40dac9dc2870cbe7b08e500f15c83cded720e8caab516025d450be80a3c48b693872a4f9eb51c3133eb48a352
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
%div.inner
|
34
34
|
%b Installation
|
35
35
|
%ul
|
36
|
-
%li add gem 'jinda', '0.7.0' to Gemfile then $ bundle
|
36
|
+
%li add gem 'jinda', '0.7.0.1' to Gemfile then $ bundle
|
37
37
|
%li rails generate jinda:install, then bundle
|
38
38
|
%li rails generate jinda:config
|
39
39
|
%li rails jinda:seed, will create initial user:password admin:secret
|
@@ -65,12 +65,13 @@ module Jinda
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
68
|
+
desc "Setup Dockerfile"
|
69
|
+
def setup_docker
|
70
|
+
puts " Setup Docker files"
|
71
|
+
FileUtils.cp source_paths[0]+"/"+"Dockerfile", "Dockerfile"
|
72
|
+
FileUtils.cp source_paths[0]+"/"+"docker-compose.yml", "docker-compose.yml"
|
73
|
+
FileUtils.cp source_paths[0]+"/"+"entrypoint.sh", "entrypoint.sh"
|
74
|
+
end
|
74
75
|
|
75
76
|
def finish
|
76
77
|
puts " configured omniauth.\n"
|
@@ -19,7 +19,7 @@ module Jinda
|
|
19
19
|
gem 'bson', '4.4.2'
|
20
20
|
gem 'mongoid', '7.1.0.rc0'
|
21
21
|
gem 'turbolinks_render'
|
22
|
-
gem 'nokogiri', '1.
|
22
|
+
gem 'nokogiri', '~> 1.11.0'
|
23
23
|
gem 'haml', '~> 5.1', '>= 5.1.2'
|
24
24
|
gem 'haml-rails', '~> 2.0.1'
|
25
25
|
gem 'mail'
|
@@ -53,7 +53,7 @@ module Jinda
|
|
53
53
|
gem 'selenium-webdriver'
|
54
54
|
gem 'rb-fsevent'
|
55
55
|
gem 'valid_attribute'
|
56
|
-
gem 'faker'
|
56
|
+
gem 'faker'
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
@@ -11,13 +11,15 @@ COPY . /myapp
|
|
11
11
|
|
12
12
|
# Set Rails environment to production
|
13
13
|
# ENV RAILS_ENV production
|
14
|
-
|
15
|
-
|
14
|
+
ENV RAILS_ENV development
|
15
|
+
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
|
16
|
+
&& apt install -y nodejs
|
16
17
|
|
17
18
|
# Add a script to be executed every time the container starts.
|
18
19
|
COPY entrypoint.sh /usr/bin/
|
19
20
|
RUN chmod +x /usr/bin/entrypoint.sh
|
20
21
|
ENTRYPOINT ["entrypoint.sh"]
|
22
|
+
# EXPOSE 3000
|
21
23
|
EXPOSE 3000
|
22
24
|
|
23
25
|
# Start the main process.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
.box.box-info
|
2
|
+
.box-header.with-border
|
3
|
+
|
4
|
+
%h3.box-title
|
5
|
+
= @page_title
|
6
|
+
.label-warning
|
7
|
+
= flash[:notice]
|
8
|
+
.box-tools.pull-right
|
9
|
+
%button.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"}
|
10
|
+
%i.fa.fa-minus
|
11
|
+
%button.btn.btn-box-tool{"data-widget" => "remove", :type => "button"}
|
12
|
+
%i.fa.fa-times
|
13
|
+
/ /.box-header
|
14
|
+
.box-body
|
15
|
+
.table-responsive
|
16
|
+
%table.table.no-margin
|
17
|
+
%thead
|
18
|
+
%tr
|
19
|
+
%th Title
|
20
|
+
%th Description
|
21
|
+
%th Created
|
22
|
+
%th Updated
|
23
|
+
%th Delete
|
24
|
+
%th Edit
|
25
|
+
- report.each do |article|
|
26
|
+
%tr
|
27
|
+
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
|
28
|
+
%td= article.text.html_safe
|
29
|
+
%td= article.created_at.strftime('%m/%d/%Y')
|
30
|
+
%td= article.updated_at.strftime('%m/%d/%Y')
|
31
|
+
%td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
32
|
+
%td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,12 +1,23 @@
|
|
1
|
+
- @title= "Edit"
|
2
|
+
- @page_title = 'Edit'
|
3
|
+
.container
|
4
|
+
%div.row::before
|
5
|
+
%div.col-md-12
|
6
|
+
%h2.display-3.mt-5.pt-5
|
7
|
+
= @article.title
|
8
|
+
%hr
|
9
|
+
= @article.text
|
10
|
+
%h4.display-5
|
11
|
+
= @article.body.html_safe
|
1
12
|
|
2
|
-
|
3
|
-
.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
+
.container
|
14
|
+
.card
|
15
|
+
= form_for @article, :html => {:class => "form-horizontal center"} , :article_id => @article.id do |f|
|
16
|
+
.form-group
|
17
|
+
= f.text_field :title, class: "form-control", :required => true
|
18
|
+
.form-group
|
19
|
+
= f.text_field :text, class: "form-control", :required => true
|
20
|
+
.form-group
|
21
|
+
= f.text_area :body, rows: 10, class: "form-control"
|
22
|
+
.form-group
|
23
|
+
= f.submit "Submit", class: "btn btn-default btn-success"
|
@@ -1,13 +1,15 @@
|
|
1
1
|
<%
|
2
|
-
|
3
|
-
%>
|
4
|
-
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
article = Article.find_by :id=> $xvars["select_article"]["title"]
|
3
|
+
%>
|
4
|
+
<div class ="module-table">
|
5
|
+
<%= fields_for article do |f| %>
|
6
|
+
<%= f.label :title, "Title" %>
|
7
|
+
<%= f.text_field :title %>
|
8
|
+
<%= f.label :text, "Text" %>
|
9
|
+
<%= f.text_field :text %>
|
10
|
+
<%= f.label :text, "Keywords" %>
|
11
|
+
<%= f.text_field :keywords %>
|
12
|
+
<%= f.label :body, "Body Content" %>
|
13
|
+
<%= f.text_area :body %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -1,23 +1,5 @@
|
|
1
1
|
- @title= "All Articles"
|
2
|
+
%p
|
3
|
+
- @page_title = 'All Articlces'
|
4
|
+
= render :partial => 'report', locals: { report: @articles}
|
2
5
|
= paginate @articles
|
3
|
-
%table{:id=>"pending-table", :width=>"100%"}
|
4
|
-
%tr{:style=>"color:black; background-color:#97BF60;"}
|
5
|
-
%th User
|
6
|
-
%th Title
|
7
|
-
%th Description
|
8
|
-
%th Created
|
9
|
-
%th Updated
|
10
|
-
%th Delete
|
11
|
-
- @articles.each do |article|
|
12
|
-
%tr
|
13
|
-
%td= article.user.code if article.user
|
14
|
-
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id=>article.id
|
15
|
-
%td= article.text
|
16
|
-
%td= article.created_at
|
17
|
-
%td= article.updated_at
|
18
|
-
%td(align='center')
|
19
|
-
- next unless login?
|
20
|
-
- unless current_ma_user.role.upcase.split(',').include?("A")
|
21
|
-
- next unless article.user
|
22
|
-
- next unless current_ma_user == article.user
|
23
|
-
= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,20 +1,5 @@
|
|
1
1
|
- @title= "My Articles"
|
2
2
|
%p
|
3
3
|
- @page_title = 'All Articlces'
|
4
|
+
= render :partial => 'report', locals: { report: @my_articles}
|
4
5
|
= paginate @my_articles
|
5
|
-
%table#article-table
|
6
|
-
%tr
|
7
|
-
%th Title
|
8
|
-
%th Description
|
9
|
-
%th Created
|
10
|
-
%th Updated
|
11
|
-
%th Delete
|
12
|
-
%th Edit
|
13
|
-
- @my_articles.each do |article|
|
14
|
-
%tr
|
15
|
-
%td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
|
16
|
-
%td= article.text.html_safe
|
17
|
-
%td= article.created_at.strftime('%m/%d/%Y')
|
18
|
-
%td= article.updated_at.strftime('%m/%d/%Y')
|
19
|
-
%td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
|
20
|
-
%td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
|
@@ -1,26 +1,42 @@
|
|
1
1
|
- title @article.title
|
2
2
|
- description @article.text
|
3
3
|
- keywords @article.keywords
|
4
|
+
.container
|
5
|
+
%div.row::before
|
6
|
+
%div.col-md-12
|
7
|
+
%h2.display-3.mt-5.pt-5
|
8
|
+
= @article.title
|
9
|
+
= link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
|
10
|
+
%hr
|
11
|
+
= @article.text
|
12
|
+
%h4.display-5
|
13
|
+
= @article.body.html_safe
|
14
|
+
- @comments.each do |comment|
|
15
|
+
%div#article-comment.ui-corner-all
|
16
|
+
.col-md-10.col-sm-12
|
17
|
+
%div.small-box.bg-gray
|
18
|
+
%div.inner
|
19
|
+
%div.font-weight-light
|
20
|
+
Author:
|
21
|
+
%b= comment.user.code if comment.user
|
22
|
+
%div#comment-body
|
23
|
+
%i= comment.body
|
24
|
+
%hr
|
4
25
|
|
5
|
-
|
6
|
-
|
7
|
-
#article-title= @article.title
|
26
|
+
.container
|
27
|
+
.card
|
8
28
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
= f.label :body, "Comment"
|
24
|
-
= f.text_area :body
|
25
|
-
= f.hidden_field :user_id, :value => current_ma_user
|
26
|
-
= f.submit
|
29
|
+
- if login?
|
30
|
+
%h4.display-5
|
31
|
+
Add a comment:
|
32
|
+
= form_with(model: [@article, Comment.new], local: true) do |f|
|
33
|
+
.form-group
|
34
|
+
= f.hidden_field :article_id, :value => @article.id
|
35
|
+
.form-group
|
36
|
+
= f.label :body, "Comment"
|
37
|
+
.form-group
|
38
|
+
= f.text_area :body, rows: 5, class: "form-control"
|
39
|
+
.form-group
|
40
|
+
= f.hidden_field :user_id, :value => current_ma_user
|
41
|
+
.form-group
|
42
|
+
= f.submit "Submit", class: "btn btn-default btn-success"
|
@@ -1,7 +1,8 @@
|
|
1
|
-
version: '3'
|
1
|
+
version: '3.5'
|
2
2
|
services:
|
3
3
|
web:
|
4
4
|
build: .
|
5
|
+
env_file: .env
|
5
6
|
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
|
6
7
|
volumes:
|
7
8
|
- .:/myapp
|
@@ -13,4 +14,4 @@ services:
|
|
13
14
|
mongodb:
|
14
15
|
image: mongo
|
15
16
|
ports:
|
16
|
-
- "
|
17
|
+
- "27888:27017"
|
@@ -5,8 +5,9 @@ cp /myapp/config/mongoid.yml-docker /myapp/config/mongoid.yml
|
|
5
5
|
# Remove a potentially pre-existing server.pid for Rails.
|
6
6
|
rm -f /myapp/tmp/pids/server.pid
|
7
7
|
# Compile the assets
|
8
|
-
|
8
|
+
bundle exec rake assets:precompile
|
9
9
|
# Add admin user
|
10
|
+
# rake db:seed
|
10
11
|
rake jinda:seed
|
11
12
|
# Then exec the container's main process (what's set as CMD in the Dockerfile).
|
12
13
|
exec "$@"
|
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.7.0
|
4
|
+
version: 0.7.0.1
|
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: 2021-01-
|
12
|
+
date: 2021-01-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -180,7 +180,7 @@ files:
|
|
180
180
|
- app/assets/stylesheets/images/icons-36-black.png
|
181
181
|
- app/assets/stylesheets/images/icons-36-white.png
|
182
182
|
- app/assets/stylesheets/images/indicator.gif
|
183
|
-
- app/assets/stylesheets/jinda.
|
183
|
+
- app/assets/stylesheets/jinda.scss
|
184
184
|
- app/assets/stylesheets/jinda_jqm.css.scss
|
185
185
|
- app/assets/stylesheets/jquery.mobile-1.2.1.css
|
186
186
|
- app/assets/stylesheets/jquery.mobile.datebox.css
|
@@ -285,6 +285,7 @@ files:
|
|
285
285
|
- lib/generators/jinda/templates/app/views/admins/edit_role/edit_role.html.erb
|
286
286
|
- lib/generators/jinda/templates/app/views/admins/edit_role/select_user.html.erb
|
287
287
|
- lib/generators/jinda/templates/app/views/api/v1/note.haml
|
288
|
+
- lib/generators/jinda/templates/app/views/articles/_report.haml
|
288
289
|
- lib/generators/jinda/templates/app/views/articles/edit.haml
|
289
290
|
- lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb
|
290
291
|
- lib/generators/jinda/templates/app/views/articles/edit_article/select_article.html.erb
|