rom-factory 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 504ab61b3360ec9a28fd62e995f5968cee1f26ac566ab8f4fa5058626f192b62
4
- data.tar.gz: 0f657fa936e822c49e6fca236b0adbac14d661ae4340dbb22c2387a65326fc6b
3
+ metadata.gz: 94cfd909ac5f05dee532d23b332e3ae3477448316d9323e2928e2d7170628843
4
+ data.tar.gz: '0319563d050c33fd3b2ed3571df3ac4dc67509372b17876ff0b7f06f6ee56c19'
5
5
  SHA512:
6
- metadata.gz: a3bccee8f544c0022d71a6b1652a86d228ff93e97708568192c6027d33bbd1c723bc0f0a303a57c3d673ae614da240c1523436247a35fc5599fecb365e02545f
7
- data.tar.gz: dced3ab7a97199b676e64d5b71aec8ffafc00ff578e3800f78200024c62b82a07f41a125c2bf37b2a4534fde5e8155e9ab84fc31e0279e50d2b3d6113a766983
6
+ metadata.gz: 978c5466c39f8bb6b2ade20ec6881d4c25242b7ac5a711810acb786f4cbd555b54df057f4828393b70084a1b0d347e18ff45775ea909a2a3c937522f2de833ea
7
+ data.tar.gz: c25f18add3a02a7d93a9e3a6b1bb8c8f6e36495e1811fc1bde187cbba3ec2e8ae041137e57df0c2228a5e6f5478caaaaa16d51e3c8acdf9f8b756123b8130ad6
@@ -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 %>
@@ -9,7 +9,7 @@ assignees: ''
9
9
 
10
10
  **Before you submit this: WE ONLY ACCEPT BUG REPORTS AND FEATURE REQUESTS**
11
11
 
12
- For more information see [our contribution guidelines](https://github.com/rom-rb/rom/blob/master/CONTRIBUTING.md)
12
+ For more information see `CONTRIBUTING.md`.
13
13
 
14
14
  **Describe the bug**
15
15
 
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: ci
3
+ 'on':
4
+ push:
5
+ paths:
6
+ - ".github/workflows/ci.yml"
7
+ - lib/**
8
+ - "*.gemspec"
9
+ - spec/**
10
+ - Rakefile
11
+ - Gemfile
12
+ - Gemfile.devtools
13
+ - ".rubocop.yml"
14
+ - project.yml
15
+ pull_request:
16
+ branches:
17
+ - master
18
+ create:
19
+ jobs:
20
+ tests:
21
+ runs-on: ubuntu-latest
22
+ strategy:
23
+ fail-fast: false
24
+ matrix:
25
+ ruby:
26
+ - '2.7'
27
+ - '2.6'
28
+ - '2.5'
29
+ - '2.4'
30
+ - jruby
31
+ include:
32
+ - ruby: '2.6'
33
+ coverage: 'true'
34
+ - ruby: '2.6'
35
+ faker: faker-2
36
+ coverage: 'true'
37
+ - ruby: jruby
38
+ database_url: jdbc:postgresql://localhost/rom_factory
39
+ faker:
40
+ - faker-1
41
+ - faker-2
42
+ env:
43
+ CLASSPATH: ''
44
+ COVERAGE: "${{matrix.coverage}}"
45
+ CODACY_RUN_LOCAL: true
46
+ CODACY_PROJECT_TOKEN: "${{secrets.CODACY_PROJECT_TOKEN}}"
47
+ FAKER: "${{matrix.faker}}"
48
+ APT_DEPS: libpq-dev libmysqlclient-dev libsqlite3-dev
49
+ steps:
50
+ - uses: actions/checkout@v1
51
+ - name: Install package dependencies
52
+ run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
53
+ - name: Set up Ruby
54
+ uses: ruby/setup-ruby@v1
55
+ with:
56
+ ruby-version: "${{matrix.ruby}}"
57
+ - name: Install latest bundler
58
+ run: |
59
+ gem install bundler --no-document
60
+ bundle config set without 'tools benchmarks docs'
61
+ - name: Bundle install
62
+ run: bundle install --jobs 4 --retry 3
63
+ - name: Run all tests
64
+ run: bundle exec rake
65
+ services:
66
+ db:
67
+ image: postgres:10.8
68
+ env:
69
+ POSTGRES_USER: runner
70
+ POSTGRES_PASSWORD: ''
71
+ POSTGRES_DB: rom_factory
72
+ ports:
73
+ - 5432:5432
74
+ options: "--health-cmd pg_isready --health-interval 10s --health-timeout 5s
75
+ --health-retries 5"
76
+ release:
77
+ runs-on: ubuntu-latest
78
+ if: contains(github.ref, 'tags') && github.event_name == 'create'
79
+ needs: tests
80
+ env:
81
+ GITHUB_LOGIN: rom-bot
82
+ GITHUB_TOKEN: "${{secrets.GH_PAT}}"
83
+ steps:
84
+ - uses: actions/checkout@v1
85
+ - name: Install package dependencies
86
+ run: "[ -e $APT_DEPS ] || sudo apt-get install -y --no-install-recommends $APT_DEPS"
87
+ - name: Set up Ruby
88
+ uses: ruby/setup-ruby@v1
89
+ with:
90
+ ruby-version: 2.6
91
+ - name: Install dependencies
92
+ run: gem install ossy --no-document
93
+ - name: Trigger release workflow
94
+ run: |
95
+ tag=$(echo $GITHUB_REF | cut -d / -f 3)
96
+ ossy gh w rom-rb/devtools release --payload "{\"tag\":\"$tag\",\"tag_creator\":\"$GITHUB_ACTOR\",\"repo\":\"$GITHUB_REPOSITORY\"}"
@@ -0,0 +1,26 @@
1
+ jobs:
2
+ tests:
3
+ services:
4
+ db:
5
+ image: postgres:10.8
6
+ env:
7
+ POSTGRES_USER: runner
8
+ POSTGRES_PASSWORD: ""
9
+ POSTGRES_DB: rom_factory
10
+ ports:
11
+ - 5432:5432
12
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
13
+ strategy:
14
+ matrix:
15
+ faker:
16
+ - faker-1
17
+ - faker-2
18
+ include:
19
+ - ruby: "2.6"
20
+ faker: faker-2
21
+ coverage: "true"
22
+ - ruby: jruby
23
+ database_url: jdbc:postgresql://localhost/rom_factory
24
+ env:
25
+ FAKER: ${{matrix.faker}}
26
+ APT_DEPS: "libpq-dev libmysqlclient-dev libsqlite3-dev"
@@ -1,6 +1,6 @@
1
1
  # this file is managed by rom-rb/devtools project
2
2
 
3
- name: docsite
3
+ name: Update docs on rom-rb.org
4
4
 
5
5
  on:
6
6
  push:
@@ -16,19 +16,47 @@ jobs:
16
16
  update-docs:
17
17
  runs-on: ubuntu-latest
18
18
  steps:
19
- - uses: actions/checkout@v1
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/*
20
24
  - name: Set up Ruby
21
25
  uses: actions/setup-ruby@v1
22
26
  with:
23
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"
24
32
  - name: Install dependencies
33
+ run: gem install ossy --no-document
34
+ - name: Update release branches
25
35
  run: |
26
- gem install bundler
27
- bundle install --jobs 4 --retry 3 --without benchmarks sql
28
- - name: Symlink ossy
29
- run: mkdir -p bin && ln -sf "$(bundle show ossy)/bin/ossy" bin/ossy
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
30
58
  - name: Trigger rom-rb.org deploy
31
59
  env:
32
60
  GITHUB_LOGIN: rom-bot
33
- GITHUB_TOKEN: ${{ secrets.GH_PAT }}
34
- run: bin/ossy github workflow rom-rb/rom-rb.org ci
61
+ GITHUB_TOKEN: ${{secrets.GH_PAT}}
62
+ run: ossy github workflow rom-rb/rom-rb.org ci
@@ -1,30 +1,53 @@
1
1
  # this file is managed by rom-rb/devtools project
2
2
 
3
- name: sync_configs
3
+ name: sync
4
4
 
5
5
  on:
6
6
  repository_dispatch:
7
+ push:
8
+ branches:
9
+ - "master"
7
10
 
8
11
  jobs:
9
- sync-configs:
12
+ main:
10
13
  runs-on: ubuntu-latest
11
- if: github.event.action == 'sync_configs'
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 }}
12
18
  steps:
13
- - uses: actions/checkout@v1
14
- - name: Update configuration files from devtools
15
- env:
16
- GITHUB_LOGIN: ${{ github.actor }}
17
- GITHUB_TOKEN: ${{ secrets.GH_PAT }}
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
18
27
  run: |
19
- git clone https://github.com/rom-rb/devtools.git tmp/devtools
20
-
21
- rsync -av tmp/devtools/shared/ .
22
-
23
28
  git config --local user.email "rom-bot@rom-rb.org"
24
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: |
25
48
  git add -A
26
- git commit -m "[devtools] config sync" || echo "nothing changed"
49
+ git commit -m "[devtools] sync" || echo "nothing to commit"
27
50
  - name: Push changes
28
- uses: ad-m/github-push-action@master
29
- with:
30
- github_token: ${{ secrets.GH_PAT }}
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,4 +1,4 @@
1
1
  --color
2
2
  --require spec_helper
3
3
  --order random
4
-
4
+ --warnings
@@ -2,88 +2,127 @@
2
2
 
3
3
  AllCops:
4
4
  TargetRubyVersion: 2.4
5
+ Exclude:
6
+ - spec/support/coverage.rb
7
+ - spec/support/warnings.rb
8
+ - Gemfile.devtools
9
+ - "*.gemspec"
5
10
 
6
- Style/EachWithObject:
11
+ Layout/SpaceInLambdaLiteral:
7
12
  Enabled: false
8
13
 
9
- Style/StringLiterals:
14
+ Layout/MultilineMethodCallIndentation:
10
15
  Enabled: true
11
- EnforcedStyle: single_quotes
16
+ EnforcedStyle: indented
12
17
 
13
- Style/Alias:
14
- Enabled: false
18
+ Layout/IndentFirstArrayElement:
19
+ EnforcedStyle: consistent
15
20
 
16
- Style/LambdaCall:
17
- Enabled: false
21
+ Layout/SpaceInsideHashLiteralBraces:
22
+ Enabled: true
23
+ EnforcedStyle: no_space
24
+ EnforcedStyleForEmptyBraces: no_space
18
25
 
19
- Style/StabbyLambdaParentheses:
20
- Enabled: false
26
+ Lint/HandleExceptions:
27
+ Exclude:
28
+ - "spec/spec_helper.rb"
21
29
 
22
- Style/FormatString:
30
+ Lint/BooleanSymbol:
23
31
  Enabled: false
24
32
 
25
- Style/Documentation:
33
+ Naming/PredicateName:
26
34
  Enabled: false
27
35
 
28
- Layout/SpaceInLambdaLiteral:
36
+ Naming/FileName:
37
+ Exclude:
38
+ - "lib/*-*.rb"
39
+
40
+ Naming/MethodName:
29
41
  Enabled: false
30
42
 
31
- Layout/MultilineMethodCallIndentation:
32
- Enabled: true
33
- EnforcedStyle: indented
43
+ Naming/MemoizedInstanceVariableName:
44
+ Enabled: false
34
45
 
35
46
  Metrics/LineLength:
36
47
  Max: 100
48
+ Exclude:
49
+ - "spec/**/*_spec.rb"
37
50
 
38
51
  Metrics/MethodLength:
39
- Max: 22
52
+ Enabled: false
40
53
 
41
54
  Metrics/ClassLength:
42
- Max: 150
43
-
44
- Metrics/AbcSize:
45
- Max: 20
55
+ Enabled: false
46
56
 
47
57
  Metrics/BlockLength:
48
58
  Enabled: false
49
59
 
60
+ Metrics/AbcSize:
61
+ Max: 25
62
+
50
63
  Metrics/CyclomaticComplexity:
51
64
  Enabled: true
52
- Max: 10
65
+ Max: 12
53
66
 
54
- Lint/BooleanSymbol:
67
+ Style/AccessModifierDeclarations:
55
68
  Enabled: false
56
69
 
57
- Style/AccessModifierDeclarations:
70
+ Style/Alias:
71
+ Enabled: true
72
+ EnforcedStyle: prefer_alias_method
73
+
74
+ Style/AsciiComments:
58
75
  Enabled: false
59
76
 
60
77
  Style/BlockDelimiters:
61
78
  Enabled: false
62
79
 
63
- Layout/IndentFirstArrayElement:
64
- EnforcedStyle: consistent
65
-
66
80
  Style/ClassAndModuleChildren:
67
81
  Exclude:
68
82
  - "spec/**/*_spec.rb"
69
83
 
70
- Lint/HandleExceptions:
71
- Exclude:
72
- - "spec/spec_helper.rb"
84
+ Style/ConditionalAssignment:
85
+ Enabled: false
73
86
 
74
- Naming/PredicateName:
87
+ Style/DateTime:
75
88
  Enabled: false
76
89
 
77
- Naming/FileName:
78
- Exclude:
79
- - "lib/rom-*.rb"
90
+ Style/Documentation:
91
+ Enabled: false
92
+
93
+ Style/EachWithObject:
94
+ Enabled: false
95
+
96
+ Style/FormatString:
97
+ Enabled: false
98
+
99
+ Style/GuardClause:
100
+ Enabled: false
101
+
102
+ Style/IfUnlessModifier:
103
+ Enabled: false
104
+
105
+ Style/LambdaCall:
106
+ Enabled: false
107
+
108
+ Style/ParallelAssignment:
109
+ Enabled: false
110
+
111
+ Style/StabbyLambdaParentheses:
112
+ Enabled: false
113
+
114
+ Style/StringLiterals:
115
+ Enabled: true
116
+ EnforcedStyle: double_quotes
117
+ ConsistentQuotesInMultiline: false
118
+
119
+ Style/StringLiteralsInInterpolation:
120
+ Enabled: true
121
+ EnforcedStyle: double_quotes
80
122
 
81
123
  Style/SymbolArray:
82
124
  Exclude:
83
125
  - "spec/**/*_spec.rb"
84
126
 
85
- Style/ConditionalAssignment:
86
- Enabled: false
87
-
88
- Naming/MethodName:
127
+ Style/TrailingUnderscoreVariable:
89
128
  Enabled: false