memory_test_fix 1.4.1 → 1.4.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
  SHA1:
3
- metadata.gz: c53515f1c687998babc235f9965856cd3b756d9e
4
- data.tar.gz: b6fb35b74a6189c369e79d40cbc8085ee37d6bc4
3
+ metadata.gz: e61644658f57f5842df48c9474e0b14af9e44b61
4
+ data.tar.gz: f336ed05d3fb0d75a8218b88b1da6ea4be11f73a
5
5
  SHA512:
6
- metadata.gz: 382f23a1d088c5847fcfefdee17ef0b96b1f90081b5bea2b2452dd02862cdc60b7fb275db7b1b63c1dc5e1516804e548a627ae257283313b88c7924e3cd4c75a
7
- data.tar.gz: 849669d39d5b35713893ca5dbfc37e198d75a274b1d7eb1a21df885f905360785ecf426dacffa0c5be4f298c6b6fef03614ed4475279ebf07ae471f245833ab5
6
+ metadata.gz: c96f54b41ff3dfc9928d665debfad734bd7d4b1c1f50662d516e70c2998b401360188caf554fe420dc7d2495547b4dd421f33bf3215189cd1d2a0618da0b4a64
7
+ data.tar.gz: 7be2a625d38ee7baa03b293063225966ceb484dac3f3e4878d7043883c94970ff228ba6c4a093ae410df08d3bd329b6f8784ccadc6a24910d54cb2b593349cf5
data/Changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.2 / 2017-04-28
4
+
5
+ * Update dependencies to allow use with Rails 5.1
6
+
3
7
  ## 1.4.1 / 2017-03-27
4
8
 
5
9
  * Stop silent schema loading dropping STDOUT completely
data/README.md CHANGED
@@ -46,7 +46,7 @@ You can also use this with other (testing) environments, not just 'test'.
46
46
  In general, Bundler should pick a compatible version for you if you don't
47
47
  specify one in your `Gemfile`.
48
48
 
49
- That said, the latest version of this gem is compatible with Rails 5.0.
49
+ That said, the latest version of this gem is compatible with Rails 5.0 and 5.1.
50
50
  If you're still on Rails 4, you can use version 1.3.0. Unfortunately, the hard
51
51
  requirement of Ruby 2.2 or above for Rails 5 means `memory_test_fix` cannot
52
52
  support Rails 4 and 5 at the same time.
@@ -0,0 +1,10 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '~> 5.1.0'
4
+ gem 'sqlite3', platform: :ruby
5
+ gem 'activerecord-jdbcsqlite3-adapter', platform: :jruby
6
+ gem 'memory_test_fix', path: '../..'
7
+
8
+ group :development, :test do
9
+ gem 'spring'
10
+ end
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.abstract_class = true
3
+ end
@@ -0,0 +1,2 @@
1
+ class Foo < ApplicationRecord
2
+ end
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path('../spring', __FILE__)
4
+ rescue LoadError => e
5
+ raise unless e.message.include?('spring')
6
+ end
7
+ require_relative '../config/boot'
8
+ require 'rake'
9
+ Rake.application.run
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast.
4
+ # It gets overwritten when you run the `spring binstub` command.
5
+
6
+ unless defined?(Spring)
7
+ require 'rubygems'
8
+ require 'bundler'
9
+
10
+ lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
+ spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12
+ if spring
13
+ Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
+ gem 'spring', spring.version
15
+ require 'spring/binstub'
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ require_relative 'boot'
2
+
3
+ require 'rails'
4
+ require 'active_record/railtie'
5
+ require 'rails/test_unit/railtie'
6
+
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module RailsTestApp
10
+ class Application < Rails::Application
11
+ config.load_defaults 5.1
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative 'application'
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,3 @@
1
+ Rails.application.configure do
2
+ config.eager_load = false
3
+ end
@@ -0,0 +1,3 @@
1
+ Rails.application.configure do
2
+ config.eager_load = true
3
+ end
@@ -0,0 +1,5 @@
1
+ Rails.application.configure do
2
+ config.eager_load = false
3
+ config.active_support.test_order = :random
4
+ config.active_support.deprecation = :stderr
5
+ end
@@ -0,0 +1 @@
1
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,13 @@
1
+ class CreateFoos < ActiveRecord::Migration[5.1]
2
+ def self.up
3
+ create_table :foos do |t|
4
+ t.string :name
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :foos
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20140830065127) do
15
+
16
+ create_table "foos", force: :cascade do |t|
17
+ t.string "name"
18
+ t.datetime "created_at", null: false
19
+ t.datetime "updated_at", null: false
20
+ end
21
+
22
+ end
@@ -0,0 +1,7 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+
3
+ one:
4
+ name: Foo one
5
+
6
+ two:
7
+ name: Foo two
@@ -0,0 +1,9 @@
1
+ require File.expand_path('../../config/environment', __FILE__)
2
+ require 'rails/test_help'
3
+
4
+ class ActiveSupport::TestCase
5
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
6
+ fixtures :all
7
+
8
+ # Add more helper methods to be used by all tests here...
9
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class FooTest < ActiveSupport::TestCase
4
+ test "Foos have names" do
5
+ assert_equal 'Foo one', foos(:one).name
6
+ end
7
+
8
+ test "Foos can be stored" do
9
+ foo = Foo.new(name: 'A third')
10
+ foo.save!
11
+ assert_equal 'A third', Foo.find(foo.id).name
12
+ end
13
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "memory_test_fix"
3
- spec.version = "1.4.1"
3
+ spec.version = "1.4.2"
4
4
 
5
5
  spec.authors = ["Matijs van Zuijlen",
6
6
  "Chris Roos",
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
  spec.rdoc_options = ["--main", "README.md"]
30
30
  spec.extra_rdoc_files = ["README.md"]
31
31
 
32
- spec.add_runtime_dependency("railties", "~> 5.0.0")
33
- spec.add_runtime_dependency("activerecord", "~> 5.0.0")
32
+ spec.add_runtime_dependency("railties", "~> 5.0")
33
+ spec.add_runtime_dependency("activerecord", "~> 5.0")
34
34
  spec.add_development_dependency("rake", "~> 12.0")
35
35
  spec.add_development_dependency("minitest", "~> 5.2")
36
36
  spec.add_development_dependency("rspec", "~> 3.1")
@@ -59,6 +59,7 @@ end
59
59
 
60
60
  VERSIONS = [
61
61
  ["Rails 5.0", 'rails50_app'],
62
+ ["Rails 5.1", 'rails51_app'],
62
63
  ]
63
64
 
64
65
  VERSIONS.each do |label, appdir|
@@ -72,7 +73,7 @@ VERSIONS.each do |label, appdir|
72
73
  create_db_config_without_migrations
73
74
  out = run_tests
74
75
  out.must_match(/Creating sqlite :memory: database/)
75
- out.must_match(/initialize_schema_migrations_table/)
76
+ out.wont_match(/migrating/)
76
77
  end
77
78
  end
78
79
 
@@ -81,7 +82,7 @@ VERSIONS.each do |label, appdir|
81
82
  create_db_config_with_migrations
82
83
  out = run_tests
83
84
  out.must_match(/Creating sqlite :memory: database/)
84
- out.wont_match(/initialize_schema_migrations_table/)
85
+ out.must_match(/migrating/)
85
86
  end
86
87
  end
87
88
 
@@ -93,7 +94,7 @@ VERSIONS.each do |label, appdir|
93
94
  create_db_config_without_migrations
94
95
  out = run_tests command_array
95
96
  out.must_match(/Creating sqlite :memory: database/)
96
- out.must_match(/initialize_schema_migrations_table/)
97
+ out.wont_match(/migrating/)
97
98
  end
98
99
  end
99
100
 
@@ -103,7 +104,7 @@ VERSIONS.each do |label, appdir|
103
104
  create_db_config_with_migrations
104
105
  out = run_tests command_array
105
106
  out.must_match(/Creating sqlite :memory: database/)
106
- out.wont_match(/initialize_schema_migrations_table/)
107
+ out.must_match(/migrating/)
107
108
  end
108
109
  end
109
110
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memory_test_fix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-03-27 00:00:00.000000000 Z
17
+ date: 2017-04-28 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: railties
@@ -22,28 +22,28 @@ dependencies:
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 5.0.0
25
+ version: '5.0'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: 5.0.0
32
+ version: '5.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activerecord
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 5.0.0
39
+ version: '5.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: 5.0.0
46
+ version: '5.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -117,6 +117,24 @@ files:
117
117
  - fixtures/rails50_app/test/fixtures/foos.yml
118
118
  - fixtures/rails50_app/test/test_helper.rb
119
119
  - fixtures/rails50_app/test/unit/foo_test.rb
120
+ - fixtures/rails51_app/Gemfile
121
+ - fixtures/rails51_app/Rakefile
122
+ - fixtures/rails51_app/app/models/application_record.rb
123
+ - fixtures/rails51_app/app/models/foo.rb
124
+ - fixtures/rails51_app/bin/rake
125
+ - fixtures/rails51_app/bin/spring
126
+ - fixtures/rails51_app/config/application.rb
127
+ - fixtures/rails51_app/config/boot.rb
128
+ - fixtures/rails51_app/config/environment.rb
129
+ - fixtures/rails51_app/config/environments/development.rb
130
+ - fixtures/rails51_app/config/environments/production.rb
131
+ - fixtures/rails51_app/config/environments/test.rb
132
+ - fixtures/rails51_app/config/initializers/filter_parameter_logging.rb
133
+ - fixtures/rails51_app/db/migrate/20140830065127_create_foos.rb
134
+ - fixtures/rails51_app/db/schema.rb
135
+ - fixtures/rails51_app/test/fixtures/foos.yml
136
+ - fixtures/rails51_app/test/test_helper.rb
137
+ - fixtures/rails51_app/test/unit/foo_test.rb
120
138
  - lib/memory_test_fix.rb
121
139
  - lib/memory_test_fix/railtie.rb
122
140
  - lib/memory_test_fix/schema_file_loader.rb