inline_forms 3.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bin/inline_forms +4 -1
- data/bin/inline_forms_app_template.rb +6 -2
- data/bin/inline_forms_installer_core.rb +13 -6
- data/lib/app/assets/javascripts/ckeditor/config.js +3 -2
- data/lib/app/helpers/form_elements/image_field.rb +1 -1
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2RmZjU4YmYwMWZkMjFkNWQxNzkxMjVhYjUwMjc4ODliMjdlMjllNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzIxMjY2ODI4NzljMjllMzk0YTI3MzI3M2UyOGNlZTc2YjBlMjdjMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGJhOWFmNTI2Zjk4ODk5YWZkNDI4OGEwMzk1NWQ2YTVhOGViZWExMThlMDg1
|
10
|
+
NzI3ZjYwYjdhNDI3MDFjNGU3ZDBhMDFkMTNiOWE4ZTRhNDUzYjA1NTQ5ZGY0
|
11
|
+
YmJiYjlmMTc3M2UyOThmYzY2ZjdhZTRkNDc3ZTZhZWYyZjRmNDc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGM5YzRjZDFhMWVhYWRlMWE1MTZkNjBmNWY3M2UwMzQ1YjI1ZTZmZmU1YmY2
|
14
|
+
Y2E0YzZkY2ZlMWU1MTU3NWQ2YzMwMjA3NjgzMGM0NWMxYmI5MTZiMzA3ZWIz
|
15
|
+
ZDFmYTBkNjhjZDA4YjFlYmE1MzAxMmM4ZjEwZDhkZmIxOWE4MWE=
|
data/bin/inline_forms
CHANGED
@@ -15,7 +15,10 @@ module InlineForms
|
|
15
15
|
desc "create APP", "create an application with inline_forms v#{VERSION}"
|
16
16
|
DATABASE_OPTIONS = %w(sqlite mysql)
|
17
17
|
method_option :database, :aliases => "-d", :default => DATABASE_OPTIONS.first, :banner => DATABASE_OPTIONS.join('|'), :desc => 'specify development database'
|
18
|
+
# TODO ROYTJE specify sqlite OR mysql, and if none is specified, ASK THE USER.
|
19
|
+
|
18
20
|
method_option :dry, :type => :boolean, :desc => 'dry run. Do not do most things. Only useful for development of inline_forms'
|
21
|
+
# TODO ROYTJE Remove ALL dry run code. We don't do dry runs anymore.
|
19
22
|
method_option :example, :type => :boolean, :desc => 'install the example app. incompatible with --dry and uses sqlite as development database'
|
20
23
|
method_option :email, :aliases => "-e", :default => "admin@example.com", :desc => 'specify admin email'
|
21
24
|
method_option :password, :aliases => "-p", :default => "admin999", :desc => 'specify admin password'
|
@@ -115,7 +118,7 @@ module InlineForms
|
|
115
118
|
app_template_file = File.join(File.dirname(__FILE__), 'inline_forms_app_template.rb')
|
116
119
|
|
117
120
|
if ! run("rails _3.2.12_ new #{app_name} -m #{app_template_file} --skip-bundle --skip-gemfile --skip-test-unit")
|
118
|
-
say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red
|
121
|
+
say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red # TODO ROYTJE MAKE ERROR MESSAGE MORE RELEVANT # Rails could not create the app 'MyApp', maybe because it is a reserved word..
|
119
122
|
exit 1
|
120
123
|
end
|
121
124
|
end
|
@@ -4,10 +4,14 @@ if RVM.current && ENV['skiprvm'] !='true'
|
|
4
4
|
rvm_version = "#{ENV['ruby_version']}@#{app_name}"
|
5
5
|
RVM.chdir "../#{app_name}" do
|
6
6
|
say "Working directory is #{`pwd`}"
|
7
|
-
RVM.use_from_path! '.'
|
7
|
+
RVM.use_from_path! '.' # TODO ROYTJE FIX THIS BELOW
|
8
|
+
# Warning! PATH is not properly set up, '/home/vagrant/.rvm/gems/ruby-2.0.0-p247@MyApp/bin' is not available,
|
9
|
+
# usually this is caused by shell initialization files - check them for 'PATH=...' entries,
|
10
|
+
# it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
|
11
|
+
# to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-p247@MyApp'.
|
8
12
|
rvm_gemset = %x[rvm current]
|
9
13
|
say "RVM GEMSET is now #{rvm_gemset}"
|
10
|
-
say "Installing using gemset : #{RVM.current}", :green
|
14
|
+
say "Installing using gemset : #{RVM.current.environment_name}", :green
|
11
15
|
end
|
12
16
|
else
|
13
17
|
say "Installing without RVM", :green
|
@@ -90,6 +90,8 @@ END_DATABASEYML
|
|
90
90
|
say "- Devise install..."
|
91
91
|
run "bundle exec rails g devise:install"
|
92
92
|
|
93
|
+
# TODO ROYTJE Devise creates a model. That is a migration, a test, a route and a model. We delete the model, the route, and the test probably too. Is there another way to just create the migration instead of all the stuff that we are going to delete anyway !?
|
94
|
+
|
93
95
|
say "- Devise User model install with added name and locale field..."
|
94
96
|
run "bundle exec rails g devise User name:string locale:string"
|
95
97
|
|
@@ -173,14 +175,22 @@ create_file "app/models/user.rb", <<-USER_MODEL.strip_heredoc
|
|
173
175
|
end
|
174
176
|
USER_MODEL
|
175
177
|
|
178
|
+
# TODO ROYTJE This above is all that: Devise creates a model. That is a migration, a test, a route and a model. We delete the model, the route, and the test probably too. Is there another way to just create the migration instead of all the stuff that we are going to delete anyway !?
|
179
|
+
|
180
|
+
|
176
181
|
say "- Install ckeditor..."
|
177
182
|
generate "ckeditor:install --backend=carrierwave"
|
178
183
|
|
184
|
+
# TODO ROYTJE urgent, get ckeditor to work with carrierwave (the normal carrierwave, not -db)
|
185
|
+
|
186
|
+
|
179
187
|
say "- Mount Ckeditor::Engine to routes..."
|
180
188
|
route "mount Ckeditor::Engine => '/ckeditor'"
|
181
189
|
|
182
190
|
say "- Add ckeditor autoload_paths to application.rb..."
|
183
|
-
application "config.autoload_paths += %W(\#{config.root}/app/models/ckeditor)"
|
191
|
+
application "config.autoload_paths += %W(\#{config.root}/app/models/ckeditor)" # TODO ROYTJE is this still needed?
|
192
|
+
|
193
|
+
|
184
194
|
|
185
195
|
say "- Add ckeditor/init to application.js..."
|
186
196
|
insert_into_file "app/assets/javascripts/application.js",
|
@@ -194,15 +204,12 @@ say "- Add remotipart to application.js..."
|
|
194
204
|
insert_into_file "app/assets/javascripts/application.js", "//= require jquery.remotipart\n", :before => "//= require_tree .\n"
|
195
205
|
|
196
206
|
say "- Paper_trail install..."
|
197
|
-
generate "paper_trail:install"
|
207
|
+
generate "paper_trail:install" # TODO One day, we need some management tools so we can actually SEE the versions, restore them etc.
|
198
208
|
|
199
|
-
say "- Generate models and tables and views for translations..."
|
200
|
-
# using generate this way http://api.rubyonrails.org/classes/Rails/Generators/Actions.html#method-i-generate
|
201
|
-
# run "bundle install"
|
202
209
|
say "- Installaing ZURB Foundation..."
|
203
210
|
generate "foundation:install"
|
204
211
|
|
205
|
-
say "- Generate models and tables and views for translations..."
|
212
|
+
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
|
206
213
|
generate "inline_forms", "InlineFormsLocale name:string inline_forms_translations:belongs_to _enabled:yes _presentation:\#{name}"
|
207
214
|
generate "inline_forms", "InlineFormsKey name:string inline_forms_translations:has_many inline_forms_translations:associated _enabled:yes _presentation:\#{name}"
|
208
215
|
generate "inline_forms", "InlineFormsTranslation inline_forms_key:belongs_to inline_forms_locale:dropdown value:text interpolations:text is_proc:boolean _presentation:\#{value}"
|
@@ -26,8 +26,9 @@ CKEDITOR.editorConfig = function( config )
|
|
26
26
|
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
|
27
27
|
|
28
28
|
// The location of a script that handles file uploads in the Image dialog.
|
29
|
-
|
30
|
-
|
29
|
+
var token = $('meta[name=csrf-token]').attr('content');
|
30
|
+
var param = $('meta[name=csrf-param]').attr('content');
|
31
|
+
config.filebrowserImageUploadUrl = "/ckeditor/pictures" + "?" + token + "=" + param;
|
31
32
|
// The location of a script that handles file uploads.
|
32
33
|
config.filebrowserUploadUrl = "/ckeditor/attachment_files";
|
33
34
|
|
@@ -3,7 +3,7 @@ InlineForms::SPECIAL_COLUMN_TYPES[:image_field]=:string
|
|
3
3
|
|
4
4
|
def image_field_show(object, attribute)
|
5
5
|
o = object.send(attribute)
|
6
|
-
msg =
|
6
|
+
msg = "<i class='fi-plus'></i>".html_safe
|
7
7
|
if o.send(:present?)
|
8
8
|
if o.respond_to? :palm
|
9
9
|
msg = image_tag(o.send(:palm).send(:url))
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Suares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rvm
|