Skip to content

Commit 82c4568

Browse files
committed
Upgrading the Ruby and CI stack (#42)
1 parent f012fa7 commit 82c4568

File tree

10 files changed

+159
-106
lines changed

10 files changed

+159
-106
lines changed

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: bundler
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
day: monday
9+
time: '00:00'
10+
target-branch: main
11+
versioning-strategy: increase-if-necessary
12+
13+
- package-ecosystem: github-actions
14+
directory: /
15+
schedule:
16+
interval: weekly
17+
day: monday
18+
time: '00:00'
19+
target-branch: main

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
specs:
13+
name: Rubocop & Rspec
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
ruby-version: ['3.2', '3.1', '3.0', '2.7', '2.6']
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Ruby ${{matrix.ruby-version}}
24+
uses: ruby/setup-ruby@v1
25+
with:
26+
ruby-version: ${{matrix.ruby-version}}
27+
bundler-cache: true
28+
- name: Updating RubyGems
29+
run: gem update --system
30+
- name: Install dependencies
31+
run: bundle install
32+
- name: Rubocop
33+
run: bundle exec rubocop -D
34+
- name: Rspec
35+
run: bundle exec rspec

.hound.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.rubocop.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.rubocop.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
AllCops:
2+
Exclude:
3+
- memfs.gemspec
4+
- spec/**/*
5+
- vendor/bundle/**/*
6+
NewCops: enable
7+
TargetRubyVersion: 2.7
8+
9+
Layout/ArgumentAlignment:
10+
EnforcedStyle: with_fixed_indentation
11+
12+
Layout/EmptyLineAfterGuardClause:
13+
Enabled: false
14+
15+
Layout/FirstArrayElementIndentation:
16+
EnforcedStyle: consistent
17+
18+
Layout/FirstHashElementIndentation:
19+
EnforcedStyle: consistent
20+
21+
Layout/LineLength:
22+
Exclude:
23+
- Rakefile
24+
Max: 100
25+
26+
Layout/MultilineMethodCallBraceLayout:
27+
EnforcedStyle: same_line
28+
29+
Layout/MultilineMethodDefinitionBraceLayout:
30+
EnforcedStyle: same_line
31+
32+
Layout/MultilineOperationIndentation:
33+
EnforcedStyle: indented
34+
35+
Layout/ParameterAlignment:
36+
EnforcedStyle: with_fixed_indentation
37+
38+
Metrics/AbcSize:
39+
Max: 18
40+
41+
Metrics/ClassLength:
42+
Enabled: false
43+
44+
Metrics/MethodLength:
45+
Max: 10
46+
47+
Naming/PredicateName:
48+
ForbiddenPrefixes:
49+
- is_
50+
51+
Security/Open:
52+
Enabled: false
53+
54+
Style/AccessModifierDeclarations:
55+
Enabled: false
56+
57+
Style/AndOr:
58+
Enabled: false
59+
60+
Style/Documentation:
61+
Enabled: false
62+
63+
Style/DoubleNegation:
64+
Enabled: false
65+
66+
Style/PercentLiteralDelimiters:
67+
PreferredDelimiters:
68+
'%': '{}'
69+
'%i': '[]'
70+
'%q': '{}'
71+
'%Q': '{}'
72+
'%r': '{}'
73+
'%s': '{}'
74+
'%w': '[]'
75+
'%W': '[]'
76+
'%x': '{}'
77+
78+
Style/RegexpLiteral:
79+
EnforcedStyle: mixed
80+
81+
Style/SignalException:
82+
EnforcedStyle: semantic
83+
84+
Style/SpecialGlobalVars:
85+
Enabled: false
86+
87+
Style/StringLiterals:
88+
EnforcedStyle: single_quotes
89+
90+
Style/StringLiteralsInInterpolation:
91+
EnforcedStyle: single_quotes

.ruby-style.yml

Lines changed: 0 additions & 90 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22

33
## HEAD
44

5-
* ADD: `Dir.empty?` from Ruby 2.4
5+
* ADD: Support for Ruby 3.x
6+
* ADD: `Dir.empty?`
67
* ADD: `IO#fileno` and `Dir#fileno` raise `NotImplementedError`
78
* ADD: `File.birthtime` and `File#birthtime`
89
* ADD: `File.empty?`
910
* ADD: `File::Stat#nlink` (#39 by @djberg96)
1011
* FIX: Fixing the inverted _read_ and _execute_ bitmasks (#41 by @micahlee)
12+
* ADD: Dependabot configuration
13+
* CHG: Replacing Travis CI with GitHub Actions
14+
15+
### Breaking
16+
17+
* DEL: Removing support for Ruby 2.4 and 2.5
18+
* CHG: Renaming the `master` branch to `main`
1119

1220
## 1.0.0
1321

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
![MemFs Logo](https://raw.github.com/simonc/memfs/master/memfs.png)
1+
![MemFs Logo](https://raw.github.com/simonc/memfs/main/memfs.png)
22

33
[![Gem Version](https://badge.fury.io/rb/memfs.svg)](https://badge.fury.io/rb/memfs)
4-
[![Build Status](https://api.travis-ci.org/simonc/memfs.svg?branch=master)](http://travis-ci.org/simonc/memfs)
4+
[![Build Status](https://github.com/simonc/memfs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/simonc/memfs/actions/workflows/ci.yml)
55
[![Code Climate](https://codeclimate.com/github/simonc/memfs/badges/gpa.svg)](https://codeclimate.com/github/simonc/memfs)
6-
[![Coverage Status](https://coveralls.io/repos/github/simonc/memfs/badge.svg?branch=master)](https://coveralls.io/github/simonc/memfs?branch=master)
6+
[![Coverage Status](https://coveralls.io/repos/github/simonc/memfs/badge.svg?branch=main)](https://coveralls.io/github/simonc/memfs?branch=main)
77

88
MemFs is an in-memory filesystem that can be used for your tests.
99

lib/memfs/io.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def external_encoding
113113
end
114114

115115
def each(sep = $/, &block)
116-
return to_enum(__callee__) unless block_given?
116+
return to_enum(__callee__, sep) unless block_given?
117117
fail IOError, 'not opened for reading' unless readable?
118118
content.each_line(sep) { |line| block.call(line) }
119119
self

0 commit comments

Comments
 (0)