inline_forms 6.1.0 → 6.2.3

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: 169ab894a2c055a03e9983a22dfa213b5a8652802b0275a00cc331383051e463
4
- data.tar.gz: 3c8ef4b8dcd3d786f3faa0cc689b5c506415736049fe3215398e173211ea1699
3
+ metadata.gz: f48aa1b89fe880b19beb6d406899df02eee17b8d3e983bf178191d0df55a5b31
4
+ data.tar.gz: 3a809751b43e2c28e2540755d1129e28ef94ae45e8dc58e6b262020e6f184111
5
5
  SHA512:
6
- metadata.gz: cfc1950838796ad809ed0a3dc4dfc858cdb067b0fea0fada79ee1ac3c5ac1f60690eb1d19dcd1dc2d1a24d45bb12b5d41e35ffc42261d46e4a43a2aa8b3cb6af
7
- data.tar.gz: 1ecda9c9be6c4fa99ace420def18b0c88bc26279d56816a60d503cfbdf0e2f6d5b48203c2441810405c120fc93e53c3302971a8e857e465934992c8f9863cc24
6
+ metadata.gz: 0df25af0155983aabef89dec1d79beff5847fff623bdde5638d58c36dbf0ac31f03e7a6a1ef21fbd2011692f1784d93ec0e4255e619619200059bcb7556c0a9b
7
+ data.tar.gz: aacb19a78f02779eb3f0c6483d0291414f63d7edb31a88f4d54d3985cc34a95900362060b44c7d30f4ec36a4aef98ec1de23a11255431f09a5633c1577b862d2
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Ace Suares
1
+ Copyright (c) 2011 - 2021 Ace Suares
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -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
- raw out
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
 
@@ -44,11 +44,14 @@
44
44
  <div class="small-1 column">
45
45
  <%= version.event -%>
46
46
  </div>
47
+ <div class="small-2 column">
48
+ <%= version.created_at -%>
49
+ </div>
47
50
  <div class="small-2 column">
48
51
  <%= version_modified_by version.whodunnit -%>
49
52
  </div>
50
- <div class="small-8 column">
51
- <% if version.changeset.empty? %>
53
+ <div class="small-6 column">
54
+ <% if version.changeset.nil? || version.changeset.empty? %>
52
55
  <em>empty</em>
53
56
  <% else %>
54
57
  <% version.changeset.each do |attribute, value| %>
@@ -13,5 +13,6 @@
13
13
  <body>
14
14
  <%= yield %>
15
15
  <%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
16
+ <%= javascript_include_tag Ckeditor.cdn_url %>
16
17
  </body>
17
18
  </html>
@@ -16,5 +16,6 @@
16
16
  <%= yield %>
17
17
  </div>
18
18
  <%= javascript_include_tag 'inline_forms/inline_forms', 'data-turbolinks-track' => true %>
19
+ <%= javascript_include_tag Ckeditor.cdn_url %>
19
20
  </body>
20
21
  </html>
@@ -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', '~> 2.0'
7
+ gem 'cancancan'
8
8
  gem 'carrierwave'
9
- gem 'ckeditor', git: 'https://github.com/galetahub/ckeditor'
10
- #gem 'bootsnap', require: false
9
+ gem 'ckeditor', github: 'galetahub/ckeditor'
11
10
  gem 'coffee-rails'
12
- #gem 'compass-rails'
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: 'https://github.com/acesuares/i18n-active_record.git'
18
- gem 'inline_forms', '>=5'
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', '~> 5.2.1'
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 'rspec-rails'
45
- gem 'rspec'
46
- gem 'seed_dump', git: 'https://github.com/acesuares/seed_dump.git'
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
- gem 'capistrano', '~> 3.6', require: false
52
- gem 'capistrano-rails', '~> 1.3', require: false
53
- gem 'capistrano-bundler', '~> 1.3', require: false
54
- gem 'rvm1-capistrano3', require: false
55
- gem "capistrano3-unicorn"
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: <%= ENV["DATABASE_NAME"] %>
78
- username: <%= ENV["DATABASE_USER"] %>
79
- password: <%= ENV["DATABASE_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: <%= ENV["DATABASE_NAME"] %>
86
- username: <%= ENV["DATABASE_USER"] %>
87
- password: <%= ENV["DATABASE_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 "- Add rails 5.2 defaults to application.rb..."
91
- gsub_file "config/application.rb", /6\.0/, '5.2'
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,12 @@ 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 "- Add ckeditor autoload_paths to application.rb..."
296
- application "config.autoload_paths += %W(\#{config.root}/app/models/ckeditor)"
297
-
298
- # see https://github.com/galetahub/ckeditor/issues/579
299
- #say "- Set languages for ckeditor to ['en', 'nl'] in config/initializers/ckeditor.rb..."
300
- #insert_into_file "config/initializers/ckeditor.rb", " config.assets_languages = ['en', 'nl']\n", :after => "config.assets_languages = ['en', 'uk']\n"
327
+ say "- Add ckeditor/config.js to precompile assets..."
328
+ append_to_file 'config/initializers/assets.rb',
329
+ 'Rails.application.config.assets.precompile += %w[ckeditor/config.js]'
301
330
 
302
331
  say "- Paper_trail install..."
303
- generate "paper_trail:install --with-changes"
332
+ generate "paper_trail:install --with-changes --with-mysql"
304
333
 
305
334
  # Create Translations
306
335
  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 +390,34 @@ create_file "app/helpers/application_helper.rb", <<-END_APPHELPER.strip_heredoc
361
390
  end
362
391
  END_APPHELPER
363
392
 
393
+ say "- Creating inline_forms initializer"
394
+ create_file "config/initializers/inline_forms.rb", <<-END_INITIALIZER.strip_heredoc
395
+ Rails.application.reloader.to_prepare do
396
+ MODEL_TABS = %w()
397
+ end
398
+ END_INITIALIZER
399
+
364
400
  say "- Recreating ApplicationController to add devise, cancan, I18n stuff..."
365
401
  remove_file "app/controllers/application_controller.rb" # the one that 'rails new' created
366
402
  create_file "app/controllers/application_controller.rb", <<-END_APPCONTROLLER.strip_heredoc
367
403
  class ApplicationController < InlineFormsApplicationController
368
404
  protect_from_forgery
369
405
 
370
- # Comment next line if you don't want Devise authentication
371
- before_action :authenticate_user!
406
+ # add whodunnit
407
+ before_action :set_paper_trail_whodunnit
372
408
 
373
- # Comment next 6 lines if you do not want CanCan authorization
409
+ # Comment next lines if you don't want Devise authentication
410
+ before_action :authenticate_user!
374
411
  check_authorization unless: :devise_controller?
375
412
 
376
413
  rescue_from CanCan::AccessDenied do |exception|
377
- redirect_to root_path, alert: exception.message
414
+ respond_to do |format|
415
+ format.json { head :forbidden, content_type: 'text/html' }
416
+ format.html { redirect_to main_app.root_url, notice: exception.message }
417
+ format.js { head :forbidden, content_type: 'text/html' }
418
+ end
378
419
  end
379
-
380
- ActionView::CompiledTemplates::MODEL_TABS = %w()
420
+ # Comment previous lines if you don't want Devise authentication
381
421
 
382
422
  # Uncomment next line if you want I18n (based on subdomain)
383
423
  # before_action :set_locale
@@ -423,108 +463,69 @@ create_file "app/models/ability.rb", <<-END_ABILITY.strip_heredoc
423
463
  end
424
464
  END_ABILITY
425
465
 
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
466
  # devise mailer stuff
498
467
  say "- Injecting devise mailer stuff in environments/production.rb..."
499
468
  # strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
500
- insert_into_file "config/environments/production.rb", <<-DEVISE_MAILER_STUFF.strip_heredoc, :before => "end\n"
469
+ insert_into_file "config/environments/production.rb", <<-DEVISE_MAILER_PROD_STUFF.strip_heredoc, :before => "end\n"
501
470
 
502
471
  # for devise
503
- config.action_mailer.default_url_options = { protocol: 'https', host: 'YOURHOSTNAME' }
472
+ config.action_mailer.default_url_options = { protocol: 'https', host: Rails.application.credentials[:smtp_app_host] }
504
473
  config.action_mailer.delivery_method = :smtp
505
474
  config.action_mailer.smtp_settings = {
506
- address: 'YOURMAILSERVER',
475
+ address: Rails.application.credentials[:smtp_host],
507
476
  enable_starttls_auto: true,
508
- password: 'YOURPASSWORD',
509
- user_name: 'YOURUSERNAME'
477
+ password: Rails.application.credentials[:smtp_password] ,
478
+ user_name: Rails.application.credentials[:smtp_username]
510
479
  }
511
480
 
512
- DEVISE_MAILER_STUFF
481
+ DEVISE_MAILER_PROD_STUFF
482
+
483
+ say "Setting production smtp settings in credentials"
484
+ create_file "temp_production_smtp_credentials", <<-END_PROD_SMTP_CRED.strip_heredoc
485
+
486
+ # devise mailer stuff for production:
487
+ smtp_app_host: APP_HOST
488
+ smtp_host: SMTP_HOST
489
+ smtp_username: USERNAME
490
+ smtp_password: PASSWORD
491
+
492
+ END_PROD_SMTP_CRED
493
+
494
+ run "EDITOR='cat temp_production_smtp_credentials >> ' rails credentials:edit --environment production"
495
+
496
+ remove_file 'temp_production_smtp_credentials'
513
497
 
514
498
  say "- Injecting devise mailer stuff in environments/development.rb..."
515
499
  # strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
516
- insert_into_file "config/environments/development.rb", <<-DEVISE_MAILER_STUFF.strip_heredoc, :before => "\nend\n"
500
+ insert_into_file "config/environments/development.rb", <<-DEVISE_MAILER_DEV_STUFF.strip_heredoc, :before => "\nend\n"
517
501
  # for devise
518
502
  config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost', port: 3000 }
519
503
  config.action_mailer.delivery_method = :smtp
520
504
  config.action_mailer.smtp_settings = {
521
- address: 'YOURMAILSERVER',
505
+ address: Rails.application.credentials[:smtp_host],
522
506
  enable_starttls_auto: true,
523
- password: 'YOURPASSWORD',
524
- user_name: 'YOURUSERNAME'
507
+ password: Rails.application.credentials[:smtp_password] ,
508
+ user_name: Rails.application.credentials[:smtp_username]
525
509
  }
526
510
 
527
- DEVISE_MAILER_STUFF
511
+ DEVISE_MAILER_DEV_STUFF
512
+
513
+ say "Setting development smtp settings in credentials"
514
+ create_file "temp_development_smtp_credentials", <<-END_DEV_SMTP_CRED.strip_heredoc
515
+
516
+ # devise mailers stuff for development:
517
+ smtp_app_host: APP_HOST
518
+ smtp_host: SMTP_HOST
519
+ smtp_username: USERNAME
520
+ smtp_password: PASSWORD
521
+
522
+ END_DEV_SMTP_CRED
523
+
524
+ run "EDITOR='cat temp_development_smtp_credentials >> ' rails credentials:edit"
525
+
526
+ remove_file 'temp_development_smtp_credentials'
527
+
528
+
528
529
 
529
530
  # capify
530
531
  say "- Capify..."
@@ -540,73 +541,27 @@ copy_file File.join(GENERATOR_PATH,'lib/generators/templates/capistrano/Capfile'
540
541
  say "- Unicorn Config..."
541
542
  copy_file File.join(GENERATOR_PATH,'lib/generators/templates/unicorn/production.rb'), "config/unicorn/production.rb"
542
543
 
543
-
544
544
  # Git
545
- say "- Initializing git..."
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)}
545
+ say "- adding and committing to git..."
566
546
 
567
- test:
568
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
569
-
570
- production:
571
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
572
- END_SECRETS_YML
573
-
574
- run 'git add .'
575
- run 'git commit -a -m " * Initial"'
547
+ git add: "."
548
+ git commit: " -a -m 'Initial Commit'"
576
549
 
577
550
  # example
578
551
  if ENV['install_example'] == 'true'
579
552
  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}\'' # FIXME temporary changed because ckeditor is playing dirty
553
+ run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:ckeditor apartment:belongs_to _presentation:\'#{name}\''
581
554
  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}\'' # FIXME temporary changed because ckeditor is playing dirty
555
+ run 'bundle exec rails g inline_forms Apartment name:string title:string description:ckeditor photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\''
583
556
  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
557
 
596
- #run "rspec" if ENV['runtest']
597
558
  remove_file 'public/index.html'
559
+
598
560
  route "root :to => 'apartments#index'"
599
561
 
600
- # done!
601
562
  say "\nDone! Now point your browser to http://localhost:3000", :yellow
602
563
  say "\nPress ctlr-C to quit...", :yellow
603
564
  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
565
  end
609
566
  # done!
610
567
  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', '>= 6.0')
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
@@ -1,8 +1,3 @@
1
- # Load ENV vars via Figaro
2
- require 'figaro'
3
- Figaro.application = Figaro::Application.new(environment: 'production', path: File.expand_path('../config/application.yml', __FILE__))
4
- Figaro.load
5
-
6
1
  # Load DSL and set up stages
7
2
  require "capistrano/setup"
8
3
 
@@ -1,4 +1,4 @@
1
- class InlineFormsCreate<%= table_name.camelize %> < ActiveRecord::Migration[5.0]
1
+ class InlineFormsCreate<%= table_name.camelize %> < ActiveRecord::Migration[6.1]
2
2
 
3
3
  def self.up
4
4
  create_table :<%= table_name + @primary_key_option %> do |t|
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( inline_forms/inline_forms.scss
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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "6.1.0"
3
+ VERSION = "6.2.3"
4
4
  end
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.1.0
4
+ version: 6.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-07-05 00:00:00.000000000 Z
13
+ date: 2021-08-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rvm
@@ -58,16 +58,16 @@ dependencies:
58
58
  name: rails
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ">="
61
+ - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: '6.0'
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: '6.0'
70
+ version: 6.1.3.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rails-i18n
73
73
  requirement: !ruby/object:Gem::Requirement
@@ -82,62 +82,6 @@ dependencies:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
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
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: '0'
141
85
  description: Inline Forms aims to ease the setup of forms that provide inline editing.
142
86
  The field list can be specified in the model.
143
87
  email:
@@ -151,7 +95,6 @@ extra_rdoc_files: []
151
95
  files:
152
96
  - ".document"
153
97
  - ".gitignore"
154
- - ".vscode/settings.json"
155
98
  - Gemfile
156
99
  - LICENSE.txt
157
100
  - README.rdoc
@@ -265,8 +208,6 @@ files:
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
@@ -309,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
246
  - !ruby/object:Gem::Version
310
247
  version: '0'
311
248
  requirements: []
312
- rubygems_version: 3.0.1
249
+ rubygems_version: 3.2.3
313
250
  signing_key:
314
251
  specification_version: 4
315
252
  summary: Inline editing of forms.
@@ -1,3 +0,0 @@
1
- // Place your settings in this file to overwrite default and user settings.
2
- {
3
- }
@@ -1,3 +0,0 @@
1
- class ActiveRecord::ConnectionAdapters::Mysql2Adapter
2
- NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY"
3
- end
@@ -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:
@@ -1,7 +0,0 @@
1
- PaperTrail.config.track_associations = false
2
-
3
- PaperTrail::Version.class_eval do
4
- def author
5
- User.find(whodunnit) if whodunnit
6
- end
7
- end
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
@@ -1,2 +0,0 @@
1
- diff -ru /var/lib/gems/1.8/gems/inline_forms-0.9.16 inline_forms|grep ^diff -ru|sed "s/ inline_/ > inline_/"|sed "s/^diff -ru/cat/" > mkup
2
-
Binary file