riot_rails 0.0.9.pre → 0.0.10.pre.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
- test/rails_root/log/*.log
1
+ test/rails_root/log/*
2
2
  pkg/*
3
3
 
data/Rakefile CHANGED
@@ -32,7 +32,7 @@ begin
32
32
  gem.email = "gus@gusg.us"
33
33
  gem.homepage = "http://github.com/thumblemonks/riot_rails"
34
34
  gem.authors = ["Justin 'Gus' Knowlden"]
35
- gem.add_dependency("riot", ">= 0.10.13.pre")
35
+ gem.add_dependency("riot", ">= 0.10.13")
36
36
  gem.add_development_dependency("activerecord", ">= 3.0.0.pre")
37
37
  gem.add_development_dependency("actionpack", ">= 3.0.0.pre")
38
38
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9.pre
1
+ 0.0.10.pre.2
@@ -44,16 +44,16 @@ module RiotRails #:nodoc:
44
44
  parameters ||= {}
45
45
  @request.assign_parameters(@controller.class.name.underscore.sub(/_controller$/, ''), action.to_s, parameters)
46
46
 
47
- # @request.session = ActionController::TestSession.new(session) unless session.nil?
48
- # @request.session["flash"] = @request.flash.update(flash || {})
49
- # @request.session["flash"].sweep
47
+ @request.session = ActionController::TestSession.new(session) unless session.nil?
48
+ @request.session["flash"] = @request.flash.update(flash || {})
49
+ @request.session["flash"].sweep
50
50
 
51
51
  @controller.request = @request
52
52
  @controller.params.merge!(parameters)
53
53
  build_request_uri(action, parameters)
54
54
  ::ActionController::Base.class_eval { include ::ActionController::Testing }
55
55
  @controller.process_with_new_base_test(@request, @response)
56
- # @request.session.delete('flash') if @request.session['flash'].blank?
56
+ @request.session.delete('flash') if @request.session['flash'].blank?
57
57
  @response
58
58
  end
59
59
 
@@ -73,9 +73,6 @@ end # RiotRails
73
73
 
74
74
  Riot::Situation.instance_eval do
75
75
  include RiotRails::ActionController::HttpSupport
76
-
77
- # Making routes work in the situation
78
- Rails::Application.routes.named_routes.install(self)
79
- include ActionController::UrlFor
76
+ include ::ActionController::UrlFor
80
77
  default_url_options[:host] = "test.host"
81
78
  end
data/log/test.log ADDED
File without changes
data/riot_rails.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{riot_rails}
8
- s.version = "0.0.9.pre"
8
+ s.version = "0.0.10.pre.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin 'Gus' Knowlden"]
12
- s.date = %q{2010-02-20}
12
+ s.date = %q{2010-03-02}
13
13
  s.description = %q{Riot specific test support for Rails apps. Protest the slow app.}
14
14
  s.email = %q{gus@gusg.us}
15
15
  s.extra_rdoc_files = [
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
35
35
  "lib/riot/active_record/validation_macros.rb",
36
36
  "lib/riot/rails.rb",
37
37
  "lib/riot/rails_context.rb",
38
+ "log/test.log",
38
39
  "rails/init.rb",
39
40
  "riot_rails.gemspec",
40
41
  "test/action_controller/controller_context_test.rb",
@@ -54,6 +55,7 @@ Gem::Specification.new do |s|
54
55
  "test/active_record/validates_uniqueness_of_test.rb",
55
56
  "test/rails_context_test.rb",
56
57
  "test/rails_root/app/views/rendered_templates/foo_bar.html.erb",
58
+ "test/rails_root/config/database.yml",
57
59
  "test/rails_root/config/environment.rb",
58
60
  "test/rails_root/config/routes.rb",
59
61
  "test/rails_root/db/schema.rb",
@@ -62,7 +64,7 @@ Gem::Specification.new do |s|
62
64
  s.homepage = %q{http://github.com/thumblemonks/riot_rails}
63
65
  s.rdoc_options = ["--charset=UTF-8"]
64
66
  s.require_paths = ["lib"]
65
- s.rubygems_version = %q{1.3.5}
67
+ s.rubygems_version = %q{1.3.6}
66
68
  s.summary = %q{Riot specific test support for Rails apps}
67
69
  s.test_files = [
68
70
  "test/action_controller/controller_context_test.rb",
@@ -92,16 +94,16 @@ Gem::Specification.new do |s|
92
94
  s.specification_version = 3
93
95
 
94
96
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
95
- s.add_runtime_dependency(%q<riot>, [">= 0.10.13.pre"])
97
+ s.add_runtime_dependency(%q<riot>, [">= 0.10.13"])
96
98
  s.add_development_dependency(%q<activerecord>, [">= 3.0.0.pre"])
97
99
  s.add_development_dependency(%q<actionpack>, [">= 3.0.0.pre"])
98
100
  else
99
- s.add_dependency(%q<riot>, [">= 0.10.13.pre"])
101
+ s.add_dependency(%q<riot>, [">= 0.10.13"])
100
102
  s.add_dependency(%q<activerecord>, [">= 3.0.0.pre"])
101
103
  s.add_dependency(%q<actionpack>, [">= 3.0.0.pre"])
102
104
  end
103
105
  else
104
- s.add_dependency(%q<riot>, [">= 0.10.13.pre"])
106
+ s.add_dependency(%q<riot>, [">= 0.10.13"])
105
107
  s.add_dependency(%q<activerecord>, [">= 3.0.0.pre"])
106
108
  s.add_dependency(%q<actionpack>, [">= 3.0.0.pre"])
107
109
  end
@@ -0,0 +1,4 @@
1
+ test:
2
+ adapter: "sqlite3"
3
+ database: ":memory:"
4
+
@@ -1,18 +1,20 @@
1
1
  ENV['RAILS_ENV'] = 'test'
2
2
 
3
+ require 'sqlite3'
3
4
  require "active_record/railtie"
4
5
  require "action_controller/railtie"
5
6
  # require "action_mailer/railtie"
6
7
  # require "active_resource/railtie"
7
8
 
8
- module Rails
9
- def self.root; File.expand_path(File.join(File.dirname(__FILE__), "..")); end
10
- end
11
-
12
9
  module RiotRails
13
- class Application < Rails::Application; end
10
+ class Application < Rails::Application
11
+ config.root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
12
+ config.action_controller.session = { :key => "_riotrails_session", :secret => ("i own you." * 3) }
13
+ end
14
14
  end
15
15
 
16
+ RiotRails::Application.initialize!
17
+
16
18
  require File.join(Rails.root, "config", "routes.rb")
17
19
 
18
20
  # Logging stuff
@@ -36,11 +38,7 @@ def shhh(&block)
36
38
  end
37
39
 
38
40
  shhh do
39
- require 'sqlite3'
40
- ActiveRecord::Base.configurations = {"test" => { "adapter" => "sqlite3", "database" => ":memory:"}}
41
- ActiveRecord::Base.establish_connection("test")
42
41
  load(File.join(Rails.root, "db", "schema.rb"))
43
42
  end
44
43
 
45
44
  ActiveRecord::Base.logger = Logger.new(NilIO.new)
46
- ActionController::Base.view_paths = [File.join(Rails.root, 'app', 'views')]
metadata CHANGED
@@ -1,7 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riot_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.pre
4
+ prerelease: true
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 10
9
+ - pre
10
+ - 2
11
+ version: 0.0.10.pre.2
5
12
  platform: ruby
6
13
  authors:
7
14
  - Justin 'Gus' Knowlden
@@ -9,39 +16,53 @@ autorequire:
9
16
  bindir: bin
10
17
  cert_chain: []
11
18
 
12
- date: 2010-02-20 00:00:00 -06:00
19
+ date: 2010-03-02 00:00:00 -06:00
13
20
  default_executable:
14
21
  dependencies:
15
22
  - !ruby/object:Gem::Dependency
16
23
  name: riot
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
23
- version: 0.10.13.pre
24
- version:
29
+ segments:
30
+ - 0
31
+ - 10
32
+ - 13
33
+ version: 0.10.13
34
+ type: :runtime
35
+ version_requirements: *id001
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: activerecord
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
30
40
  requirements:
31
41
  - - ">="
32
42
  - !ruby/object:Gem::Version
43
+ segments:
44
+ - 3
45
+ - 0
46
+ - 0
47
+ - pre
33
48
  version: 3.0.0.pre
34
- version:
49
+ type: :development
50
+ version_requirements: *id002
35
51
  - !ruby/object:Gem::Dependency
36
52
  name: actionpack
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
40
55
  requirements:
41
56
  - - ">="
42
57
  - !ruby/object:Gem::Version
58
+ segments:
59
+ - 3
60
+ - 0
61
+ - 0
62
+ - pre
43
63
  version: 3.0.0.pre
44
- version:
64
+ type: :development
65
+ version_requirements: *id003
45
66
  description: Riot specific test support for Rails apps. Protest the slow app.
46
67
  email: gus@gusg.us
47
68
  executables: []
@@ -70,6 +91,7 @@ files:
70
91
  - lib/riot/active_record/validation_macros.rb
71
92
  - lib/riot/rails.rb
72
93
  - lib/riot/rails_context.rb
94
+ - log/test.log
73
95
  - rails/init.rb
74
96
  - riot_rails.gemspec
75
97
  - test/action_controller/controller_context_test.rb
@@ -89,6 +111,7 @@ files:
89
111
  - test/active_record/validates_uniqueness_of_test.rb
90
112
  - test/rails_context_test.rb
91
113
  - test/rails_root/app/views/rendered_templates/foo_bar.html.erb
114
+ - test/rails_root/config/database.yml
92
115
  - test/rails_root/config/environment.rb
93
116
  - test/rails_root/config/routes.rb
94
117
  - test/rails_root/db/schema.rb
@@ -106,18 +129,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
129
  requirements:
107
130
  - - ">="
108
131
  - !ruby/object:Gem::Version
132
+ segments:
133
+ - 0
109
134
  version: "0"
110
- version:
111
135
  required_rubygems_version: !ruby/object:Gem::Requirement
112
136
  requirements:
113
137
  - - ">"
114
138
  - !ruby/object:Gem::Version
139
+ segments:
140
+ - 1
141
+ - 3
142
+ - 1
115
143
  version: 1.3.1
116
- version:
117
144
  requirements: []
118
145
 
119
146
  rubyforge_project:
120
- rubygems_version: 1.3.5
147
+ rubygems_version: 1.3.6
121
148
  signing_key:
122
149
  specification_version: 3
123
150
  summary: Riot specific test support for Rails apps