tiddle 1.5.0 → 1.6.0

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: 3bd6e3feb1ccba22684e65085d74f245e894178246b8535c4ccc4d885984b154
4
- data.tar.gz: c12348cf95c0731af63b99b8804e825652791e7c166d35d8f539a172fbb78601
3
+ metadata.gz: ceda852fb296447c9da00e1f7cafabbfe6eefa599f457bcf1885aa937ba549db
4
+ data.tar.gz: 4d0133d03bd53b4e75595a26ebb6ca115cb9ab6858f3a557eb38fb70dddf01c1
5
5
  SHA512:
6
- metadata.gz: c8e9eaf42c24032583f36906d73950ebaab11252193629f5b82045a8d81f51b39ca98beefb58ccec234499458407f4cdf0406902a166a5232ff713678d704207
7
- data.tar.gz: d80bf9abe5d72446839eaab8f7dcb6d5c6521f8c15f0d646c564b8bb635c0d3475cf177cfbc917aab7a68b469613b3722657085a2a8599ffc5a394f087f0168e
6
+ metadata.gz: 97f53dad24042c517c85445a98e26206995d0242e7d80f42bfd1a49dd6cc40e8f55cfcfbfb9e704aed8992b3872897f8b39b5bb8d4b145e758536bc2ce1d7712
7
+ data.tar.gz: ebdda46f4045e4aeb26ea535b233b3b75b6c434b7a2062fdc5f2342b0e529189c0f413c9d7d1e94693774efb4d95617b2f2b0082af038f1dd9ddcf8d483e28e4
@@ -0,0 +1,47 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ gemfile:
15
+ - rails5.2
16
+ - rails6.0
17
+ - rails6.1
18
+ ruby:
19
+ - 2.5
20
+ - 2.6
21
+ - 2.7
22
+ - 3.0
23
+ backend:
24
+ - active_record
25
+ - mongoid
26
+ exclude:
27
+ - gemfile: rails5.2
28
+ ruby: 3.0
29
+ name: ${{ matrix.gemfile }}, ruby ${{ matrix.ruby }}, ${{ matrix.backend }}
30
+ runs-on: ubuntu-latest
31
+ env:
32
+ BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
33
+ BACKEND: ${{ matrix.backend }}
34
+
35
+ steps:
36
+ - uses: actions/checkout@v2
37
+ - name: Set up Ruby
38
+ uses: ruby/setup-ruby@v1
39
+ with:
40
+ bundler-cache: true
41
+ ruby-version: ${{ matrix.ruby }}
42
+ - name: Start MongoDB
43
+ uses: supercharge/mongodb-github-action@1.3.0
44
+ if: ${{ matrix.backend == 'mongoid' }}
45
+ - name: Run tests
46
+ run: |
47
+ bundle exec rake spec
data/.rubocop.yml CHANGED
@@ -1,11 +1,13 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.5
3
3
  Include:
4
- - 'lib'
5
- - 'spec'
4
+ - 'lib/**/*.rb'
5
+ - 'spec/**/*.rb'
6
6
  Exclude:
7
7
  - 'spec/rails_app/**/*'
8
8
  - 'spec/spec_helper.rb'
9
+ - 'vendor/bundle/**/*'
10
+ SuggestExtensions: false
9
11
  Style/StringLiterals:
10
12
  Enabled: false
11
13
  Style/Documentation:
@@ -14,17 +16,73 @@ Style/FrozenStringLiteralComment:
14
16
  Enabled: false
15
17
  Style/SignalException:
16
18
  Enabled: false
17
- Metrics/LineLength:
19
+ Layout/LineLength:
18
20
  Max: 100
19
21
  Gemspec/OrderedDependencies:
20
22
  Enabled: false
21
- Naming/FileName:
22
- Exclude:
23
- - 'Rakefile'
24
- - 'Gemfile'
25
- - 'Appraisals'
26
23
  Metrics/BlockLength:
27
24
  Exclude:
28
25
  - 'spec/**/*'
29
26
  Metrics/MethodLength:
30
27
  Max: 15
28
+
29
+ Gemspec/DateAssignment:
30
+ Enabled: true
31
+ Layout/SpaceBeforeBrackets:
32
+ Enabled: true
33
+ Lint/AmbiguousAssignment:
34
+ Enabled: true
35
+ Lint/DeprecatedConstants:
36
+ Enabled: true
37
+ Lint/DuplicateBranch:
38
+ Enabled: true
39
+ Lint/DuplicateRegexpCharacterClassElement:
40
+ Enabled: true
41
+ Lint/EmptyBlock:
42
+ Enabled: true
43
+ Lint/EmptyClass:
44
+ Enabled: true
45
+ Lint/LambdaWithoutLiteralBlock:
46
+ Enabled: true
47
+ Lint/NoReturnInBeginEndBlocks:
48
+ Enabled: true
49
+ Lint/NumberedParameterAssignment:
50
+ Enabled: true
51
+ Lint/OrAssignmentToConstant:
52
+ Enabled: true
53
+ Lint/RedundantDirGlobSort:
54
+ Enabled: true
55
+ Lint/SymbolConversion:
56
+ Enabled: true
57
+ Lint/ToEnumArguments:
58
+ Enabled: true
59
+ Lint/TripleQuotes:
60
+ Enabled: true
61
+ Lint/UnexpectedBlockArity:
62
+ Enabled: true
63
+ Lint/UnmodifiedReduceAccumulator:
64
+ Enabled: true
65
+ Style/ArgumentsForwarding:
66
+ Enabled: true
67
+ Style/CollectionCompact:
68
+ Enabled: true
69
+ Style/DocumentDynamicEvalDefinition:
70
+ Enabled: true
71
+ Style/EndlessMethod:
72
+ Enabled: true
73
+ Style/HashConversion:
74
+ Enabled: true
75
+ Style/HashExcept:
76
+ Enabled: true
77
+ Style/IfWithBooleanLiteralBranches:
78
+ Enabled: true
79
+ Style/NegatedIfElseCondition:
80
+ Enabled: true
81
+ Style/NilLambda:
82
+ Enabled: true
83
+ Style/RedundantArgument:
84
+ Enabled: true
85
+ Style/StringChars:
86
+ Enabled: true
87
+ Style/SwapValues:
88
+ Enabled: true
data/Appraisals CHANGED
@@ -1,9 +1,3 @@
1
- appraise "rails4.2" do
2
- gem "rails", "~> 4.2.0"
3
- gem "mongoid", "~> 5"
4
- gem "sqlite3", "~> 1.3.13"
5
- end
6
-
7
1
  appraise "rails5.2" do
8
2
  gem "rails", "~> 5.2.1"
9
3
  gem "mongoid", "~> 6"
@@ -15,3 +9,9 @@ appraise "rails6.0" do
15
9
  gem "mongoid", "~> 7"
16
10
  gem "sqlite3"
17
11
  end
12
+
13
+ appraise "rails6.1" do
14
+ gem "rails", "~> 6.1.0"
15
+ gem "mongoid"
16
+ gem "sqlite3"
17
+ end
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### 1.6.0
2
+
3
+ Add Rails 6.1 support
4
+
5
+ Add Ruby 3.0 support
6
+
7
+ Remove Rails 4.2 support
8
+
9
+ Remove Ruby 2.4 support
10
+
11
+
1
12
  ### 1.5.0
2
13
 
3
14
  Add Rails 6 support
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem "rubocop", "~> 0.52.0"
4
-
5
3
  # Specify your gem's dependencies in tiddle.gemspec
6
4
  gemspec
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # Tiddle
2
2
 
3
- [![Build Status](https://travis-ci.org/adamniedzielski/tiddle.svg?branch=master)](https://travis-ci.org/adamniedzielski/tiddle)
4
- [![Coverage Status](https://coveralls.io/repos/adamniedzielski/tiddle/badge.svg?branch=master)](https://coveralls.io/r/adamniedzielski/tiddle?branch=master)
5
3
  [![Code Climate](https://codeclimate.com/github/adamniedzielski/tiddle/badges/gpa.svg)](https://codeclimate.com/github/adamniedzielski/tiddle)
6
4
 
7
5
  Tiddle provides Devise strategy for token authentication in API-only Ruby on Rails applications. Its main feature is **support for multiple tokens per user**.
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'appraisal'
6
6
  RSpec::Core::RakeTask.new(spec: :rubocop)
7
7
  RuboCop::RakeTask.new(:rubocop)
8
8
 
9
- if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
9
+ if !ENV["APPRAISAL_INITIALIZED"]
10
10
  task default: :appraisal
11
11
  else
12
12
  task default: :spec
@@ -2,7 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "~> 0.52.0"
6
5
  gem "rails", "~> 5.2.1"
7
6
  gem "mongoid", "~> 6"
8
7
  gem "sqlite3", "~> 1.3.13"
@@ -2,7 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rubocop", "~> 0.52.0"
6
5
  gem "rails", "~> 6.0.0"
7
6
  gem "mongoid", "~> 7"
8
7
  gem "sqlite3"
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 6.1.0"
6
+ gem "mongoid"
7
+ gem "sqlite3"
8
+
9
+ gemspec path: "../"
@@ -1,3 +1,3 @@
1
1
  module Tiddle
2
- VERSION = "1.5.0".freeze
2
+ VERSION = "1.6.0".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require File.expand_path('boot', __dir__)
2
2
 
3
3
  require "active_model/railtie"
4
4
  require "active_record/railtie"
@@ -8,7 +8,7 @@ require "action_view/railtie"
8
8
  module RailsApp
9
9
  class Application < Rails::Application
10
10
  config.eager_load = true
11
- config.root = File.expand_path('../../.', __FILE__)
11
+ config.root = File.expand_path('..', __dir__)
12
12
  config.consider_all_requests_local = true
13
13
  config.active_record.sqlite3.represent_boolean_as_integer = true if config.active_record.sqlite3
14
14
  end
@@ -1,2 +1,2 @@
1
- ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../Gemfile', __dir__)
2
2
  require 'bundler/setup'
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require File.expand_path('application', __dir__)
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,10 +1,4 @@
1
- migration_class = if Rails::VERSION::MAJOR > 4
2
- ActiveRecord::Migration[4.2]
3
- else
4
- ActiveRecord::Migration
5
- end
6
-
7
- class CreateTables < migration_class
1
+ class CreateTables < ActiveRecord::Migration[4.2]
8
2
  # rubocop:disable Metrics/AbcSize
9
3
  # rubocop:disable Metrics/MethodLength
10
4
  def change
@@ -1,4 +1,4 @@
1
- require File.expand_path('../boot', __FILE__)
1
+ require File.expand_path('boot', __dir__)
2
2
 
3
3
  require "active_model/railtie"
4
4
  require "active_job/railtie"
@@ -9,7 +9,7 @@ require "action_view/railtie"
9
9
  module RailsApp
10
10
  class Application < Rails::Application
11
11
  config.eager_load = true
12
- config.root = File.expand_path('../../.', __FILE__)
12
+ config.root = File.expand_path('..', __dir__)
13
13
  config.consider_all_requests_local = true
14
14
  end
15
15
  end
@@ -1,2 +1,2 @@
1
- ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../Gemfile', __dir__)
2
2
  require 'bundler/setup'
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require File.expand_path('application', __dir__)
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,6 @@
1
1
  require 'bundler/setup'
2
2
  require 'simplecov'
3
- require 'coveralls'
4
3
 
5
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
6
- SimpleCov::Formatter::HTMLFormatter,
7
- Coveralls::SimpleCov::Formatter
8
- ])
9
4
  SimpleCov.start do
10
5
  add_filter "/spec/"
11
6
  end
@@ -6,7 +6,7 @@ describe "Authentication using Tiddle strategy", type: :request do
6
6
  end
7
7
 
8
8
  it "allows to access endpoints which require authentication" do
9
- warningless_get(
9
+ get(
10
10
  secrets_path,
11
11
  headers: {
12
12
  "X-USER-EMAIL" => "test@example.com",
@@ -25,7 +25,7 @@ describe "Authentication using Tiddle strategy", type: :request do
25
25
 
26
26
  it "updates last_used_at field" do
27
27
  expect do
28
- warningless_get(
28
+ get(
29
29
  secrets_path,
30
30
  headers: {
31
31
  "X-USER-EMAIL" => "test@example.com",
@@ -43,7 +43,7 @@ describe "Authentication using Tiddle strategy", type: :request do
43
43
 
44
44
  it "does not update last_used_at field" do
45
45
  expect do
46
- warningless_get(
46
+ get(
47
47
  secrets_path,
48
48
  headers: {
49
49
  "X-USER-EMAIL" => "test@example.com",
@@ -57,7 +57,7 @@ describe "Authentication using Tiddle strategy", type: :request do
57
57
 
58
58
  context "when email contains uppercase letters" do
59
59
  it "converts email to lower case and authenticates user" do
60
- warningless_get(
60
+ get(
61
61
  secrets_path,
62
62
  headers: {
63
63
  "X-USER-EMAIL" => "TEST@example.com",
@@ -76,7 +76,7 @@ describe "Authentication using Tiddle strategy", type: :request do
76
76
  end
77
77
 
78
78
  it "does not allow to access endpoints which require authentication" do
79
- warningless_get(
79
+ get(
80
80
  secrets_path,
81
81
  headers: {
82
82
  "X-USER-EMAIL" => "wrong@example.com",
@@ -94,7 +94,7 @@ describe "Authentication using Tiddle strategy", type: :request do
94
94
  end
95
95
 
96
96
  it "does not allow to access endpoints which require authentication" do
97
- warningless_get(
97
+ get(
98
98
  secrets_path,
99
99
  headers: {
100
100
  "X-USER-EMAIL" => "test@example.com",
@@ -107,7 +107,7 @@ describe "Authentication using Tiddle strategy", type: :request do
107
107
 
108
108
  context "when no headers are passed" do
109
109
  it "does not allow to access endpoints which require authentication" do
110
- warningless_get secrets_path, headers: {}
110
+ get secrets_path, headers: {}
111
111
  expect(response.status).to eq 401
112
112
  end
113
113
  end
@@ -119,7 +119,7 @@ describe "Authentication using Tiddle strategy", type: :request do
119
119
  end
120
120
 
121
121
  it "allows to access endpoints which require authentication" do
122
- warningless_get(
122
+ get(
123
123
  long_secrets_path,
124
124
  headers: {
125
125
  "X-ADMIN-USER-EMAIL" => "test@example.com",
@@ -152,7 +152,7 @@ describe "Authentication using Tiddle strategy", type: :request do
152
152
 
153
153
  it "allows to access endpoints which require authentication with valid \
154
154
  nick name and token" do
155
- warningless_get(
155
+ get(
156
156
  secrets_path,
157
157
  headers: { "X-USER-NICK-NAME" => "test", "X-USER-TOKEN" => @token }
158
158
  )
@@ -168,7 +168,7 @@ describe "Authentication using Tiddle strategy", type: :request do
168
168
 
169
169
  describe "token is not expired" do
170
170
  it "does allow to access endpoints which require authentication" do
171
- warningless_get(
171
+ get(
172
172
  secrets_path,
173
173
  headers: {
174
174
  "X-USER-EMAIL" => "test@example.com",
@@ -181,12 +181,12 @@ describe "Authentication using Tiddle strategy", type: :request do
181
181
 
182
182
  describe "token is expired" do
183
183
  before do
184
- token = @user.authentication_tokens.sort_by(&:id).last
184
+ token = @user.authentication_tokens.max_by(&:id)
185
185
  token.update_attribute(:last_used_at, 1.month.ago)
186
186
  end
187
187
 
188
188
  it "does not allow to access endpoints which require authentication" do
189
- warningless_get(
189
+ get(
190
190
  secrets_path,
191
191
  headers: {
192
192
  "X-USER-EMAIL" => "test@example.com",
@@ -23,18 +23,14 @@ module Backend
23
23
  # Do initial migration
24
24
  path = File.expand_path("../rails_app_active_record/db/migrate/", File.dirname(__FILE__))
25
25
 
26
- # rubocop:disable Performance/RegexpMatch
27
26
  if Gem::Requirement.new(">= 6.0.0") =~ Rails.gem_version
28
27
  ActiveRecord::MigrationContext.new(
29
28
  path,
30
29
  ActiveRecord::SchemaMigration
31
30
  ).migrate
32
- elsif Gem::Requirement.new(">= 5.2.0") =~ Rails.gem_version
33
- ActiveRecord::MigrationContext.new(path).migrate
34
31
  else
35
- ActiveRecord::Migrator.migrate(path)
32
+ ActiveRecord::MigrationContext.new(path).migrate
36
33
  end
37
- # rubocop:enable Performance/RegexpMatch
38
34
  end
39
35
  end
40
36
 
@@ -43,12 +39,11 @@ module Backend
43
39
  require 'mongoid'
44
40
  require 'devise/orm/mongoid'
45
41
  require 'rails_app_mongoid/config/environment'
46
- require 'database_cleaner'
42
+ require 'database_cleaner-mongoid'
47
43
  end
48
44
 
49
45
  def setup_database_cleaner
50
46
  DatabaseCleaner.allow_remote_database_url = true
51
- DatabaseCleaner[:mongoid].strategy = :truncation
52
47
  end
53
48
 
54
49
  def migrate!
@@ -9,7 +9,5 @@ class FakeRequest
9
9
  self.headers = headers
10
10
  end
11
11
 
12
- attr_accessor :remote_ip
13
- attr_accessor :user_agent
14
- attr_accessor :headers
12
+ attr_accessor :remote_ip, :user_agent, :headers
15
13
  end
data/tiddle.gemspec CHANGED
@@ -16,15 +16,15 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.required_ruby_version = '>= 2.4.0'
19
+ spec.required_ruby_version = '>= 2.5.0'
20
20
 
21
21
  spec.add_dependency "devise", ">= 4.0.0.rc1", "< 5"
22
- spec.add_dependency "activerecord", ">= 4.2.0"
23
- spec.add_development_dependency "rake", "~> 12.0"
22
+ spec.add_dependency "activerecord", ">= 5.2.0"
23
+ spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency "rspec-rails"
25
25
  spec.add_development_dependency "appraisal"
26
- spec.add_development_dependency "coveralls"
27
26
  spec.add_development_dependency "simplecov"
28
27
  spec.add_development_dependency "rubocop"
29
- spec.add_development_dependency "database_cleaner"
28
+ spec.add_development_dependency "database_cleaner-active_record"
29
+ spec.add_development_dependency "database_cleaner-mongoid"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Niedzielski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-18 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
@@ -36,28 +36,28 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 4.2.0
39
+ version: 5.2.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 4.2.0
46
+ version: 5.2.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '12.0'
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '12.0'
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rspec-rails
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -87,7 +87,7 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: coveralls
90
+ name: simplecov
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
@@ -101,7 +101,7 @@ dependencies:
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
- name: simplecov
104
+ name: rubocop
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
@@ -115,7 +115,7 @@ dependencies:
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
- name: rubocop
118
+ name: database_cleaner-active_record
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - ">="
@@ -129,7 +129,7 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
- name: database_cleaner
132
+ name: database_cleaner-mongoid
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
@@ -149,10 +149,10 @@ executables: []
149
149
  extensions: []
150
150
  extra_rdoc_files: []
151
151
  files:
152
+ - ".github/workflows/ruby.yml"
152
153
  - ".gitignore"
153
154
  - ".rspec"
154
155
  - ".rubocop.yml"
155
- - ".travis.yml"
156
156
  - Appraisals
157
157
  - CHANGELOG.md
158
158
  - CONTRIBUTING.md
@@ -161,9 +161,9 @@ files:
161
161
  - README.md
162
162
  - Rakefile
163
163
  - config/locales/en.yml
164
- - gemfiles/rails4.2.gemfile
165
164
  - gemfiles/rails5.2.gemfile
166
165
  - gemfiles/rails6.0.gemfile
166
+ - gemfiles/rails6.1.gemfile
167
167
  - lib/tiddle.rb
168
168
  - lib/tiddle/model.rb
169
169
  - lib/tiddle/model_name.rb
@@ -199,7 +199,6 @@ files:
199
199
  - spec/strategy_spec.rb
200
200
  - spec/support/backend.rb
201
201
  - spec/support/fake_request.rb
202
- - spec/support/warningless_get.rb
203
202
  - spec/tiddle_spec.rb
204
203
  - tiddle.gemspec
205
204
  homepage: ''
@@ -214,7 +213,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
214
213
  requirements:
215
214
  - - ">="
216
215
  - !ruby/object:Gem::Version
217
- version: 2.4.0
216
+ version: 2.5.0
218
217
  required_rubygems_version: !ruby/object:Gem::Requirement
219
218
  requirements:
220
219
  - - ">="
@@ -254,5 +253,4 @@ test_files:
254
253
  - spec/strategy_spec.rb
255
254
  - spec/support/backend.rb
256
255
  - spec/support/fake_request.rb
257
- - spec/support/warningless_get.rb
258
256
  - spec/tiddle_spec.rb
data/.travis.yml DELETED
@@ -1,27 +0,0 @@
1
- language: ruby
2
- branches:
3
- only:
4
- - master
5
- before_install:
6
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
7
- - gem install bundler -v '< 2'
8
- services:
9
- - mongodb
10
- rvm:
11
- - "2.4.6"
12
- - "2.5.5"
13
- - "2.6.3"
14
- - "2.7.1"
15
- gemfile:
16
- - gemfiles/rails4.2.gemfile
17
- - gemfiles/rails5.2.gemfile
18
- - gemfiles/rails6.0.gemfile
19
- env:
20
- - BACKEND=mongoid
21
- - BACKEND=active_record
22
- jobs:
23
- exclude:
24
- - rvm: "2.4.6"
25
- gemfile: gemfiles/rails6.0.gemfile
26
- - rvm: "2.7.1"
27
- gemfile: gemfiles/rails4.2.gemfile
@@ -1,10 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rubocop", "~> 0.52.0"
6
- gem "rails", "~> 4.2.0"
7
- gem "mongoid", "~> 5"
8
- gem "sqlite3", "~> 1.3.13"
9
-
10
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- def warningless_get(path, headers:)
2
- # rubocop:disable Performance/RegexpMatch
3
- if Gem::Requirement.new(">= 5") =~ Rails.gem_version
4
- get path, headers: headers
5
- else
6
- get path, {}, headers
7
- end
8
- # rubocop:enable Performance/RegexpMatch
9
- end