fact_checker 0.1.0 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49efc644177e73e8127c70768faeb8d3c4f29b54
4
- data.tar.gz: 7c91d43ed59898af6d528880e15cd69375eb4940
3
+ metadata.gz: a0e39311f3271364b69c679c7f8cd88a860ce47a
4
+ data.tar.gz: f1959732e6b2c629d5c3a024b6b3aa637b5aea3c
5
5
  SHA512:
6
- metadata.gz: 69ae38383592c810071ecef53093fbfc13844eeb30aac26b5679a8757243ffb2cc476cb9a6dd4e2e6297f12ff46a30cc8db554ca8cbc14dd0b342afd060d960d
7
- data.tar.gz: 8103359a9eeff6f0d438dffbbaccd8fa33bef1d2b5a3e614a2bea835f10f90250d0eaea9c1c15f50d17b2015c849bcbbe4926714cabec5c709743fc57baf4de0
6
+ metadata.gz: 4d6c294369778a125c90630ecadbce01be763a17eca82f54c69e2f10d2fee0313b712a4ff9a5f94d695cebbd6f78fff5e2161b9d5b260191347cd20f2f40436c
7
+ data.tar.gz: 17d01fdd5db1e52d90fb72eea36dd7bf1469045d6b15c6269d678df30e61277508a4ce4fb612e59e0a28fedb46dd82f1ec4068fb0b3a28307f9b3fba2ead646a
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- # Fact Checker [![Build Status](https://secure.travis-ci.org/alexis/fact_checker.png?branch=master)](http://travis-ci.org/alexis/fact_checker)
2
- [![Code Climate](https://codeclimate.com/github/alexis/fact_checker.png)](https://codeclimate.com/github/alexis/fact_checker)
1
+ # Fact Checker [![Build Status](https://secure.travis-ci.org/alexis/fact_checker.png?branch=master)](http://travis-ci.org/alexis/fact_checker) [![Code Climate](https://codeclimate.com/github/alexis/fact_checker.png)](https://codeclimate.com/github/alexis/fact_checker)
3
2
 
4
3
  Simple ruby gem to define and check hierarchically dependent "facts" about objects.
5
4
 
@@ -30,13 +29,13 @@ p.is_happy? # => false
30
29
  The gem is most usefull when you have something
31
30
  like a checklist, a list of tasks that your users should complete to achieve some goal.
32
31
 
33
- For example, let's say that in order to publish an article, user have to:
32
+ For example, let's say that in order to publish an article a user has to:
34
33
 
35
34
  1. write the article
36
35
  2. name the article (user may complete steps 1 & 2 in any order)
37
36
  3. choose its category
38
37
  4. assign tags to the article (user may complete steps 3 & 4 in any order, but only after steps 1 & 2)
39
- 5. mark article as ready for review (only after steps 1-3 are completed, but step 4 is not required)
38
+ 5. mark article as "ready for review" (only after steps 1-3 are completed, but step 4 is not required)
40
39
  6. recieve approvement from one of moderators (all steps 1-5 are required)
41
40
 
42
41
  <!--- The imporant thing here - which makes fact_checker worth its use - is that you want to display this
@@ -58,8 +57,8 @@ define_fact(:step5 => :step3) { ready_for_approvement? }
58
57
  define_fact(:step6 => [:step4, :step5]) { approved? }
59
58
 
60
59
  def state_of(step)
61
- return 'completed' if valid?(step)
62
- return 'ready_for_action' if available?(step)
60
+ return 'completed' if public_send(step).valid?
61
+ return 'ready_for_action' if public_send(step).available?
63
62
  return 'not_available'
64
63
  end
65
64
  ```
@@ -105,8 +104,8 @@ def step6_valid?
105
104
  end
106
105
 
107
106
  def state_of(step)
108
- return 'completed' if self.send(step + '_valid?')
109
- return 'ready_for_action' if self.send(step + '_available?')
107
+ return 'completed' if self.public_send(step + '_valid?')
108
+ return 'ready_for_action' if self.public_send(step + '_available?')
110
109
  return 'not_available'
111
110
  end
112
111
  ```
@@ -13,6 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.summary = %q{Checks facts which may depend on other facts}
14
14
  s.description = %q{Simple gem to check hierarchically dependent "facts" about objects}
15
15
 
16
+ s.license = 'MIT'
17
+
16
18
  s.rubyforge_project = "fact_checker"
17
19
 
18
20
  s.files = `git ls-files`.split("\n")
@@ -25,7 +27,7 @@ Gem::Specification.new do |s|
25
27
 
26
28
  s.add_development_dependency 'rake'
27
29
  s.add_development_dependency 'bundler'
28
- s.add_development_dependency 'rspec', '~> 2.14'
30
+ s.add_development_dependency 'rspec', '~> 2.14'
29
31
  s.add_development_dependency 'simplecov'
30
32
  s.add_development_dependency 'debugger'
31
33
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module FactChecker
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fact_checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Smolianinov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-02 00:00:00.000000000 Z
12
+ date: 2013-09-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -106,7 +106,8 @@ files:
106
106
  - spec/spec_helper.rb
107
107
  - spec/version_spec.rb
108
108
  homepage: https://github.com/alexis/fact_checker
109
- licenses: []
109
+ licenses:
110
+ - MIT
110
111
  metadata: {}
111
112
  post_install_message:
112
113
  rdoc_options: []
@@ -124,8 +125,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  version: 1.3.5
125
126
  requirements: []
126
127
  rubyforge_project: fact_checker
127
- rubygems_version: 2.0.3
128
+ rubygems_version: 2.0.7
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: Checks facts which may depend on other facts
131
- test_files: []
132
+ test_files:
133
+ - spec/mixin_spec.rb
134
+ - spec/result_spec.rb
135
+ - spec/spec.rake
136
+ - spec/spec_helper.rb
137
+ - spec/version_spec.rb