riot-rails 0.1.0 → 0.2.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/.gitignore +4 -0
  2. data/CHANGELOG +150 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.markdown +31 -0
  5. data/Rakefile +32 -10
  6. data/VERSION +1 -1
  7. data/lib/riot/action_controller/context_macros/asserts_response.rb +15 -0
  8. data/lib/riot/action_controller/context_middleware.rb +48 -0
  9. data/lib/riot/action_controller/http_methods.rb +19 -0
  10. data/lib/riot/action_controller.rb +4 -0
  11. data/lib/riot/active_record/assertion_macros.rb +3 -0
  12. data/lib/riot/active_record/context_middleware.rb +17 -0
  13. data/lib/riot/active_record/database_macros.rb +58 -0
  14. data/lib/riot/active_record/reflection_macros.rb +106 -0
  15. data/lib/riot/active_record/transactional_middleware.rb +28 -0
  16. data/lib/riot/active_record/validation_macros.rb +187 -0
  17. data/lib/riot/active_record.rb +4 -0
  18. data/lib/riot/rails.rb +1 -0
  19. data/rails/init.rb +1 -0
  20. data/riot-rails.gemspec +130 -0
  21. data/test/action_controller/context_macros/asserts_response_test.rb +35 -0
  22. data/test/action_controller/context_middleware_test.rb +66 -0
  23. data/test/action_controller/delete_request_test.rb +45 -0
  24. data/test/action_controller/get_request_test.rb +37 -0
  25. data/test/action_controller/post_request_test.rb +45 -0
  26. data/test/action_controller/put_request_test.rb +45 -0
  27. data/test/action_controller/restful_delete_request_test.rb +28 -0
  28. data/test/action_controller/restful_get_request_test.rb +25 -0
  29. data/test/action_controller/restful_post_request_test.rb +25 -0
  30. data/test/action_controller/restful_put_request_test.rb +28 -0
  31. data/test/active_record/allowing_values_test.rb +64 -0
  32. data/test/active_record/attribute_is_invalid_test.rb +20 -0
  33. data/test/active_record/belongs_to_test.rb +22 -0
  34. data/test/active_record/context_middleware_test.rb +18 -0
  35. data/test/active_record/has_and_belongs_to_many_test.rb +22 -0
  36. data/test/active_record/has_database_index_on_test.rb +73 -0
  37. data/test/active_record/has_many_test.rb +22 -0
  38. data/test/active_record/has_one_test.rb +22 -0
  39. data/test/active_record/validates_length_of_test.rb +31 -0
  40. data/test/active_record/validates_presence_of_test.rb +14 -0
  41. data/test/active_record/validates_uniqueness_of_test.rb +23 -0
  42. data/test/rails_root/app/controllers/gremlins_controller.rb +21 -0
  43. data/test/rails_root/app/controllers/parties_controller.rb +17 -0
  44. data/test/rails_root/app/controllers/rooms_controller.rb +22 -0
  45. data/{README.md → test/rails_root/app/views/rendered_templates/foo_bar.html.erb} +0 -0
  46. data/test/rails_root/config/database.yml +4 -0
  47. data/test/rails_root/config/environment.rb +46 -0
  48. data/test/rails_root/config/routes.rb +7 -0
  49. data/test/rails_root/db/schema.rb +8 -0
  50. data/test/teststrap.rb +84 -0
  51. data/test/transactional_middleware_test.rb +27 -0
  52. metadata +154 -26
  53. data/init.rb +0 -0
  54. data/install.rb +0 -0
  55. data/lib/generators/riot_rails/model/model_generator.rb +0 -22
  56. data/lib/generators/riot_rails/model/templates/fixtures.yml +0 -23
  57. data/lib/generators/riot_rails/model/templates/riot_test.rb +0 -5
  58. data/lib/generators/riot_rails.rb +0 -10
metadata CHANGED
@@ -1,47 +1,143 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riot-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ prerelease: true
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 0
9
+ - pre
10
+ version: 0.2.0.pre
5
11
  platform: ruby
6
12
  authors:
7
- - Daniel Schierbeck
13
+ - Justin 'Gus' Knowlden
8
14
  autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-06 00:00:00 +01:00
18
+ date: 2010-06-13 00:00:00 -05:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: riot
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ - 11
31
+ - 0
32
+ version: 0.11.0
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rack-test
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ segments:
43
+ - 0
44
+ - 5
45
+ - 3
46
+ version: 0.5.3
17
47
  type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: activerecord
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ segments:
57
+ - 3
58
+ - 0
59
+ - 0
60
+ - beta3
61
+ version: 3.0.0.beta3
62
+ type: :development
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: actionpack
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
20
68
  requirements:
21
69
  - - ">="
22
70
  - !ruby/object:Gem::Version
23
- version: "0"
24
- version:
25
- description: Use the fast, expressive and concise Riot unit-testing framework to test your Rails apps with.
26
- email: daniel.schierbeck@gmail.com
71
+ segments:
72
+ - 3
73
+ - 0
74
+ - 0
75
+ - beta3
76
+ version: 3.0.0.beta3
77
+ type: :development
78
+ version_requirements: *id004
79
+ description: Riot specific test support for Rails apps. Protest the slow app.
80
+ email: gus@gusg.us
27
81
  executables: []
28
82
 
29
83
  extensions: []
30
84
 
31
85
  extra_rdoc_files:
32
- - README.md
86
+ - README.markdown
33
87
  files:
34
- - README.md
88
+ - .gitignore
89
+ - CHANGELOG
90
+ - MIT-LICENSE
91
+ - README.markdown
35
92
  - Rakefile
36
93
  - VERSION
37
- - init.rb
38
- - install.rb
39
- - lib/generators/riot_rails.rb
40
- - lib/generators/riot_rails/model/model_generator.rb
41
- - lib/generators/riot_rails/model/templates/fixtures.yml
42
- - lib/generators/riot_rails/model/templates/riot_test.rb
94
+ - lib/riot/action_controller.rb
95
+ - lib/riot/action_controller/context_macros/asserts_response.rb
96
+ - lib/riot/action_controller/context_middleware.rb
97
+ - lib/riot/action_controller/http_methods.rb
98
+ - lib/riot/active_record.rb
99
+ - lib/riot/active_record/assertion_macros.rb
100
+ - lib/riot/active_record/context_middleware.rb
101
+ - lib/riot/active_record/database_macros.rb
102
+ - lib/riot/active_record/reflection_macros.rb
103
+ - lib/riot/active_record/transactional_middleware.rb
104
+ - lib/riot/active_record/validation_macros.rb
105
+ - lib/riot/rails.rb
106
+ - rails/init.rb
107
+ - riot-rails.gemspec
108
+ - test/action_controller/context_macros/asserts_response_test.rb
109
+ - test/action_controller/context_middleware_test.rb
110
+ - test/action_controller/delete_request_test.rb
111
+ - test/action_controller/get_request_test.rb
112
+ - test/action_controller/post_request_test.rb
113
+ - test/action_controller/put_request_test.rb
114
+ - test/action_controller/restful_delete_request_test.rb
115
+ - test/action_controller/restful_get_request_test.rb
116
+ - test/action_controller/restful_post_request_test.rb
117
+ - test/action_controller/restful_put_request_test.rb
118
+ - test/active_record/allowing_values_test.rb
119
+ - test/active_record/attribute_is_invalid_test.rb
120
+ - test/active_record/belongs_to_test.rb
121
+ - test/active_record/context_middleware_test.rb
122
+ - test/active_record/has_and_belongs_to_many_test.rb
123
+ - test/active_record/has_database_index_on_test.rb
124
+ - test/active_record/has_many_test.rb
125
+ - test/active_record/has_one_test.rb
126
+ - test/active_record/validates_length_of_test.rb
127
+ - test/active_record/validates_presence_of_test.rb
128
+ - test/active_record/validates_uniqueness_of_test.rb
129
+ - test/rails_root/app/controllers/gremlins_controller.rb
130
+ - test/rails_root/app/controllers/parties_controller.rb
131
+ - test/rails_root/app/controllers/rooms_controller.rb
132
+ - test/rails_root/app/views/rendered_templates/foo_bar.html.erb
133
+ - test/rails_root/config/database.yml
134
+ - test/rails_root/config/environment.rb
135
+ - test/rails_root/config/routes.rb
136
+ - test/rails_root/db/schema.rb
137
+ - test/teststrap.rb
138
+ - test/transactional_middleware_test.rb
43
139
  has_rdoc: true
44
- homepage: http://github.com/dasch/riot-rails
140
+ homepage: http://github.com/thumblemonks/riot-rails
45
141
  licenses: []
46
142
 
47
143
  post_install_message:
@@ -53,20 +149,52 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
149
  requirements:
54
150
  - - ">="
55
151
  - !ruby/object:Gem::Version
152
+ segments:
153
+ - 0
56
154
  version: "0"
57
- version:
58
155
  required_rubygems_version: !ruby/object:Gem::Requirement
59
156
  requirements:
60
- - - ">="
157
+ - - ">"
61
158
  - !ruby/object:Gem::Version
62
- version: "0"
63
- version:
159
+ segments:
160
+ - 1
161
+ - 3
162
+ - 1
163
+ version: 1.3.1
64
164
  requirements: []
65
165
 
66
166
  rubyforge_project:
67
- rubygems_version: 1.3.5
167
+ rubygems_version: 1.3.6
68
168
  signing_key:
69
169
  specification_version: 3
70
- summary: Test your Rails apps with Riot
71
- test_files: []
72
-
170
+ summary: Riot specific test support for Rails apps
171
+ test_files:
172
+ - test/action_controller/context_macros/asserts_response_test.rb
173
+ - test/action_controller/context_middleware_test.rb
174
+ - test/action_controller/delete_request_test.rb
175
+ - test/action_controller/get_request_test.rb
176
+ - test/action_controller/post_request_test.rb
177
+ - test/action_controller/put_request_test.rb
178
+ - test/action_controller/restful_delete_request_test.rb
179
+ - test/action_controller/restful_get_request_test.rb
180
+ - test/action_controller/restful_post_request_test.rb
181
+ - test/action_controller/restful_put_request_test.rb
182
+ - test/active_record/allowing_values_test.rb
183
+ - test/active_record/attribute_is_invalid_test.rb
184
+ - test/active_record/belongs_to_test.rb
185
+ - test/active_record/context_middleware_test.rb
186
+ - test/active_record/has_and_belongs_to_many_test.rb
187
+ - test/active_record/has_database_index_on_test.rb
188
+ - test/active_record/has_many_test.rb
189
+ - test/active_record/has_one_test.rb
190
+ - test/active_record/validates_length_of_test.rb
191
+ - test/active_record/validates_presence_of_test.rb
192
+ - test/active_record/validates_uniqueness_of_test.rb
193
+ - test/rails_root/app/controllers/gremlins_controller.rb
194
+ - test/rails_root/app/controllers/parties_controller.rb
195
+ - test/rails_root/app/controllers/rooms_controller.rb
196
+ - test/rails_root/config/environment.rb
197
+ - test/rails_root/config/routes.rb
198
+ - test/rails_root/db/schema.rb
199
+ - test/teststrap.rb
200
+ - test/transactional_middleware_test.rb
data/init.rb DELETED
File without changes
data/install.rb DELETED
File without changes
@@ -1,22 +0,0 @@
1
- require 'generators/riot_rails'
2
-
3
- module RiotRails
4
- module Generators
5
- class ModelGenerator < Base
6
- argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
7
- class_option :fixture, :type => :boolean
8
-
9
- def create_test_file
10
- template File.join(File.dirname(__FILE__), 'templates', 'riot_test.rb'), File.join('test/unit', class_path, "#{file_name}_test.rb")
11
- end
12
-
13
- hook_for :fixture_replacement
14
-
15
- def create_fixture_file
16
- if options[:fixture] && options[:fixture_replacement].nil?
17
- template File.join(File.dirname(__FILE__), 'templates', 'fixtures.yml'), File.join('test/fixtures', "#{table_name}.yml")
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,23 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
-
3
- <% unless attributes.empty? -%>
4
- one:
5
- <% for attribute in attributes -%>
6
- <%= attribute.name %>: <%= attribute.default %>
7
- <% end -%>
8
-
9
- two:
10
- <% for attribute in attributes -%>
11
- <%= attribute.name %>: <%= attribute.default %>
12
- <% end -%>
13
- <% else -%>
14
- # This model initially had no columns defined. If you add columns to the
15
- # model remove the '{}' from the fixture names and add the columns immediately
16
- # below each fixture, per the syntax in the comments below
17
- #
18
- one: {}
19
- # column: value
20
- #
21
- two: {}
22
- # column: value
23
- <% end -%>
@@ -1,5 +0,0 @@
1
- require 'test_helper'
2
-
3
- context "A <%= class_name %>" do
4
- asserts("1 + 1") { 1 + 1 }.equals{2}
5
- end
@@ -1,10 +0,0 @@
1
- require 'rails/generators/named_base'
2
-
3
- require 'riot'
4
-
5
- module RiotRails
6
- module Generators
7
- class Base < Rails::Generators::NamedBase #:nodoc:
8
- end
9
- end
10
- end