Skip to content

Commit

Permalink
Technical/Update gemspec (#39)
Browse files Browse the repository at this point in the history
* Added latest gemspec
* Added developer env guide
* Updated gemspec
* Updated CircleCI config
* Updated gem version, contributing guide, changelog
  • Loading branch information
bestwebua committed Feb 23, 2022
1 parent 671dfa3 commit 0677227
Show file tree
Hide file tree
Showing 9 changed files with 110 additions and 17 deletions.
10 changes: 9 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ references:
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
use_latest_gemspec: &use_latest_gemspec
run:
name: Using latest gemspec
command: |
cp .circleci/gemspec_latest truemail-rspec.gemspec
use_compatible_gemspec: &use_compatible_gemspec
run:
name: Use compatible gemspec
Expand All @@ -51,6 +57,7 @@ jobs:
steps:
- checkout

- <<: *use_latest_gemspec
- <<: *restore_bundle_cache
- <<: *bundle_install
- <<: *save_bundle_cache
Expand All @@ -71,6 +78,7 @@ jobs:
steps:
- checkout

- <<: *use_latest_gemspec
- <<: *restore_bundle_cache
- <<: *bundle_install
- <<: *save_bundle_cache
Expand Down Expand Up @@ -107,7 +115,7 @@ jobs:
- checkout
- <<: *use_compatible_gemspec
- ruby/install-deps:
bundler-version: "2.3.5"
bundler-version: "2.3.7"
with-cache: false
path: './vendor/custom_bundle'
- run:
Expand Down
51 changes: 51 additions & 0 deletions .circleci/gemspec_latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

lib = ::File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'truemail/rspec/version'

Gem::Specification.new do |spec|
spec.name = 'truemail-rspec'
spec.version = Truemail::RSpec::VERSION
spec.authors = ['Vladislav Trotsenko']
spec.email = ['[email protected]']

spec.summary = %(truemail-rspec)
spec.description = %(Truemail RSpec helpers)

spec.homepage = 'https://github.com/truemail-rb/truemail-rspec'
spec.license = 'MIT'

spec.metadata = {
'homepage_uri' => 'https://truemail-rb.org',
'changelog_uri' => 'https://github.com/truemail-rb/truemail-rspec/blob/master/CHANGELOG.md',
'source_code_uri' => 'https://github.com/truemail-rb/truemail-rspec',
'documentation_uri' => 'https://truemail-rb.org/truemail-rspec',
'bug_tracker_uri' => 'https://github.com/truemail-rb/truemail-rspec/issues'
}

spec.required_ruby_version = '>= 2.5.0'

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| ::File.basename(f) }
spec.require_paths = ['lib']

spec.add_runtime_dependency 'ffaker', '~> 2.20'
spec.add_runtime_dependency 'net-smtp', '~> 0.3.1'
spec.add_runtime_dependency 'rspec', '~> 3.11'
spec.add_runtime_dependency 'truemail', '~> 2.6', '>= 2.6.2'

spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1'
spec.add_development_dependency 'fasterer', '~> 0.9.0'
spec.add_development_dependency 'ffaker', '~> 2.20'
spec.add_development_dependency 'overcommit', '~> 0.58.0'
spec.add_development_dependency 'pry-byebug', '~> 3.9'
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
spec.add_development_dependency 'reek', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.11'
spec.add_development_dependency 'rubocop', '~> 1.25', '>= 1.25.1'
spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.2'
spec.add_development_dependency 'rubocop-rspec', '~> 2.8'
spec.add_development_dependency 'simplecov', '~> 0.21.2'
end
26 changes: 26 additions & 0 deletions .github/DEVELOPMENT_ENVIRONMENT_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Development environment guide

## Preparing

Clone `truemail-rspec` repository:

```bash
git clone https://github.com/truemail-rb/truemail-rspec.git
cd truemail-rspec
```

Configure latest Ruby environment:

```bash
echo 'ruby-3.1.1' > .ruby-version
cp .circleci/gemspec_latest truemail.gemspec
```

## Commiting

Commit your changes excluding `.ruby-version`, `truemail.gemspec`

```bash
git add . ':!.ruby-version' ':!truemail.gemspec'
git commit -m 'Your new awesome truemail feature'
```
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-3.1.0
ruby-2.5.0
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.0] - 2022-02-23

### Added

- Added development environment guide docs

### Updated

- Updated gem runtime dependencies
- Updated gem development dependencies
- Updated minimal Ruby version for RubyGems environment
- Updated CircleCI configs
- Updated contributing guide

## [0.8.0] - 2022-01-25

### Updated
Expand Down
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ Guidelines for pull requests:
2. Fork the repo, checkout to `develop` branch
3. Run the tests. This is to make sure your starting point works
4. Read our [branch naming convention](.github/BRANCH_NAMING_CONVENTION.md)
5. Create a new branch and make your changes. This includes tests for features!
6. Push to your fork and submit a pull request to `develop` branch
5. Create a new branch
6. Read our [setup development environment guide](.github/DEVELOPMENT_ENVIRONMENT_GUIDE.md)
7. Make your changes. Please note that your PR should include tests for the new codebase!
9. Push to your fork and submit a pull request to `develop` branch
2 changes: 1 addition & 1 deletion lib/truemail/rspec/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Truemail
module RSpec
VERSION = '0.8.0'
VERSION = '0.9.0'
end
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'bundler/setup'

if ::RUBY_VERSION[/\A3\.1.+\z/]
require 'pry'
require 'simplecov'

SimpleCov.minimum_coverage(100)
Expand Down
15 changes: 3 additions & 12 deletions truemail-rspec.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,11 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_runtime_dependency 'ffaker', '~> 2.20'
spec.add_runtime_dependency 'net-smtp', '~> 0.3'
spec.add_runtime_dependency 'rspec', '~> 3.10'
spec.add_runtime_dependency 'net-smtp', '~> 0.3.1' if ::RUBY_VERSION >= '3.1.0'
spec.add_runtime_dependency 'rspec', '~> 3.11'
spec.add_runtime_dependency 'truemail', '~> 2.6', '>= 2.6.2'

spec.add_development_dependency 'bundler-audit', '~> 0.9.0.1'
spec.add_development_dependency 'fasterer', '~> 0.9.0'
spec.add_development_dependency 'ffaker', '~> 2.20'
spec.add_development_dependency 'overcommit', '~> 0.58.0'
spec.add_development_dependency 'pry-byebug', '~> 3.9'
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
spec.add_development_dependency 'reek', '~> 6.1'
spec.add_development_dependency 'rspec', '~> 3.10'
spec.add_development_dependency 'rubocop', '~> 1.25'
spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.2'
spec.add_development_dependency 'rubocop-rspec', '~> 2.8'
spec.add_development_dependency 'simplecov', '~> 0.21.2'
spec.add_development_dependency 'rspec', '~> 3.11'
end

0 comments on commit 0677227

Please sign in to comment.