r_spec 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: 224b375a489540fef9cdc393dadfcbec43e44e3a
4
- data.tar.gz: b2038494406219d2cc862d828ff38ab374370493
3
+ metadata.gz: 2c3049c4ebd9625b0f68cbac8aebbaeeeae6aea4
4
+ data.tar.gz: 4ed229f6b7af9fb724b4b8a84b7e669d75f6f76c
5
5
  SHA512:
6
- metadata.gz: 3da6f04fa0744c32b88751ae5fed39b1f08f4da842f97d62ce5f76e8b2f8fa408141eff9922b783800bdfb0481480c00a4d8d562defa5815c0114b11b938f9b6
7
- data.tar.gz: 16302802270c0f634fabc46e019096d8f9438f404e9b112e7ee149ad853e9e29495eae6bf8bce22888931c1376bf4f149c5b9aceef11defb35a35b10eb33277b
6
+ metadata.gz: e1b94c8ae19261cbeb6cb4e5aed30d06c3a62fb20ab3dadb1ed941ef2a57b39a39f32988517a70ccd476a402dbf549ac00a0ae95c25551dd96978d6cd6be6619
7
+ data.tar.gz: b6f9c72508f69af188bc480c6c42cd549019648e708d9acd6c4ba586ba38631d647610b682c0be1ddd2004c4917b8c229230ecdfee25d0c00e73ea7b28068f87
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RSpec
1
+ # R Spec
2
2
 
3
3
  [![Build Status](https://travis-ci.org/cyril/r_spec.svg?branch=master)][travis]
4
4
  [![Gem Version](https://badge.fury.io/rb/r_spec.svg)][gem]
@@ -7,11 +7,22 @@
7
7
 
8
8
  > A small [Rspec](https://github.com/rspec/rspec) clone based on [Fix specing framework](https://github.com/fixrb/fix).
9
9
 
10
+ ***
11
+
12
+ :warning: Important:
13
+
14
+ To avoid confusion in the community, please note that the gem of this project is **not [rspec](https://rubygems.org/gems/rspec)**, it is **[r_spec](https://rubygems.org/gems/rspec)** (meaning _Ruby Spec_).
15
+
16
+ This project is totally independent of [rspec.info](http://rspec.info/).
17
+
18
+ Also, while the `RSpec` module is the same (I follow [the gem naming convention](http://guides.rubygems.org/name-your-gem/#use-underscores-for-multiple-words), the **r_spec** internal is quite different than **rspec** due to its [Ruby Fix](http://fixrb.org/) dependency.
19
+
20
+ ***
21
+
10
22
  ## Contact
11
23
 
12
24
  * Home page: https://github.com/cyril/r_spec
13
25
  * Bugs/issues: https://github.com/cyril/r_spec/issues
14
- * Support: https://stackoverflow.com/questions/tagged/r_spec
15
26
 
16
27
  ## Rubies
17
28
 
@@ -21,14 +32,14 @@
21
32
 
22
33
  ## Installation
23
34
 
24
- __RSpec__ is cryptographically signed.
35
+ __R Spec__ is cryptographically signed.
25
36
 
26
37
  To be sure the gem you install hasn't been tampered with, add my public key (if you haven't already) as a trusted certificate:
27
38
 
28
39
  $ gem cert --add <(curl -Ls https://raw.github.com/cyril/r_spec/master/certs/gem-cyril-public_cert.pem)
29
40
  $ gem install r_spec -P HighSecurity
30
41
 
31
- The `HighSecurity` trust profile will verify all gems. All of __RSpec__'s dependencies are signed.
42
+ The `HighSecurity` trust profile will verify all gems. All of __R Spec__'s dependencies are signed.
32
43
 
33
44
  Or add this line to your application's Gemfile:
34
45
 
@@ -72,7 +83,7 @@ It can be tested in the console with the command:
72
83
 
73
84
  ## Security
74
85
 
75
- As a basic form of security __RSpec__ provides a set of SHA512 checksums for
86
+ As a basic form of security __R Spec__ provides a set of SHA512 checksums for
76
87
  every Gem release. These checksums can be found in the `checksum/` directory.
77
88
  Although these checksums do not prevent malicious users from tampering with a
78
89
  built Gem they can be used for basic integrity verification purposes.
@@ -85,7 +96,7 @@ example:
85
96
 
86
97
  ## Versioning
87
98
 
88
- __RSpec__ follows [Semantic Versioning 2.0](http://semver.org/).
99
+ __R Spec__ follows [Semantic Versioning 2.0](http://semver.org/).
89
100
 
90
101
  ## Contributing
91
102
 
data/Rakefile CHANGED
@@ -7,7 +7,6 @@ RuboCop::RakeTask.new
7
7
  Rake::TestTask.new do |t|
8
8
  t.verbose = true
9
9
  t.warning = true
10
- # t.pattern = File.join('test', '**', 'test_*.rb')
11
10
  end
12
11
 
13
12
  namespace :test do
data/VERSION.semver CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1 @@
1
+ 2988d048456c0dcc53bd2c8c45d8fd0f7de49e1f2bb0a3aca0749671b4baa4376e44e25d05f9ee457fe024872155ce93c8fe5c5e03fdcd494962d69805c5fce3
data/lib/fix/describe.rb CHANGED
@@ -2,7 +2,7 @@
2
2
  module Fix
3
3
  # Override Fix's On class.
4
4
  class On
5
- # @param another_front_object [BasicObject] The front object.
5
+ # @param another_front_object [#object_id] Override the front object.
6
6
  # @param specs [Proc] A set of specs.
7
7
  #
8
8
  # @return [Array] List of results.
data/lib/fix/it.rb CHANGED
@@ -1,9 +1,10 @@
1
- require_relative File.join '..', 'r_spec', 'it'
2
-
3
1
  # Namespace for the Fix framework.
4
2
  module Fix
5
3
  # Override Fix's It class.
6
4
  class It
7
- include ::RSpec::It
5
+ # @return [Class] The class of the described object.
6
+ def described_class
7
+ subject.is_a?(::Class) ? subject : subject.class
8
+ end
8
9
  end
9
10
  end
data/lib/r_spec.rb CHANGED
@@ -1,13 +1,17 @@
1
- # Namespace for the RSpec framework.
1
+ require 'matchi/rspec'
2
+ require 'fix/expect'
3
+ require 'fix/its'
4
+
5
+ # Namespace for the R Spec framework.
2
6
  #
3
7
  # @api public
4
8
  #
5
9
  module RSpec
6
10
  # Specs are built with this method.
7
11
  #
8
- # @example 42 must be equal to 42
9
- # describe(42) do
10
- # it { MUST Equal: 42 }
12
+ # @example The answer must be equal to 42.
13
+ # describe('the answer') do
14
+ # it { expect(42).to be 42 }
11
15
  # end
12
16
  #
13
17
  # @param front_object [#object_id] The front object.
@@ -23,10 +27,6 @@ module RSpec
23
27
  end
24
28
  end
25
29
 
26
- require 'fix/expect'
27
- require 'fix/its'
28
- require 'matchi/rspec'
29
-
30
30
  require_relative File.join 'fix', 'before'
31
- require_relative File.join 'fix', 'it'
32
31
  require_relative File.join 'fix', 'describe'
32
+ require_relative File.join 'fix', 'it'
data/r_spec.gemspec CHANGED
@@ -14,16 +14,16 @@ Gem::Specification.new do |spec|
14
14
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.add_dependency 'fix-expect', '~> 0.2'
18
- spec.add_dependency 'fix-its', '~> 0.3'
19
- spec.add_dependency 'matchi-rspec', '~> 0.0'
17
+ spec.add_dependency 'fix-expect', '~> 0.3.0'
18
+ spec.add_dependency 'fix-its', '~> 0.4.0'
19
+ spec.add_dependency 'matchi-rspec', '~> 0.0.2'
20
20
 
21
21
  spec.add_development_dependency 'bundler', '~> 1.10'
22
22
  spec.add_development_dependency 'rake', '~> 10.4'
23
23
  spec.add_development_dependency 'yard', '~> 0.8'
24
24
  spec.add_development_dependency 'simplecov', '~> 0.10'
25
25
  spec.add_development_dependency 'rubocop', '~> 0.34'
26
- spec.add_development_dependency 'spectus', '~> 2.10'
26
+ spec.add_development_dependency 'spectus', '~> 3.0'
27
27
 
28
28
  spec.cert_chain = ['certs/gem-cyril-public_cert.pem']
29
29
  private_key = File.expand_path('~/.ssh/gem-cyril-private_key.pem')
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r_spec
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
  - Cyril Wack
@@ -30,7 +30,7 @@ cert_chain:
30
30
  dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
31
31
  0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
32
32
  -----END CERTIFICATE-----
33
- date: 2015-10-24 00:00:00.000000000 Z
33
+ date: 2015-10-31 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: fix-expect
@@ -38,42 +38,42 @@ dependencies:
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.2'
41
+ version: 0.3.0
42
42
  type: :runtime
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '0.2'
48
+ version: 0.3.0
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: fix-its
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0.3'
55
+ version: 0.4.0
56
56
  type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0.3'
62
+ version: 0.4.0
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: matchi-rspec
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0.0'
69
+ version: 0.0.2
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.0'
76
+ version: 0.0.2
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: bundler
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -150,14 +150,14 @@ dependencies:
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: '2.10'
153
+ version: '3.0'
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: '2.10'
160
+ version: '3.0'
161
161
  description: A small Rspec clone based on Fix specing framework.
162
162
  email:
163
163
  - contact@cyril.email
@@ -177,11 +177,11 @@ files:
177
177
  - bin/console
178
178
  - bin/setup
179
179
  - certs/gem-cyril-public_cert.pem
180
+ - checksum/r_spec-0.1.0.gem.sha512
180
181
  - lib/fix/before.rb
181
182
  - lib/fix/describe.rb
182
183
  - lib/fix/it.rb
183
184
  - lib/r_spec.rb
184
- - lib/r_spec/it.rb
185
185
  - pkg_checksum
186
186
  - r_spec.gemspec
187
187
  homepage: https://github.com/cyril/r_spec
metadata.gz.sig CHANGED
Binary file
data/lib/r_spec/it.rb DELETED
@@ -1,23 +0,0 @@
1
- module RSpec
2
- # Module to extend Fix's It class.
3
- module It
4
- private
5
-
6
- # Override Ruby's method_missing in order to coerce matchers.
7
- #
8
- # @api private
9
- #
10
- # @raise [NoMethodError] If doesn't respond to the given method.
11
- def method_missing(name, *args)
12
- matcher = name.to_s.split('_').map(&:capitalize).join.to_sym
13
-
14
- return unless Matchi.constants.include?(matcher)
15
-
16
- if args.any?
17
- { matcher => (args.length.equal?(1) ? args.first : args) }
18
- else
19
- matcher
20
- end
21
- end
22
- end
23
- end