inline_forms 1.6.25 → 1.6.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46ccb0b70f443d2e511f79169d6fc623928e2fa1
4
- data.tar.gz: c261056e8a7b92491e9ddf71d48e89e51ec24e8b
3
+ metadata.gz: dc5d27fe76c0187936f29e9d6cd1825a902cc92d
4
+ data.tar.gz: 92ebb67c3342f09ad7e3ed81a9ede9dd1867e0c8
5
5
  SHA512:
6
- metadata.gz: 232b4445a6b3791bead559dce1dbe4d6e05e94454e919c3047e6fed657bfa3ae4bf31122d4cbbf54897deea19afd217e9bbcc6ac47ab364ddb43f845cdf81baf
7
- data.tar.gz: 5f75cf307779d60a3eeebf35537f38417c5c69531e941c5210e5ef75f94b35eeea627e5f3c1d4801476afc803e4be7094e9272607050dde913e2db7734564df3
6
+ metadata.gz: a2d82cb5802ae040c82d04fa217322e3fae4aa0f29784e8d86730f25fa55c11cc0c98bf5138f8ea3056003f2a95e27ac5197c07a3ffb1474e73adba90aae5812
7
+ data.tar.gz: 4e34858b8f4723eb715210c457d4e237e59ddf030fc602526f4ab3a13b9178f8a86a55cf6f00ccca81ef15ee983d817b58faeb588d496f3f6e61894d11c4b745
data/bin/inline_forms CHANGED
@@ -17,12 +17,12 @@ module InlineForms
17
17
  class Creator < Thor
18
18
  include Thor::Actions
19
19
 
20
- String.class_eval do
21
- def strip_heredoc_with_indent(indent=0)
22
- new_indent = ( self.empty? ? 0 : ( scan(/^[ \t]*(?=\S)/).min.size - indent ) )
23
- gsub(/^[ \t]{#{new_indent}}/, '')
24
- end
25
- end
20
+ # String.class_eval do
21
+ # def strip_heredoc_with_indent(indent=0)
22
+ # new_indent = ( self.empty? ? 0 : ( scan(/^[ \t]*(?=\S)/).min.size - indent ) )
23
+ # gsub(/^[ \t]{#{new_indent}}/, '')
24
+ # end
25
+ # end
26
26
 
27
27
  def self.source_root
28
28
  File.dirname(__FILE__)+"/.."
@@ -91,7 +91,7 @@ module InlineForms
91
91
  if dry_run?
92
92
  empty_directory(app_name)
93
93
  else
94
- if ! RVM.run("rails new #{app_name}").successful?
94
+ if ! run("rails new #{app_name}").successful?
95
95
  say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red
96
96
  exit 1
97
97
  end
@@ -101,13 +101,11 @@ module InlineForms
101
101
  ruby_version = (%x[rvm current]).gsub(/@.*/,'')
102
102
  create_file "#{app_name}/.ruby-version", "#{ruby_version.chop}"
103
103
 
104
- say "- Changing to '#{app_name}' with RVM..."
105
- RVM.chdir(app_name) do
104
+ say "- Changing to '#{app_name}'..."
105
+ chdir(app_name) do
106
106
 
107
107
  say "- Working directory is now #{`pwd`}"
108
- RVM.use_from_path! '.'
109
- rvm_gemset = %x[rvm current]
110
- say "- RVM gemset is now #{rvm_gemset}"
108
+ say "- RVM gemset is now #{%x[rvm current]}"
111
109
 
112
110
  say "- Recreating Gemfile..."
113
111
 
@@ -193,10 +191,10 @@ module InlineForms
193
191
  END_DATABASEYML
194
192
 
195
193
  say "- Devise install..."
196
- RVM.run "bundle exec rails g devise:install" unless dry_run?
194
+ run "bundle exec rails g devise:install" unless dry_run?
197
195
 
198
196
  say "- Devise User model install with added name and locale field..."
199
- RVM.run "bundle exec rails g devise User name:string locale:string" unless dry_run?
197
+ run "bundle exec rails g devise User name:string locale:string" unless dry_run?
200
198
 
201
199
  say "- Replace Devise route and add path_prefix..."
202
200
  gsub_file "#{app_name}/config/routes.rb", /devise_for :users/, "devise_for :users, :path_prefix => 'auth'"
@@ -279,7 +277,7 @@ module InlineForms
279
277
  USER_MODEL
280
278
 
281
279
  say "- Install ckeditor..."
282
- RVM.run "bundle exec rails g ckeditor:install" unless dry_run?
280
+ run "bundle exec rails g ckeditor:install" unless dry_run?
283
281
 
284
282
  say "- Create ckeditor config.js"
285
283
  copy_file "lib/app/assets/javascripts/ckeditor/config.js", "#{app_name}/app/assets/javascripts/ckeditor/config.js"
@@ -289,12 +287,12 @@ module InlineForms
289
287
  insert_into_file "#{app_name}/app/assets/javascripts/application.js", "//= require jquery.remotipart\n", :before => "//= require_tree .\n"
290
288
 
291
289
  say "- Paper_trail install..."
292
- RVM.run "bundle exec rails g paper_trail:install" unless dry_run?
290
+ run "bundle exec rails g paper_trail:install" unless dry_run?
293
291
 
294
292
  say "- Generate models and tables and views for translations..."
295
- RVM.run 'rails g inline_forms InlineFormsLocale name:string inline_forms_translations:belongs_to _enabled:yes _presentation:\'#{name}\''
296
- RVM.run 'rails g inline_forms InlineFormsKey name:string inline_forms_translations:has_many inline_forms_translations:associated _enabled:yes _presentation:\'#{name}\''
297
- RVM.run 'rails g inline_forms InlineFormsTranslation inline_forms_key:belongs_to inline_forms_locale:dropdown value:text interpolations:text is_proc:boolean _presentation:\'#{value}\''
293
+ run 'rails g inline_forms InlineFormsLocale name:string inline_forms_translations:belongs_to _enabled:yes _presentation:\'#{name}\''
294
+ run 'rails g inline_forms InlineFormsKey name:string inline_forms_translations:has_many inline_forms_translations:associated _enabled:yes _presentation:\'#{name}\''
295
+ run 'rails g inline_forms InlineFormsTranslation inline_forms_key:belongs_to inline_forms_locale:dropdown value:text interpolations:text is_proc:boolean _presentation:\'#{value}\''
298
296
 
299
297
  sleep 1 # to get unique migration number
300
298
  create_file "#{app_name}/db/migrate/" +
@@ -323,13 +321,13 @@ module InlineForms
323
321
  VIEW_MIGRATION
324
322
 
325
323
  say "- Migrating Database"
326
- RVM.run "bundle exec rake db:migrate" unless (dry_run? || !using_sqlite?)
324
+ run "bundle exec rake db:migrate" unless (dry_run? || !using_sqlite?)
327
325
 
328
326
  say "- Adding admin user with email: #{email}, password: #{password} to seeds.rb"
329
327
  append_to_file "#{app_name}/db/seeds.rb", "User.new({ :email => '#{email}', :name => 'Admin', :password => '#{password}', :password_confirmation => '#{password}'}).save"
330
328
 
331
329
  say "- Seeding the database"
332
- RVM.run "bundle exec rake db:seed" unless (dry_run? || !using_sqlite?)
330
+ run "bundle exec rake db:seed" unless (dry_run? || !using_sqlite?)
333
331
 
334
332
  say "- Creating header in app/views/inline_forms/_header.html.erb..."
335
333
  create_file "#{app_name}/app/views/inline_forms/_header.html.erb", <<-END_HEADER.strip_heredoc_with_indent
@@ -446,7 +444,7 @@ module InlineForms
446
444
  gsub_file "#{app_name}/config/environments/production.rb", /config.assets.compile = false/, "config.assets.compile = true"
447
445
 
448
446
  say "- Capify..."
449
- RVM.run 'capify .'
447
+ run 'capify .'
450
448
  remove_file "#{app_name}/config/deploy.rb" # remove the file capify created!
451
449
  copy_file "lib/generators/templates/deploy.rb", "#{app_name}/config/deploy.rb"
452
450
 
@@ -454,7 +452,7 @@ module InlineForms
454
452
  copy_file "lib/generators/templates/unicorn.rb", "#{app_name}/config/unicorn.rb"
455
453
 
456
454
  say "- Initializing git..."
457
- RVM.run 'git init'
455
+ run 'git init'
458
456
  create_file "#{app_name}/.gitignore", "/tmp\n" if dry_run?
459
457
  insert_into_file "#{app_name}/.gitignore", <<-GITIGNORE.strip_heredoc_with_indent, :after => "/tmp\n"
460
458
  # netbeans
@@ -463,18 +461,18 @@ module InlineForms
463
461
  public/uploads
464
462
  GITIGNORE
465
463
 
466
- RVM.run 'git add .'
467
- RVM.run 'git commit -a -m " * Initial"'
464
+ run 'git add .'
465
+ run 'git commit -a -m " * Initial"'
468
466
 
469
467
  if install_example?
470
468
  say "\nInstalling example application..."
471
- RVM.run 'rails g inline_forms Picture name:string caption:string image:image_field description:text apartment:belongs_to _presentation:\'#{name}\''
472
- RVM.run 'rails generate uploader Image'
473
- RVM.run 'rails g inline_forms Apartment name:string title:string description:text pictures:has_many pictures:associated _enabled:yes _presentation:\'#{name}\''
474
- RVM.run 'bundle exec rake db:migrate'
469
+ run 'rails g inline_forms Picture name:string caption:string image:image_field description:text apartment:belongs_to _presentation:\'#{name}\''
470
+ run 'rails generate uploader Image'
471
+ run 'rails g inline_forms Apartment name:string title:string description:text pictures:has_many pictures:associated _enabled:yes _presentation:\'#{name}\''
472
+ run 'bundle exec rake db:migrate'
475
473
  say "\nDone! Now point your browser to http://localhost:3000/apartments !", :yellow
476
474
  say "\nPress ctlr-C to quit...", :yellow
477
- RVM.run 'rails s'
475
+ run 'rails s'
478
476
  else
479
477
  say "\nDone! Now make your tables with 'rails g inline_forms ...", :yellow
480
478
  #say "- Don't forget: edit .rvmrc, config/{routes.rb, deploy.rb}, .git/config, delete public/index.html\n"
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.25"
3
+ VERSION = "1.6.26"
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: 1.6.25
4
+ version: 1.6.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares