jinda 0.7.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -25
- data/app/assets/config/manifest.js +4 -1
- data/lib/generators/jinda/config_generator.rb +1 -1
- data/lib/generators/jinda/install_generator.rb +3 -4
- data/lib/generators/jinda/templates/app/assets/config/manifest.js +4 -0
- data/lib/generators/jinda/templates/config/mongoid.yml +3 -3
- data/lib/generators/jinda/templates/config/mongoid.yml-docker +3 -3
- data/lib/generators/jinda/templates/config/mongoid.yml-localhost +3 -3
- data/lib/generators/jinda/templates/spec/features/userlogins_spec.rb +1 -1
- data/lib/jinda/version.rb +1 -1
- data/test/dummy/Dockerfile +2 -4
- data/test/dummy/Gemfile +6 -8
- data/test/dummy/Gemfile.lock +205 -189
- data/test/dummy/README.md.bak +24 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/javascripts/application.js +8 -8
- data/test/dummy/app/assets/stylesheets/application.css.bak +15 -0
- data/test/dummy/app/assets/stylesheets/{application.scss → application.css.scss} +4 -12
- data/test/dummy/app/assets/stylesheets/jinda_jqm.css.scss +32 -0
- data/test/dummy/app/mailers/application_mailer.rb +2 -2
- data/test/dummy/app/mailers/application_mailer.rb-org +4 -0
- data/test/dummy/app/views/identities/new.html.haml +0 -13
- data/test/dummy/app/views/layouts/application.haml +4 -51
- data/test/dummy/app/views/sessions/new.html.haml +0 -13
- data/test/dummy/config/credentials.yml.enc +1 -1
- data/test/dummy/config/environments/test.rb +1 -1
- data/test/dummy/config/initializers/content_security_policy.rb +5 -4
- data/test/dummy/config/initializers/filter_parameter_logging.rb +1 -3
- data/test/dummy/config/mongoid.yml +54 -40
- data/test/dummy/config/mongoid.yml-docker +3 -3
- data/test/dummy/config/mongoid.yml-localhost +3 -3
- data/test/dummy/docker-compose.yml +0 -4
- data/test/dummy/log/development.log +2 -2331
- data/test/dummy/spec/features/userlogins_spec.rb +1 -1
- data/test/dummy/tmp/development_secret.txt +1 -1
- data/test/integration/config_generator_test.rb +28 -0
- metadata +9 -19
- data/test/dummy/Guardfile +0 -96
- data/test/dummy/app/assets/stylesheets/jinda.scss +0 -253
- data/test/dummy/app/controllers/adminltes_controller.rb +0 -2
- data/test/dummy/app/views/adminltes/dashboard1.haml +0 -461
- data/test/dummy/app/views/adminltes/dashboard2.haml +0 -656
- data/test/dummy/app/views/identities/new-bak.html.haml +0 -32
- data/test/dummy/app/views/layouts/application.haml.bak +0 -4
- data/test/dummy/app/views/layouts/lte/_flash.haml +0 -9
- data/test/dummy/app/views/layouts/lte/_footer.haml +0 -7
- data/test/dummy/app/views/layouts/lte/_header.haml +0 -111
- data/test/dummy/app/views/layouts/lte/_menu.haml +0 -42
- data/test/dummy/app/views/layouts/lte/_menu_mm.haml +0 -36
- data/test/dummy/app/views/layouts/lte/_rightbar.haml +0 -123
- data/test/dummy/app/views/layouts/lte/_sidebar.haml +0 -154
- data/test/dummy/app/views/sessions/new-bak.html.haml +0 -22
- /data/lib/generators/jinda/templates/app/mailers/{application_mailer.rb → application_mailer.rb-org} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 967e167ae196e69b249b11576dafa1801b2a4cedee8441ec3c9d20ad3762cb20
|
4
|
+
data.tar.gz: bd9bbdfd476a063b4648cc0a746dbd5e21ed26329671ec83a338115a1153d6b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb5e145f1930bee99eebdea5b4e664d8726e89a74d78937951f6591aa33f38d50efcf5c9b4c5f3e2bc85039f57d644aa3f91febe29b5a6fbe4dcf3ff5284fe1f
|
7
|
+
data.tar.gz: 11a37c1e814d64f34b010ea3dbdef2b98149c423a8799d2a4a3f51794dad065a1f0d361e2aa05390e31f12d0e6e40aa340455b4d3ac72ab78b694f510f78c05b
|
data/README.md
CHANGED
@@ -37,8 +37,8 @@ Jinda is a tools for Ruby on Rails developer. (Required: basic Ruby on Rails )
|
|
37
37
|
|
38
38
|
These versions works for sure but others may do.
|
39
39
|
|
40
|
-
- Ruby 3.
|
41
|
-
- Rails
|
40
|
+
- Ruby 3.1.2
|
41
|
+
- Rails 7.0.0
|
42
42
|
- MongoDB 6
|
43
43
|
- Freemind 1.0.1
|
44
44
|
|
@@ -70,7 +70,7 @@ arch -x86_64 gem install nokogiri -v '1.10.10' --platform=ruby -- --use-system-l
|
|
70
70
|
|
71
71
|
[![yt_logo_rgb_light](https://user-images.githubusercontent.com/3953832/110579381-4fa9bc00-812c-11eb-973e-da9d0f2a8109.png)](https://www.youtube.com/watch?v=XUXv7Yrskjk&feature=youtu.be)
|
72
72
|
<br />
|
73
|
-
[![
|
73
|
+
[![Jinda Install](https://i9.ytimg.com/vi/XUXv7Yrskjk/mq3.jpg?sqp=CPjUoIIG&rs=AOn4CLBfMkmMtOGz3OfUp2zyhMs3Dy9xrw)](https://www.youtube.com/watch?v=XUXv7Yrskjk&feature=youtu.be)
|
74
74
|
|
75
75
|
### Sample Jinda in Docker
|
76
76
|
|
@@ -79,44 +79,58 @@ arch -x86_64 gem install nokogiri -v '1.10.10' --platform=ruby -- --use-system-l
|
|
79
79
|
Supposed we want to create ecommerce web site, first create a Rails
|
80
80
|
app without ActiveRecord
|
81
81
|
|
82
|
-
$ rails new YOURAPP -BOTJ
|
82
|
+
$ rails _7.0.0_ new YOURAPP -BOTJ
|
83
83
|
|
84
84
|
## Add jinda to your Gemfile:
|
85
|
-
|
85
|
+
```
|
86
86
|
gem 'jinda'
|
87
|
-
|
87
|
+
```
|
88
88
|
For Development (most updated)
|
89
|
-
|
89
|
+
```
|
90
90
|
gem 'jinda', github:'kul1/jinda'
|
91
|
-
|
91
|
+
```
|
92
92
|
depend on your operating system, you may need to uncomment
|
93
|
-
|
93
|
+
```
|
94
94
|
gem 'therubyracer', :platforms => :ruby
|
95
|
-
|
95
|
+
```
|
96
96
|
install gems
|
97
|
-
|
98
|
-
$ bundle
|
99
|
-
|
97
|
+
```
|
98
|
+
$ bundle install
|
99
|
+
```
|
100
100
|
generate jinda application
|
101
|
-
|
101
|
+
```
|
102
102
|
$ rails generate jinda:install
|
103
|
-
|
103
|
+
```
|
104
104
|
Then run bundle again to install additional gems added by jinda
|
105
|
-
|
106
|
-
$ bundle
|
107
|
-
|
105
|
+
```
|
106
|
+
$ bundle install
|
107
|
+
```
|
108
108
|
configure mongoid, omniauth
|
109
|
-
|
109
|
+
```
|
110
110
|
$ rails generate jinda:config
|
111
|
-
|
111
|
+
```
|
112
112
|
Please make sure mongod is running then create admin user
|
113
|
-
|
113
|
+
```
|
114
114
|
$ rails jinda:seed
|
115
|
-
|
115
|
+
```
|
116
|
+
# Option: to use jinda_adminlte theme require add Gemfile with:
|
117
|
+
```
|
118
|
+
gem 'jinda_adminlte'
|
119
|
+
```
|
120
|
+
Then
|
121
|
+
```
|
122
|
+
$ rails g jinda_adminlte:install
|
123
|
+
```
|
116
124
|
now the application is ready, start it as any Rails application
|
117
|
-
|
118
|
-
|
119
|
-
|
125
|
+
Please include your .env for social login, here sample
|
126
|
+
```
|
127
|
+
GOOGLE_CLIENT_ID=
|
128
|
+
|
129
|
+
GOOGLE_CLIENT_SECRET=
|
130
|
+
```
|
131
|
+
```
|
132
|
+
$ rails server
|
133
|
+
```
|
120
134
|
go to http://localhost:3000, click _Sign In_ on the left menu, and enter user name `admin` and password `secret`
|
121
135
|
|
122
136
|
![login](https://user-images.githubusercontent.com/3953832/41832924-d868f8f0-7813-11e8-93bb-19c0357cf604.png)
|
@@ -45,7 +45,7 @@ module Jinda
|
|
45
45
|
|
46
46
|
desc "Set up mongoid config"
|
47
47
|
def setup_mongoid
|
48
|
-
generate "mongoid:config"
|
48
|
+
generate "mongoid:config -f"
|
49
49
|
inject_into_file 'config/mongoid.yml', :after => ' # raise_not_found_error: true' do
|
50
50
|
"\n raise_not_found_error: false"
|
51
51
|
end
|
@@ -9,7 +9,7 @@ module Jinda
|
|
9
9
|
# define required gems: jinda_gem, jinda_dev_gem
|
10
10
|
jinda_gem =
|
11
11
|
[
|
12
|
-
["bson", "4.
|
12
|
+
["bson", "4.15"],
|
13
13
|
["maruku", "~> 0.7.3"],
|
14
14
|
["bcrypt"],
|
15
15
|
["rouge"],
|
@@ -18,7 +18,7 @@ module Jinda
|
|
18
18
|
["font-awesome-sass", "~> 5.12.0"],
|
19
19
|
["meta-tags"],
|
20
20
|
["jquery-turbolinks", "2.1.0"],
|
21
|
-
["mongo", "2.
|
21
|
+
["mongo", "~> 2.19", ">= 2.19.3"],
|
22
22
|
["turbolinks_render"],
|
23
23
|
["haml-rails", "~> 2.0.1"],
|
24
24
|
["haml", "~> 5.1", ">= 5.1.2"],
|
@@ -248,8 +248,7 @@ IMAGE_LOCATION = "upload"
|
|
248
248
|
end
|
249
249
|
inject_into_file 'config/initializers/assets.rb', :after => '# Precompile additional assets.
|
250
250
|
' do
|
251
|
-
"Rails.application.config.assets.precompile +=
|
252
|
-
"\nRails.application.config.assets.precompile += %w( disable_enter_key.js )\n"
|
251
|
+
"Rails.application.config.assets.precompile += ['*.js', '*.css', '*.css.erb']\n"
|
253
252
|
end
|
254
253
|
end
|
255
254
|
|
@@ -4,12 +4,12 @@ development:
|
|
4
4
|
# Defines the default client. (required)
|
5
5
|
default:
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
|
8
8
|
|
9
9
|
# Otherwise define the parameters separately.
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
11
11
|
# (required).
|
12
|
-
database:
|
12
|
+
database: jinda_development
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
14
14
|
# of host:port pairs. (required)
|
15
15
|
hosts:
|
@@ -173,7 +173,7 @@ production:
|
|
173
173
|
test:
|
174
174
|
clients:
|
175
175
|
default:
|
176
|
-
database:
|
176
|
+
database: jinda_test
|
177
177
|
hosts:
|
178
178
|
- localhost:27017
|
179
179
|
options:
|
@@ -4,12 +4,12 @@ development:
|
|
4
4
|
# Defines the default client. (required)
|
5
5
|
default:
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
|
8
8
|
|
9
9
|
# Otherwise define the parameters separately.
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
11
11
|
# (required).
|
12
|
-
database:
|
12
|
+
database: jinda_development
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
14
14
|
# of host:port pairs. (required)
|
15
15
|
hosts:
|
@@ -173,7 +173,7 @@ production:
|
|
173
173
|
test:
|
174
174
|
clients:
|
175
175
|
default:
|
176
|
-
database:
|
176
|
+
database: jinda_test
|
177
177
|
hosts:
|
178
178
|
- localhost:27017
|
179
179
|
options:
|
@@ -4,12 +4,12 @@ development:
|
|
4
4
|
# Defines the default client. (required)
|
5
5
|
default:
|
6
6
|
# Mongoid can connect to a URI accepted by the driver:
|
7
|
-
# uri: mongodb://user:password@mongodb.domain.com:27017/
|
7
|
+
# uri: mongodb://user:password@mongodb.domain.com:27017/jinda_development
|
8
8
|
|
9
9
|
# Otherwise define the parameters separately.
|
10
10
|
# This defines the name of the default database that Mongoid can connect to.
|
11
11
|
# (required).
|
12
|
-
database:
|
12
|
+
database: jinda_development
|
13
13
|
# Provides the hosts the default client can connect to. Must be an array
|
14
14
|
# of host:port pairs. (required)
|
15
15
|
hosts:
|
@@ -173,7 +173,7 @@ production:
|
|
173
173
|
test:
|
174
174
|
clients:
|
175
175
|
default:
|
176
|
-
database:
|
176
|
+
database: jinda_test
|
177
177
|
hosts:
|
178
178
|
- localhost:27017
|
179
179
|
options:
|
data/lib/jinda/version.rb
CHANGED
data/test/dummy/Dockerfile
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
# https://docs.docker.com/compose/rails/
|
2
|
-
|
3
|
-
FROM ruby:3.1.2
|
2
|
+
FROM ruby:2.6.8
|
4
3
|
RUN apt-get update -qq
|
5
4
|
RUN mkdir /myapp
|
6
5
|
WORKDIR /myapp
|
7
6
|
COPY Gemfile /myapp/Gemfile
|
8
7
|
COPY Gemfile.lock /myapp/Gemfile.lock
|
9
8
|
# Fix from here
|
10
|
-
|
11
|
-
RUN gem install bundler:2.3.25
|
9
|
+
RUN gem install bundler:2.2.27
|
12
10
|
# Fix end here
|
13
11
|
RUN bundle install
|
14
12
|
COPY . /myapp
|
data/test/dummy/Gemfile
CHANGED
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
4
4
|
ruby "3.1.2"
|
5
5
|
|
6
6
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
7
|
-
gem "rails", "~> 7.0.
|
7
|
+
gem "rails", "~> 7.0.0"
|
8
8
|
|
9
9
|
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
|
10
10
|
gem "sprockets-rails"
|
@@ -48,11 +48,10 @@ group :development do
|
|
48
48
|
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
|
49
49
|
# gem "spring"
|
50
50
|
end
|
51
|
-
|
52
|
-
|
53
|
-
gem "
|
54
|
-
gem "
|
55
|
-
gem "bson", "4.4.2"
|
51
|
+
|
52
|
+
gem "jinda", path: "../../../jinda"
|
53
|
+
gem "jinda_adminlte", path: "../../../jinda_adminlte"
|
54
|
+
gem "bson", "4.15"
|
56
55
|
gem "maruku", "~> 0.7.3"
|
57
56
|
gem "bcrypt"
|
58
57
|
gem "rouge"
|
@@ -61,7 +60,7 @@ gem "font-awesome-rails"
|
|
61
60
|
gem "font-awesome-sass", "~> 5.12.0"
|
62
61
|
gem "meta-tags"
|
63
62
|
gem "jquery-turbolinks", "2.1.0"
|
64
|
-
gem "mongo"
|
63
|
+
gem "mongo"
|
65
64
|
gem "turbolinks_render"
|
66
65
|
gem "haml-rails", "~> 2.0.1"
|
67
66
|
gem "prawn"
|
@@ -99,4 +98,3 @@ group :development, :test do
|
|
99
98
|
end
|
100
99
|
gem "mongoid-paperclip", require: "mongoid_paperclip"
|
101
100
|
gem "kaminari-mongoid", "1.0.1"
|
102
|
-
gem 'rspec_junit_formatter'
|