Browse files

Travis integration

  • Loading branch information...
1 parent 465b729 commit c9bd4725fb8af97408a927159c9bbefda994a3aa @diec123 committed Apr 18, 2012
View
17 .travis.yml
@@ -0,0 +1,17 @@
+language: ruby
+rvm:
+ - 1.9.2
+ - 1.9.3
+gemfile:
+ - test/core_test_app/gemfiles/rails3_1.gemfile
+ - test/core_test_app/gemfiles/rails3_2.gemfile
+before_script:
+ - chmod 777 ./config/ci/before-travis.sh
+ - ./config/ci/before-travis.sh
+script:
+ - export DISPLAY=:99.0
+ - cd test/core_test_app
+ - bundle exec rake db:create db:migrate RAILS_ENV=test
+ - bundle exec rspec spec
+ - bundle exec cucumber features
+
View
6 .travisrc
@@ -1,6 +0,0 @@
-rvm:
- - 1.9.2
-
-bundler_args: "--without development production profiling"
-before_script: "./config/ci/before-travis.sh"
-script: "cd test/core_test_app ; bundle exec rake travis"
View
12 config/ci/before-travis.sh
@@ -2,16 +2,10 @@
sh -e /etc/init.d/xvfb start
# fetch extjs
-wget http://extjs.cachefly.net/ext-4.0.2a-gpl.zip
-unzip -q -d test/basepack_test_app/public/ -n ext-4.0.2a-gpl.zip
-mv test/core_test_app/public/ext-4.0.2a test/core_test_app/public/extjs
+wget http://cdn.sencha.io/ext-4.0.7-gpl.zip
+unzip -q -d test/core_test_app/public/ -n ext-4.0.7-gpl.zip
+mv test/core_test_app/public/ext-4.0.7-gpl test/core_test_app/public/extjs
# cp db configuration
cp test/core_test_app/config/database.yml.travis test/core_test_app/config/database.yml
-# create mysql database
-mysql -e 'create database nct_test;'
-
-bundle install
-bundle exec rake db:migrate RAILS_ENV=test
-cd ../..
View
5 test/core_test_app/Gemfile
@@ -1,6 +1,7 @@
source 'http://rubygems.org'
-gem 'rails', '3.2.1'
+gem 'rails', '3.2.3'
+gem 'netzke-persistence'
gem 'sqlite3'
@@ -25,7 +26,7 @@ gem 'sqlite3'
group :test do
gem 'capybara'
gem 'database_cleaner'
- gem 'cucumber-rails'
+ gem 'cucumber-rails', :require => false
gem 'cucumber'
gem 'rspec-rails'
gem 'spork'
View
77 test/core_test_app/Gemfile.lock
@@ -1,31 +1,31 @@
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.2.1)
- actionpack (= 3.2.1)
- mail (~> 2.4.0)
- actionpack (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.1)
rack (~> 1.4.0)
- rack-cache (~> 1.1)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
- activemodel (3.2.1)
- activesupport (= 3.2.1)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- activerecord (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
- arel (~> 3.0.0)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.1)
- activemodel (= 3.2.1)
- activesupport (= 3.2.1)
- activesupport (3.2.1)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.7)
@@ -54,20 +54,23 @@ GEM
diff-lcs (1.1.3)
erubis (2.7.0)
ffi (1.0.11)
- gherkin (2.9.1)
+ gherkin (2.9.3)
json (>= 1.4.6)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
- json (1.6.5)
+ json (1.6.6)
launchy (2.1.0)
addressable (~> 2.2.6)
+ libwebsocket (0.1.3)
+ addressable
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
- multi_json (1.1.0)
+ multi_json (1.3.2)
+ netzke-persistence (0.1.0)
nokogiri (1.5.2)
polyglot (0.3.3)
rack (1.4.1)
@@ -77,17 +80,17 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.2.1)
- actionmailer (= 3.2.1)
- actionpack (= 3.2.1)
- activerecord (= 3.2.1)
- activeresource (= 3.2.1)
- activesupport (= 3.2.1)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
bundler (~> 1.0)
- railties (= 3.2.1)
- railties (3.2.1)
- actionpack (= 3.2.1)
- activesupport (= 3.2.1)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@@ -100,33 +103,34 @@ GEM
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
- rspec-expectations (2.9.0)
+ rspec-expectations (2.9.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
rspec-rails (2.9.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.9.0)
- rubyzip (0.9.6.1)
- selenium-webdriver (2.20.0)
+ rubyzip (0.9.7)
+ selenium-webdriver (2.21.2)
childprocess (>= 0.2.5)
ffi (~> 1.0)
+ libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
spork (0.9.0)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
+ sqlite3 (1.3.6)
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.32)
+ tzinfo (0.3.33)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -139,7 +143,8 @@ DEPENDENCIES
cucumber-rails
database_cleaner
launchy
- rails (= 3.2.1)
+ netzke-persistence
+ rails (= 3.2.3)
rspec-rails
spork
sqlite3
View
16 test/core_test_app/gemfiles/rails3_1.gemfile
@@ -0,0 +1,16 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.1.4'
+gem 'netzke-persistence'
+
+gem 'mysql2'
+
+group :test do
+ gem 'capybara'
+ gem 'database_cleaner'
+ gem 'cucumber-rails', :require => false
+ gem 'cucumber'
+ gem 'rspec-rails'
+ gem 'spork'
+ gem 'launchy' # So you can do Then show me the page
+end
View
16 test/core_test_app/gemfiles/rails3_2.gemfile
@@ -0,0 +1,16 @@
+source 'http://rubygems.org'
+
+gem 'rails', '3.2.3'
+gem 'netzke-persistence'
+
+gem 'mysql2'
+
+group :test do
+ gem 'capybara'
+ gem 'database_cleaner'
+ gem 'cucumber-rails', :require => false
+ gem 'cucumber'
+ gem 'rspec-rails'
+ gem 'spork'
+ gem 'launchy' # So you can do Then show me the page
+end
View
20 test/core_test_app/spec/component/composition_spec.rb
@@ -16,8 +16,8 @@ def self.config
def components
{
- :nested_one => {:class_name => 'NestedComponentOne'},
- :nested_two => {:class_name => 'NestedComponentTwo'}
+ :nested_one => {:class_name => 'Netzke::NestedComponentOne'},
+ :nested_two => {:class_name => 'Netzke::NestedComponentTwo'}
}
end
@@ -39,15 +39,15 @@ class NestedComponentOne < Base
class NestedComponentTwo < Base
def components
{
- :nested => {:class_name => 'DeepNestedComponent'}
+ :nested => {:class_name => 'Netzke::DeepNestedComponent'}
}
end
end
class DeepNestedComponent < Base
def components
{
- :nested => {:class_name => "VeryDeepNestedComponent"}
+ :nested => {:class_name => "Netzke::VeryDeepNestedComponent"}
}
end
end
@@ -64,16 +64,16 @@ class ComponentTwo < Base
class SomeComposite < Base
component :component_one do
{
- :class_name => "ComponentOne",
+ :class_name => "Netzke::ComponentOne",
:title => "My Cool Component"
}
end
def config
{
:items => [
- {:class_name => "ComponentTwo", :name => "my_component_two"},
- {:class_name => "ComponentTwo"} # name omitted, will be "component_two1"
+ {:class_name => "Netzke::ComponentTwo", :name => "my_component_two"},
+ {:class_name => "Netzke::ComponentTwo"} # name omitted, will be "netzke_1"
]
}.deep_merge super
end
@@ -102,9 +102,9 @@ def config
components = composite.components
components.keys.size.should == 3
- components[:component_one][:class_name].should == "ComponentOne"
- components[:my_component_two][:class_name].should == "ComponentTwo"
- components[:component_two1][:class_name].should == "ComponentTwo"
+ components[:component_one][:class_name].should == "Netzke::ComponentOne"
+ components[:my_component_two][:class_name].should == "Netzke::ComponentTwo"
+ components[:netzke_1][:class_name].should == "Netzke::ComponentTwo"
end

0 comments on commit c9bd472

Please sign in to comment.