inline_forms 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzYyMzA0NWNkNmJhZWQyODgwNDYxZGEwMDhkOWIwN2E2YTdhMmUyZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Njc5ODMyZTk2ZWFiNjZkM2MxNDMwZGM0MTRlMGNkZjVhZGM0ZWM1YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NGU0NDU1MzlhNjdjZThkODRmNmY1MzE5OTc5NDVmNmZjYTVjYzgyYTgyZGZh
|
10
|
+
YmU2MzBkYjhhYmY4NjhjNWM2ZGJhMGRhZTQ3MGZhYzQ3MjM2MWJlMjJhOTYy
|
11
|
+
ODIwODljZWM2MTEwZTI1NTEzNGVmMmVmOTIzYjIyMmZmZjYwOGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmVjMmZmZjZkZWQwZTZiM2Q3ZWU1OTkzNzEwNGQ3ODc1YmM4OTU1YmJlYzFk
|
14
|
+
MTA3Nzg2ZjAxNzlhZDkwYTc2NGExNmI2ZGVjYzMyMjIyMGRmNTBkZjg5ODBh
|
15
|
+
ZmY3Mjk2MjVhNTAwYjViOGI0YjE4OGU5NDRjZGIxYzUwMTY0MGM=
|
@@ -182,7 +182,7 @@ say "- Install ckeditor..."
|
|
182
182
|
generate "ckeditor:install --backend=carrierwave"
|
183
183
|
|
184
184
|
# TODO ROYTJE urgent, get ckeditor to work with carrierwave (the normal carrierwave, not -db)
|
185
|
-
|
185
|
+
# Thanks for fixing ROYTJE! +1
|
186
186
|
|
187
187
|
say "- Mount Ckeditor::Engine to routes..."
|
188
188
|
route "mount Ckeditor::Engine => '/ckeditor'"
|
@@ -207,7 +207,7 @@ say "- Paper_trail install..."
|
|
207
207
|
generate "paper_trail:install" # TODO One day, we need some management tools so we can actually SEE the versions, restore them etc.
|
208
208
|
|
209
209
|
say "- Installaing ZURB Foundation..."
|
210
|
-
generate "foundation:install"
|
210
|
+
generate "foundation:install", "-f"
|
211
211
|
|
212
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
|
213
213
|
generate "inline_forms", "InlineFormsLocale name:string inline_forms_translations:belongs_to _enabled:yes _presentation:\#{name}"
|
@@ -336,95 +336,157 @@ say "- Generating test files", :green
|
|
336
336
|
# run "bundle exec rspec:install" # TODO: I need do this or simply copy the files in the spec folder ?
|
337
337
|
create_file "spec/spec_helper.rb", <<-END_TEST_HELPER.strip_heredoc
|
338
338
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
339
|
-
ENV["RAILS_ENV"] ||= 'development' # this need to be changed to test ???
|
340
|
-
require File.expand_path("../../config/environment", __FILE__)
|
341
|
-
require 'capybara/rspec'
|
342
|
-
require 'rspec/rails'
|
343
|
-
require 'rspec/autorun'
|
344
|
-
require 'carrierwave/test/matchers'
|
345
|
-
|
346
|
-
|
347
|
-
# Requires supporting ruby files with custom matchers and macros, etc,
|
348
|
-
# in spec/support/ and its subdirectories.
|
349
|
-
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
350
|
-
|
351
|
-
RSpec.configure do |config|
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
end
|
339
|
+
ENV["RAILS_ENV"] ||= 'development' # this need to be changed to test ???
|
340
|
+
require File.expand_path("../../config/environment", __FILE__)
|
341
|
+
require 'capybara/rspec'
|
342
|
+
require 'rspec/rails'
|
343
|
+
require 'rspec/autorun'
|
344
|
+
require 'carrierwave/test/matchers'
|
345
|
+
|
346
|
+
|
347
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
348
|
+
# in spec/support/ and its subdirectories.
|
349
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
350
|
+
|
351
|
+
RSpec.configure do |config|
|
352
|
+
config.include FactoryGirl::Syntax::Methods
|
353
|
+
# ## Mock Framework
|
354
|
+
#
|
355
|
+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
|
356
|
+
#
|
357
|
+
# config.mock_with :mocha
|
358
|
+
# config.mock_with :flexmock
|
359
|
+
# config.mock_with :rr
|
360
|
+
|
361
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
362
|
+
config.fixture_path = Rails.root + "/spec/fixtures"
|
363
|
+
|
364
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
365
|
+
# examples within a transaction, remove the following line or assign false
|
366
|
+
# instead of true.
|
367
|
+
config.use_transactional_fixtures = true
|
368
|
+
|
369
|
+
# If true, the base class of anonymous controllers will be inferred
|
370
|
+
# automatically. This will be the default behavior in future versions of
|
371
|
+
# rspec-rails.
|
372
|
+
config.infer_base_class_for_anonymous_controllers = false
|
373
|
+
|
374
|
+
# Run specs in random order to surface order dependencies. If you find an
|
375
|
+
# order dependency and want to debug it, you can fix the order by providing
|
376
|
+
# the seed, which is printed after each run.
|
377
|
+
# --seed 1234
|
378
|
+
config.order = "random"
|
379
|
+
end
|
380
380
|
END_TEST_HELPER
|
381
|
+
|
381
382
|
say 'copy test image into rspec folder'
|
382
383
|
copy_file File.join(File.dirname(File.expand_path(__FILE__)) + '/../lib/otherstuff/fixtures/rails.png'), "spec/fixtures/images/rails.png"
|
383
384
|
say '- Creating factory_girl file'
|
384
385
|
create_file "spec/factories/inline_forms.rb", <<-END_FACTORY_GIRL.strip_heredoc
|
385
|
-
FactoryGirl.define do
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
386
|
+
FactoryGirl.define do
|
387
|
+
factory :apartment do
|
388
|
+
name "Luxe House in Bandabou 147A" #string
|
389
|
+
title "A dream house in a dream place" # string
|
390
|
+
description "A beatiful House at the edge of the <strong>sea</strong>" #text
|
391
|
+
end
|
392
|
+
factory :large_text do
|
393
|
+
name "Luxe House in Bandabou 147A" #string
|
394
|
+
title "A dream house in a dream place" # string
|
395
|
+
description "A beatiful House at the edge of the <strong>sea</strong>" #text
|
396
|
+
end
|
395
397
|
end
|
396
|
-
end
|
397
398
|
END_FACTORY_GIRL
|
398
399
|
remove_file 'spec/factories/users.rb'
|
399
400
|
remove_file 'spec/models/user_spec.rb'
|
401
|
+
|
402
|
+
# environments/production.rb
|
403
|
+
#create_file "#{app_name}/config/environments/production.rb", " #config.assets.precompile += %w( search.js )\nend\n" if dry_run?
|
404
|
+
say "- Injecting precompile assets stuff in environments/production.rb..."
|
405
|
+
insert_into_file "config/environments/production.rb",
|
406
|
+
" config.assets.precompile += %w(inline_forms_application.js inline_forms_application.css devise.css)\n",
|
407
|
+
:after => " # config.assets.precompile += %w( search.js )\n"
|
408
|
+
|
409
|
+
# devise mailer stuff
|
410
|
+
say "- Injecting devise mailer stuff in environments/production.rb..."
|
411
|
+
# strip_heredoc_with_indent(2) became strip_heredoc(2), but only in rails 4... :-(
|
412
|
+
insert_into_file "config/environments/production.rb", <<-DEVISE_MAILER_STUFF.strip_heredoc, :before => "end\n"
|
413
|
+
# for devise
|
414
|
+
config.action_mailer.default_url_options = { :protocol => 'https', :host => 'YOURHOSTNAME' }
|
415
|
+
config.action_mailer.delivery_method = :smtp
|
416
|
+
config.action_mailer.smtp_settings = {
|
417
|
+
:address => 'YOURMAILSERVER',
|
418
|
+
:enable_starttls_auto => true,
|
419
|
+
:password => 'YOURPASSWORD',
|
420
|
+
:user_name => 'YOURUSERNAME'
|
421
|
+
}
|
422
|
+
|
423
|
+
DEVISE_MAILER_STUFF
|
424
|
+
|
425
|
+
# assets
|
426
|
+
say "- Setting config.assets.compile to true in environments/production.rb (needed for ckeditor)..."
|
427
|
+
#insert_into_file "#{app_name}/config/environments/production.rb", "config.assets.compile = false\n", :before => "end\n" if dry_run?
|
428
|
+
gsub_file "config/environments/production.rb", /config.assets.compile = false/, "config.assets.compile = true"
|
429
|
+
|
430
|
+
# capify
|
431
|
+
say "- Capify..."
|
432
|
+
run 'capify .'
|
433
|
+
remove_file "config/deploy.rb" # remove the file capify created!
|
434
|
+
copy_file File.join(File.dirname(File.expand_path(__FILE__)) + '/../lib/generators/templates/deploy.rb'), "config/deploy.rb"
|
435
|
+
# TODO: ROYJE isn't there a better way to find the path?
|
436
|
+
|
437
|
+
# Unicorn
|
438
|
+
say "- Unicorn Config..."
|
439
|
+
copy_file File.join(File.dirname(File.expand_path(__FILE__)) + '/../lib/generators/templates/unicorn.rb'), "config/unicorn.rb"
|
440
|
+
|
441
|
+
# Git
|
442
|
+
say "- Initializing git..."
|
443
|
+
run 'git init'
|
444
|
+
#create_file "#{app_name}/.gitignore", "/tmp\n" if dry_run?
|
445
|
+
insert_into_file ".gitignore", <<-GITIGNORE.strip_heredoc, :after => "/tmp\n"
|
446
|
+
# netbeans
|
447
|
+
nbproject
|
448
|
+
# remotipart uploads
|
449
|
+
public/uploads
|
450
|
+
GITIGNORE
|
451
|
+
|
452
|
+
run 'git add .'
|
453
|
+
run 'git commit -a -m " * Initial"'
|
454
|
+
|
455
|
+
# example
|
400
456
|
if ENV['install_example'] == 'true'
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
end
|
415
|
-
end
|
416
|
-
END_EXAMPLE_TEST
|
417
|
-
# run tests
|
418
|
-
if ENV['runtest'] == 'true' # Not Dry
|
419
|
-
run "rspec"
|
420
|
-
end
|
421
|
-
say "\nDone! Now point your browser to http://localhost:3000/apartments !", :yellow
|
422
|
-
say "\nPress ctlr-C to quit...", :yellow
|
423
|
-
run 'bundle exec rails s'
|
424
|
-
else
|
425
|
-
say "\nDone! Now make your tables with 'bundle exec rails g inline_forms ...", :yellow
|
426
|
-
# run tests
|
427
|
-
if ENV['runtest'] == 'true'
|
428
|
-
run "rspec"
|
457
|
+
say "\nInstalling example application..."
|
458
|
+
run 'bundle exec rails g inline_forms Photo name:string caption:string image:image_field description:text apartment:belongs_to _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
|
459
|
+
run 'bundle exec rails generate uploader Image'
|
460
|
+
run 'bundle exec rails g inline_forms Apartment name:string title:string description:text photos:has_many photos:associated _enabled:yes _presentation:\'#{name}\'' # FIXME temporary changed because ckeditor is playing dirty
|
461
|
+
run 'bundle exec rake db:migrate'
|
462
|
+
say '-Adding example test'
|
463
|
+
create_file "spec/models/#{app_name}_example.rb", <<-END_EXAMPLE_TEST.strip_heredoc
|
464
|
+
require "spec_helper"
|
465
|
+
describe Apartment do
|
466
|
+
it "insert an appartment and retrieve it" do
|
467
|
+
appartment_data = create(:apartment)
|
468
|
+
first = Apartment.first.id
|
469
|
+
expect(Apartment.first.id).to eq(first)
|
429
470
|
end
|
430
|
-
|
471
|
+
end
|
472
|
+
END_EXAMPLE_TEST
|
473
|
+
|
474
|
+
# run tests
|
475
|
+
# if ENV['runtest'] == 'true' # Not Dry
|
476
|
+
# run "rspec"
|
477
|
+
# end
|
478
|
+
run "rspec" if ENV['runtest'] # Drier!
|
479
|
+
|
480
|
+
# done!
|
481
|
+
say "\nDone! Now point your browser to http://localhost:3000/apartments !", :yellow
|
482
|
+
say "\nPress ctlr-C to quit...", :yellow
|
483
|
+
run 'bundle exec rails s'
|
484
|
+
else
|
485
|
+
# run tests
|
486
|
+
run "rspec" if ENV['runtest']
|
487
|
+
# done!
|
488
|
+
say "\nDone! Now make your tables with 'bundle exec rails g inline_forms ...", :yellow
|
489
|
+
end
|
490
|
+
|
491
|
+
|
492
|
+
#say "- Don't forget: edit .rvmrc, config/{routes.rb, deploy.rb}, .git/config, delete public/index.html\n"
|
@@ -76,8 +76,6 @@ namespace :deploy do
|
|
76
76
|
run "ln -s #{shared_path}/sockets #{release_path}/tmp/sockets"
|
77
77
|
run "cd #{shared_path} && mkdir -p uploads"
|
78
78
|
run "ln -s #{shared_path}/uploads #{release_path}/public/uploads"
|
79
|
-
raise "Rails environment not set" unless rails_env
|
80
|
-
run "cd #{release_path} && RAILS_ENV=#{rails_env} bundle exec rails g ckeditor:install -f"
|
81
79
|
end
|
82
80
|
|
83
81
|
|
data/lib/inline_forms/version.rb
CHANGED
Binary file
|
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: 3.0.
|
4
|
+
version: 3.0.3
|
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-05-
|
11
|
+
date: 2014-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rvm
|
@@ -271,6 +271,7 @@ files:
|
|
271
271
|
- lib/otherstuff/add_roles.sql
|
272
272
|
- lib/otherstuff/bump
|
273
273
|
- lib/otherstuff/diffie
|
274
|
+
- lib/otherstuff/fixtures/rails.png
|
274
275
|
- lib/otherstuff/mkiftrans
|
275
276
|
- lib/otherstuff/mkrole
|
276
277
|
- lib/otherstuff/roles_users.sql
|