inline_forms 6.2.1 → 6.2.2

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
- SHA256:
3
- metadata.gz: b280e63417aebf00d9254f8f565d46136cff645b9853d7e3e92091531583722f
4
- data.tar.gz: bfb39dbe69a962a7bbbe721625db46e397a1f99cbe168ad569b9942f20182499
2
+ SHA1:
3
+ metadata.gz: 9e19b3d82e6de0df43442bb214a4a86584883559
4
+ data.tar.gz: 8a27cd31703bff9ed2ebd766993f5385871c7ebf
5
5
  SHA512:
6
- metadata.gz: 352aad514005fa9092ea1519c1494df2761bfdfeb2b0ea286dc36c7889939d7458236970ca763cccc43a742157b1fff75ce17b4227293122b59015150c44fea1
7
- data.tar.gz: 99a34153380f2d246993f09f36813937c4a7c2348d631ee1f17e3680356c25b00d4bff0f719041d73e3b0ba9e27f163ffa6e46376d6467a362a39f23e03657f3
6
+ metadata.gz: 76aac0acc9134eb2c01c56deb8f31126411ceaa3d7dd83d67aeafe65eb89c2252ecadc5188e21089acae582867b74e75df9ed79bf6755d9f6e43d88ff8b0f266
7
+ data.tar.gz: a83a88d9941cc3d4d9a8303289088a14ca1e9ced0b4e144d15ece3de6f33dc6a11587711a19c2b2726b053a74040061c9cee6d43ff459d4289ad9efc8fcd7a9e
@@ -4,11 +4,6 @@ create_file 'Gemfile', "# created by inline_forms #{ENV['inline_forms_version']}
4
4
 
5
5
  add_source 'https://rubygems.org'
6
6
 
7
- # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
8
- #gem 'bootsnap', require: false
9
- #gem 'compass-rails'
10
- # gem 'modernizr-rails'
11
-
12
7
  gem 'cancancan'
13
8
  gem 'carrierwave'
14
9
  gem 'ckeditor', github: 'galetahub/ckeditor'
@@ -24,7 +19,7 @@ gem 'jquery-timepicker-rails'
24
19
  gem 'jquery-ui-sass-rails'
25
20
  gem 'mini_magick'
26
21
  gem 'mysql2'
27
- gem 'paper_trail'
22
+ gem 'paper_trail', git: 'https://github.com/acesuares/paper_trail.git'
28
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!
29
24
  gem 'rails-jquery-autocomplete'
30
25
  gem 'rails', '6.1.3.1'
@@ -76,19 +71,56 @@ else
76
71
  create_file "config/database.yml", <<-END_DATABASEYML.strip_heredoc
77
72
  development:
78
73
  adapter: mysql2
79
- database: <%= ENV["DATABASE_NAME"] %>
80
- username: <%= ENV["DATABASE_USER"] %>
81
- password: <%= ENV["DATABASE_PASSWORD"] %>
74
+ database: <%= Rails.application.credentials.development[:database] %>
75
+ username: <%= Rails.application.credentials.development[:username] %>
76
+ password: <%= Rails.application.credentials.development[:password] %>
82
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:
83
+ database: #{app_name.downcase}_dev
84
+ username: #{app_name.downcase}_dev_user
85
+ 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
+ database: #{app_name.downcase}_dev
95
+ username: #{app_name.downcase}_dev_user
96
+ password: #{app_name.downcase}_dev_password
97
+
98
+ or use 'rails credentials:edit' to change these values.\n\n", :red
99
+
83
100
  end
84
101
  append_file "config/database.yml", <<-END_DATABASEYML.strip_heredoc
85
102
  production:
86
103
  adapter: mysql2
87
- database: <%= ENV["DATABASE_NAME"] %>
88
- username: <%= ENV["DATABASE_USER"] %>
89
- password: <%= ENV["DATABASE_PASSWORD"] %>
104
+ database: <%= Rails.application.credentials.production[:database] %>
105
+ username: <%= Rails.application.credentials.production[:username] %>
106
+ password: <%= Rails.application.credentials.production[:password] %>
90
107
  END_DATABASEYML
91
108
 
109
+ say "Setting production database in credentials"
110
+ create_file "temp_production_database_credentials", <<-END_PROD_DB_CRED.strip_heredoc
111
+ production:
112
+ database: #{app_name.downcase}_prod
113
+ username: #{app_name.downcase}_prod_user
114
+ password:
115
+
116
+ END_PROD_DB_CRED
117
+
118
+ run "EDITOR='cat temp_production_database_credentials >> ' rails credentials:edit"
119
+
120
+ remove_file 'temp_production_database_credentials'
121
+
122
+ say "\n *** Please make sure to create a mysql production database and use 'rails credentials:edit' to set the password.\n\n", :red
123
+
92
124
  say "- Devise install..."
93
125
  run "bundle exec rails g devise:install"
94
126
 
@@ -291,12 +323,8 @@ copy_file File.join(GENERATOR_PATH, 'lib/generators/templates/application_record
291
323
  say "- Install ckeditor..."
292
324
  generate "ckeditor:install --orm=active_record --backend=carrierwave"
293
325
 
294
- # precompile config.js
295
- say "- Precompile ckeditor config.js"
296
- append_file "config/initializers/assets.rb", " Rails.application.config.assets.precompile += %w[ckeditor/config.js]\n"
297
-
298
326
  say "- Paper_trail install..."
299
- generate "paper_trail:install --with-changes"
327
+ generate "paper_trail:install --with-changes --with-mysql"
300
328
 
301
329
  # Create Translations
302
330
  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
@@ -357,6 +385,13 @@ create_file "app/helpers/application_helper.rb", <<-END_APPHELPER.strip_heredoc
357
385
  end
358
386
  END_APPHELPER
359
387
 
388
+ say "- Creating inline_forms initializer"
389
+ create_file "config/initializers/inline_forms.rb", <<-END_INITIALIZER.strip_heredoc
390
+ Rails.application.reloader.to_prepare do
391
+ MODEL_TABS = %w()
392
+ end
393
+ END_INITIALIZER
394
+
360
395
  say "- Recreating ApplicationController to add devise, cancan, I18n stuff..."
361
396
  remove_file "app/controllers/application_controller.rb" # the one that 'rails new' created
362
397
  create_file "app/controllers/application_controller.rb", <<-END_APPCONTROLLER.strip_heredoc
@@ -379,8 +414,6 @@ create_file "app/controllers/application_controller.rb", <<-END_APPCONTROLLER.st
379
414
  end
380
415
  # Comment previous lines if you don't want Devise authentication
381
416
 
382
- #ActionView::CompiledTemplates::MODEL_TABS = %w()
383
-
384
417
  # Uncomment next line if you want I18n (based on subdomain)
385
418
  # before_action :set_locale
386
419
 
@@ -425,10 +458,6 @@ create_file "app/models/ability.rb", <<-END_ABILITY.strip_heredoc
425
458
  end
426
459
  END_ABILITY
427
460
 
428
- # precompile devise.css
429
- say "- Precompile devise.css"
430
- append_file "config/initializers/assets.rb", " Rails.application.config.assets.precompile += %w( inline_forms_devise.css )\n"
431
-
432
461
  # devise mailer stuff
433
462
  say "- Injecting devise mailer stuff in environments/production.rb..."
434
463
  # strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
@@ -477,44 +506,25 @@ copy_file File.join(GENERATOR_PATH,'lib/generators/templates/unicorn/production.
477
506
 
478
507
  # Git
479
508
  say "- adding and committing to git..."
480
- # run 'git init' # this is already done by rails!
481
509
 
482
- run 'git add .'
483
- run 'git commit -a -m " * Initial"'
510
+ git add: "."
511
+ git commit: " -a -m 'Initial Commit'"
484
512
 
485
513
  # example
486
514
  if ENV['install_example'] == 'true'
487
515
  say "\nInstalling example application..."
488
- 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
516
+ run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:ckeditor apartment:belongs_to _presentation:\'#{name}\''
489
517
  run 'bundle exec rails generate uploader Image'
490
- 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
518
+ run 'bundle exec rails g inline_forms Apartment name:string title:string description:ckeditor photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\''
491
519
  run 'bundle exec rake db:migrate'
492
- say '-Adding example test'
493
- create_file "spec/models/#{app_name}_example.rb", <<-END_EXAMPLE_TEST.strip_heredoc
494
- require "spec_helper"
495
- describe Apartment do
496
- it "insert an appartment and retrieve it" do
497
- appartment_data = create(:apartment)
498
- first = Apartment.first.id
499
- expect(Apartment.first.id).to eq(first)
500
- end
501
- end
502
- END_EXAMPLE_TEST
503
520
 
504
- #run "rspec" if ENV['runtest']
505
521
  remove_file 'public/index.html'
522
+
506
523
  route "root :to => 'apartments#index'"
507
524
 
508
- # done!
509
525
  say "\nDone! Now point your browser to http://localhost:3000", :yellow
510
526
  say "\nPress ctlr-C to quit...", :yellow
511
527
  run 'bundle exec rails s'
512
- else
513
- # run tests
514
- #run "rspec" if ENV['runtest']
515
- say "- Don't forget: add your secret key base in config/application.yml \n"
516
528
  end
517
529
  # done!
518
530
  say "\nDone! Now make your tables with 'bundle exec rails g inline_forms ...", :yellow
519
-
520
- #say "- Don't forget: edit .rvmrc, config/{routes.rb, deploy.rb}, .git/config, delete \n"
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.2.1"
3
+ VERSION = "6.2.2"
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.2.1
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares
@@ -10,48 +10,48 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-04-11 00:00:00.000000000 Z
13
+ date: 2021-04-12 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
@@ -72,14 +72,14 @@ dependencies:
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
- - - ">="
82
+ - - '>='
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  description: Inline Forms aims to ease the setup of forms that provide inline editing.
@@ -93,9 +93,8 @@ executables:
93
93
  extensions: []
94
94
  extra_rdoc_files: []
95
95
  files:
96
- - ".document"
97
- - ".gitignore"
98
- - ".vscode/settings.json"
96
+ - .document
97
+ - .gitignore
99
98
  - Gemfile
100
99
  - LICENSE.txt
101
100
  - README.rdoc
@@ -238,16 +237,17 @@ require_paths:
238
237
  - lib
239
238
  required_ruby_version: !ruby/object:Gem::Requirement
240
239
  requirements:
241
- - - ">="
240
+ - - '>='
242
241
  - !ruby/object:Gem::Version
243
242
  version: '0'
244
243
  required_rubygems_version: !ruby/object:Gem::Requirement
245
244
  requirements:
246
- - - ">="
245
+ - - '>='
247
246
  - !ruby/object:Gem::Version
248
247
  version: '0'
249
248
  requirements: []
250
- rubygems_version: 3.2.5
249
+ rubyforge_project: inline_forms
250
+ rubygems_version: 2.6.14
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Inline editing of forms.