typus 0.9.35 → 0.9.36

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTORS ADDED
@@ -0,0 +1,18 @@
1
+ - Laia Gargallo (Lover and tea provider) http://azotacalles.net
2
+ - Isaac Feliu (Codereview on first public release) http://www.vesne.com
3
+ - Lluis Folch (Icons, feedback & crazy ideas) http://wet-floor.com
4
+ - Sergio Espeja (Code) http://github.com/spejman
5
+ - Eadz (Code) http://github.com/eadz
6
+ - Anthony Underwood (Code) http://github.com/aunderwo
7
+ - Felipe Talavera (Code) http://github.com/flype
8
+ - Erik Tigerholm (Code) http://github.com/eriktigerholm
9
+ - George Guimarães (Portuguese translation and code) http://github.com/georgeguimaraes
10
+ - José Valim (Code) http://github.com/josevalim
11
+ - Luqman Amjad (Code) http://github.com/luqman
12
+ - Alexey Noskov (Russian translation and code) http://github.com/alno
13
+ - Andres Gutierres (Bugfixes & feedback) http://github.com/andresgutgon
14
+ - Komzák Nándor (Code, bugfixes & feedback) http://github.com/rubymood
15
+ - Michael Grunewalder (German translation) http://michael.grunewalder.com
16
+ - Tim Harvey (Code) http://www.timharvey.net/
17
+ - Ned Baldessin (French translation and code) http://github.com/nedbaldessin
18
+ - Robert Rouse (Code) - Ruby 1.9 compatibility fixes.
data/HISTORY.md ADDED
@@ -0,0 +1,3 @@
1
+ ## 0.9.37 (2009-??-??)
2
+
3
+ * Added contributors file.
data/README.rdoc CHANGED
@@ -8,9 +8,10 @@
8
8
  extensible enough to match lots of use cases.
9
9
 
10
10
  - Project site and documentation http://intraducibles.com/projects/typus
11
- - Plugin source http://github.com/fesplugas/typus/tree
12
- - Google Group http://groups.google.es/group/typus
13
- - Bugs http://typus.lighthouseapp.com/dashboard
11
+ - Plugin source http://github.com/fesplugas/typus
12
+ - Google Group http://groups.google.com/group/typus
13
+ - Bugs http://github.com/fesplugas/typus/issues
14
+ - Gems: http://gemcutter.org/gems/typus
14
15
 
15
16
  == Impatients to see it working?
16
17
 
@@ -82,27 +83,6 @@ If you are using *Typus* as a gem add the following line at the end of the
82
83
 
83
84
  Dir["#{RAILS_ROOT}/vendor/gems/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
84
85
 
85
- == Contributors
86
-
87
- - Laia Gargallo (Lover and tea provider) http://azotacalles.net
88
- - Isaac Feliu (Codereview on first public release) http://www.vesne.com
89
- - Lluis Folch (Icons, feedback & crazy ideas) http://wet-floor.com
90
- - Sergio Espeja (Code) http://github.com/spejman
91
- - Eadz (Code) http://github.com/eadz
92
- - Anthony Underwood (Code) http://github.com/aunderwo
93
- - Felipe Talavera (Code) http://github.com/flype
94
- - Erik Tigerholm (Code) http://github.com/eriktigerholm
95
- - George Guimarães (Portuguese translation and code) http://github.com/georgeguimaraes
96
- - José Valim (Code) http://github.com/josevalim
97
- - Luqman Amjad (Code) http://github.com/luqman
98
- - Alexey Noskov (Russian translation and code) http://github.com/alno
99
- - Andres Gutierres (Bugfixes & feedback) http://github.com/andresgutgon
100
- - Komzák Nándor (Code, bugfixes & feedback) http://github.com/rubymood
101
- - Michael Grunewalder (German translation) http://michael.grunewalder.com
102
- - Tim Harvey (Code) http://www.timharvey.net/
103
- - Ned Baldessin (French translation and code) http://github.com/nedbaldessin
104
- - Robert Rouse (Code) - Ruby 1.9 compatibility fixes.
105
-
106
86
  == Acknowledgments
107
87
 
108
88
  - *Typus* uses "Paginator" by Bruce Williams http://codefluency.com.
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
- require 'rake'
2
1
  require 'rake/testtask'
3
- require 'rake/rdoctask'
2
+ # require 'rake/rdoctask'
4
3
 
5
4
  desc 'Default: run unit tests.'
6
5
  task :default => :test
@@ -12,17 +11,6 @@ Rake::TestTask.new(:test) do |t|
12
11
  t.verbose = true
13
12
  end
14
13
 
15
- desc 'Generate documentation for the typus plugin.'
16
- Rake::RDocTask.new(:rdoc) do |rdoc|
17
- rdoc.rdoc_files.add ['README.rdoc', 'MIT-LICENSE', 'lib/**/*.rb']
18
- rdoc.rdoc_dir = 'rdoc'
19
- rdoc.title = 'Typus documentation'
20
- rdoc.main = 'README.rdoc'
21
- rdoc.options << '--charset=UTF-8'
22
- rdoc.options << '--inline-source'
23
- rdoc.options << '--line-numbers'
24
- end
25
-
26
14
  desc 'Generate specdoc-style documentation from tests'
27
15
  task :specs do
28
16
 
@@ -48,6 +36,8 @@ end
48
36
 
49
37
  begin
50
38
  require 'jeweler'
39
+ $LOAD_PATH.unshift 'lib'
40
+ require 'typus/version'
51
41
  Jeweler::Tasks.new do |gemspec|
52
42
  gemspec.name = "typus"
53
43
  gemspec.summary = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)"
@@ -55,7 +45,38 @@ begin
55
45
  gemspec.homepage = "http://intraducibles.com/projects/typus"
56
46
  gemspec.description = "Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)"
57
47
  gemspec.authors = ["Francesc Esplugas"]
48
+ # gemspec.version = Typus::Version
49
+ gemspec.version = "1223"
58
50
  end
59
51
  rescue LoadError
60
- puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
52
+ puts "Jeweler not available."
53
+ puts "Install it with: gem install jeweler -s http://gemcutter.org"
54
+ end
55
+
56
+ begin
57
+ require 'sdoc_helpers'
58
+ rescue LoadError
59
+ puts "sdoc support not enabled. Please gem install sdoc-helpers."
60
+ end
61
+
62
+ desc "Push a new version to Gemcutter"
63
+ task :publish => [ :gemspec, :build ] do
64
+ system "git tag v#{Typus::Version}"
65
+ system "git push origin v#{Typus::Version}"
66
+ system "gem push pkg/typus-#{Typus::Version}.gem"
67
+ system "git clean -fd"
68
+ exec "rake pages"
69
+ end
70
+
71
+ desc "Install the edge gem"
72
+ task :install_edge => [ :dev_version, :gemspec, :build ] do
73
+ exec "gem install pkg/typus-#{Typus::Version}.gem"
74
+ end
75
+
76
+ # Sets the current Typus version to the current dev version
77
+ task :dev_version do
78
+ $LOAD_PATH.unshift 'lib'
79
+ require 'typus/version'
80
+ version = Typus::Version + '.' + Time.now.to_i.to_s
81
+ Typus.const_set(:Version, version)
61
82
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.35
1
+ 0.9.36
@@ -98,7 +98,7 @@ class Admin::MasterController < ApplicationController
98
98
  if @item.valid?
99
99
  create_with_back_to and return if params[:back_to]
100
100
  @item.save
101
- flash[:success] = _("{{model}} successfully created.", :model => @resource[:class].typus_human_name)
101
+ flash[:success] = _("{{model}} successfully created.", :model => @resource[:human_name])
102
102
  if @resource[:class].typus_options_for(:index_after_save)
103
103
  redirect_to :action => 'index'
104
104
  else
@@ -149,7 +149,7 @@ class Admin::MasterController < ApplicationController
149
149
  @item.update_attributes Typus.user_fk => @current_user.id
150
150
  end
151
151
 
152
- flash[:success] = _("{{model}} successfully updated.", :model => @resource[:class].typus_human_name)
152
+ flash[:success] = _("{{model}} successfully updated.", :model => @resource[:human_name])
153
153
  path = if @resource[:class].typus_options_for(:index_after_save)
154
154
  params[:back_to] ? "#{params[:back_to]}##{@resource[:self]}" : { :action => 'index' }
155
155
  else
@@ -168,7 +168,7 @@ class Admin::MasterController < ApplicationController
168
168
 
169
169
  def destroy
170
170
  @item.destroy
171
- flash[:success] = _("{{model}} successfully removed.", :model => @resource[:class].typus_human_name)
171
+ flash[:success] = _("{{model}} successfully removed.", :model => @resource[:human_name])
172
172
  redirect_to request.referer || admin_dashboard_path
173
173
  rescue Exception => error
174
174
  error_handler(error, params.merge(:action => 'index', :id => nil))
@@ -178,7 +178,7 @@ class Admin::MasterController < ApplicationController
178
178
  if @resource[:class].typus_options_for(:toggle)
179
179
  @item.toggle!(params[:field])
180
180
  flash[:success] = _("{{model}} {{attribute}} changed.",
181
- :model => @resource[:class].typus_human_name,
181
+ :model => @resource[:human_name],
182
182
  :attribute => params[:field].humanize.downcase)
183
183
  else
184
184
  flash[:notice] = _("Toggle is disabled.")
@@ -214,7 +214,7 @@ class Admin::MasterController < ApplicationController
214
214
 
215
215
  flash[:success] = _("{{model_a}} related to {{model_b}}.",
216
216
  :model_a => resource_class.typus_human_name,
217
- :model_b => @resource[:class].typus_human_name)
217
+ :model_b => @resource[:human_name])
218
218
 
219
219
  redirect_to :back
220
220
 
@@ -240,7 +240,7 @@ class Admin::MasterController < ApplicationController
240
240
 
241
241
  flash[:success] = _("{{model_a}} unrelated from {{model_b}}.",
242
242
  :model_a => resource_class.typus_human_name,
243
- :model_b => @resource[:class].typus_human_name)
243
+ :model_b => @resource[:human_name])
244
244
 
245
245
  redirect_to :back
246
246
 
@@ -249,8 +249,9 @@ class Admin::MasterController < ApplicationController
249
249
  private
250
250
 
251
251
  def set_resource
252
- resource = params[:controller].split('/').last
253
- @resource = { :self => resource, :class => resource.classify.constantize }
252
+ @resource = { :self => params[:controller].extract_resource,
253
+ :human_name => params[:controller].extract_human_name,
254
+ :class => params[:controller].extract_class }
254
255
  rescue Exception => error
255
256
  error_handler(error)
256
257
  end
@@ -305,7 +306,7 @@ private
305
306
  klass = params[:resource].classify.constantize
306
307
  return if !klass.typus_user_id?
307
308
  item = klass.find(params[:resource_id])
308
- raise "You're not owner of this record." unless item.owned_by?(@current_user)
309
+ raise "You're not owner of this record." unless item.owned_by?(@current_user) || @current_user.is_root?
309
310
  end
310
311
 
311
312
  def set_fields
@@ -370,7 +371,7 @@ private
370
371
  @item.send(params[:resource]) << resource
371
372
  when :has_many
372
373
  @item.save
373
- message = _("{{model}} successfully created.", :model => @resource[:class].typus_human_name)
374
+ message = _("{{model}} successfully created.", :model => @resource[:human_name])
374
375
  path = "#{params[:back_to]}?#{params[:selected]}=#{@item.id}"
375
376
  when :polymorphic
376
377
  resource.send(@item.class.name.tableize).create(params[:item])
@@ -9,7 +9,7 @@ module Admin::MasterHelper
9
9
  def display_link_to_previous
10
10
 
11
11
  options = {}
12
- options[:resource_from] = @resource[:class].typus_human_name
12
+ options[:resource_from] = @resource[:human_name]
13
13
  options[:resource_to] = params[:resource].classify.humanize if params[:resource]
14
14
 
15
15
  editing = %w( edit update ).include?(params[:action])
@@ -75,7 +75,7 @@ module Admin::TableHelper
75
75
  :title => _("Unrelate"),
76
76
  :confirm => _("Unrelate {{unrelate_model}} from {{unrelate_model_from}}?",
77
77
  :unrelate_model => model.typus_human_name,
78
- :unrelate_model_from => @resource[:class].typus_human_name)
78
+ :unrelate_model_from => @resource[:human_name])
79
79
  when 'show'
80
80
  # If we are showing content, we only can relate and unrelate if we are
81
81
  # the owners of the owner record.
@@ -88,7 +88,7 @@ module Admin::TableHelper
88
88
  :title => _("Unrelate"),
89
89
  :confirm => _("Unrelate {{unrelate_model}} from {{unrelate_model_from}}?",
90
90
  :unrelate_model => model.typus_human_name,
91
- :unrelate_model_from => @resource[:class].typus_human_name) if condition
91
+ :unrelate_model_from => @resource[:human_name]) if condition
92
92
  end
93
93
 
94
94
  html << <<-HTML
@@ -167,7 +167,7 @@ module Admin::TableHelper
167
167
 
168
168
  def typus_table_string_field(attribute, item, link_options = {})
169
169
  <<-HTML
170
- <td class="#{attribute}">#{item.send(attribute)}</td>
170
+ <td class="#{attribute}">#{h(item.send(attribute))}</td>
171
171
  HTML
172
172
  end
173
173
 
@@ -25,13 +25,14 @@ module TypusHelper
25
25
 
26
26
  klass = model.constantize
27
27
  klass_resource = klass.name.tableize
28
+ klass_human_name = klass.typus_human_name.gsub('/', ' ').pluralize
28
29
 
29
30
  admin_items_path = { :controller => "admin/#{klass_resource}" }
30
31
  new_admin_item_path = { :controller => "admin/#{klass_resource}", :action => 'new'}
31
32
 
32
33
  html << <<-HTML
33
34
  <tr class="#{cycle('even', 'odd')}">
34
- <td>#{link_to klass.typus_human_name.pluralize, admin_items_path}<br /><small>#{_(klass.typus_description) if !klass.typus_description.nil?}</small></td>
35
+ <td>#{link_to klass_human_name, admin_items_path}<br /><small>#{_(klass.typus_description) if !klass.typus_description.nil?}</small></td>
35
36
  <td class="right"><small>
36
37
  #{link_to _("Add"), new_admin_item_path if @current_user.can_perform?(klass, 'create')}
37
38
  </small></td>
@@ -114,7 +115,7 @@ module TypusHelper
114
115
 
115
116
  def page_title(action = params[:action])
116
117
  crumbs = [ ]
117
- crumbs << @resource[:class].typus_human_name.pluralize if @resource
118
+ crumbs << @resource[:human_name].pluralize if @resource
118
119
  crumbs << _(action.humanize) unless %w( index ).include?(action)
119
120
  return "#{Typus::Configuration.options[:app_name]} - " + crumbs.compact.map { |x| x }.join(' &rsaquo; ')
120
121
  end
@@ -7,7 +7,7 @@
7
7
 
8
8
  <%= display_link_to_previous if params[:back_to] %>
9
9
 
10
- <h2><%= link_to @resource[:class].typus_human_name.pluralize, :action => 'index' %> &rsaquo;
10
+ <h2><%= link_to @resource[:human_name].pluralize, :action => 'index' %> &rsaquo;
11
11
  <%= _("Edit") %></h2>
12
12
 
13
13
  <%= typus_block :location => @resource[:self], :partial => 'edit' %>
@@ -6,7 +6,7 @@
6
6
  <%= filters %>
7
7
  <% end %>
8
8
 
9
- <h2><%= @resource[:class].typus_human_name.pluralize %> <%= remove_filter_link %></h2>
9
+ <h2><%= @resource[:human_name].pluralize %> <%= remove_filter_link %></h2>
10
10
 
11
11
  <%= typus_block :location => @resource[:self], :partial => 'index' %>
12
12
 
@@ -16,9 +16,9 @@
16
16
  <% else %>
17
17
  <div id="flash" class="notice">
18
18
  <% if @resource[:class].count.zero? %>
19
- <p><%= _("There are no {{records}}.", :records => @resource[:class].typus_human_name.pluralize.downcase) %></p>
19
+ <p><%= _("There are no {{records}}.", :records => @resource[:human_name].pluralize.downcase) %></p>
20
20
  <% else %>
21
- <p><%= _("There are no {{records}} under this filter.", :records => @resource[:class].typus_human_name.pluralize.downcase) %></p>
21
+ <p><%= _("There are no {{records}} under this filter.", :records => @resource[:human_name].pluralize.downcase) %></p>
22
22
  <% end %>
23
23
  </div>
24
24
  <% end %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <%= display_link_to_previous if params[:back_to] %>
7
7
 
8
- <h2><%= link_to @resource[:class].typus_human_name.pluralize, :action => 'index' %> &rsaquo;
8
+ <h2><%= link_to @resource[:human_name].pluralize, :action => 'index' %> &rsaquo;
9
9
  <%= _("New") %></h2>
10
10
 
11
11
  <%= typus_block :location => @resource[:self], :partial => 'new' %>
@@ -5,7 +5,7 @@
5
5
  <%= previous_and_next %>
6
6
  <% end %>
7
7
 
8
- <h2><%= link_to @resource[:class].typus_human_name.pluralize, :action => 'index' %> &rsaquo;
8
+ <h2><%= link_to @resource[:human_name].pluralize, :action => 'index' %> &rsaquo;
9
9
  <%= _("Show") %></h2>
10
10
 
11
11
  <%= typus_block :location => @resource[:self], :partial => 'show' %>
@@ -2,6 +2,8 @@ This is an example of a **Typus** enabled model with all available
2
2
  options. You can use this example to customize your YAML files which
3
3
  only have set the most common settings.
4
4
 
5
+ Note: To define namespace models use :: as a separator. (i.e. Delayed::Job)
6
+
5
7
  Post:
6
8
  fields:
7
9
  list: id, title, category_id, created_at, is_published?
@@ -354,7 +354,7 @@ input#search { border: 1px solid #999; font-size: 1.2em; padding: 3px; }
354
354
 
355
355
  /* @group Sprite */
356
356
 
357
- .sprite { background: url(/images/admin/ui-icons.png) no-repeat; text-indent: -1000px; }
357
+ .sprite { background: url(/images/admin/ui-icons.png) no-repeat; text-indent: -10000px; }
358
358
  .trash { background-position: -177px -97px; height: 15px; width: 15px; }
359
359
  .unrelate { background-position: -145px -129px; height: 15px; width: 15px; }
360
360
 
@@ -1,5 +1,3 @@
1
- require 'ftools'
2
-
3
1
  class TypusGenerator < Rails::Generator::Base
4
2
 
5
3
  def manifest
@@ -21,7 +19,7 @@ class TypusGenerator < Rails::Generator::Base
21
19
 
22
20
  # To create <tt>application.yml</tt> and <tt>application_roles.yml</tt>
23
21
  # detect available AR models on the application.
24
- models = Dir['app/models/*.rb'].collect { |x| File.basename(x).sub(/\.rb$/,'').camelize }
22
+ models = (Typus.discover_models + Typus.models).uniq
25
23
  ar_models = []
26
24
 
27
25
  models.each do |model|
@@ -146,15 +144,23 @@ class TypusGenerator < Rails::Generator::Base
146
144
  # `app/controllers/admin/#{resource}_controller.rb`
147
145
  # `test/functional/admin/#{resource}_controller_test.rb`
148
146
  #
149
- Typus.models.each do |model|
147
+
148
+ ar_models << TypusUser
149
+ ar_models.each do |model|
150
+
151
+ folder = "admin/#{model.name.tableize}".split('/')[0...-1].join('/')
152
+
153
+ # Create needed folder.
154
+ [ "app/controllers/#{folder}",
155
+ "test/functional/#{folder}"].each { |f| FileUtils.mkdir_p(f) unless File.directory?(f) }
150
156
 
151
157
  m.template "auto/resources_controller.rb.erb",
152
- "app/controllers/admin/#{model.tableize}_controller.rb",
153
- :assigns => { :model => model }
158
+ "app/controllers/admin/#{model.name.tableize}_controller.rb",
159
+ :assigns => { :model => model.name }
154
160
 
155
161
  m.template "auto/resource_controller_test.rb.erb",
156
- "test/functional/admin/#{model.tableize}_controller_test.rb",
157
- :assigns => { :model => model }
162
+ "test/functional/admin/#{model.name.tableize}_controller_test.rb",
163
+ :assigns => { :model => model.name }
158
164
 
159
165
  end
160
166
 
data/lib/typus.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # coding: utf-8
2
+
1
3
  module Typus
2
4
 
3
5
  class << self
@@ -28,6 +30,9 @@ module Typus
28
30
  Typus::Configuration.config.collect { |i| i.first if i.last['application'] == name }.compact.uniq.sort
29
31
  end
30
32
 
33
+ ##
34
+ # Gets a list of all the models on the configuration file.
35
+ #
31
36
  def models
32
37
  Typus::Configuration.config.map { |i| i.first }.sort
33
38
  end
@@ -36,20 +41,28 @@ module Typus
36
41
  models.collect { |m| m if m.constantize.typus_options_for(:on_header) }.compact
37
42
  end
38
43
 
44
+ ##
39
45
  # List of resources, which are tableless models.
40
- def resources(models = get_model_names)
41
-
42
- all_resources = Typus::Configuration.roles.keys.map do |key|
43
- Typus::Configuration.roles[key].keys
44
- end.flatten.sort.uniq
45
-
46
- all_resources.delete_if { |x| models.include?(x) || x == 'TypusUser' } rescue []
47
-
46
+ #
47
+ def resources
48
+ Typus::Configuration.roles.keys.map do |key|
49
+ Typus::Configuration.roles[key].keys
50
+ end.flatten.sort.uniq.delete_if { |x| models.include?(x) }
48
51
  end
49
52
 
50
- def get_model_names
51
- Dir[ "#{Rails.root}/app/models/**/*.rb",
52
- "#{Rails.root}/vendor/plugins/**/app/models/**/*.rb" ].collect { |m| File.basename(m).sub(/\.rb$/,'').camelize }
53
+ ##
54
+ # Gets a list of models under app/models
55
+ #
56
+ def discover_models
57
+ all_models = []
58
+ Dir.chdir(File.join(Rails.root, 'app/models')) do
59
+ Dir['**/*.rb'].each do |m|
60
+ class_name = m.sub(/\.rb$/,'').camelize
61
+ klass = class_name.split('::').inject(Object){ |klass,part| klass.const_get(part) }
62
+ all_models << "#{class_name}" if klass < ActiveRecord::Base && !klass.abstract_class?
63
+ end
64
+ end
65
+ return all_models
53
66
  end
54
67
 
55
68
  def user_class
@@ -289,15 +289,19 @@ module Typus
289
289
 
290
290
  select = !klass.typus_user_id? ? klass.primary_key : "#{klass.primary_key}, #{Typus.user_fk}"
291
291
 
292
- previous_ = klass.find :first,
293
- :select => select,
294
- :order => "#{klass.primary_key} DESC",
295
- :conditions => previous_conditions
296
-
297
- next_ = klass.find :first,
298
- :select => select,
299
- :order => "#{klass.primary_key} ASC",
300
- :conditions => next_conditions
292
+ previous_ = klass.send(:with_exclusive_scope) do
293
+ klass.find :first,
294
+ :select => select,
295
+ :order => "#{klass.primary_key} DESC",
296
+ :conditions => previous_conditions
297
+ end
298
+
299
+ next_ = klass.send(:with_exclusive_scope) do
300
+ klass.find :first,
301
+ :select => select,
302
+ :order => "#{klass.primary_key} ASC",
303
+ :conditions => next_conditions
304
+ end
301
305
 
302
306
  return previous_, next_
303
307
 
data/lib/typus/format.rb CHANGED
@@ -21,12 +21,24 @@ module Typus
21
21
 
22
22
  def generate_csv
23
23
 
24
- require 'fastercsv'
25
-
26
24
  fields = @resource[:class].typus_fields_for(:csv).collect { |i| i.first }
27
- csv_string = FasterCSV.generate do |csv|
28
- csv << fields.map { |f| _(f.humanize) }
29
- data.each { |i| csv << fields.map { |f| i.send(f) } }
25
+
26
+ require 'csv'
27
+ if CSV.const_defined?(:Reader)
28
+ # Old CSV version so we enable faster CSV.
29
+ begin
30
+ require 'fastercsv'
31
+ rescue Exception => error
32
+ raise error.message
33
+ end
34
+ csv = FasterCSV
35
+ else
36
+ csv = CSV
37
+ end
38
+
39
+ csv_string = csv.generate do |c|
40
+ c << fields.map { |f| _(f.humanize) }
41
+ data.each { |i| c << fields.map { |f| i.send(f) } }
30
42
  end
31
43
 
32
44
  filename = "#{Time.now.strftime("%Y%m%d%H%M%S")}_#{@resource[:self]}.csv"
@@ -34,8 +46,6 @@ module Typus
34
46
  :type => 'text/csv; charset=utf-8; header=present',
35
47
  :filename => filename)
36
48
 
37
- rescue LoadError
38
- render :text => _("FasterCSV is not installed.")
39
49
  end
40
50
 
41
51
  def generate_xml
data/lib/typus/preview.rb CHANGED
@@ -45,18 +45,16 @@ module Typus
45
45
  HTML
46
46
  elsif send(attachment).styles.member?(file_thumbnail)
47
47
  <<-HTML
48
+ <script type="text/javascript" charset="utf-8">
49
+ $(document).ready(function() { $("##{to_dom}").fancybox(); });
50
+ </script>
48
51
  <a href="#{send(attachment).url}" title="#{typus_name}">
49
52
  <img src="#{send(attachment).url(file_thumbnail)}" />
50
53
  </a>
51
54
  HTML
52
55
  elsif send(attachment).styles.member?(file_preview)
53
56
  <<-HTML
54
- <script type="text/javascript" charset="utf-8">
55
- $(document).ready(function() { $("##{to_dom}").fancybox(); });
56
- </script>
57
- <a id="#{to_dom}" href="#{send(attachment).url(file_preview)}" title="#{typus_name}">
58
- #{send(attribute)}
59
- </a>
57
+ <img src="#{send(attachment).url(file_preview)}" />
60
58
  HTML
61
59
  else
62
60
  <<-HTML
data/lib/typus/string.rb CHANGED
@@ -1,5 +1,21 @@
1
1
  class String
2
2
 
3
+ def extract_controller(admin = 'admin')
4
+ split('/').delete_if { |i| i.eql?(admin) }
5
+ end
6
+
7
+ def extract_resource
8
+ extract_controller.join('/')
9
+ end
10
+
11
+ def extract_class
12
+ extract_controller.map { |i| i.capitalize }.join('::').classify.constantize
13
+ end
14
+
15
+ def extract_human_name
16
+ extract_class.typus_human_name.gsub('/', ' ')
17
+ end
18
+
3
19
  def typus_actions_for(filter)
4
20
  Typus::Configuration.config[self]['actions'][filter.to_s].split(', ') rescue []
5
21
  end
@@ -0,0 +1,3 @@
1
+ class Typus
2
+ Version = '0.9.36'
3
+ end
@@ -22,6 +22,13 @@ Comment:
22
22
  search: email, body
23
23
  application: Blog
24
24
 
25
+ Delayed::Task:
26
+ fields:
27
+ list: name
28
+ form: name
29
+ search: name
30
+ application: System
31
+
25
32
  Page:
26
33
  fields:
27
34
  # Body field is overwrited from a Page class method.
@@ -2,6 +2,7 @@ admin:
2
2
  Asset: create, read, update, delete
3
3
  Category: create, read, update, delete
4
4
  Comment: create, read, update, delete
5
+ Delayed::Task: create, read, update, delete
5
6
  Git: index, commit
6
7
  Order:
7
8
  Page: create, read, update, delete, rebuild, rebuild_all
@@ -37,12 +37,6 @@ class Admin::PostsControllerTest < ActionController::TestCase
37
37
 
38
38
  assert @typus_user.is_root?
39
39
 
40
- begin
41
- require 'fastercsv'
42
- rescue LoadError
43
- return
44
- end
45
-
46
40
  expected = <<-RAW
47
41
  Title,Status
48
42
  Owned by admin,false
@@ -9,7 +9,7 @@ class Admin::MasterHelperTest < ActiveSupport::TestCase
9
9
 
10
10
  def test_display_link_to_previous
11
11
 
12
- @resource = { :class => Post }
12
+ @resource = { :class => Post, :human_name => 'Post' }
13
13
  params = { :action => 'edit', :back_to => '/back_to_param' }
14
14
  self.expects(:params).at_least_once.returns(params)
15
15
 
@@ -1,3 +1,5 @@
1
+ # coding: utf-8
2
+
1
3
  require 'test/helper'
2
4
 
3
5
  class Admin::SidebarHelperTest < ActiveSupport::TestCase
@@ -13,10 +15,11 @@ class Admin::SidebarHelperTest < ActiveSupport::TestCase
13
15
  default_url_options[:host] = 'test.host'
14
16
  end
15
17
 
16
- =begin
17
-
18
+ # FIXME
18
19
  def test_actions
19
20
 
21
+ return
22
+
20
23
  self.expects(:default_actions).returns(['action1', 'action2'])
21
24
  self.expects(:previous_and_next).returns(['previous', 'next'])
22
25
  self.expects(:export).returns(['csv', 'pdf'])
@@ -47,8 +50,6 @@ class Admin::SidebarHelperTest < ActiveSupport::TestCase
47
50
 
48
51
  end
49
52
 
50
- =end
51
-
52
53
  def test_export
53
54
 
54
55
  @resource = { :class => Post }
@@ -341,7 +341,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
341
341
  end
342
342
 
343
343
  def test_should_verify_previous_and_next
344
- assert TypusUser.instance_methods.include?('previous_and_next')
344
+ assert TypusUser.instance_methods.map { |i| i.to_sym }.include?(:previous_and_next)
345
345
  assert typus_users(:admin).previous_and_next.kind_of?(Array)
346
346
  end
347
347
 
@@ -2,6 +2,36 @@ require 'test/helper'
2
2
 
3
3
  class StringTest < ActiveSupport::TestCase
4
4
 
5
+ def test_extract_controller
6
+
7
+ assert_equal ['posts'], 'admin/posts'.extract_controller
8
+ assert_equal ['typus_users'], 'admin/typus_users'.extract_controller
9
+ assert_equal ['delayed', 'jobs'], 'admin/delayed/jobs'.extract_controller
10
+
11
+ assert_equal ['posts'], 'typus/posts'.extract_controller('typus')
12
+ assert_equal ['typus_users'], 'typus/typus_users'.extract_controller('typus')
13
+ assert_equal ['delayed', 'tasks'], 'typus/delayed/tasks'.extract_controller('typus')
14
+
15
+ end
16
+
17
+ def test_extract_resource
18
+ assert_equal 'posts', 'admin/posts'.extract_resource
19
+ assert_equal 'typus_users', 'admin/typus_users'.extract_resource
20
+ assert_equal 'delayed/tasks', 'admin/delayed/tasks'.extract_resource
21
+ end
22
+
23
+ def test_extract_class
24
+ assert_equal Post, 'admin/posts'.extract_class
25
+ assert_equal TypusUser, 'admin/typus_users'.extract_class
26
+ assert_equal Delayed::Task, 'admin/delayed/tasks'.extract_class
27
+ end
28
+
29
+ def test_extract_human_name
30
+ assert_equal 'Post', 'admin/posts'.extract_human_name
31
+ assert_equal 'Typus user', 'admin/typus_users'.extract_human_name
32
+ assert_equal 'Delayed task', 'admin/delayed/tasks'.extract_human_name
33
+ end
34
+
5
35
  def test_should_return_post_actions_for_index
6
36
  assert_equal %w( cleanup ), 'Post'.typus_actions_for('index')
7
37
  assert_equal %w( cleanup ), 'Post'.typus_actions_for(:index)
@@ -15,7 +15,7 @@ class TypusTest < ActiveSupport::TestCase
15
15
  def test_should_return_applications_and_should_be_sorted
16
16
  assert Typus.respond_to?(:applications)
17
17
  assert Typus.applications.kind_of?(Array)
18
- assert_equal %w( Blog Site Typus ), Typus.applications
18
+ assert_equal %w( Blog Site System Typus ), Typus.applications
19
19
  end
20
20
 
21
21
  def test_should_return_modules_of_an_application
@@ -26,7 +26,7 @@ class TypusTest < ActiveSupport::TestCase
26
26
  def test_should_return_models_and_should_be_sorted
27
27
  assert Typus.respond_to?(:models)
28
28
  assert Typus.models.kind_of?(Array)
29
- assert_equal %w( Asset Category Comment CustomUser Page Post TypusUser View ), Typus.models
29
+ assert_equal %w( Asset Category Comment CustomUser Delayed::Task Page Post TypusUser View ), Typus.models
30
30
  end
31
31
 
32
32
  def test_should_return_an_array_of_models_on_header
@@ -36,8 +36,7 @@ class TypusTest < ActiveSupport::TestCase
36
36
 
37
37
  def test_should_verify_resources_class_method
38
38
  assert Typus.respond_to?(:resources)
39
- models = Typus.models
40
- assert_equal %w( Git Order Status WatchDog ), Typus.resources(models)
39
+ assert_equal %w( Git Order Status WatchDog ), Typus.resources
41
40
  end
42
41
 
43
42
  def test_should_return_user_class
data/test/models.rb CHANGED
@@ -58,4 +58,10 @@ class View < ActiveRecord::Base
58
58
 
59
59
  belongs_to :post
60
60
 
61
+ end
62
+
63
+ class Delayed::Task < ActiveRecord::Base
64
+
65
+ set_table_name 'delayed_tasks'
66
+
61
67
  end
data/test/schema.rb CHANGED
@@ -24,6 +24,10 @@ ActiveRecord::Schema.define do
24
24
 
25
25
  add_index :comments, :post_id
26
26
 
27
+ create_table :delayed_tasks, :force => true do |t|
28
+ t.string :name
29
+ end
30
+
27
31
  create_table :pages, :force => true do |t|
28
32
  t.string :title
29
33
  t.text :body
@@ -12,7 +12,7 @@ class TypusUserRolesTest < ActiveSupport::TestCase
12
12
  typus_user = typus_users(:admin)
13
13
  assert_equal 'admin', typus_user.role
14
14
 
15
- models = %w( Asset Category Comment Git Page Post Status TypusUser View WatchDog )
15
+ models = %w( Asset Category Comment Delayed::Task Git Page Post Status TypusUser View WatchDog )
16
16
  assert_equal models, typus_user.resources.map(&:first).sort
17
17
 
18
18
  # Order exists on the roles, but, as we compact the hash, the
@@ -14,14 +14,14 @@ class TypusUserTest < ActiveSupport::TestCase
14
14
  end
15
15
 
16
16
  def test_should_verify_typus_user_attributes
17
- %w( first_name last_name email role salt crypted_password ).each do |attribute|
18
- assert TypusUser.instance_methods.include?(attribute)
17
+ [ :first_name, :last_name, :email, :role, :salt, :crypted_password ].each do |attribute|
18
+ assert TypusUser.instance_methods.map { |i| i.to_sym }.include?(attribute)
19
19
  end
20
20
  end
21
21
 
22
22
  def test_should_verify_definition_on_instance_methods
23
- %w( is_root? authenticated? ).each do |instance_method|
24
- assert TypusUser.instance_methods.include?(instance_method)
23
+ [ :is_root?, :authenticated? ].each do |instance_method|
24
+ assert TypusUser.instance_methods.map { |i| i.to_sym }.include?(instance_method)
25
25
  end
26
26
  end
27
27
 
@@ -169,7 +169,7 @@ this_is_chelm@example.com
169
169
  end
170
170
 
171
171
  def test_should_verify_can_perform?
172
- assert TypusUser.instance_methods.include?('can_perform?')
172
+ assert TypusUser.instance_methods.map {|i| i.to_sym }.include?(:can_perform?)
173
173
  @current_user = TypusUser.find(:first)
174
174
  assert @current_user.can_perform?(TypusUser, 'delete')
175
175
  assert @current_user.can_perform?('TypusUser', 'delete')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.35
4
+ version: 0.9.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesc Esplugas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-04 00:00:00 +02:00
12
+ date: 2009-10-13 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,6 +23,8 @@ extra_rdoc_files:
23
23
  - README.rdoc
24
24
  files:
25
25
  - .gitignore
26
+ - CONTRIBUTORS
27
+ - HISTORY.md
26
28
  - MIT-LICENSE
27
29
  - README.rdoc
28
30
  - Rakefile
@@ -125,6 +127,7 @@ files:
125
127
  - lib/typus/reloader.rb
126
128
  - lib/typus/string.rb
127
129
  - lib/typus/user.rb
130
+ - lib/typus/version.rb
128
131
  - lib/vendor/active_record.rb
129
132
  - lib/vendor/paginator.rb
130
133
  - lib/vendor/rss_parser.rb
@@ -210,7 +213,6 @@ files:
210
213
  - test/unit/typus_user_test.rb
211
214
  - test/vendor/active_record_test.rb
212
215
  - test/vendor/paginator_test.rb
213
- - typus.gemspec
214
216
  has_rdoc: true
215
217
  homepage: http://intraducibles.com/projects/typus
216
218
  licenses: []
data/typus.gemspec DELETED
@@ -1,268 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{typus}
8
- s.version = "0.9.35"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Francesc Esplugas"]
12
- s.date = %q{2009-10-04}
13
- s.description = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
14
- s.email = %q{francesc@intraducibles.com}
15
- s.extra_rdoc_files = [
16
- "README.rdoc"
17
- ]
18
- s.files = [
19
- ".gitignore",
20
- "MIT-LICENSE",
21
- "README.rdoc",
22
- "Rakefile",
23
- "VERSION",
24
- "app/controllers/admin/master_controller.rb",
25
- "app/controllers/typus_controller.rb",
26
- "app/helpers/admin/form_helper.rb",
27
- "app/helpers/admin/master_helper.rb",
28
- "app/helpers/admin/public_helper.rb",
29
- "app/helpers/admin/sidebar_helper.rb",
30
- "app/helpers/admin/table_helper.rb",
31
- "app/helpers/typus_helper.rb",
32
- "app/models/typus_mailer.rb",
33
- "app/models/typus_user.rb",
34
- "app/views/admin/dashboard/_sidebar.html.erb",
35
- "app/views/admin/resources/edit.html.erb",
36
- "app/views/admin/resources/index.html.erb",
37
- "app/views/admin/resources/new.html.erb",
38
- "app/views/admin/resources/show.html.erb",
39
- "app/views/admin/shared/_feedback.html.erb",
40
- "app/views/admin/shared/_footer.html.erb",
41
- "app/views/admin/shared/_pagination.html.erb",
42
- "app/views/admin/templates/_boolean.html.erb",
43
- "app/views/admin/templates/_date.html.erb",
44
- "app/views/admin/templates/_datetime.html.erb",
45
- "app/views/admin/templates/_file.html.erb",
46
- "app/views/admin/templates/_password.html.erb",
47
- "app/views/admin/templates/_selector.html.erb",
48
- "app/views/admin/templates/_string.html.erb",
49
- "app/views/admin/templates/_text.html.erb",
50
- "app/views/admin/templates/_time.html.erb",
51
- "app/views/admin/templates/_tiny_mce.html.erb",
52
- "app/views/layouts/admin.html.erb",
53
- "app/views/layouts/typus.html.erb",
54
- "app/views/typus/dashboard.html.erb",
55
- "app/views/typus/recover_password.html.erb",
56
- "app/views/typus/reset_password.html.erb",
57
- "app/views/typus/sign_in.html.erb",
58
- "app/views/typus/sign_up.html.erb",
59
- "app/views/typus_mailer/reset_password_link.erb",
60
- "config/locales/de.yml",
61
- "config/locales/es.yml",
62
- "config/locales/fr.yml",
63
- "config/locales/language.yml.template",
64
- "config/locales/pt-BR.yml",
65
- "config/locales/ru.yml",
66
- "config/routes.rb",
67
- "generators/typus/templates/auto/index.html.erb",
68
- "generators/typus/templates/auto/resource_controller.rb.erb",
69
- "generators/typus/templates/auto/resource_controller_test.rb.erb",
70
- "generators/typus/templates/auto/resources_controller.rb.erb",
71
- "generators/typus/templates/config/initializers/typus.rb",
72
- "generators/typus/templates/config/typus/README",
73
- "generators/typus/templates/config/typus/application.yml",
74
- "generators/typus/templates/config/typus/application_roles.yml",
75
- "generators/typus/templates/config/typus/typus.yml",
76
- "generators/typus/templates/config/typus/typus_roles.yml",
77
- "generators/typus/templates/db/create_typus_users.rb",
78
- "generators/typus/templates/lib/tasks/typus_tasks.rake",
79
- "generators/typus/templates/public/images/admin/fancybox/fancy_closebox.png",
80
- "generators/typus/templates/public/images/admin/fancybox/fancy_left.png",
81
- "generators/typus/templates/public/images/admin/fancybox/fancy_progress.png",
82
- "generators/typus/templates/public/images/admin/fancybox/fancy_right.png",
83
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_e.png",
84
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_n.png",
85
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_ne.png",
86
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_nw.png",
87
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_s.png",
88
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_se.png",
89
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_sw.png",
90
- "generators/typus/templates/public/images/admin/fancybox/fancy_shadow_w.png",
91
- "generators/typus/templates/public/images/admin/fancybox/fancy_title_left.png",
92
- "generators/typus/templates/public/images/admin/fancybox/fancy_title_main.png",
93
- "generators/typus/templates/public/images/admin/fancybox/fancy_title_right.png",
94
- "generators/typus/templates/public/images/admin/ui-icons.png",
95
- "generators/typus/templates/public/javascripts/admin/application.js",
96
- "generators/typus/templates/public/javascripts/admin/jquery-1.3.2.min.js",
97
- "generators/typus/templates/public/javascripts/admin/jquery.fancybox-1.2.1.min.js",
98
- "generators/typus/templates/public/stylesheets/admin/jquery.fancybox.css",
99
- "generators/typus/templates/public/stylesheets/admin/reset.css",
100
- "generators/typus/templates/public/stylesheets/admin/screen.css",
101
- "generators/typus/typus_generator.rb",
102
- "generators/typus_update_schema_to_01/templates/config/typus.yml",
103
- "generators/typus_update_schema_to_01/templates/migration.rb",
104
- "generators/typus_update_schema_to_01/typus_update_schema_to_01_generator.rb",
105
- "generators/typus_update_schema_to_02/templates/migration.rb",
106
- "generators/typus_update_schema_to_02/typus_update_schema_to_02_generator.rb",
107
- "lib/typus.rb",
108
- "lib/typus/active_record.rb",
109
- "lib/typus/authentication.rb",
110
- "lib/typus/configuration.rb",
111
- "lib/typus/extensions/routes.rb",
112
- "lib/typus/extensions/routes_hack.rb",
113
- "lib/typus/format.rb",
114
- "lib/typus/hash.rb",
115
- "lib/typus/object.rb",
116
- "lib/typus/preferences.rb",
117
- "lib/typus/preview.rb",
118
- "lib/typus/quick_edit.rb",
119
- "lib/typus/reloader.rb",
120
- "lib/typus/string.rb",
121
- "lib/typus/user.rb",
122
- "lib/vendor/active_record.rb",
123
- "lib/vendor/paginator.rb",
124
- "lib/vendor/rss_parser.rb",
125
- "rails/init.rb",
126
- "tasks/typus_tasks.rake",
127
- "test/config/broken/application.yml",
128
- "test/config/broken/application_roles.yml",
129
- "test/config/broken/empty.yml",
130
- "test/config/broken/empty_roles.yml",
131
- "test/config/broken/undefined.yml",
132
- "test/config/broken/undefined_roles.yml",
133
- "test/config/default/typus.yml",
134
- "test/config/default/typus_roles.yml",
135
- "test/config/empty/empty_01.yml",
136
- "test/config/empty/empty_01_roles.yml",
137
- "test/config/empty/empty_02.yml",
138
- "test/config/empty/empty_02_roles.yml",
139
- "test/config/locales/es.yml",
140
- "test/config/ordered/001_roles.yml",
141
- "test/config/ordered/002_roles.yml",
142
- "test/config/unordered/app_one_roles.yml",
143
- "test/config/unordered/app_two_roles.yml",
144
- "test/config/working/application.yml",
145
- "test/config/working/application_roles.yml",
146
- "test/config/working/typus.yml",
147
- "test/config/working/typus_roles.yml",
148
- "test/fixtures/app/controllers/admin/assets_controller.rb",
149
- "test/fixtures/app/controllers/admin/categories_controller.rb",
150
- "test/fixtures/app/controllers/admin/comments_controller.rb",
151
- "test/fixtures/app/controllers/admin/pages_controller.rb",
152
- "test/fixtures/app/controllers/admin/posts_controller.rb",
153
- "test/fixtures/app/controllers/admin/status_controller.rb",
154
- "test/fixtures/app/controllers/admin/typus_users_controller.rb",
155
- "test/fixtures/app/controllers/admin/watch_dog_controller.rb",
156
- "test/fixtures/app/views/admin/dashboard/_content.html.erb",
157
- "test/fixtures/app/views/admin/dashboard/_sidebar.html.erb",
158
- "test/fixtures/app/views/admin/posts/_edit.html.erb",
159
- "test/fixtures/app/views/admin/posts/_index.html.erb",
160
- "test/fixtures/app/views/admin/posts/_new.html.erb",
161
- "test/fixtures/app/views/admin/posts/_show.html.erb",
162
- "test/fixtures/app/views/admin/posts/_sidebar.html.erb",
163
- "test/fixtures/app/views/admin/resources/_sidebar.html.erb",
164
- "test/fixtures/app/views/admin/shared/_footer.html.erb",
165
- "test/fixtures/app/views/admin/status/index.html.erb",
166
- "test/fixtures/app/views/admin/templates/_datepicker.html.erb",
167
- "test/fixtures/assets.yml",
168
- "test/fixtures/categories.yml",
169
- "test/fixtures/comments.yml",
170
- "test/fixtures/pages.yml",
171
- "test/fixtures/posts.yml",
172
- "test/fixtures/typus_users.yml",
173
- "test/functional/admin/master_controller_assets_relationships.rb",
174
- "test/functional/admin/master_controller_categories_lists_test.rb",
175
- "test/functional/admin/master_controller_posts_before_test.rb",
176
- "test/functional/admin/master_controller_posts_crud_test.rb",
177
- "test/functional/admin/master_controller_posts_formats_test.rb",
178
- "test/functional/admin/master_controller_posts_permissions_test.rb",
179
- "test/functional/admin/master_controller_posts_relationships_test.rb",
180
- "test/functional/admin/master_controller_posts_roles.rb",
181
- "test/functional/admin/master_controller_posts_toggle_test.rb",
182
- "test/functional/admin/master_controller_posts_views_test.rb",
183
- "test/functional/admin/master_controller_tableless_resource_test.rb",
184
- "test/functional/admin/master_controller_typus_users_test.rb",
185
- "test/functional/typus_controller_test.rb",
186
- "test/helper.rb",
187
- "test/helpers/admin/form_helper_test.rb",
188
- "test/helpers/admin/master_helper_test.rb",
189
- "test/helpers/admin/public_helper_test.rb",
190
- "test/helpers/admin/sidebar_helper_test.rb",
191
- "test/helpers/admin/table_helper_test.rb",
192
- "test/helpers/typus_helper_test.rb",
193
- "test/lib/active_record_test.rb",
194
- "test/lib/configuration_test.rb",
195
- "test/lib/hash_test.rb",
196
- "test/lib/routes_test.rb",
197
- "test/lib/string_test.rb",
198
- "test/lib/typus_test.rb",
199
- "test/models.rb",
200
- "test/schema.rb",
201
- "test/unit/typus_mailer_test.rb",
202
- "test/unit/typus_test.rb",
203
- "test/unit/typus_user_roles_test.rb",
204
- "test/unit/typus_user_test.rb",
205
- "test/vendor/active_record_test.rb",
206
- "test/vendor/paginator_test.rb",
207
- "typus.gemspec"
208
- ]
209
- s.homepage = %q{http://intraducibles.com/projects/typus}
210
- s.rdoc_options = ["--charset=UTF-8"]
211
- s.require_paths = ["lib"]
212
- s.rubygems_version = %q{1.3.5}
213
- s.summary = %q{Effortless backend interface for Ruby on Rails applications. (Admin scaffold generator.)}
214
- s.test_files = [
215
- "test/fixtures/app/controllers/admin/assets_controller.rb",
216
- "test/fixtures/app/controllers/admin/categories_controller.rb",
217
- "test/fixtures/app/controllers/admin/comments_controller.rb",
218
- "test/fixtures/app/controllers/admin/pages_controller.rb",
219
- "test/fixtures/app/controllers/admin/posts_controller.rb",
220
- "test/fixtures/app/controllers/admin/status_controller.rb",
221
- "test/fixtures/app/controllers/admin/typus_users_controller.rb",
222
- "test/fixtures/app/controllers/admin/watch_dog_controller.rb",
223
- "test/functional/admin/master_controller_assets_relationships.rb",
224
- "test/functional/admin/master_controller_categories_lists_test.rb",
225
- "test/functional/admin/master_controller_posts_before_test.rb",
226
- "test/functional/admin/master_controller_posts_crud_test.rb",
227
- "test/functional/admin/master_controller_posts_formats_test.rb",
228
- "test/functional/admin/master_controller_posts_permissions_test.rb",
229
- "test/functional/admin/master_controller_posts_relationships_test.rb",
230
- "test/functional/admin/master_controller_posts_roles.rb",
231
- "test/functional/admin/master_controller_posts_toggle_test.rb",
232
- "test/functional/admin/master_controller_posts_views_test.rb",
233
- "test/functional/admin/master_controller_tableless_resource_test.rb",
234
- "test/functional/admin/master_controller_typus_users_test.rb",
235
- "test/functional/typus_controller_test.rb",
236
- "test/helper.rb",
237
- "test/helpers/admin/form_helper_test.rb",
238
- "test/helpers/admin/master_helper_test.rb",
239
- "test/helpers/admin/public_helper_test.rb",
240
- "test/helpers/admin/sidebar_helper_test.rb",
241
- "test/helpers/admin/table_helper_test.rb",
242
- "test/helpers/typus_helper_test.rb",
243
- "test/lib/active_record_test.rb",
244
- "test/lib/configuration_test.rb",
245
- "test/lib/hash_test.rb",
246
- "test/lib/routes_test.rb",
247
- "test/lib/string_test.rb",
248
- "test/lib/typus_test.rb",
249
- "test/models.rb",
250
- "test/schema.rb",
251
- "test/unit/typus_mailer_test.rb",
252
- "test/unit/typus_test.rb",
253
- "test/unit/typus_user_roles_test.rb",
254
- "test/unit/typus_user_test.rb",
255
- "test/vendor/active_record_test.rb",
256
- "test/vendor/paginator_test.rb"
257
- ]
258
-
259
- if s.respond_to? :specification_version then
260
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
261
- s.specification_version = 3
262
-
263
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
264
- else
265
- end
266
- else
267
- end
268
- end