kibali 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b3de305b0042d68b37a0e8d1d78ebe1cd60a29f8
4
+ data.tar.gz: 654abd79a0dca4b4a4a34d1d1ea0a8ac1d01b4d1
5
+ SHA512:
6
+ metadata.gz: 873c09ecb9f188860d1ea5984174fc6ad8caa83e9de3ba3df584045cd272f938f3611572475d501926426c0fd11b755d81eb5b32f08af73152f8b29a657b7759
7
+ data.tar.gz: 0fde5c7196fd17a7b5d4ab8fd8f20d1ef6e08de1d53bdb9a24f2a67efc7d8ceb10166e13e22371092ed4c57ea3c10fae61722b20a19f4052cc6a6325b2ee2910
data/.gitignore ADDED
@@ -0,0 +1,90 @@
1
+ #####################################################################################
2
+ # Rails
3
+ .bundle
4
+ db/*.sqlite3
5
+ db/*.sqlite3-journal
6
+ log/
7
+ tmp/
8
+ *.log
9
+ tmp/**/*
10
+ .tmp*
11
+ *.sqlite3
12
+
13
+ # Documentation
14
+ doc/api
15
+ doc/app
16
+ .yardoc
17
+ .yardopts
18
+ rdoc/
19
+
20
+ # Public Uploads
21
+ public/system/*
22
+ public/themes/*
23
+
24
+ # Public Cache
25
+ public/javascripts/cache
26
+ public/stylesheets/cache
27
+
28
+ # Vendor Cache
29
+ vendor/cache
30
+
31
+ # Acts as Indexed
32
+ index/**/*
33
+
34
+ # Refinery Specific
35
+ *.tmproj
36
+ *.autobackupbyrefinery.*
37
+ /refinerycms-*.gem
38
+ .autotest
39
+
40
+ # Mac
41
+ .DS_Store
42
+
43
+ # Windows
44
+ Thumbs.db
45
+
46
+ # NetBeans
47
+ nbproject
48
+
49
+ # Eclipse
50
+ .project
51
+
52
+ # Redcar
53
+ .redcar
54
+
55
+ # Rubinius
56
+ *.rbc
57
+
58
+ # Vim
59
+ *.swp
60
+ *.swo
61
+ *~
62
+
63
+ # RubyMine
64
+ .idea
65
+
66
+ # Backup
67
+ *~
68
+
69
+ # Capybara Bug
70
+ capybara-*html
71
+
72
+ # sass
73
+ .sass-cache
74
+ .sass-cache/*
75
+
76
+ #rvm
77
+ .rvmrc
78
+ .rvmrc.*
79
+
80
+ #gem
81
+ pkg/
82
+
83
+ # other
84
+ .loadpath
85
+ all.js
86
+ all.css
87
+ temp*.txt
88
+ config/database.yml
89
+ *.dump
90
+ .bashrc
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ kibali
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.0.0
data/Gemfile CHANGED
@@ -1,22 +1,4 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
- gem 'rails', '~> 3.2.8'
6
-
7
- # Add dependencies to develop your gem here.
8
- # Include everything needed to run rake, tests, features, etc.
9
- group :development, :test do
10
- gem "rdoc", "~> 3.12"
11
- gem "jeweler", "~> 1.8.4"
12
- gem 'sqlite3'
13
- end
14
-
15
- group :test do
16
- gem "factory_girl"
17
- gem "shoulda"
18
- # Pretty printed test output
19
- gem 'turn', :require => false
20
- end
21
-
1
+ source 'https://rubygems.org'
22
2
 
3
+ # Specify your gem's dependencies in xsrftoken.gemspec
4
+ gemspec
@@ -0,0 +1,110 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.9)
5
+ actionpack (= 3.2.9)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.9)
8
+ activemodel (= 3.2.9)
9
+ activesupport (= 3.2.9)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.9)
18
+ activesupport (= 3.2.9)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.9)
21
+ activemodel (= 3.2.9)
22
+ activesupport (= 3.2.9)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.9)
26
+ activemodel (= 3.2.9)
27
+ activesupport (= 3.2.9)
28
+ activesupport (3.2.9)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ ansi (1.4.3)
32
+ arel (3.0.2)
33
+ builder (3.0.4)
34
+ erubis (2.7.0)
35
+ factory_girl (4.1.0)
36
+ activesupport (>= 3.0.0)
37
+ git (1.2.5)
38
+ hike (1.2.1)
39
+ i18n (0.6.1)
40
+ jeweler (1.8.4)
41
+ bundler (~> 1.0)
42
+ git (>= 1.2.5)
43
+ rake
44
+ rdoc
45
+ journey (1.0.4)
46
+ json (1.7.5)
47
+ mail (2.4.4)
48
+ i18n (>= 0.4.0)
49
+ mime-types (~> 1.16)
50
+ treetop (~> 1.4.8)
51
+ mime-types (1.19)
52
+ multi_json (1.3.7)
53
+ polyglot (0.3.3)
54
+ rack (1.4.1)
55
+ rack-cache (1.2)
56
+ rack (>= 0.4)
57
+ rack-ssl (1.3.2)
58
+ rack
59
+ rack-test (0.6.2)
60
+ rack (>= 1.0)
61
+ rails (3.2.9)
62
+ actionmailer (= 3.2.9)
63
+ actionpack (= 3.2.9)
64
+ activerecord (= 3.2.9)
65
+ activeresource (= 3.2.9)
66
+ activesupport (= 3.2.9)
67
+ bundler (~> 1.0)
68
+ railties (= 3.2.9)
69
+ railties (3.2.9)
70
+ actionpack (= 3.2.9)
71
+ activesupport (= 3.2.9)
72
+ rack-ssl (~> 1.3.2)
73
+ rake (>= 0.8.7)
74
+ rdoc (~> 3.4)
75
+ thor (>= 0.14.6, < 2.0)
76
+ rake (10.0.2)
77
+ rdoc (3.12)
78
+ json (~> 1.4)
79
+ shoulda (3.3.2)
80
+ shoulda-context (~> 1.0.1)
81
+ shoulda-matchers (~> 1.4.1)
82
+ shoulda-context (1.0.1)
83
+ shoulda-matchers (1.4.1)
84
+ activesupport (>= 3.0.0)
85
+ sprockets (2.2.1)
86
+ hike (~> 1.2)
87
+ multi_json (~> 1.0)
88
+ rack (~> 1.0)
89
+ tilt (~> 1.1, != 1.3.0)
90
+ sqlite3 (1.3.6)
91
+ thor (0.16.0)
92
+ tilt (1.3.3)
93
+ treetop (1.4.12)
94
+ polyglot
95
+ polyglot (>= 0.3.1)
96
+ turn (0.9.6)
97
+ ansi
98
+ tzinfo (0.3.35)
99
+
100
+ PLATFORMS
101
+ ruby
102
+
103
+ DEPENDENCIES
104
+ factory_girl
105
+ jeweler (~> 1.8.4)
106
+ rails (~> 3.2.8)
107
+ rdoc (~> 3.12)
108
+ shoulda
109
+ sqlite3
110
+ turn
data/Gemfile.lock CHANGED
@@ -1,110 +1,104 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ kibali (0.3.1)
5
+
1
6
  GEM
2
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
3
8
  specs:
4
- actionmailer (3.2.9)
5
- actionpack (= 3.2.9)
6
- mail (~> 2.4.4)
7
- actionpack (3.2.9)
8
- activemodel (= 3.2.9)
9
- activesupport (= 3.2.9)
10
- builder (~> 3.0.0)
9
+ actionmailer (4.0.2)
10
+ actionpack (= 4.0.2)
11
+ mail (~> 2.5.4)
12
+ actionpack (4.0.2)
13
+ activesupport (= 4.0.2)
14
+ builder (~> 3.1.0)
11
15
  erubis (~> 2.7.0)
12
- journey (~> 1.0.4)
13
- rack (~> 1.4.0)
14
- rack-cache (~> 1.2)
15
- rack-test (~> 0.6.1)
16
- sprockets (~> 2.2.1)
17
- activemodel (3.2.9)
18
- activesupport (= 3.2.9)
19
- builder (~> 3.0.0)
20
- activerecord (3.2.9)
21
- activemodel (= 3.2.9)
22
- activesupport (= 3.2.9)
23
- arel (~> 3.0.2)
24
- tzinfo (~> 0.3.29)
25
- activeresource (3.2.9)
26
- activemodel (= 3.2.9)
27
- activesupport (= 3.2.9)
28
- activesupport (3.2.9)
29
- i18n (~> 0.6)
30
- multi_json (~> 1.0)
16
+ rack (~> 1.5.2)
17
+ rack-test (~> 0.6.2)
18
+ activemodel (4.0.2)
19
+ activesupport (= 4.0.2)
20
+ builder (~> 3.1.0)
21
+ activerecord (4.0.2)
22
+ activemodel (= 4.0.2)
23
+ activerecord-deprecated_finders (~> 1.0.2)
24
+ activesupport (= 4.0.2)
25
+ arel (~> 4.0.0)
26
+ activerecord-deprecated_finders (1.0.3)
27
+ activesupport (4.0.2)
28
+ i18n (~> 0.6, >= 0.6.4)
29
+ minitest (~> 4.2)
30
+ multi_json (~> 1.3)
31
+ thread_safe (~> 0.1)
32
+ tzinfo (~> 0.3.37)
31
33
  ansi (1.4.3)
32
- arel (3.0.2)
33
- builder (3.0.4)
34
+ arel (4.0.1)
35
+ atomic (1.1.14)
36
+ builder (3.1.4)
34
37
  erubis (2.7.0)
35
- factory_girl (4.1.0)
38
+ factory_girl (4.3.0)
36
39
  activesupport (>= 3.0.0)
37
- git (1.2.5)
38
- hike (1.2.1)
39
- i18n (0.6.1)
40
- jeweler (1.8.4)
41
- bundler (~> 1.0)
42
- git (>= 1.2.5)
43
- rake
44
- rdoc
45
- journey (1.0.4)
46
- json (1.7.5)
47
- mail (2.4.4)
48
- i18n (>= 0.4.0)
40
+ hike (1.2.3)
41
+ i18n (0.6.9)
42
+ mail (2.5.4)
49
43
  mime-types (~> 1.16)
50
44
  treetop (~> 1.4.8)
51
- mime-types (1.19)
52
- multi_json (1.3.7)
45
+ mime-types (1.25.1)
46
+ minitest (4.7.5)
47
+ multi_json (1.8.2)
53
48
  polyglot (0.3.3)
54
- rack (1.4.1)
55
- rack-cache (1.2)
56
- rack (>= 0.4)
57
- rack-ssl (1.3.2)
58
- rack
49
+ rack (1.5.2)
59
50
  rack-test (0.6.2)
60
51
  rack (>= 1.0)
61
- rails (3.2.9)
62
- actionmailer (= 3.2.9)
63
- actionpack (= 3.2.9)
64
- activerecord (= 3.2.9)
65
- activeresource (= 3.2.9)
66
- activesupport (= 3.2.9)
67
- bundler (~> 1.0)
68
- railties (= 3.2.9)
69
- railties (3.2.9)
70
- actionpack (= 3.2.9)
71
- activesupport (= 3.2.9)
72
- rack-ssl (~> 1.3.2)
52
+ rails (4.0.2)
53
+ actionmailer (= 4.0.2)
54
+ actionpack (= 4.0.2)
55
+ activerecord (= 4.0.2)
56
+ activesupport (= 4.0.2)
57
+ bundler (>= 1.3.0, < 2.0)
58
+ railties (= 4.0.2)
59
+ sprockets-rails (~> 2.0.0)
60
+ railties (4.0.2)
61
+ actionpack (= 4.0.2)
62
+ activesupport (= 4.0.2)
73
63
  rake (>= 0.8.7)
74
- rdoc (~> 3.4)
75
- thor (>= 0.14.6, < 2.0)
76
- rake (10.0.2)
77
- rdoc (3.12)
78
- json (~> 1.4)
79
- shoulda (3.3.2)
80
- shoulda-context (~> 1.0.1)
81
- shoulda-matchers (~> 1.4.1)
82
- shoulda-context (1.0.1)
83
- shoulda-matchers (1.4.1)
64
+ thor (>= 0.18.1, < 2.0)
65
+ rake (10.1.0)
66
+ shoulda (3.5.0)
67
+ shoulda-context (~> 1.0, >= 1.0.1)
68
+ shoulda-matchers (>= 1.4.1, < 3.0)
69
+ shoulda-context (1.1.6)
70
+ shoulda-matchers (2.4.0)
84
71
  activesupport (>= 3.0.0)
85
- sprockets (2.2.1)
72
+ sprockets (2.10.1)
86
73
  hike (~> 1.2)
87
74
  multi_json (~> 1.0)
88
75
  rack (~> 1.0)
89
76
  tilt (~> 1.1, != 1.3.0)
90
- sqlite3 (1.3.6)
91
- thor (0.16.0)
92
- tilt (1.3.3)
93
- treetop (1.4.12)
77
+ sprockets-rails (2.0.1)
78
+ actionpack (>= 3.0)
79
+ activesupport (>= 3.0)
80
+ sprockets (~> 2.8)
81
+ sqlite3 (1.3.8)
82
+ thor (0.18.1)
83
+ thread_safe (0.1.3)
84
+ atomic
85
+ tilt (1.4.1)
86
+ treetop (1.4.15)
94
87
  polyglot
95
88
  polyglot (>= 0.3.1)
96
89
  turn (0.9.6)
97
90
  ansi
98
- tzinfo (0.3.35)
91
+ tzinfo (0.3.38)
99
92
 
100
93
  PLATFORMS
101
94
  ruby
102
95
 
103
96
  DEPENDENCIES
97
+ bundler (~> 1.3)
104
98
  factory_girl
105
- jeweler (~> 1.8.4)
106
- rails (~> 3.2.8)
107
- rdoc (~> 3.12)
99
+ kibali!
100
+ rails (~> 4.0)
101
+ rake
108
102
  shoulda
109
103
  sqlite3
110
104
  turn
data/README.md CHANGED
@@ -4,6 +4,10 @@ Kibali is a simple replacement for ACL9, a role-based authentication gem.
4
4
  Kibali is primarily oriented for functioning as a before\_filter role authentication
5
5
  scheme for Rails controllers.
6
6
 
7
+ ## version
8
+ v0.3.1 for Rails 4.0/ Ruby 2.0
9
+
10
+
7
11
  ## Basic concepts
8
12
  Authentication is often called for on a controller-by-controller basis, restricting
9
13
  actions to users who possess certain roles. Kibali (current version) assumes only one role
@@ -19,7 +23,7 @@ Kibali adds, to the User model, role accessor methods: has\_role?, has\_role!, g
19
23
 
20
24
  ## Dependency requirements
21
25
 
22
- * Rails 3.2 or higher
26
+ * Rails 4.0 or higher
23
27
 
24
28
  ## Installation
25
29
 
data/Rakefile CHANGED
@@ -1,30 +1,15 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
1
+ require "bundler/gem_tasks"
4
2
  require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
3
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "kibali"
18
- gem.homepage = "http://github.com/dsaronin@gmail.com/kibali"
19
- gem.license = "MIT"
20
- gem.summary = %Q{rails role authentication}
21
- gem.description = %Q{simple Rails role authentication}
22
- gem.email = "dsaronin@gmail.com"
23
- gem.authors = ["Daudi Amani"]
24
- # dependencies defined in Gemfile
25
- end
4
+ begin
5
+ Bundler.setup(:default, :development)
6
+ rescue Bundler::BundlerError => e
7
+ $stderr.puts e.message
8
+ $stderr.puts "Run `bundle install` to install missing gems"
9
+ exit e.status_code
10
+ end
26
11
 
27
- Jeweler::RubygemsDotOrgTasks.new
12
+ require 'rake'
28
13
 
29
14
  # ------------------------------------------------------------------------
30
15
  # don't use normal Rake test routine because of double factory_girl
@@ -37,12 +22,3 @@ end # test task
37
22
 
38
23
  task :default => :test
39
24
 
40
- require 'rdoc/task'
41
- Rake::RDocTask.new do |rdoc|
42
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
43
-
44
- rdoc.rdoc_dir = 'rdoc'
45
- rdoc.title = "kibali #{version}"
46
- rdoc.rdoc_files.include('README*')
47
- rdoc.rdoc_files.include('lib/**/*.rb')
48
- end
data/kibali.gemspec CHANGED
@@ -1,77 +1,32 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'kibali/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "kibali"
8
- s.version = "0.2.1"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "kibali"
8
+ spec.version = Kibali::VERSION
9
+ spec.authors = ["daudi amani"]
10
+ spec.email = ["dsaronin@gmail.com"]
11
+ spec.description = %q{simple Rails role authentication}
12
+ spec.summary = %q{simple Rails role authentication}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
9
15
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Daudi Amani"]
12
- s.date = "2012-12-14"
13
- s.description = "simple Rails role authentication"
14
- s.email = "dsaronin@gmail.com"
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- "Gemfile",
22
- "Gemfile.lock",
23
- "LICENSE.txt",
24
- "README.md",
25
- "Rakefile",
26
- "VERSION",
27
- "kibali.gemspec",
28
- "lib/kibali.rb",
29
- "lib/kibali/access_control.rb",
30
- "lib/kibali/base.rb",
31
- "lib/kibali/control.rb",
32
- "lib/kibali/railtie.rb",
33
- "lib/kibali/subject_extensions.rb",
34
- "markdown.rb",
35
- "test/app/controllers/anon_controller.rb",
36
- "test/app/controllers/application_controller.rb",
37
- "test/app/controllers/empty_controller.rb",
38
- "test/config.ru",
39
- "test/config/routes.rb",
40
- "test/ctlr_helper.rb",
41
- "test/factories/units_factory.rb",
42
- "test/helper.rb",
43
- "test/script/rails",
44
- "test/support/models.rb",
45
- "test/support/schema.rb",
46
- "test/test_access.rb",
47
- "test/test_anon.rb",
48
- "test/test_kibali.rb"
49
- ]
50
- s.homepage = "http://github.com/dsaronin@gmail.com/kibali"
51
- s.licenses = ["MIT"]
52
- s.require_paths = ["lib"]
53
- s.rubygems_version = "1.8.24"
54
- s.summary = "rails role authentication"
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
55
20
 
56
- if s.respond_to? :specification_version then
57
- s.specification_version = 3
21
+ # spec.add_dependency 'rails', '~> 4.0'
22
+
23
+ spec.add_development_dependency "rails", "~> 4.0"
24
+ spec.add_development_dependency "bundler", "~> 1.3"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "sqlite3"
27
+ spec.add_development_dependency "factory_girl"
28
+ spec.add_development_dependency "shoulda"
29
+ spec.add_development_dependency "turn"
58
30
 
59
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
60
- s.add_runtime_dependency(%q<rails>, ["~> 3.2.8"])
61
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
62
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
63
- s.add_development_dependency(%q<sqlite3>, [">= 0"])
64
- else
65
- s.add_dependency(%q<rails>, ["~> 3.2.8"])
66
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
67
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
68
- s.add_dependency(%q<sqlite3>, [">= 0"])
69
- end
70
- else
71
- s.add_dependency(%q<rails>, ["~> 3.2.8"])
72
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
73
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
74
- s.add_dependency(%q<sqlite3>, [">= 0"])
75
- end
76
- end
77
31
 
32
+ end
@@ -0,0 +1,3 @@
1
+ module Kibali
2
+ VERSION = "0.3.1"
3
+ end
@@ -0,0 +1,6 @@
1
+ TestKibali::Application.configure do
2
+
3
+ # Do not eager load code on boot.
4
+ config.eager_load = false
5
+
6
+ end
@@ -0,0 +1,6 @@
1
+ TestKibali::Application.configure do
2
+
3
+ # Do not eager load code on boot.
4
+ config.eager_load = false
5
+
6
+ end
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure your secret_key_base is kept private
11
+ # if you're sharing your code publicly.
12
+ TestKibali::Application.config.secret_key_base = 'a981b2781a7e06365fba93da9b343563bbcf4237a0553fec83e7200f99ed8882666418a5259ad1bf73ee0f62b5893fc152f00f69e26e14f48ef97a815bbdf719'
@@ -2,5 +2,5 @@ TestKibali::Application.routes.draw do
2
2
 
3
3
  root :to => "empty#index"
4
4
 
5
- match ':controller(/:action(/:id(.:format)))'
5
+ match ':controller(/:action(/:id(.:format)))', via: [:get, :post]
6
6
  end # draw
data/test/ctlr_helper.rb CHANGED
@@ -67,7 +67,6 @@ TestKibali::Application.initialize!
67
67
 
68
68
  ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
69
69
  ActionController::Base.logger = ActiveRecord::Base.logger
70
- ActiveRecord::Base.silence { ActiveRecord::Migration.verbose = false }
71
70
 
72
71
  class ActiveSupport::TestCase
73
72
 
@@ -10,7 +10,7 @@ FactoryGirl.define do |binding|
10
10
 
11
11
  USERNAMES = %w(demarcus deshaun jemell jermaine jabari kwashaun musa nigel kissamu yona brenden terell treven tyrese adonys)
12
12
 
13
- # pick_name -- construct a unique user name based on sequence & world
13
+ # pick_name -- construct a unique user name based on sequence & world (w)
14
14
  def pick_name(n,w)
15
15
  return USERNAMES[ (n % USERNAMES.size) ] + n.to_s + "_w#{w.to_s}"
16
16
  end
@@ -21,8 +21,8 @@ FactoryGirl.define do |binding|
21
21
 
22
22
 
23
23
  factory :user do |f|
24
- f.sequence( :email ) { |n| "#{binding.pick_name(n,w)}@example.com" }
25
- f.sequence( :name ) { |n| "#{binding.pick_name(n,w)}@example.com" }
24
+ f.sequence( :email ) { |n| "#{binding.pick_name(n,1)}@example.com" }
25
+ f.sequence( :name ) { |n| "#{binding.pick_name(n,1)}@example.com" }
26
26
  end # user
27
27
 
28
28
  factory :role do
data/test/helper.rb CHANGED
@@ -51,7 +51,6 @@ end
51
51
 
52
52
  ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
53
53
  ActionController::Base.logger = ActiveRecord::Base.logger
54
- ActiveRecord::Base.silence { ActiveRecord::Migration.verbose = false }
55
54
 
56
55
  class ActiveSupport::TestCase
57
56
 
data/test/test_access.rb CHANGED
@@ -12,8 +12,8 @@ context "ctlr" do
12
12
  end
13
13
 
14
14
  teardown do
15
- User.destroy_all
16
- Role.destroy_all
15
+ User.all.each {|x| x.destroy }
16
+ Role.all.each {|x| x.destroy }
17
17
  end
18
18
 
19
19
 
data/test/test_anon.rb CHANGED
@@ -12,8 +12,8 @@ context "ctlr" do
12
12
  end
13
13
 
14
14
  teardown do
15
- User.destroy_all
16
- Role.destroy_all
15
+ User.all.each {|x| x.destroy }
16
+ Role.all.each {|x| x.destroy }
17
17
  end
18
18
 
19
19
  should 'permit admin access _ implicit all 2' do
data/test/test_kibali.rb CHANGED
@@ -10,8 +10,8 @@ class TestKibali < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  teardown do
13
- User.destroy_all
14
- Role.destroy_all
13
+ User.all.each {|x| x.destroy }
14
+ Role.all.each {|x| x.destroy }
15
15
  end
16
16
 
17
17
 
@@ -32,7 +32,7 @@ class TestKibali < Test::Unit::TestCase
32
32
 
33
33
  should "get role for all cases" do
34
34
  @demarcus.has_role!( :admin )
35
- admin_role_list = Role.where( :name => "admin" ).all
35
+ admin_role_list = Role.where( :name => "admin" ).to_a
36
36
  assert_equal 1,admin_role_list.size
37
37
  assert_equal admin_role_list.first, @demarcus.get_role( :admin )
38
38
  assert_equal admin_role_list.first, @demarcus.get_role( )
@@ -116,8 +116,8 @@ class TestKibali < Test::Unit::TestCase
116
116
  end
117
117
 
118
118
  teardown do
119
- User.destroy_all
120
- Role.destroy_all
119
+ User.all.each {|x| x.destroy }
120
+ Role.all.each {|x| x.destroy }
121
121
  end
122
122
 
123
123
  should "not be same as another" do
metadata CHANGED
@@ -1,95 +1,130 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kibali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.3.1
6
5
  platform: ruby
7
6
  authors:
8
- - Daudi Amani
7
+ - daudi amani
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-12-14 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: 3.2.8
22
- type: :runtime
19
+ version: '4.0'
20
+ type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: 3.2.8
26
+ version: '4.0'
30
27
  - !ruby/object:Gem::Dependency
31
- name: rdoc
28
+ name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: '3.12'
33
+ version: '1.3'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: '3.12'
40
+ version: '1.3'
46
41
  - !ruby/object:Gem::Dependency
47
- name: jeweler
42
+ name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
- version: 1.8.4
47
+ version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
- version: 1.8.4
54
+ version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: factory_girl
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: shoulda
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
68
88
  - !ruby/object:Gem::Version
69
89
  version: '0'
70
90
  type: :development
71
91
  prerelease: false
72
92
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
93
  requirements:
75
- - - ! '>='
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: turn
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
76
109
  - !ruby/object:Gem::Version
77
110
  version: '0'
78
111
  description: simple Rails role authentication
79
- email: dsaronin@gmail.com
112
+ email:
113
+ - dsaronin@gmail.com
80
114
  executables: []
81
115
  extensions: []
82
- extra_rdoc_files:
83
- - LICENSE.txt
84
- - README.md
116
+ extra_rdoc_files: []
85
117
  files:
86
118
  - .document
119
+ - .gitignore
120
+ - .ruby-gemset
121
+ - .ruby-version
87
122
  - Gemfile
123
+ - Gemfile-oldstyle.lock
88
124
  - Gemfile.lock
89
125
  - LICENSE.txt
90
126
  - README.md
91
127
  - Rakefile
92
- - VERSION
93
128
  - kibali.gemspec
94
129
  - lib/kibali.rb
95
130
  - lib/kibali/access_control.rb
@@ -97,11 +132,15 @@ files:
97
132
  - lib/kibali/control.rb
98
133
  - lib/kibali/railtie.rb
99
134
  - lib/kibali/subject_extensions.rb
135
+ - lib/kibali/version.rb
100
136
  - markdown.rb
101
137
  - test/app/controllers/anon_controller.rb
102
138
  - test/app/controllers/application_controller.rb
103
139
  - test/app/controllers/empty_controller.rb
104
140
  - test/config.ru
141
+ - test/config/environments/development.rb
142
+ - test/config/environments/test.rb
143
+ - test/config/initializers/secret_token.rb
105
144
  - test/config/routes.rb
106
145
  - test/ctlr_helper.rb
107
146
  - test/factories/units_factory.rb
@@ -112,32 +151,45 @@ files:
112
151
  - test/test_access.rb
113
152
  - test/test_anon.rb
114
153
  - test/test_kibali.rb
115
- homepage: http://github.com/dsaronin@gmail.com/kibali
154
+ homepage: ''
116
155
  licenses:
117
156
  - MIT
157
+ metadata: {}
118
158
  post_install_message:
119
159
  rdoc_options: []
120
160
  require_paths:
121
161
  - lib
122
162
  required_ruby_version: !ruby/object:Gem::Requirement
123
- none: false
124
163
  requirements:
125
- - - ! '>='
164
+ - - '>='
126
165
  - !ruby/object:Gem::Version
127
166
  version: '0'
128
- segments:
129
- - 0
130
- hash: 455055425
131
167
  required_rubygems_version: !ruby/object:Gem::Requirement
132
- none: false
133
168
  requirements:
134
- - - ! '>='
169
+ - - '>='
135
170
  - !ruby/object:Gem::Version
136
171
  version: '0'
137
172
  requirements: []
138
173
  rubyforge_project:
139
- rubygems_version: 1.8.24
174
+ rubygems_version: 2.1.10
140
175
  signing_key:
141
- specification_version: 3
142
- summary: rails role authentication
143
- test_files: []
176
+ specification_version: 4
177
+ summary: simple Rails role authentication
178
+ test_files:
179
+ - test/app/controllers/anon_controller.rb
180
+ - test/app/controllers/application_controller.rb
181
+ - test/app/controllers/empty_controller.rb
182
+ - test/config.ru
183
+ - test/config/environments/development.rb
184
+ - test/config/environments/test.rb
185
+ - test/config/initializers/secret_token.rb
186
+ - test/config/routes.rb
187
+ - test/ctlr_helper.rb
188
+ - test/factories/units_factory.rb
189
+ - test/helper.rb
190
+ - test/script/rails
191
+ - test/support/models.rb
192
+ - test/support/schema.rb
193
+ - test/test_access.rb
194
+ - test/test_anon.rb
195
+ - test/test_kibali.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.2.1