lockdown 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -4,7 +4,6 @@ Manifest.txt
4
4
  README.txt
5
5
  Rakefile
6
6
  lib/lockdown.rb
7
- lib/lockdown/classy-inheritance.rb
8
7
  lib/lockdown/controller.rb
9
8
  lib/lockdown/database.rb
10
9
  lib/lockdown/frameworks/merb.rb
data/lib/lockdown.rb CHANGED
@@ -2,7 +2,7 @@ require File.join(File.dirname(__FILE__), "lockdown", "helper")
2
2
 
3
3
  module Lockdown
4
4
  # :stopdoc:
5
- VERSION = '0.7.0'
5
+ VERSION = '0.7.1'
6
6
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
7
7
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
8
8
  # :startdoc:
@@ -11,19 +11,16 @@ module Lockdown
11
11
  include Lockdown::Helper
12
12
 
13
13
  # Returns the version string for the library.
14
- #
15
14
  def version
16
15
  VERSION
17
16
  end
18
17
 
19
18
  # Returns the qualified path to the init file
20
- #
21
19
  def init_file
22
20
  "#{Dir.pwd}/lib/lockdown/init.rb"
23
21
  end
24
22
 
25
- # Mixin Lockdown code to the appropriate Controller and ORM
26
- #
23
+ # Mixin Lockdown code to the appropriate framework and ORM
27
24
  def mixin
28
25
  if mixin_resource?("frameworks")
29
26
  unless mixin_resource?("orms")
@@ -39,6 +39,10 @@ Lockdown::System.configure do
39
39
  # :all_methods(:products) will return an array of all controller actions
40
40
  # for the products controller
41
41
  #
42
+ # If you need to reference a namespaced controller use two underscores:
43
+ # :admin__products would tell lockdown to look for:
44
+ # app/controllers/admin/products_controller.rb
45
+ #
42
46
  # if products is your standard RESTful resource you'll get:
43
47
  # ["products/index , "products/show",
44
48
  # "products/new", "products/edit",
data/tasks/gem.rake CHANGED
@@ -37,8 +37,6 @@ class GemPackageTask < Rake::PackageTask
37
37
  local_setup = File.join(Dir.pwd, %w[tasks setup.rb])
38
38
  if !test(?e, local_setup)
39
39
  Dir.glob(::Bones.path(%w[lib bones tasks *])).each {|fn| bones_files << fn}
40
- gem_spec.files = (gem_spec.files +
41
- bones_files.map {|fn| File.join('tasks', File.basename(fn))}).sort
42
40
  end
43
41
  end
44
42
 
@@ -63,6 +61,10 @@ class GemPackageTask < Rake::PackageTask
63
61
 
64
62
  file package_dir_path => bones_files do
65
63
  mkdir_p package_dir rescue nil
64
+
65
+ gem_spec.files = (gem_spec.files +
66
+ bones_files.map {|fn| File.join('tasks', File.basename(fn))}).sort
67
+
66
68
  bones_files.each do |fn|
67
69
  base_fn = File.join('tasks', File.basename(fn))
68
70
  f = File.join(package_dir_path, base_fn)
@@ -157,6 +159,13 @@ namespace :gem do
157
159
  puts PROJ.gem._spec.to_ruby
158
160
  end
159
161
 
162
+ desc 'Write the gemspec '
163
+ task :spec => 'gem:prereqs' do
164
+ File.open("#{PROJ.name}.gemspec", 'w') do |f|
165
+ f.write PROJ.gem._spec.to_ruby
166
+ end
167
+ end
168
+
160
169
  desc 'Install the gem'
161
170
  task :install => [:clobber, 'gem:package'] do
162
171
  sh "#{SUDO} #{GEM} install --local pkg/#{PROJ.gem._spec.full_name}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-08 00:00:00 -05:00
12
+ date: 2009-01-17 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.1
23
+ version: 2.2.0
24
24
  version:
25
25
  description: Lockdown is a authentication/authorization system for RubyOnRails (ver >= 2.1).
26
26
  email: andy@stonean.com
@@ -38,7 +38,6 @@ files:
38
38
  - README.txt
39
39
  - Rakefile
40
40
  - lib/lockdown.rb
41
- - lib/lockdown/classy-inheritance.rb
42
41
  - lib/lockdown/controller.rb
43
42
  - lib/lockdown/database.rb
44
43
  - lib/lockdown/frameworks/merb.rb
@@ -1,13 +0,0 @@
1
- if Object.const_defined?("ActiveRecord")
2
- unless Object.const_defined?("Stonean") && Stonean.const_defined?("ClassyInheritance")
3
- begin
4
- require "classy-inheritance"
5
- rescue LoadError
6
- puts <<-MSG
7
- You need to install classy-inheritance to use the provided models.
8
- With gems, use `gem install classy-inheritance'
9
- MSG
10
- exit
11
- end
12
- end
13
- end