Skip to content

Rails hydra #57

Closed
wants to merge 46 commits into from

1 participant

@tpickett66

At the time of this request we don't have any support for Rails 3.X in the client and rubycas-client-rails doesn't work with the latest version of the client gem. So to start the process of bringing Rails 3.x support (and incidentally Ruby 1.9..3) I began the process of moving the test infrastructure to using a dummy app. To maintain Rails 2.3 testability there were a lot of hacks that had to be done but most of the commits here only touch a few files so they should be easy to digest.

tpickett66 added some commits Nov 1, 2012
@tpickett66 tpickett66 ignore DS_Store files
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
3dc40fb
@tpickett66 tpickett66 add dummy rails app
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
786f46a
@tpickett66 tpickett66 make older versions of rails happy
I generated using 3.2.8 but it includes many
features not available in older versions.

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
b05fed7
@tpickett66 tpickett66 configure new 'app' for some jruby love
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
a0e24cb
@tpickett66 tpickett66 add migrations to our dummy app
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
4de0b7a
@tpickett66 tpickett66 run migrations before we attempt to test
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
97deb98
@tpickett66 tpickett66 ignore our new app's test logs and DB
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
530a5ac
@tpickett66 tpickett66 remove active_record_helpers
Since the dummy app is handling this now we don't
need to maintain these setup methods.

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
e7cbb38
@tpickett66 tpickett66 stop following our test logs in git...
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
2d1d2bc
@tpickett66 tpickett66 add a boot.rb for initing rails 2.3
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
40a2501
@tpickett66 tpickett66 begin hacking our app's boot process
Because such a huge shift was made between rails
2.3 and 3.x we can't use the same boot process.
There will be more hacks to make this work...

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
c20f3a4
@tpickett66 tpickett66 hack our app's test environment to work both ways
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
9029648
@tpickett66 tpickett66 do our initialization both ways...
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
96e61dd
@tpickett66 tpickett66 load up our app's test helpers correctly
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
8c205e2
@tpickett66 tpickett66 ewps, need to know if config can do that not Object
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
99a4743
@tpickett66 tpickett66 Filter.fake specs passing with 'real' controller
This approach only works in Rails 2.3 so it
doesn't further the goal of adding 3.x support
but it may provide a path forward.

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
5d4e1ef
@tpickett66 tpickett66 implement controller instantiation helper
Because Rails 2.3 and 3.x handle sessions
differently we need to get a controller instance
in a slightly different way between them.

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
28eb7e7
@tpickett66 tpickett66 plug in new controller builder
Hooray! These two specs are green in all target
versions of Rails! (2.3, 3.0, 3.1, 3.2)

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
6c9485e
@tpickett66 tpickett66 remove redundant require
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
b5e01a4
@tpickett66 tpickett66 add a real controller and route
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
42d1852
@tpickett66 tpickett66 remove focus from those specs
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
db852a3
@tpickett66 tpickett66 comment out controller mocking
This way we can quickly find everything using it.

Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
7cb3b8d
@tpickett66 tpickett66 plug in our real controller, not just the abstract
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
5b189b9
@tpickett66 tpickett66 build and use rails' built in test requests
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
ecc8b3a
@tpickett66 tpickett66 DRY up rails version checking for setup
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
f76e578
@tpickett66 tpickett66 manually delegate rails 2.3 params to the request
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
2656e8c
@tpickett66 tpickett66 set up our query parameters/string
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
5658245
@tpickett66 tpickett66 setup rails 2's @url instance variable
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
5ef4bc0
@tpickett66 tpickett66 valid ticket spec passing for all target versions of rails
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
93f9c24
@tpickett66 tpickett66 dun, dun, dun, another one passes now.
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
0a77395
@tpickett66 tpickett66 allow customization of the Rack environment
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
294d7db
@tpickett66 tpickett66 deal with the moronic way Rails 2.3 checks the query string
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
9d15056
@tpickett66 tpickett66 another group of filter specs passing
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
fce15d9
@tpickett66 tpickett66 make request_uri match the default supplied by rails
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
c4ef598
@tpickett66 tpickett66 add helper to build request urls w/o ticket
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
e170822
@tpickett66 tpickett66 another round of passing specs
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
bdbbcdd
@tpickett66 tpickett66 last filter spec passing all target versions of rails
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
3d2ea2d
@tpickett66 tpickett66 remove spec that doesn't assert anything
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
5e97390
@tpickett66 tpickett66 build a real controller for these specs
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
890ec86
@tpickett66 tpickett66 all active_record_ticket_store examples passing
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
ffed5e0
@tpickett66 tpickett66 abstract session store specs passing
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
af5b7cd
@tpickett66 tpickett66 FS Session store specs passing
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
3ac70e1
@tpickett66 tpickett66 all specs passing without mocked controller, removing controller mock
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
24f8176
@tpickett66 tpickett66 comment out mock_post_request to see what breaks
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
93cc340
@tpickett66 tpickett66 nothing broke, removing
Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
3eaffab
@tpickett66 tpickett66 unhide find_by_sesison_id
Rails 3.x mangles this method in some weird way.
The specs were failing at line 32 of storage.rb
where we were trying to use the session_class
method on the session store, in the debugger using
send didn't work but using 
session_class.superclass.find_by_session_id did
work so we arrive at this stupid simple
implementation


Signed-off-by: Tyler Pickett <t.pickett66@gmail.com>
7f886f3
@tpickett66 tpickett66 closed this Sep 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.