dry-web-roda 0.13.1 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +143 -64
- data/LICENSE +1 -1
- data/README.md +16 -41
- data/{exe → bin}/dry-web-roda +0 -0
- data/dry-web-roda.gemspec +21 -20
- data/lib/dry/web/roda/templates/subapp/container.rb.tt +3 -3
- data/lib/dry/web/roda/version.rb +1 -1
- metadata +18 -144
- data/.codeclimate.yml +0 -12
- data/.github/ISSUE_TEMPLATE/----please-don-t-ask-for-support-via-issues.md +0 -10
- data/.github/ISSUE_TEMPLATE/---bug-report.md +0 -30
- data/.github/ISSUE_TEMPLATE/---feature-request.md +0 -18
- data/.github/workflows/custom_ci.yml +0 -50
- data/.github/workflows/docsite.yml +0 -34
- data/.github/workflows/sync_configs.yml +0 -34
- data/.gitignore +0 -37
- data/.rspec +0 -4
- data/.rubocop.yml +0 -95
- data/CODE_OF_CONDUCT.md +0 -13
- data/CONTRIBUTING.md +0 -29
- data/Gemfile +0 -32
- data/Rakefile +0 -6
- data/lib/dry/web/roda/templates/.gitignore +0 -11
- data/lib/dry/web/roda/templates/.keep +0 -0
- data/lib/dry/web/roda/templates/.rspec +0 -2
- data/script/ci +0 -67
- data/script/setup +0 -47
- data/script/teardown +0 -42
- data/spec/integration/new_app_spec.rb +0 -21
- data/spec/spec_helper.rb +0 -22
- data/spec/support/app.rb +0 -64
- data/spec/support/bundler.rb +0 -113
- data/spec/support/cli.rb +0 -47
- data/spec/support/directories.rb +0 -37
- data/spec/support/env.rb +0 -84
- data/spec/support/files.rb +0 -59
- data/spec/support/project.rb +0 -60
- data/spec/support/requests.rb +0 -5
- data/spec/support/silently.rb +0 -28
- data/spec/unit/generators/inflections_spec.rb +0 -33
@@ -1,34 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
name: sync_configs
|
4
|
-
|
5
|
-
on:
|
6
|
-
repository_dispatch:
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
sync-configs:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
if: github.event.action == 'sync_configs'
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v1
|
14
|
-
- name: Update configuration files from devtools
|
15
|
-
env:
|
16
|
-
GITHUB_LOGIN: dry-bot
|
17
|
-
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
18
|
-
run: |
|
19
|
-
git clone https://github.com/dry-rb/devtools.git tmp/devtools
|
20
|
-
|
21
|
-
if [ -f ".github/workflows/custom_ci.yml" ]; then
|
22
|
-
rsync -av --exclude '.github/workflows/ci.yml' tmp/devtools/shared/ . ;
|
23
|
-
else
|
24
|
-
rsync -av tmp/devtools/shared/ . ;
|
25
|
-
fi
|
26
|
-
|
27
|
-
git config --local user.email "dry-bot@dry-rb.org"
|
28
|
-
git config --local user.name "dry-bot"
|
29
|
-
git add -A
|
30
|
-
git commit -m "[devtools] config sync" || echo "nothing changed"
|
31
|
-
- name: Push changes
|
32
|
-
uses: ad-m/github-push-action@master
|
33
|
-
with:
|
34
|
-
github_token: ${{ secrets.GH_PAT }}
|
data/.gitignore
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/test/tmp/
|
8
|
-
/test/version_tmp/
|
9
|
-
/tmp/
|
10
|
-
|
11
|
-
## Testing
|
12
|
-
/spec/reports/
|
13
|
-
/spec/examples.txt
|
14
|
-
|
15
|
-
## Documentation cache and generated files:
|
16
|
-
/.yardoc/
|
17
|
-
/_yardoc/
|
18
|
-
/doc/
|
19
|
-
/rdoc/
|
20
|
-
|
21
|
-
## Environment normalisation:
|
22
|
-
/.bundle/
|
23
|
-
/lib/bundler/man/
|
24
|
-
|
25
|
-
# for a library or gem, you might want to ignore these files since the code is
|
26
|
-
# intended to run in multiple environments; otherwise, check them in:
|
27
|
-
Gemfile.lock
|
28
|
-
# .ruby-version
|
29
|
-
# .ruby-gemset
|
30
|
-
|
31
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
32
|
-
.rvmrc
|
33
|
-
|
34
|
-
.byebug_history
|
35
|
-
/vendor/cache/
|
36
|
-
|
37
|
-
.idea
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
# this file is managed by dry-rb/devtools project
|
2
|
-
|
3
|
-
AllCops:
|
4
|
-
TargetRubyVersion: 2.4
|
5
|
-
|
6
|
-
Style/EachWithObject:
|
7
|
-
Enabled: false
|
8
|
-
|
9
|
-
Style/StringLiterals:
|
10
|
-
Enabled: true
|
11
|
-
EnforcedStyle: single_quotes
|
12
|
-
|
13
|
-
Style/Alias:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
Style/LambdaCall:
|
17
|
-
Enabled: false
|
18
|
-
|
19
|
-
Style/StabbyLambdaParentheses:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/FormatString:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Style/Documentation:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Layout/SpaceInLambdaLiteral:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Layout/MultilineMethodCallIndentation:
|
32
|
-
Enabled: true
|
33
|
-
EnforcedStyle: indented
|
34
|
-
|
35
|
-
Metrics/LineLength:
|
36
|
-
Max: 100
|
37
|
-
|
38
|
-
Metrics/MethodLength:
|
39
|
-
Max: 22
|
40
|
-
|
41
|
-
Metrics/ClassLength:
|
42
|
-
Max: 150
|
43
|
-
|
44
|
-
Metrics/AbcSize:
|
45
|
-
Max: 20
|
46
|
-
|
47
|
-
Metrics/BlockLength:
|
48
|
-
Enabled: false
|
49
|
-
|
50
|
-
Metrics/CyclomaticComplexity:
|
51
|
-
Enabled: true
|
52
|
-
Max: 10
|
53
|
-
|
54
|
-
Lint/BooleanSymbol:
|
55
|
-
Enabled: false
|
56
|
-
|
57
|
-
Style/AccessModifierDeclarations:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
Style/BlockDelimiters:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
Layout/IndentFirstArrayElement:
|
64
|
-
EnforcedStyle: consistent
|
65
|
-
|
66
|
-
Style/ClassAndModuleChildren:
|
67
|
-
Exclude:
|
68
|
-
- "spec/**/*_spec.rb"
|
69
|
-
|
70
|
-
Lint/HandleExceptions:
|
71
|
-
Exclude:
|
72
|
-
- "spec/spec_helper.rb"
|
73
|
-
|
74
|
-
Naming/FileName:
|
75
|
-
Exclude:
|
76
|
-
- "lib/dry-*.rb"
|
77
|
-
|
78
|
-
Style/SymbolArray:
|
79
|
-
Exclude:
|
80
|
-
- "spec/**/*_spec.rb"
|
81
|
-
|
82
|
-
Style/ConditionalAssignment:
|
83
|
-
Enabled: false
|
84
|
-
|
85
|
-
Naming/MethodName:
|
86
|
-
Enabled: false
|
87
|
-
|
88
|
-
Style/AsciiComments:
|
89
|
-
Enabled: false
|
90
|
-
|
91
|
-
Style/DateTime:
|
92
|
-
Enabled: false
|
93
|
-
|
94
|
-
Style/IfUnlessModifier:
|
95
|
-
Enabled: false
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -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.4.0, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct](https://www.contributor-covenant.org/version/1/4/code-of-conduct)
|
data/CONTRIBUTING.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Issue Guidelines
|
2
|
-
|
3
|
-
## Reporting bugs
|
4
|
-
|
5
|
-
If you found a bug, report an issue and describe what's the expected behavior versus what actually happens. If the bug causes a crash, attach a full backtrace. If possible, a reproduction script showing the problem is highly appreciated.
|
6
|
-
|
7
|
-
## Reporting feature requests
|
8
|
-
|
9
|
-
Report a feature request **only after discussing it first on [discourse.dry-rb.org](https://discourse.dry-rb.org)** where it was accepted. Please provide a concise description of the feature, don't link to a discussion thread, and instead summarize what was discussed.
|
10
|
-
|
11
|
-
## Reporting questions, support requests, ideas, concerns etc.
|
12
|
-
|
13
|
-
**PLEASE DON'T** - use [discourse.dry-rb.org](http://discourse.dry-rb.org) instead.
|
14
|
-
|
15
|
-
# Pull Request Guidelines
|
16
|
-
|
17
|
-
A Pull Request will only be accepted if it addresses a specific issue that was reported previously, or fixes typos, mistakes in documentation etc.
|
18
|
-
|
19
|
-
Other requirements:
|
20
|
-
|
21
|
-
1) Do not open a pull request if you can't provide tests along with it. If you have problems writing tests, ask for help in the related issue.
|
22
|
-
2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
|
23
|
-
3) Add API documentation if it's a new feature
|
24
|
-
4) Update API documentation if it changes an existing feature
|
25
|
-
5) Bonus points for sending a PR to [github.com/dry-rb/dry-rb.org](github.com/dry-rb/dry-rb.org) which updates user documentation and guides
|
26
|
-
|
27
|
-
# Asking for help
|
28
|
-
|
29
|
-
If these guidelines aren't helpful, and you're stuck, please post a message on [discourse.dry-rb.org](https://discourse.dry-rb.org) or join [our chat](https://dry-rb.zulipchat.com).
|
data/Gemfile
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'pry'
|
6
|
-
gem 'byebug', platform: :mri
|
7
|
-
gem 'codeclimate-test-reporter', platform: :rbx
|
8
|
-
|
9
|
-
# Generated application dependencies
|
10
|
-
gem "puma"
|
11
|
-
gem "rack_csrf"
|
12
|
-
gem "rerun"
|
13
|
-
gem "rack", ">= 2.0"
|
14
|
-
gem "pg"
|
15
|
-
gem "rom", "~> 5.1"
|
16
|
-
gem "rom-factory", "~> 0.10"
|
17
|
-
gem "rom-sql", "~> 3.1"
|
18
|
-
gem "dry-matcher"
|
19
|
-
gem "dry-monads"
|
20
|
-
gem "dry-struct"
|
21
|
-
gem "dry-system"
|
22
|
-
gem "dry-types"
|
23
|
-
gem "dry-validation"
|
24
|
-
gem "dry-view"
|
25
|
-
gem "dry-web"
|
26
|
-
gem "slim"
|
27
|
-
gem "pry-byebug", platform: :mri
|
28
|
-
gem "capybara"
|
29
|
-
gem "capybara-screenshot"
|
30
|
-
gem "database_cleaner"
|
31
|
-
gem "poltergeist"
|
32
|
-
gem "rspec"
|
data/Rakefile
DELETED
File without changes
|
data/script/ci
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
|
5
|
-
setup() {
|
6
|
-
./script/setup
|
7
|
-
}
|
8
|
-
|
9
|
-
teardown() {
|
10
|
-
./script/teardown
|
11
|
-
}
|
12
|
-
|
13
|
-
run_all() {
|
14
|
-
bundle exec rake
|
15
|
-
}
|
16
|
-
|
17
|
-
run_unit_tests() {
|
18
|
-
bundle exec rake spec:coverage
|
19
|
-
}
|
20
|
-
|
21
|
-
run_isolation_tests() {
|
22
|
-
local pwd=$PWD
|
23
|
-
local root="$pwd/spec/isolation"
|
24
|
-
|
25
|
-
run_tests $root
|
26
|
-
}
|
27
|
-
|
28
|
-
run_integration_tests() {
|
29
|
-
local pwd=$PWD
|
30
|
-
local root="$pwd/spec/integration"
|
31
|
-
|
32
|
-
run_tests $root
|
33
|
-
}
|
34
|
-
|
35
|
-
run_tests() {
|
36
|
-
local root=$1
|
37
|
-
|
38
|
-
for test in $(find $root -name '*_spec.rb')
|
39
|
-
do
|
40
|
-
run_test $test
|
41
|
-
|
42
|
-
if [ $? -ne 0 ]; then
|
43
|
-
local exit_code=$?
|
44
|
-
echo "Failing test: $test"
|
45
|
-
exit $exit_code
|
46
|
-
fi
|
47
|
-
done
|
48
|
-
}
|
49
|
-
|
50
|
-
run_test() {
|
51
|
-
local test=$1
|
52
|
-
|
53
|
-
printf "\n\n\nRunning: $test\n"
|
54
|
-
COVERAGE=true bundle exec rspec $test
|
55
|
-
}
|
56
|
-
|
57
|
-
main() {
|
58
|
-
setup &&
|
59
|
-
run_all
|
60
|
-
# run_unit_tests &&
|
61
|
-
# run_isolation_tests &&
|
62
|
-
# run_integration_tests
|
63
|
-
}
|
64
|
-
|
65
|
-
trap teardown EXIT
|
66
|
-
|
67
|
-
main
|
data/script/setup
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
|
5
|
-
declare pwd=$PWD
|
6
|
-
declare cache="$pwd/vendor/cache"
|
7
|
-
|
8
|
-
cleanup() {
|
9
|
-
./script/teardown
|
10
|
-
}
|
11
|
-
|
12
|
-
bundle_package() {
|
13
|
-
bundle package --all
|
14
|
-
echo ""
|
15
|
-
}
|
16
|
-
|
17
|
-
# We may need something like this in future if we use github checkouts of gems
|
18
|
-
# (see `install_hanami_frameworks()` in hanami/hanami's setup script)
|
19
|
-
#
|
20
|
-
# install_from_git_checkouts() { }
|
21
|
-
|
22
|
-
install_base_gem() {
|
23
|
-
bundle exec rake build
|
24
|
-
local pkg=`ls $pwd/pkg/*.gem | sort -r | head -1`
|
25
|
-
|
26
|
-
gem install $pkg > /dev/null
|
27
|
-
mv $pkg $cache
|
28
|
-
|
29
|
-
echo "Installed $pkg (from $(git rev-parse HEAD))"
|
30
|
-
echo ""
|
31
|
-
}
|
32
|
-
|
33
|
-
generate_index() {
|
34
|
-
pushd $cache > /dev/null
|
35
|
-
gem generate_index
|
36
|
-
popd > /dev/null
|
37
|
-
echo ""
|
38
|
-
}
|
39
|
-
|
40
|
-
main() {
|
41
|
-
cleanup &&
|
42
|
-
bundle_package &&
|
43
|
-
install_base_gem &&
|
44
|
-
generate_index
|
45
|
-
}
|
46
|
-
|
47
|
-
main
|
data/script/teardown
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
set -euo pipefail
|
3
|
-
IFS=$'\n\t'
|
4
|
-
|
5
|
-
remove_bundler_cache() {
|
6
|
-
local pwd=$PWD
|
7
|
-
local cache="$pwd/vendor/cache"
|
8
|
-
|
9
|
-
rm -rf $cache
|
10
|
-
}
|
11
|
-
|
12
|
-
# We may need something like this in future if we use github checkouts of gems
|
13
|
-
# (see `uninstall_hanami_gems()` in hanami/hanami's teardown script)
|
14
|
-
#
|
15
|
-
# uninstall_gems_from_checkouts() { }
|
16
|
-
|
17
|
-
bundle_install() {
|
18
|
-
bundle install > /dev/null
|
19
|
-
}
|
20
|
-
|
21
|
-
advertise_start() {
|
22
|
-
echo -en "Cleaning up.."
|
23
|
-
}
|
24
|
-
|
25
|
-
advertise_end() {
|
26
|
-
echo " done"
|
27
|
-
}
|
28
|
-
|
29
|
-
main() {
|
30
|
-
local ci=${CI:-false}
|
31
|
-
|
32
|
-
if [ "$ci" = true ] ; then
|
33
|
-
echo "Running on CI, skipping cleanup"
|
34
|
-
else
|
35
|
-
advertise_start &&
|
36
|
-
remove_bundler_cache &&
|
37
|
-
bundle_install &&
|
38
|
-
advertise_end
|
39
|
-
fi
|
40
|
-
}
|
41
|
-
|
42
|
-
main
|
@@ -1,21 +0,0 @@
|
|
1
|
-
RSpec.describe "new app", type: :cli do
|
2
|
-
describe "umbrella project" do
|
3
|
-
it "boots and displays a welcome page" do
|
4
|
-
with_project do
|
5
|
-
run_app do |app|
|
6
|
-
expect(app.get("/")).to eq "<html><body><h1>Welcome to dry-web-roda!</h1></body></html>"
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
describe "flat project" do
|
13
|
-
it "boots and displays a welcome page" do
|
14
|
-
with_project arch: "flat" do
|
15
|
-
run_app do |app|
|
16
|
-
expect(app.get("/")).to eq "<html><body><h1>Welcome to dry-web-roda!</h1></body></html>"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|