Permalink
Browse files

remove Riot, Steak, RightJS genetraors, closes #1851

  • Loading branch information...
ujifgc committed May 10, 2016
1 parent 30255d4 commit cd1c1dc81894d96ed618c3af8adb623b04184ab6
View
@@ -1,5 +1,9 @@
= CHANGES
== Edge
- NEW Remove RightJS, Riot, Steak support (@ujifgc)
== 0.13.2 (May 9th 2016)
- FIX #1789 Relax Tilt version to allow Tilt 2 (>= 1.4.1, < 3) (@ujifgc)
View
@@ -38,11 +38,11 @@ You can also instruct the generator to skip a certain component to avoid using o
The available components and their default options are listed below:
test:: none (default), bacon, shoulda, cucumber, riot, rspec, minitest, steak
test:: none (default), bacon, shoulda, cucumber, rspec, minitest
renderer:: slim (default), erb, erubis, liquid, haml
stylesheet:: none (default), less, compass, sass, scss
mock:: none (default), mocha, rr
script:: none (default), jquery, prototype, mootools, rightjs, extcore, dojo
script:: none (default), jquery, prototype, mootools, extcore, dojo
orm:: none (default), datamapper, mongomapper, mongoid, activerecord, minirecord, sequel, couchrest, ohm, mongomatic, ripple, dynamoid
In addition, you can generate projects based on existing templates:
@@ -127,7 +127,7 @@ def store_component_choice(key, value)
#
# @example
# retrieve_component_config(...)
# # => { :mock => 'rr', :test => 'riot', ... }
# # => { :mock => 'rr', :test => 'rspec', ... }
#
def retrieve_component_config(target)
YAML.load_file(target)
@@ -631,7 +631,7 @@ def component_types
#
# @example
# available_choices_for :test
# => [:shoulda, :bacon, :riot, :minitest]
# => [:shoulda, :bacon, :minitest]
#
def available_choices_for(component)
@available_choices[component] + [:none]
@@ -3,8 +3,6 @@ def setup_mock
case options[:test].to_s
when 'rspec'
inject_into_file 'spec/spec_helper.rb', "require 'rr'\n", :after => "\"/../config/boot\")\n"
when 'riot'
inject_into_file "test/test_config.rb","require 'riot/rr'\n", :after => "\"/../config/boot\")\n"
when 'minitest'
insert_mocking_include "RR::Adapters::MiniTest", :path => "test/test_config.rb"
else

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -109,7 +109,7 @@ def setup_test_files
proc{|*args| args.map{|str| str.gsub!(/!PATH!/, recognize_path)} }.call(controller_content, helper_content)
directory_name = [:rspec, :steak].include?(test_component.to_sym) ? "spec" : "test"
directory_name = [:rspec].include?(test_component.to_sym) ? "spec" : "test"
base_path = File.join(directory_name, "app")
create_file destination_root("#{base_path}/controllers/controllers_#{directory_name}.rb"), controller_content, :skip => true
create_file destination_root("#{base_path}/helpers/helpers_#{directory_name}.rb"), helper_content, :skip => true
@@ -126,19 +126,6 @@ def teardown
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
end
it 'should generate controller test for riot' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=riot') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:controller, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:controller, 'UserItems','-a=/subby', "-r=#{@apptmp}/sample_project", "-p=user") }
assert_match_in_file(/(\/\.\.){2}/m, @controller_test_path.gsub('app','subby'))
assert_match_in_file(/context "\/demo_items" do/m, @controller_test_path.gsub('app','subby'))
assert_match_in_file(/context "\/user\/:user_id\/user_items"/, @controller_with_parent_test_path.gsub('app','subby'))
assert_match_in_file(/get "\/demo_items"/m, @controller_test_path.gsub('app','subby'))
assert_match_in_file(/get "\/user\/1\/user_items"/m, @controller_with_parent_test_path.gsub('app','subby'))
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
end
it 'should generate controller test for minitest' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=minitest') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
@@ -179,20 +166,6 @@ def teardown
assert_file_exists("#{@apptmp}/sample_project/test/subby/helpers/demo_items_helper_test.rb")
end
it 'should generate controller test for steak' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=steak') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:controller, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:controller, 'UserItems','-a=/subby', "-r=#{@apptmp}/sample_project", "-p=user") }
assert_match_in_file(/describe "\/demo_items" do/m, "#{@apptmp}/sample_project/spec/subby/controllers/demo_items_controller_spec.rb")
assert_match_in_file(/feature "\/demo_items" do/m, "#{@apptmp}/sample_project/spec/subby/acceptance/controllers/demo_items_controller_spec.rb")
assert_match_in_file(/describe "\/user\/:user_id\/user_items" do/m, "#{@apptmp}/sample_project/spec/subby/controllers/user_items_controller_spec.rb")
assert_match_in_file(/get "\/demo_items"/m, "#{@apptmp}/sample_project/spec/subby/controllers/demo_items_controller_spec.rb")
assert_match_in_file(/get "\/user\/1\/user_items"/m, "#{@apptmp}/sample_project/spec/subby/controllers/user_items_controller_spec.rb")
assert_match_in_file(/feature "\/user\/:user_id\/user_items" do/m, "#{@apptmp}/sample_project/spec/subby/acceptance/controllers/user_items_controller_spec.rb")
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, "#{@apptmp}/sample_project/spec/subby/helpers/demo_items_helper_spec.rb")
end
it 'should generate controller test for cucumber' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=cucumber') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
@@ -62,13 +62,6 @@ def teardown
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
end
it 'should generate helper test for riot' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=riot') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, @helper_test_path.gsub('app','subby'))
end
it 'should generate helper test for minitest' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=minitest') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
@@ -93,13 +86,6 @@ def teardown
assert_file_exists("#{@apptmp}/sample_project/test/subby/helpers/demo_items_helper_test.rb")
end
it 'should generate helper test for steak' do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--script=none', '-t=steak') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
capture_io { generate(:helper, 'DemoItems','-a=/subby', "-r=#{@apptmp}/sample_project") }
assert_match_in_file(/describe "SampleProject::Subby::DemoItemsHelper" do/m, "#{@apptmp}/sample_project/spec/subby/helpers/demo_items_helper_spec.rb")
end
it "should generate helper test for testunit" do
capture_io { generate(:project, 'sample_project', "--root=#{@apptmp}", '--test=testunit', '--script=none') }
capture_io { generate(:app, 'subby', "-r=#{@apptmp}/sample_project") }
Oops, something went wrong.

0 comments on commit cd1c1dc

Please sign in to comment.