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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d366628d4cd026005bc75ff7c777cc27e783dcc626d57b5c93b6f67601f01b1e
4
- data.tar.gz: d3392657824388c9815e929c279b1e538dbf5017411bd7a4e7eb0c7b55decbd8
3
+ metadata.gz: 2ca87efff8bd66514eebb024644656648fd93a4b945a22dbb6659df96026d45e
4
+ data.tar.gz: 77fdbd475b8c9196e64f097c393519d6345f97822d0f3fde0b9e6bab8bdc12aa
5
5
  SHA512:
6
- metadata.gz: 67a1ddc7b42bba833d2331f0a8b166928560230cb97fbbda1453192daa2009345e6a06eb4e8eb1699846a50e14bdf373bc3816b75cd275dd36ab5f07ade652f4
7
- data.tar.gz: be82dbe2c79f1bac9f7406d2fb97242ba8ce17f39bd0d07469d681e965a7e2db71a476bb3e428dbd85f16ec2e594d16ff81e772429c53e192d8b2d7bca1a5e72
6
+ metadata.gz: 5ae63a36708f4831d99c564b0ffef7f8f24c48f3753f2ecb8036a988f2720791aa7b5796c53bab21d3c4b2f32a5364d5cabf4a0b91ca551770974dcc796690c9
7
+ data.tar.gz: a868c134eec359d38bc5f8e7bb5400b20e1e53b40dac9dc2870cbe7b08e500f15c83cded720e8caab516025d450be80a3c48b693872a4f9eb51c3133eb48a352
data/README.md CHANGED
@@ -40,7 +40,7 @@ app without ActiveRecord
40
40
 
41
41
  ## Add jinda to your Gemfile:
42
42
 
43
- gem 'jinda', '~> 0.6.9'
43
+ gem 'jinda', '~> 0.7.0.1'
44
44
 
45
45
  For Development (most updated)
46
46
 
@@ -67,3 +67,6 @@
67
67
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
68
68
  }
69
69
 
70
+ .module-table{
71
+ display: grid;
72
+ }
@@ -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
- # desc "Setup Dockerfile"
69
- # def setup_docker
70
- # FileUtils.mv "Dockerfile", "Dockerfile"
71
- # FileUtils.mv "docker-compose.yml", "docker-compose.yml"
72
- # FileUtils.mv "entrypoint.sh", "entrypoint.sh"
73
- # end
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.10.10'
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', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
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
- # RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
15
- # && apt install -y nodejs
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
- %h1= @page_title
3
- .content= @article.text
4
-
5
- = form_for @article, :article_id => @article.id do |f|
6
- = f.label :title, "Title"
7
- = f.text_field :title, :required => true
8
- = f.label :text, "Description"
9
- = f.text_field :text, :required => true
10
- = f.label :body, "Body Content"
11
- = f.text_area :body, rows: 10
12
- = f.submit
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
- article = Article.find_by :id=> $xvars["select_article"]["title"]
3
- %>
4
- <%= fields_for article do |f| %>
5
- <%= f.label :title, "Title" %>
6
- <%= f.text_field :title %>
7
- <%= f.label :text, "Text" %>
8
- <%= f.text_field :text %>
9
- <%= f.label :text, "Keywords" %>
10
- <%= f.text_field :keywords %>
11
- <%= f.label :body, "Body Content" %>
12
- <%= f.text_area :body %>
13
- <% end %>
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" }
@@ -2,7 +2,7 @@
2
2
  <%
3
3
  article = @article
4
4
  %>
5
- <div id="article-table">
5
+ <div class ="module-table">
6
6
  <%= fields_for article do |f| %>
7
7
  <%= f.label :title, "Title" %>
8
8
  <%= f.text_field :title, :required => true %>
@@ -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
- = 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" }
6
- %div{"data-role" => "menu_mm", "data-theme" => "b", "data-backbtn"=>"false"}
7
- #article-title= @article.title
26
+ .container
27
+ .card
8
28
 
9
- #article-text= @article.body.html_safe
10
-
11
- - @comments.each do |comment|
12
- %div#article-comment.ui-corner-all
13
- Author:
14
- %b= comment.user.code if comment.user
15
- %div#comment-body
16
- %i= comment.body
17
- -#
18
- - if login?
19
- %h3 Add a comment:
20
- =# form_for([@comment, @article.comments.build]) do |f|
21
- = form_with(model: [@article, Comment.new], local: true) do |f|
22
- = f.hidden_field :article_id, :value => @article.id
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
- - "27017:27017"
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
- # bundle exec rake assets:precompile
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 "$@"
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.0.1"
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.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-01 00:00:00.000000000 Z
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.css
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