policy 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a39dd27fd9bd60560c0a85eb5561666f8ac6fe78
4
- data.tar.gz: 18d9ca9ab994ba880aa3cb049f991fbbdf7e9967
3
+ metadata.gz: 707dc12513a50ae6567790a05ea8ab848f7055e0
4
+ data.tar.gz: f28991b4dad44e835bfa43790b49fa3798a64921
5
5
  SHA512:
6
- metadata.gz: 5c13ec88fa9e022a7d10a568152b977088785a1315fe345cadc9de45b4301cf8ebe91b0eb56c8d598d968f7387a178ca1e600aec252985407fc78b12ad5e8cd0
7
- data.tar.gz: 12f7d80b122be236bff053213c323c5d84bcb902b4b17ce6aeb7c80e7ede0f165f83c0755c124dd87440c27e050761adc62ffe5b4d95f250ea20b2ec2fc9c92a
6
+ metadata.gz: ffe5458110d6d8fd68558fe42018f9c3ad27559f1444ded2cd1b0e46b3d7ac0938b68b8bbec5326ef0cbd58ea887e3571c48f64ee1397a82e4965be5c1a83bba
7
+ data.tar.gz: cbe8335492c764aeaf6477470b848ecf4b3f21bf211681fcd06be7a3e05c430092fba3d9cd4f969f7edd6416c714c964bb9acbcbf16118917af8225493b70521
data/.gitignore CHANGED
@@ -2,8 +2,9 @@
2
2
  *.lock
3
3
  .bundle/
4
4
  .yardoc/
5
+ Gemfile.lock
5
6
  coverage/
6
7
  doc/
7
8
  log/
8
9
  pkg/
9
- tmp/
10
+ tmp/
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  language: ruby
3
- bundler_args: --without=extras
4
- script: rake test:coverage
3
+ bundler_args: --without metrics
4
+ script: rake test:coverage:run
5
5
  rvm:
6
6
  - '2.0'
7
7
  - 'ruby-head'
data/Gemfile CHANGED
@@ -2,6 +2,4 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- group :development do
6
- gem "hexx-suit", "1.2", require: false
7
- end
5
+ gem "hexx-suit", "~> 2.0", group: :metrics if RUBY_ENGINE == "ruby"
data/README.md CHANGED
@@ -176,8 +176,8 @@ Check policies by names (you can also use singular forms `follow_policy?` and `f
176
176
 
177
177
  ```ruby
178
178
  # Checks only consistency and skips all other policies
179
- transaction.follow_policy? :consistency
180
- transaction.follow_policy! :consistency
179
+ transfer.follow_policy? :consistency
180
+ transfer.follow_policy! :consistency
181
181
  ```
182
182
 
183
183
  The set of policies can be checked at once:
data/Rakefile CHANGED
@@ -10,8 +10,13 @@ end
10
10
  Bundler::GemHelper.install_tasks
11
11
 
12
12
  # Loads the Hexx::Suit and its tasks
13
- require "hexx-suit"
14
- Hexx::Suit.install_tasks
13
+ begin
14
+ require "hexx-suit"
15
+ Hexx::Suit.install_tasks
16
+ rescue LoadError
17
+ require "hexx-rspec"
18
+ Hexx::RSpec.install_tasks
19
+ end
15
20
 
16
21
  # Sets the Hexx::RSpec :test task to default
17
22
  task default: :test
@@ -4,6 +4,6 @@ module Policy
4
4
 
5
5
  # The semantic version of the module.
6
6
  # @see http://semver.org/ Semantic versioning 2.0
7
- VERSION = "1.0.4".freeze
7
+ VERSION = "1.0.5".freeze
8
8
 
9
9
  end # module Hexx
data/policy.gemspec CHANGED
@@ -1,23 +1,25 @@
1
1
  $:.push File.expand_path("../lib", __FILE__)
2
2
  require "policy/version"
3
3
 
4
- Gem::Specification.new do |s|
5
- s.name = "policy"
6
- s.version = Policy::VERSION.dup
7
- s.author = "Andrew Kozin"
8
- s.email = "andrew.kozin@gmail.com"
9
- s.homepage = "https://github.com/nepalez/policy"
10
- s.summary = "Policy Objects for Ruby."
11
- s.description = "A tiny library implementing the Policy Object pattern."
12
- s.license = "MIT"
4
+ Gem::Specification.new do |gem|
13
5
 
14
- s.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
15
- s.test_files = Dir["spec/**/*.rb"]
16
- s.extra_rdoc_files = Dir["README.md", "LICENSE", "config/metrics/STYLEGUIDE"]
17
- s.require_paths = ["lib"]
6
+ gem.name = "policy"
7
+ gem.version = Policy::VERSION.dup
8
+ gem.author = "Andrew Kozin"
9
+ gem.email = "andrew.kozin@gmail.com"
10
+ gem.homepage = "https://github.com/nepalez/policy"
11
+ gem.summary = "Policy Objects for Ruby."
12
+ gem.description = "A tiny library implementing the Policy Object pattern."
13
+ gem.license = "MIT"
18
14
 
19
- s.add_runtime_dependency "activemodel", ">= 3.1"
20
- s.add_runtime_dependency "adamantium", "~> 0.2"
15
+ gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
16
+ gem.test_files = Dir["spec/**/*.rb"]
17
+ gem.extra_rdoc_files = Dir["README.md", "LICENSE"]
18
+ gem.require_paths = ["lib"]
21
19
 
22
- s.add_development_dependency "hexx-rspec", "~> 0.1"
23
- end
20
+ gem.required_ruby_version = "~> 2.0"
21
+ gem.add_runtime_dependency "activemodel", ">= 3.1"
22
+ gem.add_runtime_dependency "adamantium", "~> 0.2"
23
+ gem.add_development_dependency "hexx-rspec", "~> 0.1"
24
+
25
+ end # Gem::Specification
data/spec/spec_helper.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  # Loads the RSpec test suit.
4
- require "hexx-suit"
4
+ require "hexx-rspec"
5
5
 
6
6
  # Loads runtime metrics in the current scope
7
- Hexx::Suit.load_metrics_for(self)
7
+ Hexx::RSpec.load_metrics_for(self)
8
8
 
9
9
  # Loads the code of the module.
10
10
  require "policy"
metadata CHANGED
@@ -1,52 +1,52 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: policy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kozin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- type: :runtime
15
14
  name: activemodel
16
- prerelease: false
17
15
  requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
- type: :runtime
29
28
  name: adamantium
30
- prerelease: false
31
29
  requirement: !ruby/object:Gem::Requirement
32
30
  requirements:
33
31
  - - "~>"
34
32
  - !ruby/object:Gem::Version
35
33
  version: '0.2'
34
+ type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.2'
41
41
  - !ruby/object:Gem::Dependency
42
- type: :development
43
42
  name: hexx-rspec
44
- prerelease: false
45
43
  requirement: !ruby/object:Gem::Requirement
46
44
  requirements:
47
45
  - - "~>"
48
46
  - !ruby/object:Gem::Version
49
47
  version: '0.1'
48
+ type: :development
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
@@ -59,7 +59,6 @@ extensions: []
59
59
  extra_rdoc_files:
60
60
  - README.md
61
61
  - LICENSE
62
- - config/metrics/STYLEGUIDE
63
62
  files:
64
63
  - ".coveralls.yml"
65
64
  - ".gitignore"
@@ -69,7 +68,6 @@ files:
69
68
  - ".travis.yml"
70
69
  - ".yardopts"
71
70
  - Gemfile
72
- - Gemfile.lock
73
71
  - Guardfile
74
72
  - LICENSE
75
73
  - README.md
@@ -116,9 +114,9 @@ require_paths:
116
114
  - lib
117
115
  required_ruby_version: !ruby/object:Gem::Requirement
118
116
  requirements:
119
- - - ">="
117
+ - - "~>"
120
118
  - !ruby/object:Gem::Version
121
- version: '0'
119
+ version: '2.0'
122
120
  required_rubygems_version: !ruby/object:Gem::Requirement
123
121
  requirements:
124
122
  - - ">="
@@ -133,12 +131,12 @@ summary: Policy Objects for Ruby.
133
131
  test_files:
134
132
  - spec/spec_helper.rb
135
133
  - spec/tests/policy_spec.rb
136
- - spec/features/follower_spec.rb
137
134
  - spec/tests/policy/follower_spec.rb
138
135
  - spec/tests/policy/interface_spec.rb
139
136
  - spec/tests/policy/validations_spec.rb
140
- - spec/tests/policy/violation_error_spec.rb
141
137
  - spec/tests/policy/follower/followed_policies_spec.rb
142
138
  - spec/tests/policy/follower/followed_policy_spec.rb
143
139
  - spec/tests/policy/follower/names_spec.rb
140
+ - spec/tests/policy/violation_error_spec.rb
141
+ - spec/features/follower_spec.rb
144
142
  has_rdoc: