jinda 0.7.3 → 0.7.5.0

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: 2ed59d0a776091a540cfb3dc8529d9ddb11c0ca4f94cdf40b277957432d300a1
4
- data.tar.gz: 7e5d9f3308145ee6241c0aca617325e62068571111c22de905119043acaf61ac
3
+ metadata.gz: 9b21591045ed229eafd7d773521a1516cd1de8206ab5a333bb2451d229746bed
4
+ data.tar.gz: 8da9450b53735e56974598365f0c5d6084c496c19fc1f24a72ee84a374597276
5
5
  SHA512:
6
- metadata.gz: 7265365e8f612ee25707ae76c080b61790b458023d9953179ae43e91e5e779d67baedaa91c37694c34da4d74b159e5f25849ede86d3ec9e2fa4f54961cd97762
7
- data.tar.gz: 6bb86d8ef01fd4346214acab6de8395293d1c8d18771495db4378ba97cbdecd22ba36e4dbe0de9c9ca05adf497ed56fb3a55a23c1ccefec1d647fe45e214e1fa
6
+ metadata.gz: 53661d2defbed1497a8c3245e4ea97e54edd3cb79d037c9bc9a856450b532c9d70de7f13cdd8205094020f2355fb9e9d0a0b9b753333aeaebdddb9e45df50de7
7
+ data.tar.gz: 231a576aae9bd37846c9082b214636cc05cb1bf63b44cd7245472e4201b1ffebec2bc83dfc3969084004adbdc44517215b308ee60a9e02ce8636e7dfd3b35720
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.7.0.1'
43
+ gem 'jinda'
44
44
 
45
45
  For Development (most updated)
46
46
 
@@ -62,8 +62,6 @@ Then run bundle again to install additional gems added by jinda
62
62
 
63
63
  $ bundle
64
64
 
65
- (or run all with "sh install.sh" )
66
-
67
65
  configure mongoid, omniauth
68
66
 
69
67
  $ rails generate jinda:config
@@ -8,7 +8,7 @@ module Jinda
8
8
  def backup_files
9
9
  st=" "
10
10
  # inside("config/initializers") {(File.file? "omniauth.rb") ? (FileUtils.mv "omniauth.rb", "omniauth.rb.bak") : (puts "new omniauth.rb created")}
11
- # inside("config/initializers") {(File.file? "mongoid.rb") ? (FileUtils.mv "mongoid.rb", "omniauth.rb.bak") : (puts "new mongoid.rb created")}
11
+ inside("config") {(File.file? "mongoid.yml") ? (FileUtils.mv "mongoid.yml", "mongoid.yml.bak") : (puts "new mongoid.yml will be created")}
12
12
  (File.file? ".env") ? (FileUtils.mv ".env", ".env-bak") : (puts "backup .env")
13
13
  end
14
14
  desc "gen_image_store"
@@ -43,14 +43,12 @@ module Jinda
43
43
  end
44
44
  end
45
45
 
46
-
47
46
  desc "Set up mongoid config"
48
47
  def setup_mongoid
49
48
  generate "mongoid:config"
50
49
  inject_into_file 'config/mongoid.yml', :after => ' # raise_not_found_error: true' do
51
50
  "\n raise_not_found_error: false"
52
51
  end
53
-
54
52
  inject_into_file 'config/mongoid.yml', :after => ' # belongs_to_required_by_default: true' do
55
53
  "\n belongs_to_required_by_default: false"
56
54
  end
@@ -7,66 +7,142 @@ module Jinda
7
7
  end
8
8
 
9
9
  def setup_gems
10
- gem 'maruku', '~> 0.7.3'
11
- gem 'rouge'
12
- gem 'normalize-rails'
13
- gem 'font-awesome-rails'
14
- gem 'font-awesome-sass', '~> 5.12.0'
15
- gem 'mongoid-paperclip', require: 'mongoid_paperclip'
16
- gem 'meta-tags'
17
- gem 'jquery-turbolinks', '2.1.0'
18
- gem 'mongo', '2.11.3'
19
- gem 'bson', '4.4.2'
20
- gem 'mongoid', git: 'git@github.com:kul1/mongoid.git'
21
- gem 'turbolinks_render'
22
- gem 'nokogiri', '~> 1.11.0'
23
- gem 'haml', '~> 5.1', '>= 5.1.2'
24
- gem 'haml-rails', '~> 2.0.1'
25
- gem 'mail'
26
- gem 'prawn'
27
- gem 'redcarpet'
28
- gem 'bcrypt'
29
- gem 'oauth2', '1.4.4'
30
- gem 'omniauth', '1.9.1'
31
- gem 'omniauth-oauth2', '1.6.0'
32
- gem 'omniauth-identity', '~> 1.1.1'
33
- gem 'omniauth-facebook', '6.0.0'
34
- gem 'omniauth-google-oauth2', '0.8.0'
35
- gem 'dotenv-rails'
36
- gem 'cloudinary', '1.13.2'
37
- gem 'kaminari', '1.2.0'
38
- gem 'kaminari-mongoid', '1.0.1'
39
- gem 'jquery-rails', '4.3.5'
40
- gem_group :development, :test do
41
- gem 'shoulda'
42
- gem 'rspec'
43
- gem 'rspec-rails'
44
- gem 'better_errors'
45
- gem 'binding_of_caller'
46
- gem 'pry-byebug'
47
- gem 'factory_bot_rails'
48
- gem 'database_cleaner'
49
- gem 'guard'
50
- gem 'guard-rspec'
51
- gem 'guard-minitest'
52
- gem 'capybara'
53
- gem 'selenium-webdriver'
54
- gem 'rb-fsevent'
55
- gem 'valid_attribute'
56
- gem 'faker'
10
+ # # define required gems: jinda_gem, jinda_dev_gem
11
+ jinda_gem =
12
+ [
13
+ ["bson", "4.4.2"],
14
+ ["maruku", "~> 0.7.3"],
15
+ ["bcrypt"],
16
+ ["rouge"],
17
+ ["normalize-rails"],
18
+ ["font-awesome-rails"],
19
+ ["font-awesome-sass", "~> 5.12.0"],
20
+ ["meta-tags"],
21
+ ["jquery-turbolinks", "2.1.0"],
22
+ ["mongo", "2.11.3"],
23
+ ["turbolinks_render"],
24
+ ["haml-rails", "~> 2.0.1"],
25
+ ["haml", "~> 5.1", ">= 5.1.2"],
26
+ ["mail"],
27
+ ["prawn"],
28
+ ["redcarpet"],
29
+ ["oauth2", "1.4.4"],
30
+ ["omniauth", "1.9.1"],
31
+ ["omniauth-oauth2", "1.6.0"],
32
+ ["omniauth-identity", "~> 1.1.1"],
33
+ ["omniauth-facebook", "6.0.0"],
34
+ ["omniauth-google-oauth2", "0.8.0"],
35
+ ["dotenv-rails"],
36
+ ["cloudinary", "1.13.2"],
37
+ ["kaminari", "1.2.0"],
38
+ ["jquery-rails", "4.3.5"]
39
+ ]
40
+ #
41
+ jinda_custom =
42
+ [
43
+ ["mongoid-paperclip", require: "mongoid_paperclip"],
44
+ ["kaminari-mongoid", "1.0.1"],
45
+ ["nokogiri", "~> 1.11.0"],
46
+ ["mongoid", git: "git@github.com:kul1/mongoid-jinda.git"]
47
+ # ["mongoid", "~> 7.1.0"]
48
+ ]
49
+ #
50
+ jinda_dev_gem =
51
+ [
52
+ ["shoulda"],
53
+ ["rspec"],
54
+ ["rspec-rails"],
55
+ ["better_errors"],
56
+ ["binding_of_caller"],
57
+ ["pry-byebug"],
58
+ ["factory_bot_rails"],
59
+ ["database_cleaner"],
60
+ ["guard"],
61
+ ["guard-rspec"],
62
+ ["guard-minitest"],
63
+ ["capybara"],
64
+ ["selenium-webdriver"],
65
+ ["rb-fsevent"],
66
+ ["valid_attribute"],
67
+ ["faker"]
68
+ ]
69
+
70
+ # Check each jinda_gem and create new array if found one otherwise just create.
71
+ # Open Gemfile add gem if not exist
72
+ jinda_gem.each do |g|
73
+ unless (%x(gem list -e --no-versions #{g[0]})) == "#{g[0]}\n"
74
+ if g.count == 2
75
+ gem g[0], g[1]
76
+ else
77
+ gem g[0]
78
+ end
79
+ else
80
+ if g.count == 2
81
+ xgem_0 = %x(gem list -e #{g[0]})
82
+ unless xgem_0.include?(("#{g[1]}").gsub(/[~> ]/, ''))
83
+ say " Found existing #{xgem_0} in Gemfile or System, Please edit Gemfile", :red
84
+ gem g[0], g[1]
85
+ else
86
+ say " Checking #{g[0]} found Ver. #{g[1]} already exist in Gemfile", :green
87
+ end
88
+ end
89
+ say " SKIP adding #{g[0]} in Gemfile", :yellow
90
+ end
91
+ end
92
+
93
+ # create list of gem in sub-group dev and test
94
+ jinda_dev_new = Array.new
95
+ jinda_dev_gem.each do |g|
96
+ unless (%x(gem list -e --no-versions #{g[0]})) == "#{g[0]}\n"
97
+ jinda_dev_new << g
98
+ else
99
+ say " #{g[0]} already exist in Gemfile", :yellow
100
+ end
57
101
  end
102
+ unless jinda_dev_new.count == 0
103
+ gem_group :development, :test do
104
+ jinda_dev_new.each do |n|
105
+ if n.count == 1
106
+ gem n[0]
107
+ else
108
+ gem n[0], n[1]
109
+ end
110
+ end
111
+ end
112
+ end
113
+
114
+ # create list of custom gem
115
+ jinda_custom_new = Array.new
116
+ jinda_custom.each do |g|
117
+ # unless (%x(gem list -e --no-versions #{g[0]})) == "#{g[0]}\n"
118
+ unless File.read("Gemfile").include?("#{g[0]}, #{g[1]}")
119
+ jinda_custom_new << g
120
+ else
121
+ say " #{g[0]} already exist in Gemfile", :yellow
122
+ end
123
+ end
124
+ unless jinda_custom_new.count == 0
125
+ jinda_custom_new.each do |c|
126
+ say " Checking if #{c[0]} already exist in Gemfile", :yellow
127
+ if c.count == 1
128
+ gem c[0]
129
+ else
130
+ gem c[0], c[1]
131
+ end
132
+ end
133
+ end
58
134
  end
59
135
 
60
136
  def setup_app
61
137
  # inside("public") { run "FileUtils.mv index.html index.html.bak" }
62
- inside("db") {(File.file? "seeds.rb") ? (FileUtils.mv "seeds.rb", "seeds.rb.bak") : ( say "no seeds.rb", :green)}
138
+ inside("db") {(File.file? "seeds.rb") ? (FileUtils.mv "seeds.rb", "seeds.rb.bak") : ( say "no seeds.rb", :green)}
63
139
  inside("app/views/layouts") {(File.file? "application.html.erb") ? (FileUtils.mv 'application.html.erb', 'application.html.erb.bak') : ( say "no app/views/layout/ application.html.erb", :blue )}
64
140
  inside("app/controllers") {(File.file? "application_controller.rb") ? (FileUtils.mv 'application_controller.rb', 'application_controller.rb.bak' ) : ( say "no app/controller/application_controller.rb, :blue ")}
65
141
  inside("app/helpers") {(File.file? "application_helper.rb") ? (FileUtils.mv 'application_helper.rb', 'application_helper.rb.bak') : ( say "no app/helpers/application_helper.rb", :blue)}
66
142
  inside("app/assets/javascripts") {(File.file? 'application.js') ? (FileUtils.mv 'application.js', 'application.js.bak') : ( say "no application.js", :blue)}
67
143
  inside("app/assets/stylesheets") {(File.file? "application.css") ? (FileUtils.mv 'application.css', 'application.css.bak') : ( say "no application.css", :blue)}
68
144
  inside("config/initializers") {(File.file? "omniauth.rb") ? (FileUtils.mv 'omniauth.rb', 'omniauth.rb.bak') : (say "no omniauth.rb", :blue)}
69
- # inside("config/initializers") {(File.file? "mongoid.rb") ? (FileUtils.mv 'mongoid.rb', 'mongoid.rb.bak') : (say "no mongoid.rb")}
145
+ inside("config/initializers") {(File.file? "mongoid.rb") ? (FileUtils.mv 'mongoid.rb', 'mongoid.rb.bak') : (say "no mongoid.rb")}
70
146
  inside("app/assets/config") {(File.file? "manifest.js") ? (FileUtils.mv "manifest.js", "manifest.js-rails") : (puts "backup to manifest.js-rails")}
71
147
  directory "app"
72
148
  directory "spec"
@@ -79,79 +155,32 @@ module Jinda
79
155
  # inside("app/assets/javascripts") {(File.file? "application.js") ? ( say "Please include application-org.js in application.js", :red) : (FileUtils.mv 'application-org.js', 'application.js')}
80
156
  # inside("app/assets/stylesheets") {(File.file? "application.css") ? ( say "Please include application-org.css in application.css", :red) : (FileUtils.mv 'application-org.css', 'application.css')}
81
157
  # inside("app/assets/stylesheets") {(File.file? "application.css.scss") ? ( say "Please include application-org.css.scss in application.css.scss", :red) : (FileUtils.mv 'application-org.css.scss', 'application.css.scss')}
82
- inside("app/controllers") {(File.file? "admins_controller.rb") ? ( say "Please merge existing jinda_org/admins_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/admins_controller.rb', 'admins_controller.rb')}
83
- inside("app/controllers") {(File.file? "articles_controller.rb") ? ( say "Please merge existing jinda_org/articles_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/articles_controller.rb', 'articles_controller.rb')}
84
- inside("app/controllers") {(File.file? "comments_controller.rb") ? ( say "Please merge existing jinda_org/comments_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/comments_controller.rb', 'comments_controller.rb')}
85
- inside("app/controllers") {(File.file? "docs_controller.rb") ? ( say "Please merge existing jinda_org/docs_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/docs_controller.rb', 'docs_controller.rb')}
86
- inside("app/controllers") {(File.file? "identities_controller.rb") ? ( say "Please merge existing jinda_org/identities_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/identities_controller.rb', 'identities_controller.rb')}
87
- inside("app/controllers") {(File.file? "application_controller.rb") ? ( say "Pleas merge existing jinda_org/application_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
158
+ inside("app/controllers") {(File.file? "admins_controller.rb") ? ( say " Please merge existing jinda_org/admins_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/admins_controller.rb', 'admins_controller.rb')}
159
+ inside("app/controllers") {(File.file? "articles_controller.rb") ? ( say " Please merge existing jinda_org/articles_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/articles_controller.rb', 'articles_controller.rb')}
160
+ inside("app/controllers") {(File.file? "comments_controller.rb") ? ( say " Please merge existing jinda_org/comments_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/comments_controller.rb', 'comments_controller.rb')}
161
+ inside("app/controllers") {(File.file? "docs_controller.rb") ? ( say " Please merge existing jinda_org/docs_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/docs_controller.rb', 'docs_controller.rb')}
162
+ inside("app/controllers") {(File.file? "identities_controller.rb") ? ( say " Please merge existing jinda_org/identities_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/identities_controller.rb', 'identities_controller.rb')}
163
+ inside("app/controllers") {(File.file? "application_controller.rb") ? ( say " Pleas merge existing jinda_org/application_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/application_controller.rb', 'application_controller.rb')}
88
164
  ## Moved to Engine
89
- # inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say "Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
90
- inside("app/controllers") {(File.file? "password_resets_controller.rb") ? ( say "Please merge existing jinda_org/password_resets_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets_controller.rb', 'password_resets_controller.rb')}
91
- inside("app/controllers") {(File.file? "password_resets.rb") ? ( say "Please merge existing jinda_org/password_resets.rb after this installation", :red) : (FileUtils.mv 'jinda_org/password_resets.rb', 'password_resets.rb')}
92
- inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say "Please merge existing jinda_org/sessions_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
93
- inside("app/controllers") {(File.file? "users_controller.rb") ? ( say "Please merge existing jinda_org/users_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/users_controller.rb', 'users_controller.rb')}
94
- inside("app/controllers") {(File.file? "sitemap_controller.rb") ? ( say "Please merge existing jinda_org/sitemap_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sitemap_controller.rb', 'sitemap_controller.rb')}
95
- inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say "Please merge existing jinda_org/notes_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
165
+ # inside("app/controllers") {(File.file? "jinda_controller.rb") ? ( say " Please merge existing jinda_org/jinda_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/jinda_controller.rb', 'jinda_controller.rb')}
166
+ inside("app/controllers") {(File.file? "password_resets_controller.rb") ? ( say " Please merge existing jinda_org/password_resets_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/password_resets_controller.rb', 'password_resets_controller.rb')}
167
+ inside("app/controllers") {(File.file? "password_resets.rb") ? ( say " Please merge existing jinda_org/password_resets.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/password_resets.rb', 'password_resets.rb')}
168
+ inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say " Please merge existing jinda_org/sessions_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
169
+ inside("app/controllers") {(File.file? "users_controller.rb") ? ( say " Please merge existing jinda_org/users_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/users_controller.rb', 'users_controller.rb')}
170
+ inside("app/controllers") {(File.file? "sitemap_controller.rb") ? ( say " Please merge existing jinda_org/sitemap_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/sitemap_controller.rb', 'sitemap_controller.rb')}
171
+ inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say " Please merge existing jinda_org/notes_controller.rb after this installation", :yellow) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
96
172
  end
97
173
  # routes created each line as reversed order in routes
98
174
  # Moved routes to Engine
99
175
  def setup_routes
100
- # route "end"
101
- # route " end"
102
- # route " namespace :v1 do resources :notes, :only => [:index] end"
103
- # route " namespace :api do"
104
- # route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
105
- # route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
106
- # route "\# api"
107
176
  route "root :to => 'jinda#index'"
108
- # route "resources :jinda, :only => [:index, :new]"
109
- # route "resources :password_resets"
110
- # route "resources :sessions"
111
- # route "resources :identities"
112
- # route "resources :users"
113
- # route "resources :docs"
114
- # route "resources :notes"
115
- # route "resources :comments"
116
- # route "resources :articles do resources :comments end"
117
- # route "get '/jinda/document/:id' => 'jinda#document'"
118
- # route "get '/notes/destroy/:id' => 'notes#destroy'"
119
- # route "get '/notes/my/destroy/:id' => 'notes#destroy'"
120
- # route "get '/docs/my/destroy' => 'docs#destroy'"
121
- # route "get '/notes/my' => 'notes/my'"
122
- # route "get '/docs/my' => 'docs/my'"
123
- # route "get '/articles/edit' => 'articles/edit'"
124
- # route "get '/articles/show' => 'articles/show'"
125
- # route "get '/articles/my/destroy' => 'articles#destroy'"
126
- # route "get '/articles/my' => 'articles#my'"
127
- # route "get '/logout' => 'sessions#destroy', :as => 'logout'"
128
- # route "get '/auth/failure' => 'sessions#destroy'"
129
- # route "get '/auth/:provider/callback' => 'sessions#create'"
130
- # route "post '/auth/:provider/callback' => 'sessions#create'"
131
- # route "\# end jinda method routes"
132
- # route "post '/jinda/end_output' => 'jinda#end_output'"
133
- # route "post '/jinda/end_form' => 'jinda#end_form'"
134
- # route "post '/jinda/pending' => 'jinda#index'"
135
- # route "post '/jinda/init' => 'jinda#init'"
136
- # route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
137
- # route "jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']"
138
- # route "jinda_methods += ['run_redirect', 'run_direct_to','run_if']"
139
- # route "jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']"
140
- # route "jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']"
141
- # route "\# start jiinda method routes"
142
- end
177
+ end
143
178
 
144
179
  def setup_env
145
180
  FileUtils.mv "README.md", "README.md.bak"
146
181
  create_file 'README.md', ''
147
- # FileUtils.mv 'install.sh', 'install.sh'
148
- # inject_into_file 'config/application.rb', :after => 'require "active_resource/railtie"' do
149
- # inject_into_file 'config/application.rb', :after => 'require "rails"' do
150
- # "\nrequire 'rexml/document'\n"+
151
- # "\nrequire 'mongoid/railtie'\n"
152
- # end
153
182
  application do
154
- %q{
183
+ %q{
155
184
  # Jinda default
156
185
  config.generators do |g|
157
186
  g.orm :mongoid
@@ -174,10 +203,10 @@ module Jinda
174
203
  # :enable_starttls_auto => true }
175
204
  # config.action_mailer.raise_delivery_errors = true
176
205
  # config.action_mailer.perform_deliveries = true
177
- }
206
+ }
178
207
  end
179
208
  initializer "jinda.rb" do
180
- %q{# encoding: utf-8
209
+ %q{# encoding: utf-8
181
210
  MM = "#{Rails.root}/app/jinda/index.mm"
182
211
  DEFAULT_TITLE = 'Jinda'
183
212
  DEFAULT_HEADER = 'Jinda'
@@ -190,25 +219,26 @@ NEXT = "Next >"
190
219
  IMAGE_LOCATION = "upload"
191
220
  # for debugging
192
221
  # DONT_SEND_MAIL = true
193
- }
194
- end
195
-
196
- initializer "mongoid.rb" do
197
- %q{# encoding: utf-8
198
- #
199
- # Mongoid 6 follows the new pattern of AR5 requiring a belongs_to relation to always require its parent
200
- # belongs_to` will now trigger a validation error by default if the association is not present.
201
- # You can turn this off on a per-association basis with `optional: true`.
202
- # (Note this new default only applies to new Rails apps that will be generated with
203
- # `config.active_record.belongs_to_required_by_default = true` in initializer.)
204
- #
205
- Mongoid::Config.belongs_to_required_by_default = false
206
- }
222
+ }
207
223
  end
224
+ # Move mongoid.rb to jinda:config
225
+ # To avoid repeate install jinda:install crash
226
+ initializer "mongoid.rb" do
227
+ %q{# encoding: utf-8
228
+ #
229
+ # Mongoid 6 follows the new pattern of AR5 requiring a belongs_to relation to always require its parent
230
+ # belongs_to` will now trigger a validation error by default if the association is not present.
231
+ # You can turn this off on a per-association basis with `optional: true`.
232
+ # (Note this new default only applies to new Rails apps that will be generated with
233
+ # `config.active_record.belongs_to_required_by_default = true` in initializer.)
234
+ #
235
+ Mongoid::Config.belongs_to_required_by_default = false
236
+ }
237
+ end
208
238
 
209
239
  inject_into_file 'config/environment.rb', :after => "initialize!" do
210
240
  "\n\n# hack to fix cloudinary error https://github.com/archiloque/rest-client/issues/141" +
211
- "\nclass Hash\n remove_method :read\nrescue\nend"
241
+ "\nclass Hash\n remove_method :read\nrescue\nend"
212
242
  end
213
243
  inject_into_file 'config/environments/development.rb', :after => 'config.action_mailer.raise_delivery_errors = false' do
214
244
  "\n config.action_mailer.default_url_options = { :host => 'localhost:3000' }"
@@ -218,16 +248,15 @@ Mongoid::Config.belongs_to_required_by_default = false
218
248
  "\n config.assets.compile = true"
219
249
  end
220
250
  inject_into_file 'config/initializers/assets.rb', :after => '# Precompile additional assets.
221
- ' do
222
- "Rails.application.config.assets.precompile += %w( sarabun.css )" +
223
- "\nRails.application.config.assets.precompile += %w( disable_enter_key.js )\n"
251
+ ' do
252
+ "Rails.application.config.assets.precompile += %w( sarabun.css )" +
253
+ "\nRails.application.config.assets.precompile += %w( disable_enter_key.js )\n"
224
254
  end
225
255
  end
226
256
 
227
257
  def finish
228
258
  say "\n"
229
259
  say "Jinda gem ready for next configuration install.\n"
230
- say " (or short cut with sh install.sh)\n"
231
260
  say "Normally you will use the following command:\n"
232
261
  say "----------------------------------------\n"
233
262
  say "bundle install\n"
data/lib/jinda/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.7.3"
2
+ VERSION = "0.7.5.0"
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.3
4
+ version: 0.7.5.0
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-28 00:00:00.000000000 Z
12
+ date: 2021-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -45,20 +45,6 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 4.1.11
48
- - !ruby/object:Gem::Dependency
49
- name: mongoid
50
- requirement: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 7.1.0
55
- type: :development
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 7.1.0
62
48
  description: 'Generate Rails workflow from mind map: Freemind'
63
49
  email:
64
50
  - 1.0@kul.asia