test_unit_pundit 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -6,7 +6,9 @@ Adds rake test sub task.
6
6
  rake test:policies
7
7
  ```
8
8
 
9
- Extends pundit generators.
9
+ Generate `test/policies` directory, when running policy:install.
10
+
11
+ New generator template of policy test.
10
12
 
11
13
  Provides some test helpers.
12
14
 
@@ -1,6 +1,8 @@
1
- module Pundit
1
+ module TestUnit
2
2
  module Generators
3
3
  class PolicyGenerator < ::Rails::Generators::NamedBase
4
+ source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
5
+
4
6
  def create_policy_test_file
5
7
  template File.join(File.dirname(__FILE__), 'templates/policy_test.rb'), File.join('test/policies', class_path, "#{file_name}_policy_test.rb")
6
8
  end
@@ -4,7 +4,6 @@ module TestUnitPundit
4
4
  class Railtie < ::Rails::Railtie
5
5
  generators do
6
6
  load File.join(File.expand_path("../../generators/test_unit_pundit/install", __FILE__), "install_generator.rb")
7
- load File.join(File.expand_path("../../generators/test_unit_pundit/policy", __FILE__), "policy_generator.rb")
8
7
  end
9
8
 
10
9
  rake_tasks do
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'test_unit_pundit'
3
- s.version = '0.1.1'
3
+ s.version = '0.2.0'
4
4
  s.summary = 'Test::Unit support for Pundit'
5
5
  s.description = 'Test::Unit support for Pundit'
6
6
  s.homepage = 'https://github.com/cqc1008/test_unit_pundit'
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_dependency 'activesupport', '>= 3.0.0'
18
18
  s.add_dependency 'railties', '>= 3.0.0'
19
- s.add_dependency 'pundit', '~> 0.2.3'
19
+ s.add_dependency 'pundit', '~> 0.3.0'
20
20
 
21
21
  s.add_development_dependency 'activesupport', '4.1.0'
22
22
  s.add_development_dependency 'railties', '4.1.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_unit_pundit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-14 00:00:00.000000000 Z
12
+ date: 2014-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: 0.2.3
53
+ version: 0.3.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
@@ -58,7 +58,7 @@ dependencies:
58
58
  requirements:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.3
61
+ version: 0.3.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: activesupport
64
64
  requirement: !ruby/object:Gem::Requirement
@@ -118,9 +118,9 @@ files:
118
118
  - Gemfile
119
119
  - README.md
120
120
  - Rakefile
121
+ - lib/generators/test_unit/policy_generator.rb
122
+ - lib/generators/test_unit/templates/policy_test.rb
121
123
  - lib/generators/test_unit_pundit/install/install_generator.rb
122
- - lib/generators/test_unit_pundit/policy/policy_generator.rb
123
- - lib/generators/test_unit_pundit/policy/templates/policy_test.rb
124
124
  - lib/pundit/test_case.rb
125
125
  - lib/pundit/testing/assertions.rb
126
126
  - lib/tasks/testing.rake