ndd-rspec-rails 0.2.2 → 0.2.3
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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +90 -16
- data/bin/setup +22 -1
- data/lib/ndd/rspec/rails/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1de22c2881153f2b19bc46f7a5be5e0b73b341
|
4
|
+
data.tar.gz: 0b158b6695190e63441a73f2778718f3a90c1dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d0928158106ad78818a31251d694db86e933f373c61f36b93e875d275ec85433da4782b122053db4c015c4912682fbec9e56be59bbfa3b7938133e263c01ce5
|
7
|
+
data.tar.gz: 2ed416fedd7b5f3125aa20ffd4b1e882386c6e3bcd4f73125ac51d54e858e90836a5242d5534f0cc68acf5d885ef3481fc8e99a098ad41fec11bf383f42bc1fa
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# NDD RSpec Rails changelog
|
2
2
|
|
3
|
+
## Version 0.2.3
|
4
|
+
|
5
|
+
- Update dependencies minor versions
|
6
|
+
- Update documentation
|
7
|
+
- Add support for multiple RSpec versions
|
8
|
+
- Add Appraisal support to Travis
|
9
|
+
- Add WWTD support to Travis
|
10
|
+
|
3
11
|
## Version 0.2.2
|
4
12
|
|
5
13
|
- Fix translation fallback
|
data/README.md
CHANGED
@@ -11,18 +11,7 @@ RSpec utilities for Rails.
|
|
11
11
|
|
12
12
|
The API documentation can be find at [RubyDoc](http://www.rubydoc.info/github/ddidier/ndd-rspec-rails).
|
13
13
|
|
14
|
-
## Prerequisites
|
15
14
|
|
16
|
-
This gem requires:
|
17
|
-
|
18
|
-
- `activesupport >= 4.0`
|
19
|
-
- `rspec >= 3.0`
|
20
|
-
|
21
|
-
And is tested with:
|
22
|
-
|
23
|
-
- `Ruby 2.4`
|
24
|
-
- `Ruby 2.3`
|
25
|
-
- `Ruby 2.2`
|
26
15
|
|
27
16
|
## Installation
|
28
17
|
|
@@ -36,8 +25,23 @@ And then execute `bundle`
|
|
36
25
|
|
37
26
|
Or install it yourself with `gem install ndd-rspec-rails`
|
38
27
|
|
28
|
+
|
29
|
+
|
39
30
|
## Usage
|
40
31
|
|
32
|
+
### Prerequisites
|
33
|
+
|
34
|
+
This gem requires:
|
35
|
+
|
36
|
+
- `activesupport >= 4.0`
|
37
|
+
- `rspec >= 3.0`
|
38
|
+
|
39
|
+
And is tested with:
|
40
|
+
|
41
|
+
- `Ruby 2.4`
|
42
|
+
- `Ruby 2.3`
|
43
|
+
- `Ruby 2.2`
|
44
|
+
|
41
45
|
### Controller matchers
|
42
46
|
|
43
47
|
- `have_a_translated_flash`: ensure that a flash message has an associated translation ([documentation](http://www.rubydoc.info/gems/ndd-rspec-rails/Ndd%2FRSpec%2FRails%2FMatchers%2FController:have_a_translated_flash));
|
@@ -48,14 +52,82 @@ Or install it yourself with `gem install ndd-rspec-rails`
|
|
48
52
|
- `have_a_translated_error`: ensure that an error on a model or an attribute has an associated translation ([documentation](http://www.rubydoc.info/gems/ndd-rspec-rails/Ndd%2FRSpec%2FRails%2FMatchers%2FModel:have_a_translated_error));
|
49
53
|
- `have_a_translated_model`: ensure that an attribute has an associated translation ([documentation](http://www.rubydoc.info/gems/ndd-rspec-rails/Ndd%2FRSpec%2FRails%2FMatchers%2FModel:have_a_translated_model));
|
50
54
|
|
55
|
+
|
56
|
+
|
51
57
|
## Development
|
52
58
|
|
53
|
-
|
54
|
-
also run `bin/console` for an interactive prompt that will allow you to experiment.
|
59
|
+
### Prerequisites
|
55
60
|
|
56
|
-
|
57
|
-
|
58
|
-
|
61
|
+
In order to extensively test this library with all the supported versions of Ruby and RSpec, you will need to manage:
|
62
|
+
|
63
|
+
- several Ruby environments using [RVM](https://rvm.io/)
|
64
|
+
- several gems sets using [Appraisal](https://github.com/thoughtbot/appraisal)
|
65
|
+
- several test execution environments (Ruby and gems) using [WWTD](https://github.com/grosser/wwtd)
|
66
|
+
|
67
|
+
### Setup
|
68
|
+
|
69
|
+
After installing RVM, check out the repository and run `bin/setup` to setup all the environments. This script will:
|
70
|
+
|
71
|
+
- create the latest Ruby environment with RVM and an associated gems set using the `.ruby-version`
|
72
|
+
and `.ruby-gemset` files:
|
73
|
+
|
74
|
+
```bash
|
75
|
+
rvm use
|
76
|
+
gem install bundler --no-rdoc --no-ri
|
77
|
+
bundle install
|
78
|
+
```
|
79
|
+
|
80
|
+
- install all the required Ruby versions listed in `.travis.yml`. For example:
|
81
|
+
|
82
|
+
```bash
|
83
|
+
export LOCAL_RUBY_VERSION=2.2.7 \
|
84
|
+
&& rvm install ruby-$LOCAL_RUBY_VERSION \
|
85
|
+
&& rvm use ruby-$LOCAL_RUBY_VERSION \
|
86
|
+
&& gem install bundler --no-rdoc --no-ri
|
87
|
+
export LOCAL_RUBY_VERSION=2.3.4 \
|
88
|
+
&& rvm install ruby-$LOCAL_RUBY_VERSION \
|
89
|
+
&& rvm use ruby-$LOCAL_RUBY_VERSION \
|
90
|
+
&& gem install bundler --no-rdoc --no-ri
|
91
|
+
export LOCAL_RUBY_VERSION=2.4.1 \
|
92
|
+
&& rvm install ruby-$LOCAL_RUBY_VERSION \
|
93
|
+
&& rvm use ruby-$LOCAL_RUBY_VERSION \
|
94
|
+
&& gem install bundler --no-rdoc --no-ri
|
95
|
+
```
|
96
|
+
|
97
|
+
- create a `Gemfile.lock` for each set of the dependencies:
|
98
|
+
|
99
|
+
```bash
|
100
|
+
appraisal install
|
101
|
+
```
|
102
|
+
|
103
|
+
- install all the dependencies in their associated environment:
|
104
|
+
|
105
|
+
```bash
|
106
|
+
wwtd --only-bundle
|
107
|
+
```
|
108
|
+
|
109
|
+
At last, to test this library in all the supported environments, just run:
|
110
|
+
|
111
|
+
```bash
|
112
|
+
wwtd --parallel
|
113
|
+
```
|
114
|
+
|
115
|
+
### Release
|
116
|
+
|
117
|
+
As a reminder...
|
118
|
+
|
119
|
+
- update all dependencies in all the environments:
|
120
|
+
|
121
|
+
```bash
|
122
|
+
bundle update
|
123
|
+
appraisal update
|
124
|
+
wwtd --only-bundle
|
125
|
+
```
|
126
|
+
|
127
|
+
- run the tests in all the environments with `wwtd --parallel`
|
128
|
+
- update the changelog
|
129
|
+
- update the library version
|
130
|
+
- release with `bundle exec rake release`
|
59
131
|
|
60
132
|
## Contributing
|
61
133
|
|
@@ -63,6 +135,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/ddidie
|
|
63
135
|
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the
|
64
136
|
[Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
65
137
|
|
138
|
+
|
139
|
+
|
66
140
|
## License
|
67
141
|
|
68
142
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/bin/setup
CHANGED
@@ -3,6 +3,27 @@ set -euo pipefail
|
|
3
3
|
IFS=$'\n\t'
|
4
4
|
set -vx
|
5
5
|
|
6
|
+
hash rvm 2>/dev/null || { echo >&2 "RVM is required but not installed. Aborting."; exit 1; }
|
7
|
+
|
8
|
+
# Create the latest Ruby environment with RVM and a gemset
|
9
|
+
# using the '.ruby-version' and '.ruby-gemset' files.
|
10
|
+
rvm use
|
11
|
+
gem install bundler --no-rdoc --no-ri
|
6
12
|
bundle install
|
7
13
|
|
8
|
-
#
|
14
|
+
# Create other Ruby environments with RVM but without a gemset
|
15
|
+
# because WWTD does not use them.
|
16
|
+
for ruby in "ruby-2.2.7" "ruby-2.3.4" "ruby-2.4.1"; do
|
17
|
+
rvm install $ruby
|
18
|
+
rvm use $ruby
|
19
|
+
gem install bundler --no-rdoc --no-ri
|
20
|
+
done
|
21
|
+
|
22
|
+
# Back to the latest Ruby environment with RVM and a gemset
|
23
|
+
rvm use
|
24
|
+
|
25
|
+
# Create Gemfile.lock for each set of the dependencies
|
26
|
+
appraisal install
|
27
|
+
|
28
|
+
# Install all the dependencies in their associated environment
|
29
|
+
wwtd --only-bundle
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndd-rspec-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David DIDIER
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: 1.
|
73
|
+
version: 1.15.0
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: 1.
|
80
|
+
version: 1.15.0
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: codeclimate-test-reporter
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +176,20 @@ dependencies:
|
|
176
176
|
- - "~>"
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: 0.14.0
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: wwtd
|
181
|
+
requirement: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - "~>"
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: 1.3.0
|
186
|
+
type: :development
|
187
|
+
prerelease: false
|
188
|
+
version_requirements: !ruby/object:Gem::Requirement
|
189
|
+
requirements:
|
190
|
+
- - "~>"
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 1.3.0
|
179
193
|
- !ruby/object:Gem::Dependency
|
180
194
|
name: yard
|
181
195
|
requirement: !ruby/object:Gem::Requirement
|