inline_forms 6.1.1 → 6.2.4
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 +5 -5
- data/LICENSE.txt +1 -1
- data/app/helpers/inline_forms_helper.rb +12 -10
- data/app/views/layouts/application.html.erb +1 -0
- data/app/views/layouts/inline_forms.html.erb +1 -0
- data/bin/inline_forms_installer_core.rb +140 -181
- data/inline_forms.gemspec +1 -6
- data/{app/assets/javascripts/inline_forms → lib/generators/assets/javascripts}/ckeditor/config.js +0 -0
- data/lib/generators/templates/capistrano/Capfile +0 -5
- data/lib/generators/templates/migration.erb +1 -1
- data/lib/inline_forms.rb +2 -1
- data/lib/inline_forms/version.rb +1 -1
- metadata +20 -84
- data/.vscode/settings.json +0 -3
- data/lib/generators/templates/abstract_mysql2_adapter.rb +0 -3
- data/lib/generators/templates/application.yml.blank +0 -59
- data/lib/generators/templates/paper_trail.rb +0 -7
- data/lib/otherstuff/bump +0 -13
- data/lib/otherstuff/diffie +0 -2
- data/lib/otherstuff/fixtures/rails.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: da0da56f70167a18cad534ee9ec06721c11a5402e51662b6d9ef474556ef0de9
|
|
4
|
+
data.tar.gz: fe14b6e4912095742e3244e563756271a7a3bf8cd707d1669c70401b5c838f96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e6bc7963f7e64512bfedd1e5ad742b07f7063a1153e9cea5f158708e446f23b58517bf1bae41a6d2eaf8c818530f8ca39ebc2d182805507d7b87d230736e3cc
|
|
7
|
+
data.tar.gz: c31de7d071bf503999f0b03b1b3bea0e46dbe376935478874682eee033ad13d2b1ebab09802972b9975e2ca8e6286b16c4cb93054d36816382319e6f32edb653
|
data/LICENSE.txt
CHANGED
|
@@ -97,17 +97,19 @@ module InlineFormsHelper
|
|
|
97
97
|
|
|
98
98
|
# link to versions list
|
|
99
99
|
def link_to_versions_list(path_to_versions_list, object, update_span, html_class = 'button new_button')
|
|
100
|
-
out = (link_to "<i class='fi-list'></i>".html_safe,
|
|
101
|
-
send(path_to_versions_list,
|
|
102
|
-
object,
|
|
103
|
-
:update => update_span,
|
|
104
|
-
),
|
|
105
|
-
:remote => true,
|
|
106
|
-
:class => html_class,
|
|
107
|
-
:title => t('inline_forms.view.list_versions')
|
|
108
|
-
)
|
|
109
100
|
if can? :list_versions, object
|
|
110
|
-
|
|
101
|
+
if defined?(PaperTrail) && object.respond_to?(:versions)
|
|
102
|
+
out = (link_to "<i class='fi-list'></i>".html_safe,
|
|
103
|
+
send(path_to_versions_list,
|
|
104
|
+
object,
|
|
105
|
+
:update => update_span,
|
|
106
|
+
),
|
|
107
|
+
:remote => true,
|
|
108
|
+
:class => html_class,
|
|
109
|
+
:title => t('inline_forms.view.list_versions')
|
|
110
|
+
)
|
|
111
|
+
raw out
|
|
112
|
+
end
|
|
111
113
|
end
|
|
112
114
|
end
|
|
113
115
|
|
|
@@ -1,58 +1,55 @@
|
|
|
1
1
|
GENERATOR_PATH = File.dirname(File.expand_path(__FILE__)) + '/../'
|
|
2
2
|
|
|
3
|
-
create_file 'Gemfile', "# created by inline_forms #{ENV['inline_forms_version']} on {Date.today}\n"
|
|
3
|
+
create_file 'Gemfile', "# created by inline_forms #{ENV['inline_forms_version']} on #{Date.today}\n"
|
|
4
4
|
|
|
5
5
|
add_source 'https://rubygems.org'
|
|
6
6
|
|
|
7
|
-
gem 'cancancan'
|
|
7
|
+
gem 'cancancan'
|
|
8
8
|
gem 'carrierwave'
|
|
9
|
-
gem 'ckeditor',
|
|
10
|
-
#gem 'bootsnap', require: false
|
|
9
|
+
gem 'ckeditor', github: 'galetahub/ckeditor'
|
|
11
10
|
gem 'coffee-rails'
|
|
12
|
-
|
|
13
|
-
gem 'rails-jquery-autocomplete'
|
|
11
|
+
gem 'devise-i18n', :git => 'https://github.com/acesuares/devise-i18n.git'
|
|
14
12
|
gem 'devise'
|
|
15
13
|
gem 'foundation-icons-sass-rails'
|
|
16
14
|
gem 'foundation-rails', '~> 5.5'
|
|
17
|
-
gem 'i18n-active_record', git
|
|
18
|
-
gem 'inline_forms', '
|
|
15
|
+
gem 'i18n-active_record', :git => 'https://github.com/acesuares/i18n-active_record.git'
|
|
16
|
+
gem 'inline_forms', '~> 6.2'
|
|
19
17
|
gem 'jquery-rails'
|
|
20
18
|
gem 'jquery-timepicker-rails'
|
|
21
19
|
gem 'jquery-ui-sass-rails'
|
|
22
20
|
gem 'mini_magick'
|
|
23
21
|
gem 'mysql2'
|
|
24
|
-
gem 'paper_trail'
|
|
25
|
-
gem 'rails-i18n'
|
|
26
|
-
gem 'rails'
|
|
22
|
+
gem 'paper_trail', git: 'https://github.com/acesuares/paper_trail.git'
|
|
23
|
+
gem 'rails-i18n', :git => 'https://github.com/svenfuchs/rails-i18n.git' # since https://github.com/svenfuchs/rails-i18n/pull/794 we don't have to maintain 'https://github.com/acesuares/rails-i18n.git' anymore!
|
|
24
|
+
gem 'rails-jquery-autocomplete'
|
|
25
|
+
gem 'rails', '6.1.3.1'
|
|
27
26
|
gem 'rake'
|
|
28
27
|
gem 'remotipart', '~> 1.0'
|
|
29
28
|
gem 'rvm'
|
|
30
29
|
gem 'sass-rails'
|
|
31
|
-
gem 'tabs_on_rails'
|
|
32
|
-
gem 'therubyracer'
|
|
33
|
-
gem 'uglifier'
|
|
34
|
-
gem 'figaro'
|
|
30
|
+
gem 'tabs_on_rails', :git => 'https://github.com/acesuares/tabs_on_rails.git', :branch => 'update_remote_before_action'
|
|
35
31
|
gem 'unicorn'
|
|
36
32
|
gem 'validation_hints'
|
|
37
33
|
gem 'will_paginate' #, git: 'https://github.com/acesuares/will_paginate.git'
|
|
38
|
-
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
|
39
|
-
gem 'turbolinks', '~> 5'
|
|
40
34
|
|
|
41
35
|
gem_group :development do
|
|
42
|
-
gem 'bundler'
|
|
36
|
+
gem 'capistrano-bundler', require: false
|
|
37
|
+
gem 'capistrano-rails', require: false
|
|
38
|
+
gem 'capistrano', require: false
|
|
39
|
+
gem 'capistrano3-unicorn'
|
|
43
40
|
gem 'listen'
|
|
44
|
-
gem '
|
|
45
|
-
gem '
|
|
46
|
-
gem 'seed_dump',
|
|
47
|
-
gem 'shoulda'
|
|
41
|
+
gem 'rvm-capistrano', :require => false
|
|
42
|
+
gem 'rvm1-capistrano3', require: false
|
|
43
|
+
gem 'seed_dump', '~> 0.5.3'
|
|
48
44
|
gem 'sqlite3'
|
|
49
45
|
gem 'switch_user'
|
|
46
|
+
gem 'thin'
|
|
50
47
|
gem 'yaml_db'
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
gem '
|
|
55
|
-
gem
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
gem_group :production do
|
|
51
|
+
gem 'mini_racer'
|
|
52
|
+
gem 'uglifier'
|
|
56
53
|
end
|
|
57
54
|
|
|
58
55
|
say "- Running bundle..."
|
|
@@ -74,21 +71,56 @@ else
|
|
|
74
71
|
create_file "config/database.yml", <<-END_DATABASEYML.strip_heredoc
|
|
75
72
|
development:
|
|
76
73
|
adapter: mysql2
|
|
77
|
-
database: <%=
|
|
78
|
-
username: <%=
|
|
79
|
-
password: <%=
|
|
74
|
+
database: <%= Rails.application.credentials[:db_name] %>
|
|
75
|
+
username: <%= Rails.application.credentials[:db_username] %>
|
|
76
|
+
password: <%= Rails.application.credentials[:db_password] %>
|
|
80
77
|
END_DATABASEYML
|
|
78
|
+
|
|
79
|
+
say "- Setting development database in credentials"
|
|
80
|
+
create_file "temp_development_database_credentials", <<-END_DEV_DB_CRED.strip_heredoc
|
|
81
|
+
|
|
82
|
+
# development database
|
|
83
|
+
db_name: #{app_name.downcase}_dev
|
|
84
|
+
db_username: #{app_name.downcase}_dev_user
|
|
85
|
+
db_password: #{app_name.downcase}_dev_password
|
|
86
|
+
|
|
87
|
+
END_DEV_DB_CRED
|
|
88
|
+
|
|
89
|
+
run "EDITOR='cat temp_development_database_credentials >> ' rails credentials:edit"
|
|
90
|
+
|
|
91
|
+
remove_file 'temp_development_database_credentials'
|
|
92
|
+
|
|
93
|
+
say "\n *** Please make sure to create a mysql development database with the following credentials:
|
|
94
|
+
db_name: #{app_name.downcase}_dev
|
|
95
|
+
db_username: #{app_name.downcase}_dev_user
|
|
96
|
+
db_password: #{app_name.downcase}_dev_password
|
|
97
|
+
|
|
98
|
+
or use 'rails credentials:edit' to change these values.\n\n", :red
|
|
99
|
+
|
|
81
100
|
end
|
|
82
101
|
append_file "config/database.yml", <<-END_DATABASEYML.strip_heredoc
|
|
83
102
|
production:
|
|
84
103
|
adapter: mysql2
|
|
85
|
-
database: <%=
|
|
86
|
-
username: <%=
|
|
87
|
-
password: <%=
|
|
104
|
+
database: <%= Rails.application.credentials[:db_name] %>
|
|
105
|
+
username: <%= Rails.application.credentials[:db_username] %>
|
|
106
|
+
password: <%= Rails.application.credentials[:db_password] %>
|
|
88
107
|
END_DATABASEYML
|
|
89
108
|
|
|
90
|
-
say "
|
|
91
|
-
|
|
109
|
+
say "Setting production database in credentials"
|
|
110
|
+
create_file "temp_production_database_credentials", <<-END_PROD_DB_CRED.strip_heredoc
|
|
111
|
+
|
|
112
|
+
# production database
|
|
113
|
+
db_name: #{app_name.downcase}_prod
|
|
114
|
+
db_username: #{app_name.downcase}_prod_user
|
|
115
|
+
db_password:
|
|
116
|
+
|
|
117
|
+
END_PROD_DB_CRED
|
|
118
|
+
|
|
119
|
+
run "EDITOR='cat temp_production_database_credentials >> ' rails credentials:edit --environment production"
|
|
120
|
+
|
|
121
|
+
remove_file 'temp_production_database_credentials'
|
|
122
|
+
|
|
123
|
+
say "\n *** Please make sure to create a mysql production database and use 'rails credentials:edit' to set the password.\n\n", :red
|
|
92
124
|
|
|
93
125
|
say "- Devise install..."
|
|
94
126
|
run "bundle exec rails g devise:install"
|
|
@@ -292,15 +324,16 @@ copy_file File.join(GENERATOR_PATH, 'lib/generators/templates/application_record
|
|
|
292
324
|
say "- Install ckeditor..."
|
|
293
325
|
generate "ckeditor:install --orm=active_record --backend=carrierwave"
|
|
294
326
|
|
|
295
|
-
say "-
|
|
296
|
-
|
|
327
|
+
say "- Copy ckeditor/config.js to app/javascripts..."
|
|
328
|
+
empty_directory "app/assets/javascripts/ckeditor"
|
|
329
|
+
copy_file File.join(GENERATOR_PATH,'lib/generators/assets/javascripts/ckeditor/config.js'), "app/assets/javascripts/ckeditor/config.js"
|
|
297
330
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
331
|
+
say "- Add ckeditor/config.js to precompile assets..."
|
|
332
|
+
append_to_file 'config/initializers/assets.rb',
|
|
333
|
+
'Rails.application.config.assets.precompile += %w[ckeditor/config.js]'
|
|
301
334
|
|
|
302
335
|
say "- Paper_trail install..."
|
|
303
|
-
generate "paper_trail:install --with-changes"
|
|
336
|
+
generate "paper_trail:install --with-changes --with-mysql"
|
|
304
337
|
|
|
305
338
|
# Create Translations
|
|
306
339
|
say "- Generate models and tables and views for translations..." # TODO Translations need to be done in inline_forms, and then generate a yml file, perhaps
|
|
@@ -361,23 +394,34 @@ create_file "app/helpers/application_helper.rb", <<-END_APPHELPER.strip_heredoc
|
|
|
361
394
|
end
|
|
362
395
|
END_APPHELPER
|
|
363
396
|
|
|
397
|
+
say "- Creating inline_forms initializer"
|
|
398
|
+
create_file "config/initializers/inline_forms.rb", <<-END_INITIALIZER.strip_heredoc
|
|
399
|
+
Rails.application.reloader.to_prepare do
|
|
400
|
+
MODEL_TABS = %w()
|
|
401
|
+
end
|
|
402
|
+
END_INITIALIZER
|
|
403
|
+
|
|
364
404
|
say "- Recreating ApplicationController to add devise, cancan, I18n stuff..."
|
|
365
405
|
remove_file "app/controllers/application_controller.rb" # the one that 'rails new' created
|
|
366
406
|
create_file "app/controllers/application_controller.rb", <<-END_APPCONTROLLER.strip_heredoc
|
|
367
407
|
class ApplicationController < InlineFormsApplicationController
|
|
368
408
|
protect_from_forgery
|
|
369
409
|
|
|
370
|
-
#
|
|
371
|
-
before_action :
|
|
410
|
+
# add whodunnit
|
|
411
|
+
before_action :set_paper_trail_whodunnit
|
|
372
412
|
|
|
373
|
-
# Comment next
|
|
413
|
+
# Comment next lines if you don't want Devise authentication
|
|
414
|
+
before_action :authenticate_user!
|
|
374
415
|
check_authorization unless: :devise_controller?
|
|
375
416
|
|
|
376
417
|
rescue_from CanCan::AccessDenied do |exception|
|
|
377
|
-
|
|
418
|
+
respond_to do |format|
|
|
419
|
+
format.json { head :forbidden, content_type: 'text/html' }
|
|
420
|
+
format.html { redirect_to main_app.root_url, notice: exception.message }
|
|
421
|
+
format.js { head :forbidden, content_type: 'text/html' }
|
|
422
|
+
end
|
|
378
423
|
end
|
|
379
|
-
|
|
380
|
-
ActionView::CompiledTemplates::MODEL_TABS = %w()
|
|
424
|
+
# Comment previous lines if you don't want Devise authentication
|
|
381
425
|
|
|
382
426
|
# Uncomment next line if you want I18n (based on subdomain)
|
|
383
427
|
# before_action :set_locale
|
|
@@ -423,108 +467,69 @@ create_file "app/models/ability.rb", <<-END_ABILITY.strip_heredoc
|
|
|
423
467
|
end
|
|
424
468
|
END_ABILITY
|
|
425
469
|
|
|
426
|
-
say "- Generating test files", :green
|
|
427
|
-
|
|
428
|
-
create_file "spec/spec_helper.rb", <<-END_TEST_HELPER.strip_heredoc
|
|
429
|
-
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
|
430
|
-
ENV["RAILS_ENV"] ||= 'development' # this need to be changed to test ???
|
|
431
|
-
require File.expand_path("../../config/environment", __FILE__)
|
|
432
|
-
require 'capybara/rspec'
|
|
433
|
-
require 'rspec/rails'
|
|
434
|
-
require 'rspec/autorun'
|
|
435
|
-
require 'carrierwave/test/matchers'
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
# Requires supporting ruby files with custom matchers and macros, etc,
|
|
439
|
-
# in spec/support/ and its subdirectories.
|
|
440
|
-
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
|
441
|
-
|
|
442
|
-
RSpec.configure do |config|
|
|
443
|
-
config.include FactoryGirl::Syntax::Methods
|
|
444
|
-
# ## Mock Framework
|
|
445
|
-
#
|
|
446
|
-
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
|
447
|
-
#
|
|
448
|
-
# config.mock_with :mocha
|
|
449
|
-
# config.mock_with :flexmock
|
|
450
|
-
# config.mock_with :rr
|
|
451
|
-
|
|
452
|
-
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
|
453
|
-
config.fixture_path = Rails.root + "/spec/fixtures"
|
|
454
|
-
|
|
455
|
-
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
|
456
|
-
# examples within a transaction, remove the following line or assign false
|
|
457
|
-
# instead of true.
|
|
458
|
-
config.use_transactional_fixtures = true
|
|
459
|
-
|
|
460
|
-
# If true, the base class of anonymous controllers will be inferred
|
|
461
|
-
# automatically. This will be the default behavior in future versions of
|
|
462
|
-
# rspec-rails.
|
|
463
|
-
config.infer_base_class_for_anonymous_controllers = false
|
|
464
|
-
|
|
465
|
-
# Run specs in random order to surface order dependencies. If you find an
|
|
466
|
-
# order dependency and want to debug it, you can fix the order by providing
|
|
467
|
-
# the seed, which is printed after each run.
|
|
468
|
-
# --seed 1234
|
|
469
|
-
config.order = "random"
|
|
470
|
-
end
|
|
471
|
-
END_TEST_HELPER
|
|
472
|
-
|
|
473
|
-
say 'copy test image into rspec folder'
|
|
474
|
-
copy_file File.join(GENERATOR_PATH,'lib/otherstuff/fixtures/rails.png'), "spec/fixtures/images/rails.png"
|
|
475
|
-
say '- Creating factory_girl file'
|
|
476
|
-
create_file "spec/factories/inline_forms.rb", <<-END_FACTORY_GIRL.strip_heredoc
|
|
477
|
-
FactoryGirl.define do
|
|
478
|
-
factory :apartment do
|
|
479
|
-
name "Luxe House in Bandabou 147A" #string
|
|
480
|
-
title "A dream house in a dream place" # string
|
|
481
|
-
description "A beatiful House at the edge of the <strong>sea</strong>" #text
|
|
482
|
-
end
|
|
483
|
-
factory :large_text do
|
|
484
|
-
name "Luxe House in Bandabou 147A" #string
|
|
485
|
-
title "A dream house in a dream place" # string
|
|
486
|
-
description "A beatiful House at the edge of the <strong>sea</strong>" #text
|
|
487
|
-
end
|
|
488
|
-
end
|
|
489
|
-
END_FACTORY_GIRL
|
|
490
|
-
remove_file 'spec/factories/users.rb'
|
|
491
|
-
remove_file 'spec/models/user_spec.rb'
|
|
492
|
-
|
|
493
|
-
# precompile devise.css
|
|
494
|
-
say "- Precompile devise.css in environments/production.rb... (Since Rails 5 in config/initializers/assets.rb !)"
|
|
495
|
-
append_file "config/initializers/assets.rb", " Rails.application.config.assets.precompile += %w( inline_forms_devise.css )\n"
|
|
496
|
-
|
|
497
470
|
# devise mailer stuff
|
|
498
471
|
say "- Injecting devise mailer stuff in environments/production.rb..."
|
|
499
472
|
# strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
|
|
500
|
-
insert_into_file "config/environments/production.rb", <<-
|
|
473
|
+
insert_into_file "config/environments/production.rb", <<-DEVISE_MAILER_PROD_STUFF.strip_heredoc, :before => "end\n"
|
|
501
474
|
|
|
502
475
|
# for devise
|
|
503
|
-
config.action_mailer.default_url_options = { protocol: 'https', host:
|
|
476
|
+
config.action_mailer.default_url_options = { protocol: 'https', host: Rails.application.credentials[:smtp_app_host] }
|
|
504
477
|
config.action_mailer.delivery_method = :smtp
|
|
505
478
|
config.action_mailer.smtp_settings = {
|
|
506
|
-
address:
|
|
479
|
+
address: Rails.application.credentials[:smtp_host],
|
|
507
480
|
enable_starttls_auto: true,
|
|
508
|
-
password:
|
|
509
|
-
user_name:
|
|
481
|
+
password: Rails.application.credentials[:smtp_password] ,
|
|
482
|
+
user_name: Rails.application.credentials[:smtp_username]
|
|
510
483
|
}
|
|
511
484
|
|
|
512
|
-
|
|
485
|
+
DEVISE_MAILER_PROD_STUFF
|
|
486
|
+
|
|
487
|
+
say "Setting production smtp settings in credentials"
|
|
488
|
+
create_file "temp_production_smtp_credentials", <<-END_PROD_SMTP_CRED.strip_heredoc
|
|
489
|
+
|
|
490
|
+
# devise mailer stuff for production:
|
|
491
|
+
smtp_app_host: APP_HOST
|
|
492
|
+
smtp_host: SMTP_HOST
|
|
493
|
+
smtp_username: USERNAME
|
|
494
|
+
smtp_password: PASSWORD
|
|
495
|
+
|
|
496
|
+
END_PROD_SMTP_CRED
|
|
497
|
+
|
|
498
|
+
run "EDITOR='cat temp_production_smtp_credentials >> ' rails credentials:edit --environment production"
|
|
499
|
+
|
|
500
|
+
remove_file 'temp_production_smtp_credentials'
|
|
513
501
|
|
|
514
502
|
say "- Injecting devise mailer stuff in environments/development.rb..."
|
|
515
503
|
# strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
|
|
516
|
-
insert_into_file "config/environments/development.rb", <<-
|
|
504
|
+
insert_into_file "config/environments/development.rb", <<-DEVISE_MAILER_DEV_STUFF.strip_heredoc, :before => "\nend\n"
|
|
517
505
|
# for devise
|
|
518
506
|
config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost', port: 3000 }
|
|
519
507
|
config.action_mailer.delivery_method = :smtp
|
|
520
508
|
config.action_mailer.smtp_settings = {
|
|
521
|
-
address:
|
|
509
|
+
address: Rails.application.credentials[:smtp_host],
|
|
522
510
|
enable_starttls_auto: true,
|
|
523
|
-
password:
|
|
524
|
-
user_name:
|
|
511
|
+
password: Rails.application.credentials[:smtp_password] ,
|
|
512
|
+
user_name: Rails.application.credentials[:smtp_username]
|
|
525
513
|
}
|
|
526
514
|
|
|
527
|
-
|
|
515
|
+
DEVISE_MAILER_DEV_STUFF
|
|
516
|
+
|
|
517
|
+
say "Setting development smtp settings in credentials"
|
|
518
|
+
create_file "temp_development_smtp_credentials", <<-END_DEV_SMTP_CRED.strip_heredoc
|
|
519
|
+
|
|
520
|
+
# devise mailers stuff for development:
|
|
521
|
+
smtp_app_host: APP_HOST
|
|
522
|
+
smtp_host: SMTP_HOST
|
|
523
|
+
smtp_username: USERNAME
|
|
524
|
+
smtp_password: PASSWORD
|
|
525
|
+
|
|
526
|
+
END_DEV_SMTP_CRED
|
|
527
|
+
|
|
528
|
+
run "EDITOR='cat temp_development_smtp_credentials >> ' rails credentials:edit"
|
|
529
|
+
|
|
530
|
+
remove_file 'temp_development_smtp_credentials'
|
|
531
|
+
|
|
532
|
+
|
|
528
533
|
|
|
529
534
|
# capify
|
|
530
535
|
say "- Capify..."
|
|
@@ -540,73 +545,27 @@ copy_file File.join(GENERATOR_PATH,'lib/generators/templates/capistrano/Capfile'
|
|
|
540
545
|
say "- Unicorn Config..."
|
|
541
546
|
copy_file File.join(GENERATOR_PATH,'lib/generators/templates/unicorn/production.rb'), "config/unicorn/production.rb"
|
|
542
547
|
|
|
543
|
-
|
|
544
548
|
# Git
|
|
545
|
-
say "-
|
|
546
|
-
run 'git init'
|
|
547
|
-
|
|
548
|
-
insert_into_file ".gitignore", <<-GITIGNORE.strip_heredoc, :after => "/tmp\n"
|
|
549
|
-
# remotipart uploads
|
|
550
|
-
public/uploads
|
|
551
|
-
# Figaro secrets
|
|
552
|
-
config/application.yml
|
|
553
|
-
GITIGNORE
|
|
554
|
-
|
|
555
|
-
say "- Installing Figaro..."
|
|
556
|
-
run 'bundle exec figaro install'
|
|
557
|
-
remove_file "config/application.yml"
|
|
558
|
-
copy_file File.join(GENERATOR_PATH,'lib/generators/templates/application.yml.blank'), "config/application.yml"
|
|
559
|
-
copy_file File.join(GENERATOR_PATH,'lib/generators/templates/application.yml.blank'), "config/application.yml.blank"
|
|
560
|
-
|
|
561
|
-
say "- Installing config/secrets.yml..."
|
|
562
|
-
remove_file "config/secrets.yml"
|
|
563
|
-
create_file "config/secrets.yml", <<-END_SECRETS_YML.strip_heredoc
|
|
564
|
-
development:
|
|
565
|
-
secret_key_base: #{SecureRandom.hex(64)}
|
|
566
|
-
|
|
567
|
-
test:
|
|
568
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
|
549
|
+
say "- adding and committing to git..."
|
|
569
550
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
END_SECRETS_YML
|
|
573
|
-
|
|
574
|
-
run 'git add .'
|
|
575
|
-
run 'git commit -a -m " * Initial"'
|
|
551
|
+
git add: "."
|
|
552
|
+
git commit: " -a -m 'Initial Commit'"
|
|
576
553
|
|
|
577
554
|
# example
|
|
578
555
|
if ENV['install_example'] == 'true'
|
|
579
556
|
say "\nInstalling example application..."
|
|
580
|
-
run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:ckeditor apartment:belongs_to _presentation:\'#{name}\''
|
|
557
|
+
run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:ckeditor apartment:belongs_to _presentation:\'#{name}\''
|
|
581
558
|
run 'bundle exec rails generate uploader Image'
|
|
582
|
-
run 'bundle exec rails g inline_forms Apartment name:string title:string description:ckeditor photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\''
|
|
559
|
+
run 'bundle exec rails g inline_forms Apartment name:string title:string description:ckeditor photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\''
|
|
583
560
|
run 'bundle exec rake db:migrate'
|
|
584
|
-
say '-Adding example test'
|
|
585
|
-
create_file "spec/models/#{app_name}_example.rb", <<-END_EXAMPLE_TEST.strip_heredoc
|
|
586
|
-
require "spec_helper"
|
|
587
|
-
describe Apartment do
|
|
588
|
-
it "insert an appartment and retrieve it" do
|
|
589
|
-
appartment_data = create(:apartment)
|
|
590
|
-
first = Apartment.first.id
|
|
591
|
-
expect(Apartment.first.id).to eq(first)
|
|
592
|
-
end
|
|
593
|
-
end
|
|
594
|
-
END_EXAMPLE_TEST
|
|
595
561
|
|
|
596
|
-
#run "rspec" if ENV['runtest']
|
|
597
562
|
remove_file 'public/index.html'
|
|
563
|
+
|
|
598
564
|
route "root :to => 'apartments#index'"
|
|
599
565
|
|
|
600
|
-
# done!
|
|
601
566
|
say "\nDone! Now point your browser to http://localhost:3000", :yellow
|
|
602
567
|
say "\nPress ctlr-C to quit...", :yellow
|
|
603
568
|
run 'bundle exec rails s'
|
|
604
|
-
else
|
|
605
|
-
# run tests
|
|
606
|
-
#run "rspec" if ENV['runtest']
|
|
607
|
-
say "- Don't forget: add your secret key base in config/application.yml \n"
|
|
608
569
|
end
|
|
609
570
|
# done!
|
|
610
571
|
say "\nDone! Now make your tables with 'bundle exec rails g inline_forms ...", :yellow
|
|
611
|
-
|
|
612
|
-
#say "- Don't forget: edit .rvmrc, config/{routes.rb, deploy.rb}, .git/config, delete \n"
|
data/inline_forms.gemspec
CHANGED
|
@@ -23,12 +23,7 @@ Gem::Specification.new do |s|
|
|
|
23
23
|
s.add_dependency('rvm')
|
|
24
24
|
s.add_dependency('thor')
|
|
25
25
|
s.add_dependency('validation_hints')
|
|
26
|
-
s.add_dependency('rails', '
|
|
26
|
+
s.add_dependency('rails', '6.1.3.1')
|
|
27
27
|
s.add_dependency('rails-i18n')
|
|
28
28
|
|
|
29
|
-
s.add_development_dependency(%q<rspec-rails>)
|
|
30
|
-
s.add_development_dependency(%q<shoulda>)
|
|
31
|
-
s.add_development_dependency(%q<bundler>)
|
|
32
|
-
s.add_development_dependency(%q<jeweler>)
|
|
33
|
-
|
|
34
29
|
end
|
data/{app/assets/javascripts/inline_forms → lib/generators/assets/javascripts}/ckeditor/config.js
RENAMED
|
File without changes
|
data/lib/inline_forms.rb
CHANGED
|
@@ -139,7 +139,8 @@ module InlineForms
|
|
|
139
139
|
class Engine < Rails::Engine
|
|
140
140
|
|
|
141
141
|
initializer "inline_forms.assets.precompile" do |app|
|
|
142
|
-
app.config.assets.precompile += %w(
|
|
142
|
+
app.config.assets.precompile += %w(
|
|
143
|
+
inline_forms/inline_forms.css
|
|
143
144
|
inline_forms/devise.css
|
|
144
145
|
inline_forms/inline_forms.js
|
|
145
146
|
inline_forms/ckeditor/config.js
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inline_forms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.
|
|
4
|
+
version: 6.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ace Suares
|
|
@@ -10,132 +10,76 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2021-
|
|
13
|
+
date: 2021-08-06 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rvm
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
requirements:
|
|
19
|
-
- -
|
|
19
|
+
- - ">="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '0'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
|
-
- -
|
|
26
|
+
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
28
|
version: '0'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: thor
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
|
-
- -
|
|
33
|
+
- - ">="
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
35
|
version: '0'
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
|
-
- -
|
|
40
|
+
- - ">="
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
42
|
version: '0'
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: validation_hints
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- -
|
|
47
|
+
- - ">="
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
49
|
version: '0'
|
|
50
50
|
type: :runtime
|
|
51
51
|
prerelease: false
|
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
|
54
|
-
- -
|
|
54
|
+
- - ">="
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
56
|
version: '0'
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: rails
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
|
-
- - '
|
|
61
|
+
- - '='
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version:
|
|
63
|
+
version: 6.1.3.1
|
|
64
64
|
type: :runtime
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
|
-
- - '
|
|
68
|
+
- - '='
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version:
|
|
70
|
+
version: 6.1.3.1
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: rails-i18n
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
|
-
- -
|
|
75
|
+
- - ">="
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
77
|
version: '0'
|
|
78
78
|
type: :runtime
|
|
79
79
|
prerelease: false
|
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
|
82
|
-
- -
|
|
83
|
-
- !ruby/object:Gem::Version
|
|
84
|
-
version: '0'
|
|
85
|
-
- !ruby/object:Gem::Dependency
|
|
86
|
-
name: rspec-rails
|
|
87
|
-
requirement: !ruby/object:Gem::Requirement
|
|
88
|
-
requirements:
|
|
89
|
-
- - '>='
|
|
90
|
-
- !ruby/object:Gem::Version
|
|
91
|
-
version: '0'
|
|
92
|
-
type: :development
|
|
93
|
-
prerelease: false
|
|
94
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
95
|
-
requirements:
|
|
96
|
-
- - '>='
|
|
97
|
-
- !ruby/object:Gem::Version
|
|
98
|
-
version: '0'
|
|
99
|
-
- !ruby/object:Gem::Dependency
|
|
100
|
-
name: shoulda
|
|
101
|
-
requirement: !ruby/object:Gem::Requirement
|
|
102
|
-
requirements:
|
|
103
|
-
- - '>='
|
|
104
|
-
- !ruby/object:Gem::Version
|
|
105
|
-
version: '0'
|
|
106
|
-
type: :development
|
|
107
|
-
prerelease: false
|
|
108
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
109
|
-
requirements:
|
|
110
|
-
- - '>='
|
|
111
|
-
- !ruby/object:Gem::Version
|
|
112
|
-
version: '0'
|
|
113
|
-
- !ruby/object:Gem::Dependency
|
|
114
|
-
name: bundler
|
|
115
|
-
requirement: !ruby/object:Gem::Requirement
|
|
116
|
-
requirements:
|
|
117
|
-
- - '>='
|
|
118
|
-
- !ruby/object:Gem::Version
|
|
119
|
-
version: '0'
|
|
120
|
-
type: :development
|
|
121
|
-
prerelease: false
|
|
122
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
123
|
-
requirements:
|
|
124
|
-
- - '>='
|
|
125
|
-
- !ruby/object:Gem::Version
|
|
126
|
-
version: '0'
|
|
127
|
-
- !ruby/object:Gem::Dependency
|
|
128
|
-
name: jeweler
|
|
129
|
-
requirement: !ruby/object:Gem::Requirement
|
|
130
|
-
requirements:
|
|
131
|
-
- - '>='
|
|
132
|
-
- !ruby/object:Gem::Version
|
|
133
|
-
version: '0'
|
|
134
|
-
type: :development
|
|
135
|
-
prerelease: false
|
|
136
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
137
|
-
requirements:
|
|
138
|
-
- - '>='
|
|
82
|
+
- - ">="
|
|
139
83
|
- !ruby/object:Gem::Version
|
|
140
84
|
version: '0'
|
|
141
85
|
description: Inline Forms aims to ease the setup of forms that provide inline editing.
|
|
@@ -149,15 +93,13 @@ executables:
|
|
|
149
93
|
extensions: []
|
|
150
94
|
extra_rdoc_files: []
|
|
151
95
|
files:
|
|
152
|
-
- .document
|
|
153
|
-
- .gitignore
|
|
154
|
-
- .vscode/settings.json
|
|
96
|
+
- ".document"
|
|
97
|
+
- ".gitignore"
|
|
155
98
|
- Gemfile
|
|
156
99
|
- LICENSE.txt
|
|
157
100
|
- README.rdoc
|
|
158
101
|
- Rakefile
|
|
159
102
|
- app/assets/images/inline_forms/glass_plate.gif
|
|
160
|
-
- app/assets/javascripts/inline_forms/ckeditor/config.js
|
|
161
103
|
- app/assets/javascripts/inline_forms/inline_forms.js
|
|
162
104
|
- app/assets/stylesheets/inline_forms/devise.scss
|
|
163
105
|
- app/assets/stylesheets/inline_forms/foundation_and_overrides.scss
|
|
@@ -261,12 +203,11 @@ files:
|
|
|
261
203
|
- bin/inline_forms_installer_core.rb
|
|
262
204
|
- inline_forms.gemspec
|
|
263
205
|
- lib/generators/USAGE
|
|
206
|
+
- lib/generators/assets/javascripts/ckeditor/config.js
|
|
264
207
|
- lib/generators/assets/stylesheets/inline_forms.scss
|
|
265
208
|
- lib/generators/assets/stylesheets/inline_forms_devise.css
|
|
266
209
|
- lib/generators/inline_forms_generator.rb
|
|
267
210
|
- lib/generators/templates/_inline_forms_tabs.html.erb
|
|
268
|
-
- lib/generators/templates/abstract_mysql2_adapter.rb
|
|
269
|
-
- lib/generators/templates/application.yml.blank
|
|
270
211
|
- lib/generators/templates/application_record.rb
|
|
271
212
|
- lib/generators/templates/capistrano/Capfile
|
|
272
213
|
- lib/generators/templates/capistrano/deploy.rb
|
|
@@ -274,7 +215,6 @@ files:
|
|
|
274
215
|
- lib/generators/templates/controller.erb
|
|
275
216
|
- lib/generators/templates/migration.erb
|
|
276
217
|
- lib/generators/templates/model.erb
|
|
277
|
-
- lib/generators/templates/paper_trail.rb
|
|
278
218
|
- lib/generators/templates/test.erb
|
|
279
219
|
- lib/generators/templates/unicorn/production.rb
|
|
280
220
|
- lib/inline_forms.rb
|
|
@@ -283,9 +223,6 @@ files:
|
|
|
283
223
|
- lib/locales/inline_forms.nl.yml
|
|
284
224
|
- lib/otherstuff/20120310065554_inline_forms_create_view_for_translations.rb
|
|
285
225
|
- lib/otherstuff/add_roles.sql
|
|
286
|
-
- lib/otherstuff/bump
|
|
287
|
-
- lib/otherstuff/diffie
|
|
288
|
-
- lib/otherstuff/fixtures/rails.png
|
|
289
226
|
- lib/otherstuff/mkiftrans
|
|
290
227
|
- lib/otherstuff/mkrole
|
|
291
228
|
- lib/otherstuff/roles_users.sql
|
|
@@ -300,17 +237,16 @@ require_paths:
|
|
|
300
237
|
- lib
|
|
301
238
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
302
239
|
requirements:
|
|
303
|
-
- -
|
|
240
|
+
- - ">="
|
|
304
241
|
- !ruby/object:Gem::Version
|
|
305
242
|
version: '0'
|
|
306
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
244
|
requirements:
|
|
308
|
-
- -
|
|
245
|
+
- - ">="
|
|
309
246
|
- !ruby/object:Gem::Version
|
|
310
247
|
version: '0'
|
|
311
248
|
requirements: []
|
|
312
|
-
|
|
313
|
-
rubygems_version: 2.6.14
|
|
249
|
+
rubygems_version: 3.1.4
|
|
314
250
|
signing_key:
|
|
315
251
|
specification_version: 4
|
|
316
252
|
summary: Inline editing of forms.
|
data/.vscode/settings.json
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
DEVISE_SECRET_KEY:
|
|
2
|
-
SECRET_TOKEN:
|
|
3
|
-
|
|
4
|
-
DEPLOY_USER:
|
|
5
|
-
DEPLOY_HOST:
|
|
6
|
-
DEPLOY_APPLICATION:
|
|
7
|
-
DEPLOY_REPO_URL:
|
|
8
|
-
DEPLOY_DIRECTORY:
|
|
9
|
-
|
|
10
|
-
development:
|
|
11
|
-
ACTION_MAILER_SMTP_SETTINGS_ADDRESS:
|
|
12
|
-
ACTION_MAILER_SMTP_SETTINGS_PASSWORD:
|
|
13
|
-
ACTION_MAILER_SMTP_SETTINGS_USERNAME:
|
|
14
|
-
|
|
15
|
-
DATABASE_NAME:
|
|
16
|
-
DATABASE_USER:
|
|
17
|
-
DATABASE_PASSWORD:
|
|
18
|
-
|
|
19
|
-
FACEBOOK_APP_ID:
|
|
20
|
-
FACEBOOK_APP_SECRET:
|
|
21
|
-
|
|
22
|
-
GITHUB_CLIENT_ID:
|
|
23
|
-
GITHUB_CLIENT_SECRET:
|
|
24
|
-
|
|
25
|
-
SECRET_KEY_BASE:
|
|
26
|
-
|
|
27
|
-
production:
|
|
28
|
-
ACTION_MAILER_SMTP_SETTINGS_ADDRESS:
|
|
29
|
-
ACTION_MAILER_SMTP_SETTINGS_PASSWORD:
|
|
30
|
-
ACTION_MAILER_SMTP_SETTINGS_USERNAME:
|
|
31
|
-
|
|
32
|
-
DATABASE_NAME:
|
|
33
|
-
DATABASE_USER:
|
|
34
|
-
DATABASE_PASSWORD:
|
|
35
|
-
|
|
36
|
-
FACEBOOK_APP_ID:
|
|
37
|
-
FACEBOOK_APP_SECRET:
|
|
38
|
-
|
|
39
|
-
GITHUB_CLIENT_ID:
|
|
40
|
-
GITHUB_CLIENT_SECRET:
|
|
41
|
-
|
|
42
|
-
SECRET_KEY_BASE:
|
|
43
|
-
|
|
44
|
-
test:
|
|
45
|
-
ACTION_MAILER_SMTP_SETTINGS_ADDRESS:
|
|
46
|
-
ACTION_MAILER_SMTP_SETTINGS_PASSWORD:
|
|
47
|
-
ACTION_MAILER_SMTP_SETTINGS_USERNAME:
|
|
48
|
-
|
|
49
|
-
DATABASE_NAME:
|
|
50
|
-
DATABASE_USER:
|
|
51
|
-
DATABASE_PASSWORD:
|
|
52
|
-
|
|
53
|
-
FACEBOOK_APP_ID:
|
|
54
|
-
FACEBOOK_APP_SECRET:
|
|
55
|
-
|
|
56
|
-
GITHUB_CLIENT_ID:
|
|
57
|
-
GITHUB_CLIENT_SECRET:
|
|
58
|
-
|
|
59
|
-
SECRET_KEY_BASE:
|
data/lib/otherstuff/bump
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
rule /^version:bump:.*/ do |t|
|
|
2
|
-
sh "git status | grep 'nothing to commit'" # ensure we are not dirty
|
|
3
|
-
index = ['major', 'minor','patch'].index(t.name.split(':').last)
|
|
4
|
-
file = 'lib/GEM_NAME/version.rb'
|
|
5
|
-
|
|
6
|
-
version_file = File.read(file)
|
|
7
|
-
old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
|
|
8
|
-
version_parts[index] = version_parts[index].to_i + 1
|
|
9
|
-
new_version = version_parts * '.'
|
|
10
|
-
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
|
|
11
|
-
|
|
12
|
-
sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
|
|
13
|
-
end
|
data/lib/otherstuff/diffie
DELETED
|
Binary file
|