muck-engine 0.2.13 → 0.2.15

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -49,10 +49,10 @@ begin
49
49
  Jeweler::Tasks.new do |gemspec|
50
50
  gemspec.name = "muck-engine"
51
51
  gemspec.summary = "The base engine for the muck system."
52
- gemspec.email = "justinball@gmail.com"
53
- gemspec.homepage = "http://github.com/jbasdf/muck_engine"
52
+ gemspec.email = "justin@tatemae.com"
53
+ gemspec.homepage = "http://github.com/tatemae/muck_engine"
54
54
  gemspec.description = "The base engine for the muck system. Contains common tables, custom for, css and javascript."
55
- gemspec.authors = ["Justin Ball"]
55
+ gemspec.authors = ["Justin Ball", "Joel Duffin"]
56
56
  gemspec.rubyforge_project = 'muck-engine'
57
57
  gemspec.add_dependency "validation_reflection"
58
58
  gemspec.add_dependency "will_paginate"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.13
1
+ 0.2.15
@@ -263,6 +263,12 @@ class MuckEngine
263
263
  end
264
264
  end
265
265
 
266
+ desc 'Translate app into all languages supported by Google'
267
+ task :translate_app => :environment do
268
+ puts 'translating app'
269
+ system("babelphish -o -y #{RAILS_ROOT}/config/locales/en.yml")
270
+ end
271
+
266
272
  desc "write specs into muck gems"
267
273
  task :specs do
268
274
  muck_write_specs
@@ -302,6 +308,7 @@ class MuckEngine
302
308
  task :sync do
303
309
  puts 'syncronizing engines and gems'
304
310
  muck_gems.each do |gem_name|
311
+ puts "syncronizing assets and code from #{gem_name}"
305
312
  if gem_name.include?('muck')
306
313
  task = "muck:#{gem_name.gsub('muck-', '')}:sync"
307
314
  else
@@ -0,0 +1,43 @@
1
+ require 'test_help'
2
+ gem 'factory_girl'
3
+ gem 'mocha'
4
+ gem 'shoulda'
5
+ # gem 'rspec', :lib => 'spec'
6
+ # gem 'rspec-rails', :lib => 'spec/rails'
7
+ gem 'treetop'
8
+ gem 'term-ansicolor'
9
+ gem 'cucumber', :version => '>=0.1.13', :lib => 'cucumber'
10
+ gem 'polyglot', :version => '>=0.2.4'
11
+ gem "rcov", :version => '>=0.8.1.2.0'
12
+ gem "webrat", :version => '>=0.4.4'
13
+
14
+ # only required if you want to use selenium for testing
15
+ #gem 'selenium-client', :lib => 'selenium/client'
16
+ #gem 'bmabey-database_cleaner', :lib => 'database_cleaner', :source => 'http://gems.github.com'
17
+
18
+ require 'shoulda'
19
+ require 'factory_girl'
20
+ require 'mocha'
21
+ require 'ruby-debug'
22
+
23
+ require 'redgreen' rescue LoadError
24
+ require File.join(File.dirname(__FILE__), 'test', 'muck_factories')
25
+ require File.join(File.dirname(__FILE__), 'test', 'muck_test_methods')
26
+ require File.join(File.dirname(__FILE__), 'test', 'muck_test_definitions')
27
+ require File.join(File.dirname(__FILE__), 'test', 'shoulda_macros', 'controller')
28
+ require File.join(File.dirname(__FILE__), 'test', 'shoulda_macros', 'forms')
29
+ require File.join(File.dirname(__FILE__), 'test', 'shoulda_macros', 'models')
30
+ require File.join(File.dirname(__FILE__), 'test', 'shoulda_macros', 'pagination')
31
+ require File.join(File.dirname(__FILE__), 'test', 'shoulda_macros', 'plugins')
32
+
33
+ begin
34
+ # turn off solr for tests
35
+ class ActsAsSolr::Post
36
+ def self.execute(request)
37
+ true
38
+ end
39
+ end
40
+ rescue NameError => ex
41
+ puts "Solr not loaded. Skipping ActsAsSolr mock"
42
+ # solr isn't loaded. Just throw out the error
43
+ end
@@ -0,0 +1,208 @@
1
+ # This file defines factories for all muck related models. You must have the
2
+ # muck gem installed and the related migrations run for all of these to work.
3
+ Factory.sequence :email do |n|
4
+ "somebody#{n}@example.com"
5
+ end
6
+
7
+ Factory.sequence :login do |n|
8
+ "inquire#{n}"
9
+ end
10
+
11
+ Factory.sequence :name do |n|
12
+ "a_name#{n}"
13
+ end
14
+
15
+ Factory.sequence :title do |n|
16
+ "a_title#{n}"
17
+ end
18
+
19
+ Factory.sequence :abbr do |n|
20
+ "abbr#{n}"
21
+ end
22
+
23
+ Factory.sequence :uri do |n|
24
+ "n#{n}.example.com"
25
+ end
26
+
27
+ Factory.sequence :description do |n|
28
+ "This is the description: #{n}"
29
+ end
30
+
31
+ Factory.sequence :locale do |n|
32
+ "a#{n}"
33
+ end
34
+
35
+ Factory.define :state do |f|
36
+ f.name { Factory.next(:name) }
37
+ f.abbreviation { Factory.next(:abbr) }
38
+ f.country {|a| a.association(:country) }
39
+ end
40
+
41
+ Factory.define :country do |f|
42
+ f.name { Factory.next(:name) }
43
+ f.abbreviation { Factory.next(:abbr) }
44
+ end
45
+
46
+ Factory.define :language do |f|
47
+ f.name { Factory.next(:name) }
48
+ f.english_name { Factory.next(:name) }
49
+ f.locale { Factory.next(:locale) }
50
+ f.supported true
51
+ f.muck_raker_supported true
52
+ end
53
+
54
+ Factory.define :user do |f|
55
+ f.login { Factory.next(:login) }
56
+ f.email { Factory.next(:email) }
57
+ f.password 'inquire_pass'
58
+ f.password_confirmation 'inquire_pass'
59
+ f.first_name 'test'
60
+ f.last_name 'guy'
61
+ f.terms_of_service true
62
+ f.activated_at DateTime.now
63
+ end
64
+
65
+ Factory.define :content_page do |f|
66
+ f.creator {|a| a.association(:user)}
67
+ f.title { Factory.next(:name) }
68
+ f.body_raw { Factory.next(:description) }
69
+ end
70
+
71
+ Factory.define :permission do |f|
72
+ f.role {|a| a.association(:role)}
73
+ f.user {|a| a.association(:user)}
74
+ end
75
+
76
+ Factory.define :role do |f|
77
+ f.rolename 'administrator'
78
+ end
79
+
80
+ Factory.define :activity do |f|
81
+ f.item {|a| a.association(:user)}
82
+ f.template ''
83
+ f.source {|a| a.association(:user)}
84
+ f.content ''
85
+ f.title ''
86
+ f.is_status_update false
87
+ f.is_public true
88
+ f.created_at DateTime.now
89
+ end
90
+
91
+ Factory.define :comment do |f|
92
+ f.body { Factory.next(:description) }
93
+ f.user {|a| a.association(:user)}
94
+ f.commentable {|a| a.association(:user)}
95
+ end
96
+
97
+ Factory.define :share do |f|
98
+ f.uri { Factory.next(:uri) }
99
+ f.title { Factory.next(:title) }
100
+ f.shared_by {|a| a.association(:user)}
101
+ end
102
+
103
+ Factory.define :blog do |f|
104
+ f.title { Factory.next(:title) }
105
+ f.blogable {|a| a.association(:user)}
106
+ end
107
+
108
+ Factory.define :domain_theme do |f|
109
+ f.name { Factory.next(:name) }
110
+ f.uri { Factory.next(:uri) }
111
+ end
112
+
113
+ Factory.define :theme do |f|
114
+ f.name { Factory.next(:name) }
115
+ end
116
+
117
+ Factory.define :feed do |f|
118
+ f.contributor { |a| a.association(:user) }
119
+ f.uri { Factory.next(:uri) }
120
+ f.display_uri { Factory.next(:uri) }
121
+ f.title { Factory.next(:title) }
122
+ f.short_title { Factory.next(:title) }
123
+ f.description { Factory.next(:description) }
124
+ f.top_tags { Factory.next(:name) }
125
+ f.priority 1
126
+ f.status 1
127
+ f.last_requested_at DateTime.now
128
+ f.last_harvested_at DateTime.now
129
+ f.harvest_interval 86400
130
+ f.failed_requests 0
131
+ f.harvested_from_display_uri { Factory.next(:uri) }
132
+ f.harvested_from_title { Factory.next(:title) }
133
+ f.harvested_from_short_title { Factory.next(:title) }
134
+ f.entries_count 0
135
+ f.default_language { |a| a.association(:language) }
136
+ f.default_grain_size 'unknown'
137
+ end
138
+
139
+ Factory.define :entry do |f|
140
+ f.feed { |a| a.association(:feed) }
141
+ f.permalink { Factory.next(:uri) }
142
+ f.author { Factory.next(:name) }
143
+ f.title { Factory.next(:title) }
144
+ f.description { Factory.next(:description) }
145
+ f.content { Factory.next(:description) }
146
+ f.unique_content { Factory.next(:description) }
147
+ f.published_at DateTime.now
148
+ f.entry_updated_at DateTime.now
149
+ f.harvested_at DateTime.now
150
+ f.language { |a| a.association(:language) }
151
+ f.direct_link { Factory.next(:uri) }
152
+ f.grain_size 'unknown'
153
+ end
154
+
155
+ Factory.define :aggregation do |f|
156
+ f.title { Factory.next(:name) }
157
+ f.terms { Factory.next(:name) }
158
+ f.description { Factory.next(:description) }
159
+ f.ownable {|a| a.association(:user)}
160
+ end
161
+
162
+ Factory.define :aggregation_feed do |f|
163
+ f.feed {|a| a.association(:feed)}
164
+ f.aggregation {|a| a.association(:aggregation)}
165
+ end
166
+
167
+ Factory.define :oai_endpoint do |f|
168
+ f.contributor { |a| a.association(:user) }
169
+ f.uri { Factory.next(:uri) }
170
+ f.display_uri { Factory.next(:uri) }
171
+ f.title { Factory.next(:title) }
172
+ f.short_title { Factory.next(:title) }
173
+ f.status 1
174
+ end
175
+
176
+ Factory.define :service do |f|
177
+ f.uri { Factory.next(:uri) }
178
+ f.name { Factory.next(:name) }
179
+ f.service_category { |a| a.association(:service_category) }
180
+ end
181
+
182
+ Factory.define :service_category do |f|
183
+ f.name { Factory.next(:name) }
184
+ end
185
+
186
+ Factory.define :content do |f|
187
+ f.creator { |a| a.association(:user) }
188
+ f.title { Factory.next(:title) }
189
+ f.body_raw { Factory.next(:description) }
190
+ f.is_public true
191
+ f.locale 'en'
192
+ end
193
+
194
+ Factory.define :content_translation do |f|
195
+ f.content { |a| a.association(:content) }
196
+ f.title { Factory.next(:title) }
197
+ f.body { Factory.next(:description) }
198
+ f.locale 'en'
199
+ end
200
+
201
+ Factory.define :content_permission do |f|
202
+ f.content { |a| a.association(:content) }
203
+ f.user {|a| a.association(:user)}
204
+ end
205
+
206
+ Factory.define :invite do |f|
207
+ f.email { Factory.next(:email) }
208
+ end
@@ -0,0 +1,2 @@
1
+ NOT_LOGGED_IN_MSG = /You must be logged in to access this feature/i
2
+ PERMISSION_DENIED_MSG = /You don't have permission to do that/i
@@ -0,0 +1,50 @@
1
+ module MuckTestMethods
2
+
3
+ def ensure_flash(val)
4
+ assert_contains flash.values, val, ", Flash: #{flash.inspect}"
5
+ end
6
+
7
+ def login_as(user)
8
+ success = UserSession.create(user)
9
+ if !success
10
+ errors = user.errors.full_messages.to_sentence
11
+ message = 'User has not been activated' if !user.active?
12
+ raise "could not login as #{user.to_param}. Please make sure the user is valid. #{message} #{errors}"
13
+ end
14
+ UserSession.find
15
+ end
16
+
17
+ def assure_logout
18
+ user_session = UserSession.find
19
+ user_session.destroy if user_session
20
+ end
21
+
22
+ def ensure_flash(val)
23
+ assert_contains flash.values, val, ", Flash: #{flash.inspect}"
24
+ end
25
+
26
+ def ensure_flash_contains(val)
27
+ flash.values.each do |flv|
28
+ return true if flv.include?(val)
29
+ end
30
+ false
31
+ end
32
+
33
+ # Add more helper methods to be used for testing xml
34
+ def assert_xml_tag(xml, conditions)
35
+ doc = HTML::Document.new(xml)
36
+ assert doc.find(conditions),
37
+ "expected tag, but no tag found matching #{conditions.inspect} in:\n#{xml.inspect}"
38
+ end
39
+
40
+ def assert_no_xml_tag(xml, conditions)
41
+ doc = HTML::Document.new(xml)
42
+ assert !doc.find(conditions),
43
+ "expected no tag, but found tag matching #{conditions.inspect} in:\n#{xml.inspect}"
44
+ end
45
+
46
+ def make_parent_params(parent)
47
+ { :parent_id => parent.id, :parent_type => parent.class.to_s }
48
+ end
49
+
50
+ end
@@ -5,7 +5,11 @@ module MuckControllerMacros
5
5
  login_url = args.delete :login_url
6
6
  args.each do |action, verb|
7
7
  should "Require login for '#{action}' action" do
8
- send(verb, action)
8
+ if [:put, :delete].include?(verb) # put and delete require an id even if it is a bogus one
9
+ send(verb, action, :id => 1)
10
+ else
11
+ send(verb, action)
12
+ end
9
13
  assert_redirected_to(login_url)
10
14
  end
11
15
  end
@@ -56,4 +60,6 @@ module MuckControllerMacros
56
60
 
57
61
  end
58
62
 
63
+ ActiveSupport::TestCase.extend(MuckControllerMacros)
64
+ Test::Unit::TestCase.extend(MuckControllerMacros)
59
65
  ActionController::TestCase.extend(MuckControllerMacros)
@@ -1,5 +1,5 @@
1
- module ShouldaFormMacros
2
- def self.should_have_form(opts)
1
+ module MuckFormMacros
2
+ def should_have_form(opts)
3
3
  model = self.name.gsub(/ControllerTest$/, '').singularize.downcase
4
4
  model = model[model.rindex('::')+2..model.size] if model.include?('::')
5
5
  http_method, hidden_http_method = form_http_method opts[:method]
@@ -17,7 +17,7 @@ module ShouldaFormMacros
17
17
  end
18
18
  end
19
19
 
20
- def self.form_http_method(http_method)
20
+ def form_http_method(http_method)
21
21
  http_method = http_method.nil? ? 'post' : http_method.to_s
22
22
  if http_method == "post" || http_method == "get"
23
23
  return http_method, nil
@@ -27,6 +27,6 @@ module ShouldaFormMacros
27
27
  end
28
28
  end
29
29
 
30
- class ActiveSupport::TestCase
31
- extend ShouldaFormMacros
32
- end
30
+ ActiveSupport::TestCase.extend(MuckFormMacros)
31
+ Test::Unit::TestCase.extend(MuckFormMacros)
32
+ ActionController::TestCase.extend(MuckFormMacros)
@@ -1,6 +1,6 @@
1
- module ShouldaModelMacros
2
-
3
- def self.should_whitelist(*attributes)
1
+ module MuckModelMacros
2
+
3
+ def should_sanitize(*attributes)
4
4
  bad_scripts = [
5
5
  %|';alert(String.fromCharCode(88,83,83))//\';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//\";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>|,
6
6
  %|'';!--"<XSS>=&{()}|,
@@ -16,7 +16,7 @@ module ShouldaModelMacros
16
16
  tt p://6&#9;6.000146.0x7.147/">XSS</A>|,
17
17
  %|<script>alert('message');</script>| ]
18
18
 
19
- klass = model_class
19
+ klass = self.name.gsub(/Test$/, '').constantize
20
20
  attributes.each do |attribute|
21
21
  attribute = attribute.to_sym
22
22
  should "white list #{attribute}" do
@@ -45,6 +45,7 @@ module ShouldaModelMacros
45
45
  end
46
46
  end
47
47
 
48
- class ActiveSupport::TestCase
49
- extend ShouldaModelMacros
50
- end
48
+
49
+ ActiveSupport::TestCase.extend(MuckModelMacros)
50
+ Test::Unit::TestCase.extend(MuckModelMacros)
51
+ ActionController::TestCase.extend(MuckModelMacros)
@@ -1,4 +1,4 @@
1
- module ShouldaPaginationMacros
1
+ module MuckPaginationMacros
2
2
  # Example:
3
3
  # context "a GET to index logged in as admin" do
4
4
  # setup do
@@ -8,7 +8,7 @@ module ShouldaPaginationMacros
8
8
  # should_paginate_collection :users
9
9
  # should_display_pagination
10
10
  # end
11
- def self.should_paginate_collection(collection_name)
11
+ def should_paginate_collection(collection_name)
12
12
  should "paginate #{collection_name}" do
13
13
  assert collection = assigns(collection_name),
14
14
  "Controller isn't assigning to @#{collection_name.to_s}."
@@ -17,7 +17,7 @@ module ShouldaPaginationMacros
17
17
  end
18
18
  end
19
19
 
20
- def self.should_display_pagination
20
+ def should_display_pagination
21
21
  should "display pagination" do
22
22
  assert_select "div.pagination", { :minimum => 1 },
23
23
  "View isn't displaying pagination. Add <%= will_paginate @collection %>."
@@ -30,7 +30,7 @@ module ShouldaPaginationMacros
30
30
  # should_not_paginate_collection :users
31
31
  # should_not_display_pagination
32
32
  # end
33
- def self.should_not_paginate_collection(collection_name)
33
+ def should_not_paginate_collection(collection_name)
34
34
  should "not paginate #{collection_name}" do
35
35
  assert collection = assigns(collection_name),
36
36
  "Controller isn't assigning to @#{collection_name.to_s}."
@@ -39,7 +39,7 @@ module ShouldaPaginationMacros
39
39
  end
40
40
  end
41
41
 
42
- def self.should_not_display_pagination
42
+ def should_not_display_pagination
43
43
  should "not display pagination" do
44
44
  assert_select "div.pagination", { :count => 0 },
45
45
  "View is displaying pagination. Check your logic."
@@ -47,7 +47,6 @@ module ShouldaPaginationMacros
47
47
  end
48
48
  end
49
49
 
50
-
51
- class ActiveSupport::TestCase
52
- extend ShouldaPaginationMacros
53
- end
50
+ ActiveSupport::TestCase.extend(MuckPaginationMacros)
51
+ Test::Unit::TestCase.extend(MuckPaginationMacros)
52
+ ActionController::TestCase.extend(MuckPaginationMacros)
@@ -1,6 +1,6 @@
1
- module ShouldaPluginMacros
1
+ module MuckPluginMacros
2
2
 
3
- def self.should_act_as_taggable_on_steroids
3
+ def should_act_as_taggable_on_steroids
4
4
  klass = self.name.gsub(/Test$/, '').constantize
5
5
 
6
6
  should "include ActsAsTaggableOnSteroids methods" do
@@ -13,7 +13,7 @@ module ShouldaPluginMacros
13
13
  end
14
14
 
15
15
 
16
- def self.should_act_as_list
16
+ def should_act_as_list
17
17
  klass = self.name.gsub(/Test$/, '').constantize
18
18
 
19
19
  context "To support acts_as_list" do
@@ -29,6 +29,6 @@ module ShouldaPluginMacros
29
29
 
30
30
  end
31
31
 
32
- ActiveSupport::TestCase.extend(ShouldaPluginMacros)
33
- Test::Unit::TestCase.extend(ShouldaPluginMacros)
34
- ActionController::TestCase.extend(ShouldaPluginMacros)
32
+ ActiveSupport::TestCase.extend(MuckPluginMacros)
33
+ Test::Unit::TestCase.extend(MuckPluginMacros)
34
+ ActionController::TestCase.extend(MuckPluginMacros)
data/muck-engine.gemspec CHANGED
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "0.2.13"
8
+ s.version = "0.2.15"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Justin Ball"]
12
- s.date = %q{2009-11-10}
11
+ s.authors = ["Justin Ball", "Joel Duffin"]
12
+ s.date = %q{2009-11-13}
13
13
  s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
14
- s.email = %q{justinball@gmail.com}
14
+ s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
17
17
  ]
@@ -100,6 +100,24 @@ Gem::Specification.new do |s|
100
100
  "lib/muck_engine.rb",
101
101
  "lib/muck_engine/tasks.rb",
102
102
  "lib/muck_engine/tasks.rb",
103
+ "lib/muck_test_helper.rb",
104
+ "lib/muck_test_helper.rb",
105
+ "lib/test/muck_factories.rb",
106
+ "lib/test/muck_factories.rb",
107
+ "lib/test/muck_test_definitions.rb",
108
+ "lib/test/muck_test_definitions.rb",
109
+ "lib/test/muck_test_methods.rb",
110
+ "lib/test/muck_test_methods.rb",
111
+ "lib/test/shoulda_macros/controller.rb",
112
+ "lib/test/shoulda_macros/controller.rb",
113
+ "lib/test/shoulda_macros/forms.rb",
114
+ "lib/test/shoulda_macros/forms.rb",
115
+ "lib/test/shoulda_macros/models.rb",
116
+ "lib/test/shoulda_macros/models.rb",
117
+ "lib/test/shoulda_macros/pagination.rb",
118
+ "lib/test/shoulda_macros/pagination.rb",
119
+ "lib/test/shoulda_macros/plugins.rb",
120
+ "lib/test/shoulda_macros/plugins.rb",
103
121
  "locales/ar.yml",
104
122
  "locales/ar.yml",
105
123
  "locales/bg.yml",
@@ -407,7 +425,6 @@ Gem::Specification.new do |s|
407
425
  "tasks/rails.rake",
408
426
  "test/rails_root/.gitignore",
409
427
  "test/rails_root/.rake_tasks",
410
- "test/rails_root/Capfile",
411
428
  "test/rails_root/Rakefile",
412
429
  "test/rails_root/app/controllers/admin/default_controller.rb",
413
430
  "test/rails_root/app/controllers/application_controller.rb",
@@ -593,18 +610,12 @@ Gem::Specification.new do |s|
593
610
  "test/rails_root/script/process/spawner",
594
611
  "test/rails_root/script/runner",
595
612
  "test/rails_root/script/server",
596
- "test/rails_root/test/factories.rb",
597
613
  "test/rails_root/test/functional/.keep",
598
614
  "test/rails_root/test/functional/admin/default_controller_test.rb",
599
615
  "test/rails_root/test/functional/default_controller_test.rb",
600
616
  "test/rails_root/test/integration/.keep",
601
617
  "test/rails_root/test/mocks/development/.keep",
602
618
  "test/rails_root/test/mocks/test/.keep",
603
- "test/rails_root/test/shoulda_macros/controller.rb",
604
- "test/rails_root/test/shoulda_macros/forms.rb",
605
- "test/rails_root/test/shoulda_macros/models.rb",
606
- "test/rails_root/test/shoulda_macros/pagination.rb",
607
- "test/rails_root/test/shoulda_macros/plugins.rb",
608
619
  "test/rails_root/test/test_helper.rb",
609
620
  "test/rails_root/test/unit/.keep",
610
621
  "test/rails_root/test/unit/basic_mailer_test.rb",
@@ -614,7 +625,7 @@ Gem::Specification.new do |s|
614
625
  "test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb",
615
626
  "uninstall.rb"
616
627
  ]
617
- s.homepage = %q{http://github.com/jbasdf/muck_engine}
628
+ s.homepage = %q{http://github.com/tatemae/muck_engine}
618
629
  s.rdoc_options = ["--charset=UTF-8"]
619
630
  s.require_paths = ["lib"]
620
631
  s.rubyforge_project = %q{muck-engine}
@@ -644,14 +655,8 @@ Gem::Specification.new do |s|
644
655
  "test/rails_root/features/support/env.rb",
645
656
  "test/rails_root/public/dispatch.rb",
646
657
  "test/rails_root/script/create_project.rb",
647
- "test/rails_root/test/factories.rb",
648
658
  "test/rails_root/test/functional/admin/default_controller_test.rb",
649
659
  "test/rails_root/test/functional/default_controller_test.rb",
650
- "test/rails_root/test/shoulda_macros/controller.rb",
651
- "test/rails_root/test/shoulda_macros/forms.rb",
652
- "test/rails_root/test/shoulda_macros/models.rb",
653
- "test/rails_root/test/shoulda_macros/pagination.rb",
654
- "test/rails_root/test/shoulda_macros/plugins.rb",
655
660
  "test/rails_root/test/test_helper.rb",
656
661
  "test/rails_root/test/unit/basic_mailer_test.rb",
657
662
  "test/rails_root/test/unit/muck_engine_helper_test.rb",
@@ -15,6 +15,6 @@ end
15
15
 
16
16
  Rails::Initializer.run do |config|
17
17
  config.time_zone = 'UTC'
18
- config.gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com'
18
+ config.gem "will_paginate"
19
19
  config.plugin_locators << TestGemLocator
20
20
  end
@@ -22,12 +22,3 @@ config.action_controller.allow_forgery_protection = false
22
22
  config.action_mailer.delivery_method = :test
23
23
 
24
24
  HOST = "localhost"
25
-
26
- config.gem 'thoughtbot-shoulda',
27
- :lib => 'shoulda',
28
- :source => "http://gems.github.com",
29
- :version => '>= 2.9.1'
30
- config.gem 'thoughtbot-factory_girl',
31
- :lib => 'factory_girl',
32
- :source => "http://gems.github.com",
33
- :version => '>= 1.2.0'
@@ -1,21 +1,12 @@
1
1
  $:.reject! { |e| e.include? 'TextMate' }
2
2
  ENV["RAILS_ENV"] = "test"
3
3
  require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
4
- require 'test_help'
5
- gem 'thoughtbot-factory_girl' # from github
6
- require 'factory_girl'
7
- require 'mocha'
8
- require 'ruby-debug'
9
- require 'redgreen' rescue LoadError
10
- require File.expand_path(File.dirname(__FILE__) + '/factories')
11
- require File.join(File.dirname(__FILE__), 'shoulda_macros', 'controller')
12
- require File.join(File.dirname(__FILE__), 'shoulda_macros', 'models')
4
+ gem 'muck-engine'
5
+ require 'muck_test_helper'
13
6
 
14
- class ActiveSupport::TestCase
7
+
8
+ class ActiveSupport::TestCase
9
+ include MuckTestMethods
15
10
  self.use_transactional_fixtures = true
16
11
  self.use_instantiated_fixtures = false
17
-
18
- def ensure_flash(val)
19
- assert_contains flash.values, val, ", Flash: #{flash.inspect}"
20
- end
21
12
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
8
+ - Joel Duffin
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-11-10 00:00:00 -07:00
13
+ date: 2009-11-13 00:00:00 -07:00
13
14
  default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
@@ -43,7 +44,7 @@ dependencies:
43
44
  version: "0"
44
45
  version:
45
46
  description: The base engine for the muck system. Contains common tables, custom for, css and javascript.
46
- email: justinball@gmail.com
47
+ email: justin@tatemae.com
47
48
  executables: []
48
49
 
49
50
  extensions: []
@@ -96,6 +97,15 @@ files:
96
97
  - lib/active_record/muck_model.rb
97
98
  - lib/muck_engine.rb
98
99
  - lib/muck_engine/tasks.rb
100
+ - lib/muck_test_helper.rb
101
+ - lib/test/muck_factories.rb
102
+ - lib/test/muck_test_definitions.rb
103
+ - lib/test/muck_test_methods.rb
104
+ - lib/test/shoulda_macros/controller.rb
105
+ - lib/test/shoulda_macros/forms.rb
106
+ - lib/test/shoulda_macros/models.rb
107
+ - lib/test/shoulda_macros/pagination.rb
108
+ - lib/test/shoulda_macros/plugins.rb
99
109
  - locales/ar.yml
100
110
  - locales/bg.yml
101
111
  - locales/ca.yml
@@ -353,7 +363,6 @@ files:
353
363
  - tasks/rails.rake
354
364
  - test/rails_root/.gitignore
355
365
  - test/rails_root/.rake_tasks
356
- - test/rails_root/Capfile
357
366
  - test/rails_root/Rakefile
358
367
  - test/rails_root/app/controllers/admin/default_controller.rb
359
368
  - test/rails_root/app/controllers/application_controller.rb
@@ -539,18 +548,12 @@ files:
539
548
  - test/rails_root/script/process/spawner
540
549
  - test/rails_root/script/runner
541
550
  - test/rails_root/script/server
542
- - test/rails_root/test/factories.rb
543
551
  - test/rails_root/test/functional/.keep
544
552
  - test/rails_root/test/functional/admin/default_controller_test.rb
545
553
  - test/rails_root/test/functional/default_controller_test.rb
546
554
  - test/rails_root/test/integration/.keep
547
555
  - test/rails_root/test/mocks/development/.keep
548
556
  - test/rails_root/test/mocks/test/.keep
549
- - test/rails_root/test/shoulda_macros/controller.rb
550
- - test/rails_root/test/shoulda_macros/forms.rb
551
- - test/rails_root/test/shoulda_macros/models.rb
552
- - test/rails_root/test/shoulda_macros/pagination.rb
553
- - test/rails_root/test/shoulda_macros/plugins.rb
554
557
  - test/rails_root/test/test_helper.rb
555
558
  - test/rails_root/test/unit/.keep
556
559
  - test/rails_root/test/unit/basic_mailer_test.rb
@@ -560,7 +563,7 @@ files:
560
563
  - test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb
561
564
  - uninstall.rb
562
565
  has_rdoc: true
563
- homepage: http://github.com/jbasdf/muck_engine
566
+ homepage: http://github.com/tatemae/muck_engine
564
567
  licenses: []
565
568
 
566
569
  post_install_message:
@@ -611,14 +614,8 @@ test_files:
611
614
  - test/rails_root/features/support/env.rb
612
615
  - test/rails_root/public/dispatch.rb
613
616
  - test/rails_root/script/create_project.rb
614
- - test/rails_root/test/factories.rb
615
617
  - test/rails_root/test/functional/admin/default_controller_test.rb
616
618
  - test/rails_root/test/functional/default_controller_test.rb
617
- - test/rails_root/test/shoulda_macros/controller.rb
618
- - test/rails_root/test/shoulda_macros/forms.rb
619
- - test/rails_root/test/shoulda_macros/models.rb
620
- - test/rails_root/test/shoulda_macros/pagination.rb
621
- - test/rails_root/test/shoulda_macros/plugins.rb
622
619
  - test/rails_root/test/test_helper.rb
623
620
  - test/rails_root/test/unit/basic_mailer_test.rb
624
621
  - test/rails_root/test/unit/muck_engine_helper_test.rb
@@ -1,3 +0,0 @@
1
- load 'deploy' if respond_to?(:namespace) # cap2 differentiator
2
- Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
3
- load 'config/deploy'
@@ -1,56 +0,0 @@
1
- Factory.sequence :email do |n|
2
- "somebody#{n}@example.com"
3
- end
4
-
5
- Factory.sequence :login do |n|
6
- "inquire#{n}"
7
- end
8
-
9
- Factory.sequence :name do |n|
10
- "a_name#{n}"
11
- end
12
-
13
- Factory.sequence :abbr do |n|
14
- "abbr#{n}"
15
- end
16
-
17
- Factory.sequence :description do |n|
18
- "This is the description: #{n}"
19
- end
20
-
21
- Factory.define :state do |f|
22
- f.name { Factory.next(:name) }
23
- f.abbreviation { Factory.next(:abbr) }
24
- f.country {|a| a.association(:country) }
25
- end
26
-
27
- Factory.define :country do |f|
28
- f.name { Factory.next(:name) }
29
- f.abbreviation { Factory.next(:abbr) }
30
- end
31
-
32
- Factory.define :user do |f|
33
- f.login { Factory.next(:login) }
34
- f.email { Factory.next(:email) }
35
- f.password 'inquire_pass'
36
- f.password_confirmation 'inquire_pass'
37
- f.first_name 'test'
38
- f.last_name 'guy'
39
- f.terms_of_service true
40
- f.activated_at DateTime.now
41
- end
42
-
43
- Factory.define :content_page do |f|
44
- f.creator {|a| a.association(:user)}
45
- f.title { Factory.next(:name) }
46
- f.body_raw { Factory.next(:description) }
47
- end
48
-
49
- Factory.define :permission do |f|
50
- f.role {|a| a.association(:role)}
51
- f.user {|a| a.association(:user)}
52
- end
53
-
54
- Factory.define :role do |f|
55
- f.rolename 'administrator'
56
- end