fix-expect 0.3.5 → 0.4.0

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
  SHA256:
3
- metadata.gz: f40ea2de81af822c57a5d8d989649da276c55973f99841e4f4921640cd349bcd
4
- data.tar.gz: a3d36424a60ec308eac24c2bc85069b818448d3baa9ca18347a82cdc9359eab7
3
+ metadata.gz: bd3ab66acef53a762a8fde029bfd8c341484a80e1fe48131cbb7537c6b73d9e0
4
+ data.tar.gz: ba1a4185b47239596e28683a8f44ee9a9331d96694b0aa35465ca64fdf2b0f9a
5
5
  SHA512:
6
- metadata.gz: 7caa433a8e52f226c9617a0133ed285ea4588ea73ac5037765f96ac0fb11b3e5b53b929fed71324f5cfeb2be554b4eb0c938f3cbd8af202a1c7de58b8fc3b1a1
7
- data.tar.gz: 322a6c4b6d32272c0b4e28609b8fe0d06f0ff37287dd21f0abe0bcf2c85bdae3a894ecc7be19433bb72f368c10407323189d5febbd152313616967bb8736eab4
6
+ metadata.gz: fcc7425d008c771ed21de78e1d5f1426ef8ee3d09a2042ab82673a75f143db6fe1464e107c0baa6c9c3d450d506f48b4de3a3255cbd9331dfbf1bd1a029cdf22
7
+ data.tar.gz: 1d3d94a78246c515e2744b693574d7338c3b96fbe82e1ff4c41782930591ee3523d488b49e39690aa766ce91b69a5ee143024dc973755fe24d0f8cb52af2eaf2
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 Cyril Kato
3
+ Copyright (c) 2015-2020 Cyril Kato
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,25 +1,13 @@
1
1
  # Fix::Expect
2
2
 
3
- [![Build Status](https://travis-ci.org/fixrb/fix-expect.svg?branch=master)][travis]
3
+ [![Build Status](https://api.travis-ci.org/fixrb/fix-expect.svg?branch=master)][travis]
4
4
  [![Code Climate](https://codeclimate.com/github/fixrb/fix-expect/badges/gpa.svg)][codeclimate]
5
5
  [![Gem Version](https://badge.fury.io/rb/fix-expect.svg)][gem]
6
- [![Inline docs](http://inch-ci.org/github/fixrb/fix-expect.svg?branch=master)][inchpages]
7
- [![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
6
+ [![Inline docs](https://inch-ci.org/github/fixrb/fix-expect.svg?branch=master)][inchpages]
7
+ [![Documentation](https://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
8
8
 
9
9
  > Provides the `expect` syntax.
10
10
 
11
- ## Contact
12
-
13
- * Home page: https://github.com/fixrb/fix-expect
14
- * Bugs/issues: https://github.com/fixrb/fix-expect/issues
15
- * Support: https://stackoverflow.com/questions/tagged/fixrb
16
-
17
- ## Rubies
18
-
19
- * [MRI](https://www.ruby-lang.org/)
20
- * [Rubinius](http://rubini.us/)
21
- * [JRuby](http://jruby.org/)
22
-
23
11
  ## Installation
24
12
 
25
13
  Add this line to your application's Gemfile:
@@ -38,101 +26,147 @@ Or install it yourself as:
38
26
 
39
27
  ## Usage
40
28
 
41
- __Fix::Expect__ lets you express expected outcomes on an object:
29
+ ### The `expect` method
30
+
31
+ __Fix::Expect__ lets you express expected outcomes on an object, thanks to [Spectus](https://rubygems.org/gems/spectus)'s `MUST` and `MUST_NOT` requirement levels.
32
+
33
+ An **absolute requirement** example:
42
34
 
43
35
  ```ruby
44
- expect(value.abs).to equal 42 # => MUST equal 42
36
+ Fix do
37
+ it { expect(-42.abs).to equal 42 }
38
+ end
45
39
  ```
46
40
 
47
- Both `expect` and `expect_block` methods are mapped to Spectus's [absolute requirement](https://github.com/fixrb/spectus#absolute-requirement)/[prohibition](https://github.com/fixrb/spectus#absolute-prohibition) to express expectations:
41
+ > (irb):2: Success: expected to equal 42.
42
+
43
+ An **absolute prohibition** example:
48
44
 
49
45
  ```ruby
50
- Fix.describe 6 * 7 do
51
- it { expect_block { subject.class }.to equal Fixnum }
52
- it { expect(subject.class).to equal Fixnum }
46
+ Fix do
47
+ it { expect(-42).not_to equal 42 }
53
48
  end
54
-
55
- # ..
56
- #
57
- # Ran 2 tests in 0.000327 seconds
58
- # 100% compliant - 0 infos, 0 failures, 0 errors
59
49
  ```
60
50
 
61
- Using those methods, the default inherited subject can be overridden by the given expected object/block:
51
+ > (irb):5: Success: expected -42 not to equal 42.
62
52
 
63
- ```ruby
64
- Fix.describe -6 * 7 do
65
- on :abs do
66
- # test against the described front object:
67
- it { MUST_NOT equal 1 }
53
+ Thus, rather than inferring the actual value (which is `41.next`) from the context
54
+ and calculating its value (which is `42`),
55
+
56
+ rather than letting Fix's default behavior define and compute `41.next` as the actual value to challenge,
57
+ the `expect` method short circuit it with its argument.
58
+
59
+ These 2 examples are equivalent:
68
60
 
69
- # another test against -1 object:
70
- it { expect(-1).to equal 1 }
61
+ ```ruby
62
+ Fix 41 do
63
+ on :next do
64
+ it { MUST equal 42 }
65
+ it { expect(41.next).to equal 42 }
71
66
  end
67
+
68
+ it { MUST equal 41 }
69
+ it { expect(41.next).to equal 42 }
72
70
  end
71
+ ```
72
+
73
+ > (irb):9: Success: expected to equal 42.
74
+ > (irb):10: Success: expected to equal 42.
75
+ > (irb):13: Success: expected to equal 41.
76
+ > (irb):14: Success: expected to equal 42.
73
77
 
74
- # ..
75
- #
76
- # Ran 2 tests in 0.000372 seconds
77
- # 100% compliant - 0 infos, 0 failures, 0 errors
78
+ The block syntax is also allowed:
79
+
80
+ ```ruby
81
+ Fix do
82
+ it { expect { -42.abs }.to equal 42 }
83
+ end
78
84
  ```
79
85
 
80
- However, the tree of challenges remains the same.
86
+ > (irb):2: Success: expected to equal 42.
87
+
88
+ ```ruby
89
+ Fix do
90
+ it { expect { 4 / 0 }.to raise_exception ZeroDivisionError }
91
+ end
92
+ ```
93
+
94
+ > (irb):5: Success: divided by 0.
95
+
96
+ ### The `is_expected` method
81
97
 
82
- For convenience, the `is_expected` method is also provided:
98
+ For convenience, an `is_expected` method is provided,
99
+ as an alias of Spectus's [MUST](https://github.com/fixrb/spectus#absolute-requirement):
83
100
 
84
101
  ```ruby
85
- Fix.describe -6 * 7 do
86
- on :abs do
87
- # test against the described front object:
102
+ Fix 41 do
103
+ on :next do
88
104
  it { is_expected.to equal 42 }
89
105
  end
90
106
  end
107
+ ```
108
+
109
+ > (irb):3: Success: expected to equal 42.
110
+
111
+ ### Code Isolation
112
+
113
+ When executing expectations, side-effects may occur.
114
+ Because they may or may not be desired, each requirement level has 2 versions:
91
115
 
92
- # .
93
- #
94
- # Ran 1 tests in 0.000176 seconds
95
- # 100% compliant - 0 infos, 0 failures, 0 errors
116
+ * if it is performed with `do`, a test is performed without isolation;
117
+ * if it is performed with `do!`, a test is performed in isolation.
118
+
119
+ Example of test without isolation:
120
+
121
+ ```ruby
122
+ greeting = 'Hello, world!'
123
+
124
+ Fix do
125
+ it 'tests without isolation' do
126
+ expect { greeting.gsub!('world', 'Alice') }.to equal 'Hello, Alice!'
127
+ end
128
+ end
129
+
130
+ greeting # => "Hello, Alice!"
96
131
  ```
97
132
 
98
- ## Security
133
+ Example of test in isolation:
99
134
 
100
- As a basic form of security __Fix::Expect__ provides a set of SHA512 checksums for
101
- every Gem release. These checksums can be found in the `checksum/` directory.
102
- Although these checksums do not prevent malicious users from tampering with a
103
- built Gem they can be used for basic integrity verification purposes.
135
+ ```ruby
136
+ greeting = 'Hello, world!'
104
137
 
105
- The checksum of a file can be checked using the `sha512sum` expect. For
106
- example:
138
+ Fix do
139
+ it 'tests with isolation' do
140
+ expect { greeting.gsub!('world', 'Alice') }.to! equal 'Hello, Alice!'
141
+ end
142
+ end
107
143
 
108
- $ sha512sum pkg/fix-expect-0.1.0.gem
109
- 26198b7812a5ac118a5f2a1b63927871b3378efb071b37abb7e1ba87c1aac9f3a6b45eeae87d9dc647b194c15171b13f15e46503a9a1440b1233faf924381ff5 pkg/fix-expect-0.1.0.gem
144
+ greeting # => "Hello, world!"
145
+ ```
110
146
 
111
- ## Versioning
147
+ ## Contact
112
148
 
113
- __Fix::Expect__ follows [Semantic Versioning 2.0](http://semver.org/).
149
+ * Source code: https://github.com/fixrb/fix-expect
114
150
 
115
- ## Contributing
151
+ ## Versioning
116
152
 
117
- 1. [Fork it](https://github.com/fixrb/fix-expect/fork)
118
- 2. Create your feature branch (`git checkout -b my-new-feature`)
119
- 3. Commit your changes (`git commit -am 'Add some feature'`)
120
- 4. Push to the branch (`git push origin my-new-feature`)
121
- 5. Create a new Pull Request
153
+ __Fix::Expect__ follows [Semantic Versioning 2.0](https://semver.org/).
122
154
 
123
155
  ## License
124
156
 
125
- See `LICENSE.md` file.
126
-
127
- [gem]: https://rubygems.org/gems/fix-expect
128
- [travis]: https://travis-ci.org/fixrb/fix-expect
129
- [codeclimate]: https://codeclimate.com/github/fixrb/fix-expect
130
- [gemnasium]: https://gemnasium.com/fixrb/fix-expect
131
- [inchpages]: http://inch-ci.org/github/fixrb/fix-expect
132
- [rubydoc]: http://rubydoc.info/gems/fix-expect/frames
157
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
133
158
 
134
159
  ***
135
160
 
136
- This project is sponsored by:
161
+ <p>
162
+ This project is sponsored by:<br />
163
+ <a href="https://sashite.com/"><img
164
+ src="https://github.com/fixrb/fix-expect/raw/master/img/sashite.png"
165
+ alt="Sashite" /></a>
166
+ </p>
137
167
 
138
- [![Sashite](https://sashite.com/img/sashite.png)](https://sashite.com/)
168
+ [gem]: https://rubygems.org/gems/fix-expect
169
+ [travis]: https://travis-ci.org/fixrb/fix-expect
170
+ [codeclimate]: https://codeclimate.com/github/fixrb/fix-expect
171
+ [inchpages]: https://inch-ci.org/github/fixrb/fix-expect
172
+ [rubydoc]: https://rubydoc.info/gems/fix-expect/frames
@@ -1,71 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Namespace for the Fix framework.
4
- #
5
- # @api public
6
- #
7
- module Fix
8
- # Expect's class.
9
- #
10
- class Expect
11
- # Initialize the expect class.
12
- #
13
- # @param object [#object_id] The object to test.
14
- # @param challenges [Array] A list of challenges.
15
- def initialize(object, *challenges)
16
- @object = object
17
- @challenges = challenges
18
- end
19
-
20
- # Evaluate to a positive assertion.
21
- #
22
- # @param m [#matches?] The matcher.
23
- #
24
- # @return (see #requirement)
25
- def to(m)
26
- requirement(m, false).result
27
- end
28
-
29
- # Evaluate to a negative assertion.
30
- #
31
- # @param (see #to)
32
- #
33
- # @return (see #requirement)
34
- def not_to(m)
35
- requirement(m, true).result
36
- end
37
-
38
- # Evaluate to a positive assertion in isolation.
39
- #
40
- # @param (see #to)
41
- #
42
- # @return (see #requirement)
43
- def to!(m)
44
- requirement(m, false).result(true)
45
- end
46
-
47
- # Evaluate to a negative assertion in isolation.
48
- #
49
- # @param (see #to)
50
- #
51
- # @return (see #requirement)
52
- def not_to!(m)
53
- requirement(m, true).result(true)
54
- end
55
-
56
- private
57
-
58
- # High requirement level.
59
- #
60
- # @param m [#matches?] The matcher.
61
- # @param negate [Boolean] Evaluate to a negative assertion.
62
- #
63
- # @return [Spectus::Result::Fail, Spectus::Result::Pass] Report if the spec
64
- # pass or fail.
65
- def requirement(m, negate)
66
- Spectus::RequirementLevel::High.new(m, negate, @object, *@challenges)
67
- end
68
- end
69
- end
70
-
71
3
  require_relative 'it'
@@ -5,25 +5,29 @@ require 'fix'
5
5
  # Namespace for the Fix framework.
6
6
  #
7
7
  module Fix
8
- # Wraps the target of an expectation.
9
- #
10
- class It
11
- # Create a new expection target given an object.
8
+ # Wraps the target of a Spectus expectation.
9
+ class Expect < ::Spectus::ExpectationTarget
10
+ # Create a new expection target
12
11
  #
13
- # @param object [#object_id] An object to test.
14
- #
15
- # @return [Expect] An expect instance.
16
- def expect(object)
17
- Expect.new(object, *challenges)
12
+ # @param callable [#call] The object to test.
13
+ def initialize(callable)
14
+ @callable = callable
18
15
  end
16
+ end
19
17
 
20
- # Create a new expection target given a block.
18
+ # Wraps the target of a Fix expectation.
19
+ class It
20
+ # Create a new expection target given an object.
21
21
  #
22
- # @param block [Proc] A code to test.
22
+ # @param object [#object_id] An object to test.
23
23
  #
24
24
  # @return [Expect] An expect instance.
25
- def expect_block(&block)
26
- Expect.new(block, *([block_challenge] + challenges))
25
+ def expect(object = nil, &block)
26
+ if block_given?
27
+ ::Fix::Expect.new(block)
28
+ else
29
+ ::Fix::Expect.new(::Defi.send(:itself).to(object))
30
+ end
27
31
  end
28
32
 
29
33
  # rubocop:disable PredicateName
@@ -32,8 +36,11 @@ module Fix
32
36
  #
33
37
  # @return [Expect] An expect instance.
34
38
  def is_expected
35
- Expect.new(subject, *challenges)
39
+ ::Fix::Expect.new(callable)
36
40
  end
37
41
  # rubocop:enable PredicateName
38
42
  end
39
43
  end
44
+
45
+ # require_relative 'expect' unless defined?(::Fix::Expect)
46
+ require_relative '../spectus/expectation_target'
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spectus'
4
+
5
+ module Spectus
6
+ class ExpectationTarget
7
+ alias to MUST
8
+ alias to! MUST!
9
+ alias not_to MUST_NOT
10
+ alias not_to! MUST_NOT!
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fix-expect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-12 00:00:00.000000000 Z
11
+ date: 2020-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fix
@@ -16,84 +16,112 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.18.0
19
+ version: 1.0.0.beta3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.18.0
26
+ version: 1.0.0.beta3
27
+ - !ruby/object:Gem::Dependency
28
+ name: spectus
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.1.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.1.2
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '2.0'
47
+ version: '2.1'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '2.0'
54
+ version: '2.1'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '12.3'
61
+ version: '13.0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '12.3'
68
+ version: '13.0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rubocop
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '0.67'
75
+ version: '0.79'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '0.67'
82
+ version: '0.79'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-performance
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: simplecov
71
99
  requirement: !ruby/object:Gem::Requirement
72
100
  requirements:
73
101
  - - "~>"
74
102
  - !ruby/object:Gem::Version
75
- version: '0.16'
103
+ version: '0.17'
76
104
  type: :development
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - "~>"
81
109
  - !ruby/object:Gem::Version
82
- version: '0.16'
110
+ version: '0.17'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: spectus
85
113
  requirement: !ruby/object:Gem::Requirement
86
114
  requirements:
87
115
  - - "~>"
88
116
  - !ruby/object:Gem::Version
89
- version: '3.0'
117
+ version: '3.1'
90
118
  type: :development
91
119
  prerelease: false
92
120
  version_requirements: !ruby/object:Gem::Requirement
93
121
  requirements:
94
122
  - - "~>"
95
123
  - !ruby/object:Gem::Version
96
- version: '3.0'
124
+ version: '3.1'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: yard
99
127
  requirement: !ruby/object:Gem::Requirement
@@ -115,27 +143,11 @@ executables: []
115
143
  extensions: []
116
144
  extra_rdoc_files: []
117
145
  files:
118
- - ".gitignore"
119
- - ".rubocop.yml"
120
- - ".rubocop_todo.yml"
121
- - ".travis.yml"
122
- - ".yardopts"
123
- - CODE_OF_CONDUCT.md
124
- - Gemfile
125
146
  - LICENSE.md
126
147
  - README.md
127
- - Rakefile
128
- - VERSION.semver
129
- - bin/console
130
- - bin/setup
131
- - checksum/fix-expect-0.3.0.gem.sha512
132
- - checksum/fix-expect-0.3.2.gem.sha512
133
- - checksum/fix-expect-0.3.3.gem.sha512
134
- - checksum/fix-expect-0.3.4.gem.sha512
135
- - fix-expect.gemspec
136
148
  - lib/fix/expect.rb
137
149
  - lib/fix/it.rb
138
- - pkg_checksum
150
+ - lib/spectus/expectation_target.rb
139
151
  homepage: https://github.com/fixrb/fix-expect
140
152
  licenses:
141
153
  - MIT
@@ -148,14 +160,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
160
  requirements:
149
161
  - - ">="
150
162
  - !ruby/object:Gem::Version
151
- version: '0'
163
+ version: 2.3.0
152
164
  required_rubygems_version: !ruby/object:Gem::Requirement
153
165
  requirements:
154
166
  - - ">="
155
167
  - !ruby/object:Gem::Version
156
168
  version: '0'
157
169
  requirements: []
158
- rubygems_version: 3.0.3
170
+ rubygems_version: 3.1.2
159
171
  signing_key:
160
172
  specification_version: 4
161
173
  summary: Provides the expect syntax.
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.ruby-version
3
- /.yardoc
4
- /Gemfile.lock
5
- /_yardoc/
6
- /coverage/
7
- /doc/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
@@ -1 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
@@ -1,19 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2018-08-26 22:47:51 +0200 using RuboCop version 0.58.2.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 5
10
- # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
11
- # AllowedNames: io, id, to, by, on, in, at, ip
12
- Naming/UncommunicativeMethodParamName:
13
- Exclude:
14
- - 'lib/fix/expect.rb'
15
-
16
- # Offense count: 1
17
- Style/MixinUsage:
18
- Exclude:
19
- - 'test/test_expect.rb'
@@ -1,28 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
- before_install:
5
- - gem install bundler
6
- script:
7
- - bundle exec rubocop
8
- - bundle exec rake test
9
- rvm:
10
- - 2.3.3
11
- - 2.4.0
12
- - 2.5.0
13
- - 2.6.2
14
- - ruby-head
15
- - jruby-head
16
- - rbx-3
17
- matrix:
18
- allow_failures:
19
- - rvm: ruby-head
20
- - rvm: jruby-head
21
- - rvm: rbx-3
22
- notifications:
23
- webhooks:
24
- urls:
25
- - https://webhooks.gitter.im/e/a44b19cc5cf6db25fa87
26
- on_success: change
27
- on_failure: always
28
- on_start: never
data/.yardopts DELETED
@@ -1 +0,0 @@
1
- - README.md
@@ -1,13 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
-
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
-
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
-
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
-
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
data/Rakefile DELETED
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'bundler/gem_tasks'
4
- require 'rake/testtask'
5
- require 'rubocop/rake_task'
6
-
7
- RuboCop::RakeTask.new
8
-
9
- Rake::TestTask.new do |t|
10
- t.verbose = true
11
- t.warning = true
12
- end
13
-
14
- namespace :test do
15
- task :coverage do
16
- ENV['COVERAGE'] = 'true'
17
- Rake::Task['test'].invoke
18
- end
19
- end
20
-
21
- task(:doc_stats) { ruby '-S yard stats' }
22
- task default: %i[test doc_stats rubocop]
@@ -1 +0,0 @@
1
- 0.3.5
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'fix/expect'
6
-
7
- require 'irb'
8
- IRB.start
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -euo pipefail
4
- IFS=$'\n\t'
5
-
6
- bundle install
@@ -1 +0,0 @@
1
- 4886cd57a0071431984eda3ac9321dc0b795f9662b3541a8bb9dd43853ef2edc220720fe168aa1e0de395ec0b2c923e408abd4e8ada2bf5e2e8adfd149d4e417
@@ -1 +0,0 @@
1
- 95b9fa3855f1e358351a9f830add81d91f78a18e2e295aeb05f272d3da1cb655b0a61c909100c9f8821d21db2fc2abe0404a93b36c04f944b6f9b006de64b5ba
@@ -1 +0,0 @@
1
- a67f8870c7d95880b83b7758b0ffb1f1e30d23beae78cb8200539bf7be06ffa9dd41df74fdd871f85874a138c55bb58a723970df3d5db481892dd203b6930e28
@@ -1 +0,0 @@
1
- 84e68c1539a488c111070157e9a1888b79e1b6cef525ff5cda1ce35e68bfda04b4590114fd41d39bf7f3827395a4d6bf47ad746c7c858159c87d2c1a687fea95
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = 'fix-expect'
5
- spec.version = File.read('VERSION.semver').chomp
6
- spec.authors = ['Cyril Kato']
7
- spec.email = ['contact@cyril.email']
8
-
9
- spec.summary = 'Provides the expect syntax.'
10
- spec.description = 'Fix extension gem to provide the expect syntax.'
11
- spec.homepage = 'https://github.com/fixrb/fix-expect'
12
- spec.license = 'MIT'
13
-
14
- spec.files =
15
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^test/}) }
16
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
17
- spec.require_paths = ['lib']
18
-
19
- spec.add_dependency 'fix', '~> 0.18.0'
20
-
21
- spec.add_development_dependency 'bundler', '~> 2.0'
22
- spec.add_development_dependency 'rake', '~> 12.3'
23
- spec.add_development_dependency 'rubocop', '~> 0.67'
24
- spec.add_development_dependency 'simplecov', '~> 0.16'
25
- spec.add_development_dependency 'spectus', '~> 3.0'
26
- spec.add_development_dependency 'yard', '~> 0.9'
27
- end
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'digest/sha2'
5
-
6
- gemname = 'fix-expect'.to_sym
7
- ARGV[0] = File.read('VERSION.semver').chomp if ARGV[0].nil?
8
- built_gem_path = "pkg/#{gemname}-#{ARGV[0]}.gem"
9
- checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
10
- checksum_path = "checksum/#{gemname}-#{ARGV[0]}.gem.sha512"
11
-
12
- File.open(checksum_path, 'w') { |f| f.write("#{checksum}\n") }