rom-yesql 0.2.0 → 1.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6d2f166f3d42301d471b4979669d1da6895a2cff
4
- data.tar.gz: 3aeb1b4e7a6aa628b37a67fb6c82c1b56b76281e
2
+ SHA256:
3
+ metadata.gz: f8a6d3dab4da13310d92b59073bf13b91e284fef8f4da60751aea849debe54a5
4
+ data.tar.gz: 3482cbe0f53e94a8040b3bb9f9a91137a074d58d4d304c3192e527a026bf733b
5
5
  SHA512:
6
- metadata.gz: d94b71f2804916243042a0b34236303deba1fdc6b8ff8a850572927b7953b2a84743a5d90342ced89c5a82d1731130dc5117faa797c1862ff550c9319798ffd7
7
- data.tar.gz: f9f3336ac5eda3bd80a21125c1e3a332016e8230158effdc3b3473d26eba79b2fad70d4590919d9297f8bcfd185a07e629ef1df6beacf8868d4e29ad6afe8fb2
6
+ metadata.gz: 8d25f12ef1f8538d87bad637f8fa9d64188086606140085138dacc5e84bafacd4f9e4e9c32246117c610fbb46167c033838b069963e54ff2836467d2f15bfe6a
7
+ data.tar.gz: f93b2e8e2adc49aaea229225cad6f287d456697dc28b8590428d9dd72c3174bc663b277916726528948a6e3b677067cfaef72438ba7d53660ec90fdc4633e272
@@ -0,0 +1,40 @@
1
+ <% releases.each_with_index do |r, idx| %>
2
+ ## <%= r.version %> <%= r.date %>
3
+
4
+ <% if r.summary %>
5
+ <%= r.summary %>
6
+
7
+ <% end %>
8
+
9
+ <% if r.added? %>
10
+ ### Added
11
+
12
+ <% r.added.each do |log| %>
13
+ - <%= log %>
14
+ <% end %>
15
+
16
+ <% end %>
17
+ <% if r.fixed? %>
18
+ ### Fixed
19
+
20
+ <% r.fixed.each do |log| %>
21
+ - <%= log %>
22
+ <% end %>
23
+
24
+ <% end %>
25
+ <% if r.changed? %>
26
+ ### Changed
27
+
28
+ <% r.changed.each do |log| %>
29
+ - <%= log %>
30
+ <% end %>
31
+ <% end %>
32
+ <% curr_ver = r.date ? "v#{r.version}" : 'master' %>
33
+ <% prev_rel = releases[idx + 1] %>
34
+ <% if prev_rel %>
35
+ <% ver_range = "v#{prev_rel.version}...#{curr_ver}" %>
36
+
37
+ [Compare <%=ver_range%>](https://github.com/rom-rb/<%= project.name %>/compare/<%=ver_range%>)
38
+ <% end %>
39
+
40
+ <% end %>
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: "⚠️ Please don't ask for support via issues"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: "\U0001F41B Bug report"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Before you submit this: WE ONLY ACCEPT BUG REPORTS AND FEATURE REQUESTS**
11
+
12
+ For more information see `CONTRIBUTING.md`.
13
+
14
+ **Describe the bug**
15
+
16
+ A clear and concise description of what the bug is.
17
+
18
+ **To Reproduce**
19
+
20
+ Provide detailed steps to reproduce, an executable script would be best.
21
+
22
+ **Expected behavior**
23
+
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Your environment**
27
+
28
+ - Affects my production application: **YES/NO**
29
+ - Ruby version: ...
30
+ - OS: ...
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: "\U0001F6E0 Feature request"
3
+ about: See CONTRIBUTING.md for more information
4
+ title: ''
5
+ labels: feature
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Summary of what the feature is supposed to do.
11
+
12
+ ## Examples
13
+
14
+ Code examples showing how the feature could be used.
15
+
16
+ ## Resources
17
+
18
+ Additional information, like a link to the discussion forum thread where the feature was discussed etc.
@@ -0,0 +1,82 @@
1
+ # this file is managed by rom-rb/devtools project
2
+
3
+ name: ci
4
+
5
+ "on":
6
+ push:
7
+ paths:
8
+ - ".github/workflows/ci.yml"
9
+ - "lib/**"
10
+ - "*.gemspec"
11
+ - "spec/**"
12
+ - "Rakefile"
13
+ - "Gemfile"
14
+ - "Gemfile.devtools"
15
+ - ".rubocop.yml"
16
+ - "project.yml"
17
+ pull_request:
18
+ branches:
19
+ - master
20
+ create:
21
+
22
+ jobs:
23
+ tests:
24
+ runs-on: ubuntu-latest
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ ruby:
29
+ - "2.7.0"
30
+ - "2.6"
31
+ - "2.5"
32
+ - "2.4"
33
+ - "jruby"
34
+ include:
35
+ - ruby: "2.6"
36
+ coverage: "true"
37
+ env:
38
+ COVERAGE: ${{matrix.coverage}}
39
+ COVERAGE_TOKEN: ${{secrets.CODACY_PROJECT_TOKEN}}
40
+ steps:
41
+ - uses: actions/checkout@v1
42
+ - name: Install package dependencies
43
+ run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
44
+ - name: Set up Ruby
45
+ uses: ruby/setup-ruby@v1
46
+ with:
47
+ ruby-version: ${{matrix.ruby}}
48
+ - name: Install latest bundler
49
+ run: |
50
+ gem install bundler --no-document
51
+ bundle config set without 'tools benchmarks docs'
52
+ - name: Bundle install
53
+ run: bundle install --jobs 4 --retry 3
54
+ - name: Run all tests
55
+ run: bundle exec rake
56
+ - name: Run codacy-coverage-reporter
57
+ uses: codacy/codacy-coverage-reporter-action@master
58
+ if: env.COVERAGE == 'true' && env.COVERAGE_TOKEN != ''
59
+ with:
60
+ project-token: ${{secrets.CODACY_PROJECT_TOKEN}}
61
+ coverage-reports: coverage/coverage.xml
62
+ release:
63
+ runs-on: ubuntu-latest
64
+ if: contains(github.ref, 'tags') && github.event_name == 'create'
65
+ needs: tests
66
+ env:
67
+ GITHUB_LOGIN: rom-bot
68
+ GITHUB_TOKEN: ${{secrets.GH_PAT}}
69
+ steps:
70
+ - uses: actions/checkout@v1
71
+ - name: Install package dependencies
72
+ run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
73
+ - name: Set up Ruby
74
+ uses: ruby/setup-ruby@v1
75
+ with:
76
+ ruby-version: 2.6
77
+ - name: Install dependencies
78
+ run: gem install ossy --no-document
79
+ - name: Trigger release workflow
80
+ run: |
81
+ tag=$(echo $GITHUB_REF | cut -d / -f 3)
82
+ ossy gh w rom-rb/devtools release --payload "{\"tag\":\"$tag\",\"tag_creator\":\"$GITHUB_ACTOR\",\"repo\":\"$GITHUB_REPOSITORY\"}"
@@ -0,0 +1,62 @@
1
+ # this file is managed by rom-rb/devtools project
2
+
3
+ name: docsite
4
+
5
+ on:
6
+ push:
7
+ paths:
8
+ - docsite/**
9
+ - .github/workflows/docsite.yml
10
+ branches:
11
+ - master
12
+ - release-**
13
+ tags:
14
+
15
+ jobs:
16
+ update-docs:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ with:
21
+ fetch-depth: 0
22
+ - run: |
23
+ git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
24
+ - name: Set up Ruby
25
+ uses: actions/setup-ruby@v1
26
+ with:
27
+ ruby-version: "2.6.x"
28
+ - name: Set up git user
29
+ run: |
30
+ git config --local user.email "rom-bot@rom-rb.org"
31
+ git config --local user.name "rom-bot"
32
+ - name: Install dependencies
33
+ run: gem install ossy --no-document
34
+ - name: Update release branches
35
+ run: |
36
+ branches=`git log --format=%B -n 1 $GITHUB_SHA | grep "docsite:release-" || echo "nothing"`
37
+
38
+ if [[ ! $branches -eq "nothing" ]]; then
39
+ for b in $branches
40
+ do
41
+ name=`echo $b | ruby -e 'puts gets[/:(.+)/, 1].gsub(/\s+/, "")'`
42
+
43
+ echo "merging $GITHUB_SHA to $name"
44
+
45
+ git checkout -b $name --track origin/$name
46
+
47
+ echo `git log -n 1`
48
+
49
+ git cherry-pick $GITHUB_SHA -m 1
50
+ done
51
+
52
+ git push --all "https://rom-bot:${{secrets.GH_PAT}}@github.com/$GITHUB_REPOSITORY.git"
53
+
54
+ git checkout master
55
+ else
56
+ echo "no need to update branches"
57
+ fi
58
+ - name: Trigger rom-rb.org deploy
59
+ env:
60
+ GITHUB_LOGIN: rom-bot
61
+ GITHUB_TOKEN: ${{secrets.GH_PAT}}
62
+ run: ossy github workflow rom-rb/rom-rb.org ci
@@ -0,0 +1,53 @@
1
+ # this file is managed by rom-rb/devtools project
2
+
3
+ name: sync
4
+
5
+ on:
6
+ repository_dispatch:
7
+ push:
8
+ branches:
9
+ - "master"
10
+
11
+ jobs:
12
+ main:
13
+ runs-on: ubuntu-latest
14
+ if: (github.event_name == 'repository_dispatch' && github.event.action == 'sync_configs') || github.event_name != 'repository_dispatch'
15
+ env:
16
+ GITHUB_LOGIN: rom-bot
17
+ GITHUB_TOKEN: ${{ secrets.GH_PAT }}
18
+ steps:
19
+ - name: Checkout ${{github.repository}}
20
+ uses: actions/checkout@v1
21
+ - name: Checkout devtools
22
+ uses: actions/checkout@v2
23
+ with:
24
+ repository: rom-rb/devtools
25
+ path: tmp/devtools
26
+ - name: Setup git user
27
+ run: |
28
+ git config --local user.email "rom-bot@rom-rb.org"
29
+ git config --local user.name "rom-bot"
30
+ - name: Set up Ruby
31
+ uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: 2.6
34
+ - name: Install dependencies
35
+ run: gem install ossy --no-document
36
+ - name: Compile file templates
37
+ run: tmp/devtools/bin/compile-templates
38
+ - name: Update workflow files from devtools
39
+ run: tmp/devtools/bin/sync-workflows
40
+ - name: Update configuration files from devtools
41
+ run: tmp/devtools/bin/sync-shared-files
42
+ - name: Update changelog.yml from commit
43
+ run: tmp/devtools/bin/update-changelog-from-commit $GITHUB_SHA
44
+ - name: Compile CHANGELOG.md
45
+ run: tmp/devtools/bin/compile-changelog
46
+ - name: Commit
47
+ run: |
48
+ git add -A
49
+ git commit -m "[devtools] sync" || echo "nothing to commit"
50
+ - name: Push changes
51
+ run: |
52
+ git pull --rebase origin master
53
+ git push https://rom-bot:${{secrets.GH_PAT}}@github.com/${{github.repository}}.git HEAD:master
data/.rspec CHANGED
@@ -1,2 +1,4 @@
1
1
  --color
2
+ --require spec_helper
2
3
  --order random
4
+ --warnings
@@ -1,78 +1,152 @@
1
- # Generated by `rubocop --auto-gen-config`
2
- inherit_from: .rubocop_todo.yml
1
+ # this file is managed by rom-rb/devtools project
3
2
 
4
- # Exclude temporary files
5
3
  AllCops:
4
+ TargetRubyVersion: 2.4
6
5
  Exclude:
7
- - tmp/**/*
6
+ - spec/support/coverage.rb
7
+ - spec/support/warnings.rb
8
+ - Gemfile.devtools
9
+ - "*.gemspec"
8
10
 
9
- # It’s quite readable when we know what we are doing
10
- Lint/AssignmentInCondition:
11
+ Layout/SpaceAroundMethodCallOperator:
11
12
  Enabled: false
12
13
 
13
- # No need to handle LoadError in Rakefile
14
- Lint/HandleExceptions:
14
+ Layout/SpaceInLambdaLiteral:
15
+ Enabled: false
16
+
17
+ Layout/MultilineMethodCallIndentation:
18
+ Enabled: true
19
+ EnforcedStyle: indented
20
+
21
+ Layout/FirstArrayElementIndentation:
22
+ EnforcedStyle: consistent
23
+
24
+ Layout/SpaceInsideHashLiteralBraces:
25
+ Enabled: true
26
+ EnforcedStyle: no_space
27
+ EnforcedStyleForEmptyBraces: no_space
28
+
29
+ Layout/LineLength:
30
+ Max: 100
15
31
  Exclude:
16
- - Rakefile
32
+ - "spec/**/*_spec.rb"
33
+
34
+ Lint/BooleanSymbol:
35
+ Enabled: false
17
36
 
18
- # gemspec is a special snowflake
19
- Metrics/LineLength:
37
+ Lint/RaiseException:
38
+ Enabled: false
39
+
40
+ Lint/StructNewOverride:
41
+ Enabled: false
42
+
43
+ Lint/SuppressedException:
20
44
  Exclude:
21
- - rom-yesql.gemspec
45
+ - "spec/spec_helper.rb"
22
46
 
23
- # The enforced style doesn’t match Vim’s defaults
24
- Style/AlignParameters:
47
+ Naming/PredicateName:
25
48
  Enabled: false
26
49
 
27
- # UTF-8 is perfectly fine in comments
28
- Style/AsciiComments:
50
+ Naming/FileName:
51
+ Exclude:
52
+ - "lib/*-*.rb"
53
+
54
+ Naming/MethodName:
29
55
  Enabled: false
30
56
 
31
- # Allow using braces for value-returning blocks
32
- Style/Blocks:
57
+ Naming/MemoizedInstanceVariableName:
33
58
  Enabled: false
34
59
 
35
- # Documentation checked by Inch CI
36
- Style/Documentation:
60
+ Metrics/MethodLength:
37
61
  Enabled: false
38
62
 
39
- # Early returns have their vices
40
- Style/GuardClause:
63
+ Metrics/ClassLength:
41
64
  Enabled: false
42
65
 
43
- # Need to be skipped for >-> usage
44
- Style/Lambda:
66
+ Metrics/BlockLength:
67
+ Enabled: false
68
+
69
+ Metrics/AbcSize:
70
+ Max: 25
71
+
72
+ Metrics/CyclomaticComplexity:
73
+ Enabled: true
74
+ Max: 12
75
+
76
+ Style/ExponentialNotation:
77
+ Enabled: false
78
+
79
+ Style/HashEachMethods:
80
+ Enabled: false
81
+
82
+ Style/HashTransformKeys:
45
83
  Enabled: false
46
84
 
47
- # Multiline block chains are ok
48
- Style/MultilineBlockChain:
85
+ Style/HashTransformValues:
49
86
  Enabled: false
50
87
 
51
- # Result::Success and Result::Failure use > for callbacks
52
- Style/OpMethod:
88
+ Style/AccessModifierDeclarations:
89
+ Enabled: false
90
+
91
+ Style/Alias:
92
+ Enabled: true
93
+ EnforcedStyle: prefer_alias_method
94
+
95
+ Style/AsciiComments:
96
+ Enabled: false
97
+
98
+ Style/BlockDelimiters:
99
+ Enabled: false
100
+
101
+ Style/ClassAndModuleChildren:
53
102
  Exclude:
54
- - lib/rom/command_registry.rb
103
+ - "spec/**/*_spec.rb"
104
+
105
+ Style/ConditionalAssignment:
106
+ Enabled: false
107
+
108
+ Style/DateTime:
109
+ Enabled: false
55
110
 
56
- # Even a single escaped slash can be confusing
57
- Style/RegexpLiteral:
58
- MaxSlashes: 0
111
+ Style/Documentation:
112
+ Enabled: false
59
113
 
60
- # Don’t introduce semantic fail/raise distinction
61
- Style/SignalException:
62
- EnforcedStyle: only_raise
114
+ Style/EachWithObject:
115
+ Enabled: false
63
116
 
64
- # Need to be skipped for >-> usage
65
- Style/SpaceAroundOperators:
117
+ Style/FormatString:
66
118
  Enabled: false
67
119
 
68
- # Accept both single and double quotes
69
- Style/StringLiterals:
120
+ Style/GuardClause:
121
+ Enabled: false
122
+
123
+ Style/IfUnlessModifier:
124
+ Enabled: false
125
+
126
+ Style/Lambda:
127
+ Enabled: false
128
+
129
+ Style/LambdaCall:
130
+ Enabled: false
131
+
132
+ Style/ParallelAssignment:
70
133
  Enabled: false
71
134
 
72
- # Allow def self.foo; @foo; end
73
- Style/TrivialAccessors:
135
+ Style/StabbyLambdaParentheses:
74
136
  Enabled: false
75
137
 
76
- # Allow rom-sql
77
- Style/FileName:
78
- Enabled: false
138
+ Style/StringLiterals:
139
+ Enabled: true
140
+ EnforcedStyle: double_quotes
141
+ ConsistentQuotesInMultiline: false
142
+
143
+ Style/StringLiteralsInInterpolation:
144
+ Enabled: true
145
+ EnforcedStyle: double_quotes
146
+
147
+ Style/SymbolArray:
148
+ Exclude:
149
+ - "spec/**/*_spec.rb"
150
+
151
+ Style/TrailingUnderscoreVariable:
152
+ Enabled: false