merb-admin 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -13,7 +13,7 @@ http://github.com/sferik/merb-admin/raw/master/screenshots/edit.png
13
13
  == Installation
14
14
  $ gem install merb-admin -s http://gemcutter.org
15
15
  In your app, add the following dependency to <tt>config/dependencies.rb</tt>:
16
- dependency "merb-admin", "0.7.5"
16
+ dependency "merb-admin", "0.7.6"
17
17
  Add the following route to <tt>config/router.rb</tt>:
18
18
  add_slice(:merb_admin, :path_prefix => "admin")
19
19
  Then, run the following rake task:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.5
1
+ 0.7.6
@@ -7,7 +7,7 @@ module MerbAdmin
7
7
  @models = []
8
8
  orm = Merb.orm
9
9
  case orm
10
- when :active_record, :sequel
10
+ when :activerecord, :sequel
11
11
  Dir.glob(Merb.dir_for(:model) / Merb.glob_for(:model)).each do |filename|
12
12
  File.read(filename).scan(/class ([\w\d_\-:]+)/).flatten.each do |model_name|
13
13
  add_model(model_name)
@@ -38,7 +38,7 @@ module MerbAdmin
38
38
  end
39
39
 
40
40
  case Merb.orm
41
- when :active_record
41
+ when :activerecord
42
42
  model if superclasses(model).include?(ActiveRecord::Base)
43
43
  when :datamapper
44
44
  model if model.include?(DataMapper::Resource)
@@ -57,7 +57,7 @@ module MerbAdmin
57
57
  @model = model
58
58
  self.extend(GenericSupport)
59
59
  case orm
60
- when :active_record
60
+ when :activerecord
61
61
  require 'active_record_support'
62
62
  self.extend(ActiverecordSupport)
63
63
  when :datamapper
@@ -17,16 +17,16 @@ namespace :slices do
17
17
  # end
18
18
 
19
19
  desc "Copies sample models, copies and runs sample migrations, and loads sample data into your app"
20
- task :active_record => ["active_record:copy_sample_models", "active_record:copy_sample_migrations", "active_record:migrate", "load_sample_data"]
21
- namespace :active_record do
20
+ task :activerecord => ["activerecord:copy_sample_models", "activerecord:copy_sample_migrations", "activerecord:migrate", "load_sample_data"]
21
+ namespace :activerecord do
22
22
  desc "Copies sample models into your app"
23
23
  task :copy_sample_models do
24
- copy_models(:active_record)
24
+ copy_models(:activerecord)
25
25
  end
26
26
 
27
27
  desc "Copies sample migrations into your app"
28
28
  task :copy_sample_migrations do
29
- copy_migrations(:active_record)
29
+ copy_migrations(:activerecord)
30
30
  end
31
31
 
32
32
  desc "Migrate the database to the latest version"
@@ -145,7 +145,7 @@ def require_models
145
145
  end
146
146
 
147
147
  def set_orm(orm = nil)
148
- orm || ENV['MERB_ORM'] || (Merb.orm != :none ? Merb.orm : nil) || :datamapper
148
+ orm || ENV['MERB_ORM'] || (Merb.orm != :none ? Merb.orm : nil) || :activerecord
149
149
  end
150
150
 
151
151
  def mirror_file(source, dest, copied = [], duplicated = [], postfix = '_override')
data/lib/merb-admin.rb CHANGED
@@ -24,7 +24,7 @@ if defined?(Merb::Plugins)
24
24
 
25
25
  # Slice metadata
26
26
  self.description = "MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data."
27
- self.version = "0.7.5"
27
+ self.version = "0.7.6"
28
28
  self.author = "Erik Michaels-Ober"
29
29
 
30
30
  # Stub classes loaded hook - runs before LoadClasses BootLoader
data/merb-admin.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{merb-admin}
8
- s.version = "0.7.5"
8
+ s.version = "0.7.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Erik Michaels-Ober"]
12
- s.date = %q{2009-12-14}
12
+ s.date = %q{2009-12-19}
13
13
  s.description = %q{MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data.}
14
14
  s.email = %q{sferik@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -132,21 +132,21 @@ Gem::Specification.new do |s|
132
132
  "public/stylesheets/rtl.css",
133
133
  "public/stylesheets/widgets.css",
134
134
  "spec/controllers/main_spec.rb",
135
- "spec/migrations/active_record/001_create_divisions_migration.rb",
136
- "spec/migrations/active_record/002_create_drafts_migration.rb",
137
- "spec/migrations/active_record/003_create_leagues_migration.rb",
138
- "spec/migrations/active_record/004_create_players_migration.rb",
139
- "spec/migrations/active_record/005_create_teams_migration.rb",
135
+ "spec/migrations/activerecord/001_create_divisions_migration.rb",
136
+ "spec/migrations/activerecord/002_create_drafts_migration.rb",
137
+ "spec/migrations/activerecord/003_create_leagues_migration.rb",
138
+ "spec/migrations/activerecord/004_create_players_migration.rb",
139
+ "spec/migrations/activerecord/005_create_teams_migration.rb",
140
140
  "spec/migrations/sequel/001_create_divisions_migration.rb",
141
141
  "spec/migrations/sequel/002_create_drafts_migration.rb",
142
142
  "spec/migrations/sequel/003_create_leagues_migration.rb",
143
143
  "spec/migrations/sequel/004_create_players_migration.rb",
144
144
  "spec/migrations/sequel/005_create_teams_migration.rb",
145
- "spec/models/active_record/division.rb",
146
- "spec/models/active_record/draft.rb",
147
- "spec/models/active_record/league.rb",
148
- "spec/models/active_record/player.rb",
149
- "spec/models/active_record/team.rb",
145
+ "spec/models/activerecord/division.rb",
146
+ "spec/models/activerecord/draft.rb",
147
+ "spec/models/activerecord/league.rb",
148
+ "spec/models/activerecord/player.rb",
149
+ "spec/models/activerecord/team.rb",
150
150
  "spec/models/datamapper/division.rb",
151
151
  "spec/models/datamapper/draft.rb",
152
152
  "spec/models/datamapper/league.rb",
@@ -174,21 +174,21 @@ Gem::Specification.new do |s|
174
174
  s.summary = %q{MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data.}
175
175
  s.test_files = [
176
176
  "spec/controllers/main_spec.rb",
177
- "spec/migrations/active_record/001_create_divisions_migration.rb",
178
- "spec/migrations/active_record/002_create_drafts_migration.rb",
179
- "spec/migrations/active_record/003_create_leagues_migration.rb",
180
- "spec/migrations/active_record/004_create_players_migration.rb",
181
- "spec/migrations/active_record/005_create_teams_migration.rb",
177
+ "spec/migrations/activerecord/001_create_divisions_migration.rb",
178
+ "spec/migrations/activerecord/002_create_drafts_migration.rb",
179
+ "spec/migrations/activerecord/003_create_leagues_migration.rb",
180
+ "spec/migrations/activerecord/004_create_players_migration.rb",
181
+ "spec/migrations/activerecord/005_create_teams_migration.rb",
182
182
  "spec/migrations/sequel/001_create_divisions_migration.rb",
183
183
  "spec/migrations/sequel/002_create_drafts_migration.rb",
184
184
  "spec/migrations/sequel/003_create_leagues_migration.rb",
185
185
  "spec/migrations/sequel/004_create_players_migration.rb",
186
186
  "spec/migrations/sequel/005_create_teams_migration.rb",
187
- "spec/models/active_record/division.rb",
188
- "spec/models/active_record/draft.rb",
189
- "spec/models/active_record/league.rb",
190
- "spec/models/active_record/player.rb",
191
- "spec/models/active_record/team.rb",
187
+ "spec/models/activerecord/division.rb",
188
+ "spec/models/activerecord/draft.rb",
189
+ "spec/models/activerecord/league.rb",
190
+ "spec/models/activerecord/player.rb",
191
+ "spec/models/activerecord/team.rb",
192
192
  "spec/models/datamapper/division.rb",
193
193
  "spec/models/datamapper/draft.rb",
194
194
  "spec/models/datamapper/league.rb",
File without changes
data/spec/spec_helper.rb CHANGED
@@ -41,17 +41,17 @@ module Merb
41
41
  orm = set_orm(orm)
42
42
  orm = orm.to_s.downcase.to_sym
43
43
  case orm
44
- when :active_record
44
+ when :activerecord
45
45
  require 'active_record'
46
46
  require_models(orm)
47
47
  unless ActiveRecord::Base.connected?
48
48
  ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
49
49
  ActiveRecord::Migration.verbose = false
50
- ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "active_record"), 1)
51
- ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "active_record"), 2)
52
- ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "active_record"), 3)
53
- ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "active_record"), 4)
54
- ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "active_record"), 5)
50
+ ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "activerecord"), 1)
51
+ ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "activerecord"), 2)
52
+ ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "activerecord"), 3)
53
+ ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "activerecord"), 4)
54
+ ActiveRecord::Migrator.run(:up, File.join(File.dirname(__FILE__), "migrations", "activerecord"), 5)
55
55
  end
56
56
  when :datamapper
57
57
  require 'dm-core'
@@ -83,7 +83,7 @@ module Merb
83
83
  end
84
84
 
85
85
  def set_orm(orm = nil)
86
- orm || ENV['MERB_ORM'] || (Merb.orm != :none ? Merb.orm : nil) || :active_record
86
+ orm || ENV['MERB_ORM'] || (Merb.orm != :none ? Merb.orm : nil) || :activerecord
87
87
  end
88
88
 
89
89
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Michaels-Ober
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-14 00:00:00 -08:00
12
+ date: 2009-12-19 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -187,21 +187,21 @@ files:
187
187
  - public/stylesheets/rtl.css
188
188
  - public/stylesheets/widgets.css
189
189
  - spec/controllers/main_spec.rb
190
- - spec/migrations/active_record/001_create_divisions_migration.rb
191
- - spec/migrations/active_record/002_create_drafts_migration.rb
192
- - spec/migrations/active_record/003_create_leagues_migration.rb
193
- - spec/migrations/active_record/004_create_players_migration.rb
194
- - spec/migrations/active_record/005_create_teams_migration.rb
190
+ - spec/migrations/activerecord/001_create_divisions_migration.rb
191
+ - spec/migrations/activerecord/002_create_drafts_migration.rb
192
+ - spec/migrations/activerecord/003_create_leagues_migration.rb
193
+ - spec/migrations/activerecord/004_create_players_migration.rb
194
+ - spec/migrations/activerecord/005_create_teams_migration.rb
195
195
  - spec/migrations/sequel/001_create_divisions_migration.rb
196
196
  - spec/migrations/sequel/002_create_drafts_migration.rb
197
197
  - spec/migrations/sequel/003_create_leagues_migration.rb
198
198
  - spec/migrations/sequel/004_create_players_migration.rb
199
199
  - spec/migrations/sequel/005_create_teams_migration.rb
200
- - spec/models/active_record/division.rb
201
- - spec/models/active_record/draft.rb
202
- - spec/models/active_record/league.rb
203
- - spec/models/active_record/player.rb
204
- - spec/models/active_record/team.rb
200
+ - spec/models/activerecord/division.rb
201
+ - spec/models/activerecord/draft.rb
202
+ - spec/models/activerecord/league.rb
203
+ - spec/models/activerecord/player.rb
204
+ - spec/models/activerecord/team.rb
205
205
  - spec/models/datamapper/division.rb
206
206
  - spec/models/datamapper/draft.rb
207
207
  - spec/models/datamapper/league.rb
@@ -251,21 +251,21 @@ specification_version: 3
251
251
  summary: MerbAdmin is a Merb plugin that provides an easy-to-use interface for managing your data.
252
252
  test_files:
253
253
  - spec/controllers/main_spec.rb
254
- - spec/migrations/active_record/001_create_divisions_migration.rb
255
- - spec/migrations/active_record/002_create_drafts_migration.rb
256
- - spec/migrations/active_record/003_create_leagues_migration.rb
257
- - spec/migrations/active_record/004_create_players_migration.rb
258
- - spec/migrations/active_record/005_create_teams_migration.rb
254
+ - spec/migrations/activerecord/001_create_divisions_migration.rb
255
+ - spec/migrations/activerecord/002_create_drafts_migration.rb
256
+ - spec/migrations/activerecord/003_create_leagues_migration.rb
257
+ - spec/migrations/activerecord/004_create_players_migration.rb
258
+ - spec/migrations/activerecord/005_create_teams_migration.rb
259
259
  - spec/migrations/sequel/001_create_divisions_migration.rb
260
260
  - spec/migrations/sequel/002_create_drafts_migration.rb
261
261
  - spec/migrations/sequel/003_create_leagues_migration.rb
262
262
  - spec/migrations/sequel/004_create_players_migration.rb
263
263
  - spec/migrations/sequel/005_create_teams_migration.rb
264
- - spec/models/active_record/division.rb
265
- - spec/models/active_record/draft.rb
266
- - spec/models/active_record/league.rb
267
- - spec/models/active_record/player.rb
268
- - spec/models/active_record/team.rb
264
+ - spec/models/activerecord/division.rb
265
+ - spec/models/activerecord/draft.rb
266
+ - spec/models/activerecord/league.rb
267
+ - spec/models/activerecord/player.rb
268
+ - spec/models/activerecord/team.rb
269
269
  - spec/models/datamapper/division.rb
270
270
  - spec/models/datamapper/draft.rb
271
271
  - spec/models/datamapper/league.rb