rails_core_extensions 0.10.0 → 0.11.0.beta.11

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: 9acf16057025897f45e4db536b9f9917be25e9546b4f0edfa6d6d28e3e0d12f5
4
- data.tar.gz: 40bedbbd7708d6259e3f0cd13f27d4376bdb115d22522189826613c93be017ca
3
+ metadata.gz: 5ccb364109694e5146403ee03a9083c0702aa442e8e57a0c7530c7729f74a33b
4
+ data.tar.gz: 69b3dcaa3c1b31d2bb896d934bbd173e79f1506b1e1c590fce7a96525bd3a9f7
5
5
  SHA512:
6
- metadata.gz: 108f173b65617d5b77e2ececec934c4b661f8231f3f54f5edd0cd6a3c0b7aba18211710208eb8250f3e866b98c3ca95f7f2b6893cae36379464ca310dcfaec64
7
- data.tar.gz: 7c5a916595cedd2b934c3df22041faeb198e12a8cc33e8356799e48ecd910ad3cebd81747ad4830ec33941da7694862491a10a6e16259efd21aa6d17c5949f4a
6
+ metadata.gz: 3cbdd58723a57b2230f74ba5ec42a91256e2ab2152d30c84e271b15cab8a2e910b40adacef32ce48aca90bd372ddddd2cc9a4d0909af04b03942993f4a69af4c
7
+ data.tar.gz: c6ad9dd46a34fc8680f681fa19f8b4e412e4df4c90ff167cd126dbb8c6b89d2a4757c01ff235ceb37030ce87165485ef19252a62d649761307ad1e899fadb0b0
@@ -0,0 +1,25 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+
16
+ - name: Publish to RubyGems
17
+ run: |
18
+ mkdir -p $HOME/.gem
19
+ touch $HOME/.gem/credentials
20
+ chmod 0600 $HOME/.gem/credentials
21
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
22
+ gem build *.gemspec
23
+ gem push *.gem
24
+ env:
25
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,45 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Checkout
13
+ uses: actions/checkout@v2
14
+
15
+ - name: Generate Changelog
16
+ run: |
17
+ # Get version from github ref (remove 'refs/tags/' and prefix 'v')
18
+ version="${GITHUB_REF#refs/tags/v}"
19
+ npx changelog-parser CHANGELOG.md | jq -cr ".versions | .[] | select(.version == \"$version\") | .body" > ${{ github.workflow }}-CHANGELOG.txt
20
+
21
+ - name: Release
22
+ uses: softprops/action-gh-release@v1
23
+ with:
24
+ body_path: ${{ github.workflow }}-CHANGELOG.txt
25
+ env:
26
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
+
28
+ publish:
29
+ name: Publish
30
+ runs-on: ubuntu-latest
31
+
32
+ steps:
33
+ - uses: actions/checkout@v2
34
+ - uses: ruby/setup-ruby@v1
35
+
36
+ - name: Publish to RubyGems
37
+ run: |
38
+ mkdir -p $HOME/.gem
39
+ touch $HOME/.gem/credentials
40
+ chmod 0600 $HOME/.gem/credentials
41
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
42
+ gem build *.gemspec
43
+ gem push *.gem
44
+ env:
45
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,19 @@
1
+ name: Build
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ strategy:
6
+ fail-fast: false
7
+ matrix:
8
+ gemfile: [rails60, rails61]
9
+ ruby: ["2.6", "2.7", "3.0"]
10
+ runs-on: ubuntu-latest
11
+ env:
12
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
13
+ steps:
14
+ - uses: actions/checkout@v2
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby }}
18
+ bundler-cache: true
19
+ - run: bundle exec rake
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.0.0
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.0.beta.11
4
+
5
+ * [TT-] Switch from travis to gihthub actions
6
+ * [TT-] Add support for Rails 6.1 / Ruby 3
7
+
3
8
  ## 0.10.0
4
9
 
5
10
  * [TT-8507] Sortable will now fire callbacks to ensure we audit these changes
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source 'https://rubygems.org'
2
2
  gemspec :path => '../'
3
3
 
4
4
  group :development, :test do
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+ gemspec :path => '../'
3
+
4
+ group :development, :test do
5
+ gem 'activerecord', '~> 6.1'
6
+ end
@@ -70,7 +70,7 @@ module ActiveRecordExtensions
70
70
  reload
71
71
  #{collection}.sort_by(&:position).each_with_index do |o, index|
72
72
  if o.position != (index + 1)
73
- o.update_attribute(:position, index + 1)
73
+ o.update(:position, index + 1)
74
74
  end
75
75
  end
76
76
  end
@@ -6,7 +6,7 @@ module RailsCoreExtensions
6
6
 
7
7
  module ClassMethods
8
8
  def translate(key, options = {})
9
- I18n.translate key, options.merge(scope: translation_key)
9
+ I18n.translate key, **options.merge(scope: translation_key)
10
10
  end
11
11
 
12
12
  def translation_key
@@ -1,3 +1,3 @@
1
1
  module RailsCoreExtensions
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0.beta.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0.beta.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-08 00:00:00.000000000 Z
12
+ date: 2021-01-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -186,6 +186,9 @@ executables: []
186
186
  extensions: []
187
187
  extra_rdoc_files: []
188
188
  files:
189
+ - ".github/workflows/gem-push.yml"
190
+ - ".github/workflows/release.yml"
191
+ - ".github/workflows/ruby.yml"
189
192
  - ".gitignore"
190
193
  - ".hound.yml"
191
194
  - ".rspec"
@@ -197,7 +200,8 @@ files:
197
200
  - LICENSE.txt
198
201
  - README.md
199
202
  - Rakefile
200
- - gemfiles/rails6.gemfile
203
+ - gemfiles/rails60.gemfile
204
+ - gemfiles/rails61.gemfile
201
205
  - lib/rails_core_extensions.rb
202
206
  - lib/rails_core_extensions/action_controller_sortable.rb
203
207
  - lib/rails_core_extensions/action_view_extensions.rb
@@ -247,11 +251,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
251
  version: '0'
248
252
  required_rubygems_version: !ruby/object:Gem::Requirement
249
253
  requirements:
250
- - - ">="
254
+ - - ">"
251
255
  - !ruby/object:Gem::Version
252
- version: '0'
256
+ version: 1.3.1
253
257
  requirements: []
254
- rubygems_version: 3.1.4
258
+ rubygems_version: 3.2.3
255
259
  signing_key:
256
260
  specification_version: 4
257
261
  summary: Set of extensions to core rails libraries.