inline_forms 2.0 → 2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,7 +90,7 @@ module InlineForms
90
90
  if dry_run?
91
91
  empty_directory(app_name)
92
92
  else
93
- if ! run("rails _3.2.12_ new #{app_name} --skip-bundle --skip-gemfile --skip-test-unit")
93
+ if ! run("rails new #{app_name} --skip-bundle --skip-gemfile --skip-test-unit")
94
94
  say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red
95
95
  exit 1
96
96
  end
@@ -207,7 +207,7 @@ module InlineForms
207
207
  ROUTE
208
208
 
209
209
  say "- Mount Ckeditor::Engine to routes..."
210
- insert_into_file "#{app_name}/config/routes.rb", 'mount Ckeditor::Engine => "/ckeditor"'
210
+ insert_into_file "#{app_name}/config/routes.rb", "\nmount Ckeditor::Engine => \"/ckeditor\"\n", :after => "routes.draw do\n"
211
211
 
212
212
  say "- Create User Controller..."
213
213
  create_file "#{app_name}/app/controllers/users_controller.rb", <<-USERS_CONTROLLER.strip_heredoc_with_indent
@@ -452,15 +452,10 @@ module InlineForms
452
452
  DEVISE_MAILER_STUFF
453
453
 
454
454
  say "- Setting autoload paths for ckeditor..."
455
- insert_into_file "#{app_name}/config/application.rb", ' config.autoload_paths += %W(#{config.root}/app/models/ckeditor)\n', :after => "modules you want to be autoloadable.\n" unless dry_run?
455
+ insert_into_file "#{app_name}/config/application.rb", ' config.autoload_paths += %W(#{config.root}/app/models/ckeditor)' + "\n", :after => "modules you want to be autoloadable.\n" unless dry_run?
456
456
 
457
- create_file "#{app_name}/config/initializers/ckeditor.rb" unless dry_run?
458
- insert_into_file "#{app_name}/config/initializers/ckeditor.rb", <<-CKEDITOR_INITIALIZER_FOR_CANCAN.strip_heredoc_with_indent(2)
459
- Ckeditor.setup do |config|
460
- config.authorize_with :cancan
461
- end
462
-
463
- CKEDITOR_INITIALIZER_FOR_CANCAN
457
+ say "- Adding cancan authorization to ckeditor"
458
+ gsub_file "#{app_name}/config/initializers/ckeditor.rb", "# config.authorize_with :cancan", "config.authorize_with :cancan"
464
459
 
465
460
  say "- Capify..."
466
461
  run 'capify .'
@@ -5,70 +5,69 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
5
5
 
6
6
  CKEDITOR.editorConfig = function( config )
7
7
  {
8
- // Define changes to default configuration here. For example:
9
- // config.language = 'fr';
10
- // config.uiColor = '#AADC6E';
8
+ // Define changes to default configuration here. For example:
9
+ // config.language = 'fr';
10
+ // config.uiColor = '#AADC6E';
11
11
 
12
- /* Filebrowser routes */
13
- // The location of an external file browser, that should be launched when "Browse Server" button is pressed.
14
- config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
12
+ /* Filebrowser routes */
13
+ // The location of an external file browser, that should be launched when "Browse Server" button is pressed.
14
+ config.filebrowserBrowseUrl = "/ckeditor/attachment_files";
15
15
 
16
- // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
17
- config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
16
+ // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Flash dialog.
17
+ config.filebrowserFlashBrowseUrl = "/ckeditor/attachment_files";
18
18
 
19
- // The location of a script that handles file uploads in the Flash dialog.
20
- config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
19
+ // The location of a script that handles file uploads in the Flash dialog.
20
+ config.filebrowserFlashUploadUrl = "/ckeditor/attachment_files";
21
21
 
22
- // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
23
- config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
22
+ // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Link tab of Image dialog.
23
+ config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
24
24
 
25
- // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
26
- config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
25
+ // The location of an external file browser, that should be launched when "Browse Server" button is pressed in the Image dialog.
26
+ config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
27
27
 
28
- // The location of a script that handles file uploads in the Image dialog.
29
- config.filebrowserImageUploadUrl = "/ckeditor/pictures";
28
+ // The location of a script that handles file uploads in the Image dialog.
29
+ config.filebrowserImageUploadUrl = "/ckeditor/pictures";
30
30
 
31
- // The location of a script that handles file uploads.
32
- config.filebrowserUploadUrl = "/ckeditor/attachment_files";
31
+ // The location of a script that handles file uploads.
32
+ config.filebrowserUploadUrl = "/ckeditor/attachment_files";
33
33
 
34
- // Rails CSRF token
35
- config.filebrowserParams = function(){
36
- var csrf_token = $('meta[name=csrf-token]').attr('content'),
34
+ // Rails CSRF token
35
+ config.filebrowserParams = function(){
36
+ var csrf_token = $('meta[name=csrf-token]').attr('content'),
37
37
  csrf_param = $('meta[name=csrf-param]').attr('content'),
38
38
  params = new Object();
39
39
 
40
- if (csrf_param !== undefined && csrf_token !== undefined) {
41
- params[csrf_param] = csrf_token;
42
- }
40
+ if (csrf_param !== undefined && csrf_token !== undefined) {
41
+ params[csrf_param] = csrf_token;
42
+ }
43
43
 
44
- return params;
45
- };
44
+ return params;
45
+ };
46
46
 
47
- /* Extra plugins */
48
- // works only with en, ru, uk locales
49
- config.extraPlugins = "embed,attachment";
47
+ /* Extra plugins */
48
+ // works only with en, ru, uk locales
49
+ // config.extraPlugins = "embed,attachment";
50
50
 
51
- config.height = '400px';
52
- config.width = '600px';
51
+ config.height = 400;
52
+ config.width = 600;
53
53
 
54
54
 
55
55
 
56
56
  config.language = 'nl';
57
57
 
58
- /* Toolbars */
59
-
60
- config.toolbar = 'Minimal';
58
+ /* Toolbars */
61
59
 
62
60
  config.toolbarCanCollapse = false;
63
61
 
64
62
  config.toolbar_Minimal =
65
- [
66
- ['Format','-','Bold','Italic','-','NumberedList','BulletedList','-','Link'],
67
- ['PasteFromWord','Source','Undo','Redo','RemoveFormat'],
68
- ];
63
+ [
64
+ ['Format','-','Bold','Italic','-','NumberedList','BulletedList','-','Link'],
65
+ ['PasteFromWord','Source','Undo','Redo','RemoveFormat'],
66
+ ];
69
67
 
70
- config.toolbar_None =
71
- [ '-' ];
68
+ config.toolbar_None =
69
+ [ '-' ];
72
70
 
71
+ config.toolbar = 'Minimal';
73
72
 
74
73
  };
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "2.0"
3
+ VERSION = "2.1"
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: '2.0'
4
+ version: '2.1'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: