rails_readonly_injector 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +0 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- data/.gitignore +2 -1
- data/.rubocop.yml +7 -0
- data/.travis.yml +0 -3
- data/Appraisals +4 -2
- data/CHANGELOG.md +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +4 -2
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +4 -2
- data/bin/console +4 -3
- data/cucumber_features/configuration.feature +0 -0
- data/cucumber_features/step_definitions/.gitkeep +0 -0
- data/cucumber_features/step_definitions/generic_steps.rb +5 -3
- data/cucumber_features/step_definitions/user_steps.rb +17 -15
- data/cucumber_features/support/.gitkeep +0 -0
- data/cucumber_features/user_controller.feature +0 -0
- data/cucumber_features/user_controller_readonly.feature +0 -0
- data/cucumber_features/user_model.feature +0 -0
- data/cucumber_features/user_model_readonly.feature +0 -0
- data/development_tasks/support/file_helpers.rb +57 -0
- data/development_tasks/support/gem_helpers.rb +63 -0
- data/development_tasks/tests.rake +25 -99
- data/gemfiles/.bundle/config +0 -0
- data/gemfiles/rails_3.gemfile +0 -0
- data/gemfiles/rails_4_0.gemfile +0 -0
- data/gemfiles/rails_4_1.gemfile +0 -0
- data/gemfiles/rails_4_2.gemfile +0 -0
- data/gemfiles/rails_5_0.gemfile +0 -0
- data/gemfiles/rails_5_1.gemfile +0 -0
- data/gemfiles/rails_5_2.gemfile +1 -1
- data/lib/rails_readonly_injector.rb +13 -13
- data/lib/rails_readonly_injector/configuration.rb +14 -17
- data/lib/rails_readonly_injector/version.rb +3 -1
- data/rails_readonly_injector.gemspec +15 -14
- data/rspec_specs/.gitkeep +0 -0
- data/rspec_specs/rails_readonly_injector/configuration_spec.rb +36 -32
- data/rspec_specs/rails_readonly_injector_spec.rb +4 -1
- data/rspec_specs/support/.gitkeep +0 -0
- metadata +19 -19
- data/Gemfile.lock +0 -134
- data/cucumber-rails-1.6.0.pre.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2e68a057aa63af3f0e46809dc301e596254913b0fa92729a689fdd47c91fd5bc
|
4
|
+
data.tar.gz: bee51c41e100a416caa4f752586eb1921d637a60c193843c930b7abd24e69878
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b772ac6faf91b543be796821d75a710fd3914169cee35c221a0799d3e4855c34bfdd938665c5cacde39292687599f45e5fa47b3549c655fa2893dcf9980e7e
|
7
|
+
data.tar.gz: 318587289d5e70529182438fece31a09ec5a56992676b1c67fa6381559e18b25bb9092e23d7e11c7bf2b03586021e5683ccf2e5e6a718613143b733ad155b5bd
|
data/.github/ISSUE_TEMPLATE.md
CHANGED
File without changes
|
File without changes
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -13,9 +13,6 @@ branches:
|
|
13
13
|
only:
|
14
14
|
- master
|
15
15
|
|
16
|
-
before_install:
|
17
|
-
- /bin/bash -c '[[ $BUNDLE_GEMFILE = *"rails_5_2"* ]] && { echo "Installing Cucumber-rails v1.6.0.pre..."; gem install cucumber-rails-1.6.0.pre.gem; }' || echo "Desired rails version is < 5.2. Skipping Cucumber 1.6.0.pre installation...";
|
18
|
-
|
19
16
|
before_script:
|
20
17
|
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
21
18
|
- chmod +x ./cc-test-reporter
|
data/Appraisals
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
appraise 'rails_3' do
|
2
4
|
gem 'rails', '~> 3'
|
3
5
|
gem 'cucumber-rails', '~> 1.4.5'
|
@@ -47,7 +49,7 @@ end
|
|
47
49
|
|
48
50
|
appraise 'rails_5_2' do
|
49
51
|
gem 'rails', '~> 5.2.0'
|
50
|
-
gem 'cucumber-rails', '~> 1.6.0
|
52
|
+
gem 'cucumber-rails', '~> 1.6.0', group: :test, require: false
|
51
53
|
gem 'rspec-rails', '~> 3.7.2', group: :test
|
52
54
|
gem 'database_cleaner', '~> 1.0.1'
|
53
|
-
end
|
55
|
+
end
|
data/CHANGELOG.md
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in rails_readonly_injector.gemspec
|
6
8
|
gemspec
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/Rakefile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
2
4
|
|
3
5
|
development_tasks_path = File.expand_path('../development_tasks', __FILE__)
|
4
6
|
|
5
7
|
Dir[File.join(development_tasks_path, '*.rake')].each { |rb| load rb }
|
6
8
|
|
7
|
-
task :
|
9
|
+
task default: ['dev:deploy_test_app', 'dev:run_tests']
|
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'rails_readonly_injector'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "rails_readonly_injector"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
File without changes
|
File without changes
|
@@ -1,7 +1,9 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Given('I execute:') do |code|
|
2
4
|
eval code
|
3
5
|
end
|
4
6
|
|
5
|
-
Then(
|
7
|
+
Then('The page should contain {string}') do |string|
|
6
8
|
expect(page).to have_content(string)
|
7
|
-
end
|
9
|
+
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Given('There is a user that has been persisted to the database') do
|
2
4
|
RailsReadonlyInjector.config.read_only = false
|
3
5
|
RailsReadonlyInjector.reload!
|
4
6
|
|
@@ -7,45 +9,45 @@ Given("There is a user that has been persisted to the database") do
|
|
7
9
|
expect(@user.persisted?).to eq(true)
|
8
10
|
end
|
9
11
|
|
10
|
-
Given(
|
12
|
+
Given('There is a user that has not been persisted to the database') do
|
11
13
|
User.destroy_all
|
12
|
-
|
14
|
+
|
13
15
|
@user = User.new(name: 'Bob')
|
14
16
|
end
|
15
17
|
|
16
|
-
When(
|
18
|
+
When('I update the user') do
|
17
19
|
begin
|
18
20
|
@user.update_attributes(name: 'Fred')
|
19
21
|
rescue ActiveRecord::ReadOnlyRecord
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
|
-
When(
|
25
|
+
When('I save the user') do
|
24
26
|
begin
|
25
27
|
@user.save
|
26
28
|
rescue ActiveRecord::ReadOnlyRecord
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
30
|
-
Then(
|
32
|
+
Then('the user should not be updated') do
|
31
33
|
@user.reload
|
32
|
-
|
34
|
+
|
33
35
|
expect(@user.name).to eq('Bob')
|
34
36
|
end
|
35
37
|
|
36
|
-
Then(
|
38
|
+
Then('the user should be updated') do
|
37
39
|
@user.reload
|
38
40
|
|
39
41
|
expect(@user.name).to eq('Fred')
|
40
42
|
end
|
41
43
|
|
42
|
-
Then(
|
43
|
-
|
44
|
+
Then('the user should be saved') do
|
45
|
+
@user.reload
|
44
46
|
|
45
47
|
expect(@user.persisted?).to eq(true)
|
46
48
|
end
|
47
49
|
|
48
|
-
Then(
|
50
|
+
Then('the user should not be saved') do
|
49
51
|
expect(User.all.length).to eq(0)
|
50
52
|
end
|
51
53
|
|
@@ -56,15 +58,15 @@ When("I'm using a web browser and attempt to update the user") do
|
|
56
58
|
end
|
57
59
|
|
58
60
|
When("I'm using a web browser and attempt to create a user") do
|
59
|
-
visit
|
61
|
+
visit '/users/new'
|
60
62
|
fill_in 'user[name]', with: 'Fred'
|
61
63
|
click_on 'Create User'
|
62
64
|
end
|
63
65
|
|
64
|
-
Then(
|
66
|
+
Then('the user should be created') do
|
65
67
|
expect(User.all.length).to eq(1)
|
66
68
|
end
|
67
69
|
|
68
|
-
Then(
|
70
|
+
Then('I should be able to create a user without any errors') do
|
69
71
|
expect { User.create(name: 'Bob') }.not_to raise_error
|
70
|
-
end
|
72
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
# :nodoc:
|
6
|
+
module FileHelpers
|
7
|
+
GEM_ROOT_PATH = File.expand_path('../../..', __FILE__).freeze
|
8
|
+
RAILS_APP_PATH = File.expand_path(File.join(GEM_ROOT_PATH, 'tmp', 'rails_app')).freeze
|
9
|
+
|
10
|
+
def append_to_file(path_to_file, content)
|
11
|
+
raise 'The specified path is not a file!' unless File.file? path_to_file
|
12
|
+
|
13
|
+
File.open(path_to_file, 'a') do |f|
|
14
|
+
f.write content
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def append_to_beginning_of_file(path_to_file, content)
|
19
|
+
raise 'The specified path is not a file!' unless File.file? path_to_file
|
20
|
+
|
21
|
+
existing_content_as_array = File.open(path_to_file, 'r').readlines
|
22
|
+
|
23
|
+
new_content_arr = [content] + existing_content_as_array
|
24
|
+
|
25
|
+
write_file_with_content path_to_file, new_content_arr.join("\n")
|
26
|
+
end
|
27
|
+
|
28
|
+
def write_file_with_content(path_to_file, content)
|
29
|
+
File.open(path_to_file, 'w') do |f|
|
30
|
+
f.write content
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def switch_to_gems_root_path
|
35
|
+
FileUtils.cd GEM_ROOT_PATH
|
36
|
+
end
|
37
|
+
|
38
|
+
def switch_to_rails_app_path
|
39
|
+
FileUtils.cd RAILS_APP_PATH
|
40
|
+
end
|
41
|
+
|
42
|
+
def generate_rails_application
|
43
|
+
# Remove the app, if it exists already
|
44
|
+
system("rm -rf #{RAILS_APP_PATH}")
|
45
|
+
|
46
|
+
FileUtils.mkdir_p RAILS_APP_PATH
|
47
|
+
system("bundle exec rails new #{RAILS_APP_PATH}")
|
48
|
+
end
|
49
|
+
|
50
|
+
def gems_root_path
|
51
|
+
GEM_ROOT_PATH
|
52
|
+
end
|
53
|
+
|
54
|
+
def rails_app_path
|
55
|
+
RAILS_APP_PATH
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GemHelpers
|
4
|
+
def add_gem(name, attributes = {})
|
5
|
+
line = if attributes.empty?
|
6
|
+
"gem '#{name}'"
|
7
|
+
else
|
8
|
+
"gem '#{name}', #{attributes}"
|
9
|
+
end
|
10
|
+
|
11
|
+
append_to_file('Gemfile', "#{line}\n")
|
12
|
+
end
|
13
|
+
|
14
|
+
# 'Override'/force a specific gem version, as defined in the Appraisal.
|
15
|
+
def ensure_gem_versions_defined_in_appraisal_are_used
|
16
|
+
gems_defined_in_appraisal = retrieve_gems_from_gemfile(ENV['BUNDLE_GEMFILE'])
|
17
|
+
gems_defined_in_gemfile = retrieve_gems_from_gemfile('Gemfile').collect(&:gem_name)
|
18
|
+
|
19
|
+
gems_defined_in_appraisal.reject { |l| gems_defined_in_gemfile.include? l.gem_name }.each do |gem|
|
20
|
+
add_gem gem.gem_name, gem.attributes.join(',')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def install_simplecov(coverage_dir)
|
25
|
+
append_to_beginning_of_file 'spec/spec_helper.rb', %(
|
26
|
+
require 'simplecov'
|
27
|
+
require 'rails_readonly_injector'
|
28
|
+
)
|
29
|
+
append_to_beginning_of_file 'features/support/env.rb', "require 'simplecov'"
|
30
|
+
|
31
|
+
write_file_with_content '.simplecov', %(
|
32
|
+
SimpleCov.start do
|
33
|
+
coverage_dir '#{coverage_dir}'
|
34
|
+
end
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
def unset_appraisal_environment_variables
|
39
|
+
ENV.delete('BUNDLE_GEMFILE')
|
40
|
+
ENV.delete('BUNDLE_BIN_PATH')
|
41
|
+
ENV.delete('RUBYOPT')
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def retrieve_gems_from_gemfile(file_path)
|
47
|
+
gems = []
|
48
|
+
|
49
|
+
File.open(file_path).readlines.each do |line|
|
50
|
+
matches = line.match(/^\s*gem\s+['|"]/)
|
51
|
+
|
52
|
+
next if matches.nil?
|
53
|
+
|
54
|
+
parts = line.split(',')
|
55
|
+
|
56
|
+
gem_name = parts.first.gsub(/\s*gem\s*|["|']|\n/, '')
|
57
|
+
|
58
|
+
gems << OpenStruct.new(gem_name: gem_name, attributes: parts.drop(1))
|
59
|
+
end
|
60
|
+
|
61
|
+
gems
|
62
|
+
end
|
63
|
+
end
|
@@ -1,34 +1,26 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'support/file_helpers'
|
4
|
+
require_relative 'support/gem_helpers'
|
2
5
|
|
3
6
|
namespace :dev do
|
4
|
-
|
5
|
-
|
7
|
+
include GemHelpers
|
8
|
+
include FileHelpers
|
6
9
|
|
7
|
-
desc
|
10
|
+
desc 'Deploys a test rails application.'
|
8
11
|
task :deploy_test_app do
|
9
12
|
switch_to_gems_root_path
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
puts "Creating a new rails application..."
|
15
|
-
FileUtils.mkdir_p RAILS_APP_PATH
|
16
|
-
system("bundle exec rails new #{RAILS_APP_PATH}")
|
14
|
+
puts 'Creating a new rails application...'
|
15
|
+
generate_rails_application
|
17
16
|
|
18
17
|
switch_to_rails_app_path
|
19
18
|
|
20
|
-
|
21
|
-
# so we can write them to the Gemfile rails generated.
|
22
|
-
# i.e. To 'override'/force a specific version.
|
23
|
-
gems_defined_in_appraisal = parse_gemfile(ENV['BUNDLE_GEMFILE'])
|
24
|
-
gems_defined_in_gemfile = parse_gemfile('Gemfile').collect { |l| l.gem_name }
|
25
|
-
|
26
|
-
gems_to_override = gems_defined_in_appraisal.reject { |l| gems_defined_in_gemfile.include? l.gem_name }.collect { |gem| gem.original_line_in_gemfile }
|
19
|
+
ensure_gem_versions_defined_in_appraisal_are_used
|
27
20
|
|
28
21
|
# Add required gems to the gemfile
|
29
|
-
|
30
|
-
|
31
|
-
append_to_file 'Gemfile', %{gem "rails_readonly_injector", path: "#{GEM_ROOT_PATH}"\n}
|
22
|
+
add_gem 'simplecov', require: false, group: :test
|
23
|
+
add_gem 'rails_readonly_injector', path: gems_root_path
|
32
24
|
|
33
25
|
# Make sure we don't use the gemfile from Appraisal
|
34
26
|
unset_appraisal_environment_variables
|
@@ -36,40 +28,30 @@ namespace :dev do
|
|
36
28
|
# Install gems
|
37
29
|
system("bundle install")
|
38
30
|
|
39
|
-
|
40
|
-
system(
|
31
|
+
puts 'Executing Generators...'
|
32
|
+
system('bundle exec rails generate cucumber:install')
|
33
|
+
system('bundle exec rails generate rspec:install')
|
41
34
|
|
42
35
|
# RSpec: Include all files in support/
|
43
36
|
append_to_file 'spec/spec_helper.rb', "Dir.glob('support/**/*.rb').each { |rb| require rb }"
|
44
37
|
|
45
|
-
#
|
46
|
-
append_to_beginning_of_file 'spec/spec_helper.rb', %{
|
47
|
-
require 'simplecov'
|
48
|
-
require 'rails_readonly_injector'
|
49
|
-
}
|
50
|
-
append_to_beginning_of_file 'features/support/env.rb', "require 'simplecov'"
|
38
|
+
install_simplecov("#{gems_root_path}/coverage")
|
51
39
|
|
52
|
-
write_file_with_content '.simplecov', %{
|
53
|
-
SimpleCov.start do
|
54
|
-
coverage_dir '#{GEM_ROOT_PATH}/coverage'
|
55
|
-
end
|
56
|
-
}
|
57
|
-
|
58
40
|
# Prepare database migrations, etc
|
59
|
-
system(
|
41
|
+
system('bundle exec rails generate scaffold User name:string')
|
60
42
|
|
61
|
-
system(
|
43
|
+
system('RAILS_ENV=test bundle exec rake db:migrate')
|
62
44
|
end
|
63
45
|
|
64
|
-
desc
|
65
|
-
task :
|
46
|
+
desc 'Synchronises tests from `cucumber_features` and `rspec_specs` into the temporary rails app, and runs them.'
|
47
|
+
task run_tests: %i[run_features run_specs]
|
66
48
|
|
67
|
-
desc
|
49
|
+
desc 'Synchronises features from `cucumber_features` into the temporary rails app, and runs them.'
|
68
50
|
task :run_features do
|
69
51
|
switch_to_rails_app_path
|
70
52
|
|
71
53
|
# Synchronise the cucumber features
|
72
|
-
FileUtils.cp_r File.join(
|
54
|
+
FileUtils.cp_r File.join(gems_root_path, 'cucumber_features'), 'features'
|
73
55
|
|
74
56
|
unset_appraisal_environment_variables
|
75
57
|
|
@@ -78,74 +60,18 @@ namespace :dev do
|
|
78
60
|
exit 1 unless command_executed_successfully
|
79
61
|
end
|
80
62
|
|
81
|
-
desc
|
63
|
+
desc 'Synchronise specs from `rspec_specs` into the temporary rails app, and run rspec.'
|
82
64
|
task :run_specs do
|
83
65
|
switch_to_rails_app_path
|
84
66
|
|
85
|
-
# Synchronise the
|
86
|
-
FileUtils.cp_r File.join(
|
67
|
+
# Synchronise the RSpec specs
|
68
|
+
FileUtils.cp_r File.join(gems_root_path, 'rspec_specs'), 'spec'
|
87
69
|
|
88
70
|
unset_appraisal_environment_variables
|
89
71
|
|
90
|
-
|
91
72
|
command_executed_successfully = system('bundle exec rspec')
|
92
73
|
|
93
74
|
exit 1 unless command_executed_successfully
|
94
75
|
end
|
95
76
|
|
96
|
-
def parse_gemfile(file_path)
|
97
|
-
gems = []
|
98
|
-
|
99
|
-
File.open(file_path).readlines.each do |line|
|
100
|
-
matches = line.match /^\s*gem\s+['|"]/
|
101
|
-
|
102
|
-
next if matches.nil?
|
103
|
-
|
104
|
-
parts = line.split(',')
|
105
|
-
|
106
|
-
gem_name = parts.first.gsub(/\s*gem\s*|["|']|\n/, '')
|
107
|
-
|
108
|
-
gems << OpenStruct.new({ gem_name: gem_name, original_line_in_gemfile: line })
|
109
|
-
end
|
110
|
-
|
111
|
-
gems
|
112
|
-
end
|
113
|
-
|
114
|
-
def switch_to_gems_root_path
|
115
|
-
FileUtils.cd GEM_ROOT_PATH
|
116
|
-
end
|
117
|
-
|
118
|
-
def switch_to_rails_app_path
|
119
|
-
FileUtils.cd RAILS_APP_PATH
|
120
|
-
end
|
121
|
-
|
122
|
-
def append_to_file(path_to_file, content)
|
123
|
-
raise 'The specified path is not a file!' unless File.file? path_to_file
|
124
|
-
|
125
|
-
File.open(path_to_file, 'a') do |f|
|
126
|
-
f.write content
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
def append_to_beginning_of_file(path_to_file, content)
|
131
|
-
raise 'The specified path is not a file!' unless File.file? path_to_file
|
132
|
-
|
133
|
-
existing_content_as_array = File.open(path_to_file, 'r').readlines
|
134
|
-
|
135
|
-
new_content_arr = [content] + existing_content_as_array
|
136
|
-
|
137
|
-
write_file_with_content path_to_file, new_content_arr.join("\n")
|
138
|
-
end
|
139
|
-
|
140
|
-
def write_file_with_content(path_to_file, content)
|
141
|
-
File.open(path_to_file, 'w') do |f|
|
142
|
-
f.write content
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
def unset_appraisal_environment_variables
|
147
|
-
ENV.delete('BUNDLE_GEMFILE')
|
148
|
-
ENV.delete('BUNDLE_BIN_PATH')
|
149
|
-
ENV.delete('RUBYOPT')
|
150
|
-
end
|
151
77
|
end
|
data/gemfiles/.bundle/config
CHANGED
File without changes
|
data/gemfiles/rails_3.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_4_0.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_4_1.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_4_2.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_5_0.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_5_1.gemfile
CHANGED
File without changes
|
data/gemfiles/rails_5_2.gemfile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gem "rails", "~> 5.2.0"
|
6
|
-
gem "cucumber-rails", "~> 1.6.0
|
6
|
+
gem "cucumber-rails", "~> 1.6.0", group: :test, require: false
|
7
7
|
gem "rspec-rails", "~> 3.7.2", group: :test
|
8
8
|
gem "database_cleaner", "~> 1.0.1"
|
9
9
|
|
@@ -1,13 +1,13 @@
|
|
1
|
-
|
2
|
-
require "rails_readonly_injector/configuration"
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
require 'rails_readonly_injector/version'
|
4
|
+
require 'rails_readonly_injector/configuration'
|
5
5
|
|
6
|
+
module RailsReadonlyInjector
|
6
7
|
# Applies changes defined in the `config` object
|
7
8
|
# and resets `config.dirty?` to false
|
8
9
|
def self.reload!
|
9
10
|
config.classes_to_include.each do |klass|
|
10
|
-
|
11
11
|
# Ensure we restore classes that we want to exclude, to their defaults
|
12
12
|
# in case they were previously marked as read-only.
|
13
13
|
if config.classes_to_exclude.include? klass
|
@@ -15,7 +15,7 @@ module RailsReadonlyInjector
|
|
15
15
|
next
|
16
16
|
end
|
17
17
|
|
18
|
-
if
|
18
|
+
if config.send(:read_only)
|
19
19
|
override_readonly_method(klass)
|
20
20
|
else
|
21
21
|
restore_readonly_method(klass)
|
@@ -24,17 +24,17 @@ module RailsReadonlyInjector
|
|
24
24
|
|
25
25
|
inject_error_handler_into_actioncontroller_base
|
26
26
|
|
27
|
-
|
27
|
+
config.send(:reset_dirty_status!)
|
28
28
|
end
|
29
29
|
|
30
30
|
# Returns the currently loaded `config.read_only` value.
|
31
31
|
# @return [Boolean] Whether the currently loaded config is set to read-only.
|
32
32
|
def self.in_read_only_mode?
|
33
|
-
if
|
33
|
+
if config.dirty? && config.changed_attributes.key?(:read_only)
|
34
34
|
# Return the previously stored value
|
35
|
-
|
35
|
+
config.changed_attributes[:read_only]
|
36
36
|
else
|
37
|
-
|
37
|
+
config.send(:read_only)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -42,9 +42,9 @@ module RailsReadonlyInjector
|
|
42
42
|
# and then returns the current configuration object.
|
43
43
|
# @return [Configuration] The current configuration object.
|
44
44
|
def self.config
|
45
|
-
yield
|
46
|
-
|
47
|
-
|
45
|
+
yield configuration if block_given?
|
46
|
+
|
47
|
+
configuration
|
48
48
|
end
|
49
49
|
|
50
50
|
private
|
@@ -70,7 +70,7 @@ module RailsReadonlyInjector
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def self.inject_error_handler_into_actioncontroller_base
|
73
|
-
ActionController::Base.class_eval do
|
73
|
+
ActionController::Base.class_eval do
|
74
74
|
rescue_from ActiveRecord::ReadOnlyRecord, with: :rescue_from_readonly_failure
|
75
75
|
|
76
76
|
protected
|
@@ -1,14 +1,15 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
module RailsReadonlyInjector
|
3
4
|
class Configuration
|
4
5
|
attr_reader :controller_rescue_action, :classes_to_include, :classes_to_exclude
|
5
6
|
|
6
7
|
def initialize
|
7
8
|
@read_only = false
|
8
|
-
@controller_rescue_action =
|
9
|
+
@controller_rescue_action = proc {}
|
9
10
|
@classes_to_exclude = []
|
10
11
|
|
11
|
-
@changed_attributes =
|
12
|
+
@changed_attributes = {}
|
12
13
|
end
|
13
14
|
|
14
15
|
# @return [Array<Class>] An array of classes to include
|
@@ -19,7 +20,7 @@ module RailsReadonlyInjector
|
|
19
20
|
return @classes_to_include if defined? @classes_to_include
|
20
21
|
|
21
22
|
Rails.application.eager_load!
|
22
|
-
|
23
|
+
|
23
24
|
if Rails::VERSION::STRING < '5.0.0'
|
24
25
|
ActiveRecord::Base.descendants
|
25
26
|
else
|
@@ -36,7 +37,7 @@ module RailsReadonlyInjector
|
|
36
37
|
update_instance_variable('@read_only', new_value)
|
37
38
|
end
|
38
39
|
|
39
|
-
# @param action [Lambda, Proc] The action to execute when rescuing from
|
40
|
+
# @param action [Lambda, Proc] The action to execute when rescuing from
|
40
41
|
# `ActiveRecord::RecordReadOnly` errors, within a controller
|
41
42
|
def controller_rescue_action=(action)
|
42
43
|
raise 'A lambda or proc must be specified' unless action.respond_to? :call
|
@@ -58,7 +59,7 @@ module RailsReadonlyInjector
|
|
58
59
|
# Instance methods #
|
59
60
|
#####################
|
60
61
|
|
61
|
-
# @return [Boolean] Whether the configuration
|
62
|
+
# @return [Boolean] Whether the configuration
|
62
63
|
# has changed since the config was last reloaded
|
63
64
|
def dirty?
|
64
65
|
!changed_attributes.empty?
|
@@ -66,9 +67,7 @@ module RailsReadonlyInjector
|
|
66
67
|
|
67
68
|
# @return [Hash] A hash of changed attributes
|
68
69
|
# and their previous values
|
69
|
-
|
70
|
-
@changed_attributes
|
71
|
-
end
|
70
|
+
attr_reader :changed_attributes
|
72
71
|
|
73
72
|
private
|
74
73
|
|
@@ -80,19 +79,17 @@ module RailsReadonlyInjector
|
|
80
79
|
instance_variable_set(variable_name.to_sym, new_value)
|
81
80
|
|
82
81
|
unless old_value == new_value
|
83
|
-
changed_attributes[variable_name.to_s.
|
82
|
+
changed_attributes[variable_name.to_s.delete('@').to_sym] = old_value
|
84
83
|
end
|
85
84
|
end
|
86
85
|
|
87
86
|
# Resets the changed attributes hash,
|
88
|
-
# so that `#dirty?` returns false
|
87
|
+
# so that `#dirty?` returns false
|
89
88
|
def reset_dirty_status!
|
90
|
-
|
89
|
+
@changed_attributes = {}
|
91
90
|
end
|
92
91
|
|
93
|
-
|
94
|
-
@read_only
|
95
|
-
end
|
92
|
+
attr_reader :read_only
|
96
93
|
end
|
97
94
|
private_constant :Configuration
|
98
95
|
|
@@ -108,6 +105,6 @@ module RailsReadonlyInjector
|
|
108
105
|
def self.reset_configuration!
|
109
106
|
@config = Configuration.new
|
110
107
|
|
111
|
-
|
108
|
+
reload!
|
112
109
|
end
|
113
|
-
end
|
110
|
+
end
|
@@ -1,31 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'rails_readonly_injector/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'rails_readonly_injector'
|
8
9
|
spec.version = RailsReadonlyInjector::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['Andrew Walter']
|
11
|
+
spec.email = ['andrew.walter@burnet.edu.au']
|
11
12
|
|
12
13
|
spec.summary = "Globally toggle 'read-only' mode in a Rails application, on-demand, without having to restart the server."
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
14
|
+
spec.homepage = 'https://www.github.com/xtrasimplicity/rails_readonly_injector'
|
15
|
+
spec.license = 'MIT'
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
18
|
f.match(%r{^(test|spec|features)/})
|
18
19
|
end
|
19
|
-
spec.bindir =
|
20
|
+
spec.bindir = 'exe'
|
20
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
-
spec.require_paths = [
|
22
|
+
spec.require_paths = ['lib']
|
22
23
|
|
23
|
-
spec.required_ruby_version =
|
24
|
+
spec.required_ruby_version = '>= 2.1.3'
|
25
|
+
|
26
|
+
spec.add_runtime_dependency 'rails', ['>= 3.0', '< 5.3']
|
24
27
|
|
25
|
-
spec.add_runtime_dependency "rails", [">= 3.0", "<= 5.2"]
|
26
|
-
|
27
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
28
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
29
28
|
spec.add_development_dependency 'appraisal', '~> 2.2'
|
29
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
30
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
31
|
spec.add_development_dependency 'yard', '~> 0.9.12'
|
31
32
|
end
|
data/rspec_specs/.gitkeep
CHANGED
File without changes
|
@@ -1,30 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rails_helper'
|
2
4
|
|
3
5
|
RSpec.describe RailsReadonlyInjector.config do
|
4
6
|
describe '#controller_rescue_action=' do
|
5
7
|
context 'when given a lambda expression' do
|
6
|
-
let(:
|
7
|
-
|
8
|
-
|
8
|
+
let(:exp) { -> { 'This is a test lambda!' } }
|
9
|
+
before do
|
10
|
+
RailsReadonlyInjector.config.controller_rescue_action = exp
|
11
|
+
end
|
9
12
|
|
10
13
|
subject { RailsReadonlyInjector.config.controller_rescue_action }
|
11
14
|
|
12
|
-
it { is_expected.to eq(
|
15
|
+
it { is_expected.to eq(exp) }
|
13
16
|
end
|
14
17
|
|
15
18
|
context 'when given a Proc' do
|
16
|
-
let(:
|
19
|
+
let(:passed_proc) { proc { 'This is a test Proc!' } }
|
17
20
|
|
18
|
-
before
|
21
|
+
before do
|
22
|
+
RailsReadonlyInjector.config.controller_rescue_action = passed_proc
|
23
|
+
end
|
19
24
|
|
20
25
|
subject { RailsReadonlyInjector.config.controller_rescue_action }
|
21
26
|
|
22
|
-
it { is_expected.to eq(
|
27
|
+
it { is_expected.to eq(passed_proc) }
|
23
28
|
end
|
24
29
|
|
25
30
|
context 'when an invalid value is assigned' do
|
26
31
|
it 'raises an error message' do
|
27
|
-
expect
|
32
|
+
expect do
|
33
|
+
RailsReadonlyInjector.config.controller_rescue_action = nil
|
34
|
+
end.to raise_error 'A lambda or proc must be specified'
|
28
35
|
end
|
29
36
|
end
|
30
37
|
end
|
@@ -32,7 +39,7 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
32
39
|
describe '#classes_to_include' do
|
33
40
|
context 'when not defined' do
|
34
41
|
context 'when using Rails < 5.0' do
|
35
|
-
before do
|
42
|
+
before do
|
36
43
|
stub_const('Rails::VERSION::STRING', '4.1.0')
|
37
44
|
end
|
38
45
|
|
@@ -41,17 +48,16 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
41
48
|
|
42
49
|
RailsReadonlyInjector.config.classes_to_include
|
43
50
|
end
|
44
|
-
|
45
51
|
end
|
46
52
|
|
47
53
|
context 'when using Rails >= 5.0' do
|
48
54
|
before do
|
49
55
|
stub_const('Rails::VERSION::STRING', '5.0.0')
|
50
|
-
|
56
|
+
|
51
57
|
unless defined? ApplicationRecord
|
58
|
+
# :nodoc:
|
52
59
|
class ApplicationRecord
|
53
|
-
def descendants
|
54
|
-
end
|
60
|
+
def descendants; end
|
55
61
|
end
|
56
62
|
end
|
57
63
|
end
|
@@ -61,7 +67,6 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
61
67
|
|
62
68
|
RailsReadonlyInjector.config.classes_to_include
|
63
69
|
end
|
64
|
-
|
65
70
|
end
|
66
71
|
end
|
67
72
|
end
|
@@ -82,7 +87,7 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
82
87
|
subject { RailsReadonlyInjector.config.changed_attributes }
|
83
88
|
|
84
89
|
it 'returns a hash with the attribute and its old value' do
|
85
|
-
expect(subject).to eq(
|
90
|
+
expect(subject).to eq(read_only: false)
|
86
91
|
end
|
87
92
|
end
|
88
93
|
|
@@ -111,11 +116,11 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
111
116
|
subject { RailsReadonlyInjector.config.changed_attributes }
|
112
117
|
|
113
118
|
it 'returns a hash with the attribute and its old value' do
|
114
|
-
expect(subject).to eq(
|
119
|
+
expect(subject).to eq(
|
115
120
|
read_only: false,
|
116
|
-
classes_to_include: nil,
|
121
|
+
classes_to_include: nil,
|
117
122
|
classes_to_exclude: []
|
118
|
-
|
123
|
+
)
|
119
124
|
end
|
120
125
|
end
|
121
126
|
|
@@ -136,28 +141,27 @@ RSpec.describe RailsReadonlyInjector.config do
|
|
136
141
|
end
|
137
142
|
end
|
138
143
|
|
139
|
-
|
140
144
|
describe '#dirty?' do
|
141
145
|
setup do
|
142
146
|
RailsReadonlyInjector.config { |config| config.read_only = false }
|
143
147
|
RailsReadonlyInjector.reload!
|
144
148
|
end
|
145
149
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
context 'and `reload!` is not called' do
|
150
|
-
subject { RailsReadonlyInjector.config.dirty? }
|
150
|
+
context 'when `read_only` is changed' do
|
151
|
+
before(:each) { RailsReadonlyInjector.config.read_only = true }
|
151
152
|
|
152
|
-
|
153
|
-
|
153
|
+
context 'and `reload!` is not called' do
|
154
|
+
subject { RailsReadonlyInjector.config.dirty? }
|
155
|
+
|
156
|
+
it { is_expected.to eq(true) }
|
157
|
+
end
|
154
158
|
|
155
|
-
|
156
|
-
|
157
|
-
|
159
|
+
context 'and `reload!` is called' do
|
160
|
+
before { RailsReadonlyInjector.reload! }
|
161
|
+
subject { RailsReadonlyInjector.config.dirty? }
|
158
162
|
|
159
|
-
|
163
|
+
it { is_expected.to eq(false) }
|
164
|
+
end
|
160
165
|
end
|
161
|
-
end
|
162
166
|
end
|
163
|
-
end
|
167
|
+
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rails_helper'
|
2
4
|
|
3
5
|
RSpec.describe RailsReadonlyInjector do
|
@@ -87,9 +89,10 @@ RSpec.describe RailsReadonlyInjector do
|
|
87
89
|
|
88
90
|
context 'when `config.read_only` is not changed' do
|
89
91
|
before { RailsReadonlyInjector.config.classes_to_exclude = [User] }
|
92
|
+
subject { RailsReadonlyInjector.in_read_only_mode? }
|
90
93
|
|
91
94
|
it 'returns the current value' do
|
92
|
-
expect(
|
95
|
+
expect(subject).to eq(RailsReadonlyInjector.config.send(:read_only))
|
93
96
|
end
|
94
97
|
end
|
95
98
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_readonly_injector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Walter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -17,9 +17,9 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
|
-
- - "
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '5.
|
22
|
+
version: '5.3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,51 +27,51 @@ dependencies:
|
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.0'
|
30
|
-
- - "
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '5.
|
32
|
+
version: '5.3'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: appraisal
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '2.2'
|
40
40
|
type: :development
|
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: '
|
46
|
+
version: '2.2'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '1.16'
|
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: '
|
60
|
+
version: '1.16'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '10.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '10.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: yard
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,18 +96,17 @@ files:
|
|
96
96
|
- ".github/ISSUE_TEMPLATE.md"
|
97
97
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
98
98
|
- ".gitignore"
|
99
|
+
- ".rubocop.yml"
|
99
100
|
- ".travis.yml"
|
100
101
|
- Appraisals
|
101
102
|
- CHANGELOG.md
|
102
103
|
- CODE_OF_CONDUCT.md
|
103
104
|
- Gemfile
|
104
|
-
- Gemfile.lock
|
105
105
|
- LICENSE.txt
|
106
106
|
- README.md
|
107
107
|
- Rakefile
|
108
108
|
- bin/console
|
109
109
|
- bin/setup
|
110
|
-
- cucumber-rails-1.6.0.pre.gem
|
111
110
|
- cucumber_features/configuration.feature
|
112
111
|
- cucumber_features/step_definitions/.gitkeep
|
113
112
|
- cucumber_features/step_definitions/generic_steps.rb
|
@@ -117,6 +116,8 @@ files:
|
|
117
116
|
- cucumber_features/user_controller_readonly.feature
|
118
117
|
- cucumber_features/user_model.feature
|
119
118
|
- cucumber_features/user_model_readonly.feature
|
119
|
+
- development_tasks/support/file_helpers.rb
|
120
|
+
- development_tasks/support/gem_helpers.rb
|
120
121
|
- development_tasks/tests.rake
|
121
122
|
- gemfiles/.bundle/config
|
122
123
|
- gemfiles/rails_3.gemfile
|
@@ -153,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
154
|
- !ruby/object:Gem::Version
|
154
155
|
version: '0'
|
155
156
|
requirements: []
|
156
|
-
|
157
|
-
rubygems_version: 2.6.13
|
157
|
+
rubygems_version: 3.0.3
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Globally toggle 'read-only' mode in a Rails application, on-demand, without
|
data/Gemfile.lock
DELETED
@@ -1,134 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
rails_readonly_injector (1.0.0)
|
5
|
-
rails (>= 3.0, <= 5.2)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
actioncable (5.2.0)
|
11
|
-
actionpack (= 5.2.0)
|
12
|
-
nio4r (~> 2.0)
|
13
|
-
websocket-driver (>= 0.6.1)
|
14
|
-
actionmailer (5.2.0)
|
15
|
-
actionpack (= 5.2.0)
|
16
|
-
actionview (= 5.2.0)
|
17
|
-
activejob (= 5.2.0)
|
18
|
-
mail (~> 2.5, >= 2.5.4)
|
19
|
-
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (5.2.0)
|
21
|
-
actionview (= 5.2.0)
|
22
|
-
activesupport (= 5.2.0)
|
23
|
-
rack (~> 2.0)
|
24
|
-
rack-test (>= 0.6.3)
|
25
|
-
rails-dom-testing (~> 2.0)
|
26
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
-
actionview (5.2.0)
|
28
|
-
activesupport (= 5.2.0)
|
29
|
-
builder (~> 3.1)
|
30
|
-
erubi (~> 1.4)
|
31
|
-
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
33
|
-
activejob (5.2.0)
|
34
|
-
activesupport (= 5.2.0)
|
35
|
-
globalid (>= 0.3.6)
|
36
|
-
activemodel (5.2.0)
|
37
|
-
activesupport (= 5.2.0)
|
38
|
-
activerecord (5.2.0)
|
39
|
-
activemodel (= 5.2.0)
|
40
|
-
activesupport (= 5.2.0)
|
41
|
-
arel (>= 9.0)
|
42
|
-
activestorage (5.2.0)
|
43
|
-
actionpack (= 5.2.0)
|
44
|
-
activerecord (= 5.2.0)
|
45
|
-
marcel (~> 0.3.1)
|
46
|
-
activesupport (5.2.0)
|
47
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
48
|
-
i18n (>= 0.7, < 2)
|
49
|
-
minitest (~> 5.1)
|
50
|
-
tzinfo (~> 1.1)
|
51
|
-
appraisal (2.2.0)
|
52
|
-
bundler
|
53
|
-
rake
|
54
|
-
thor (>= 0.14.0)
|
55
|
-
arel (9.0.0)
|
56
|
-
builder (3.2.3)
|
57
|
-
concurrent-ruby (1.0.5)
|
58
|
-
crass (1.0.4)
|
59
|
-
erubi (1.7.1)
|
60
|
-
globalid (0.4.1)
|
61
|
-
activesupport (>= 4.2.0)
|
62
|
-
i18n (1.0.1)
|
63
|
-
concurrent-ruby (~> 1.0)
|
64
|
-
loofah (2.2.2)
|
65
|
-
crass (~> 1.0.2)
|
66
|
-
nokogiri (>= 1.5.9)
|
67
|
-
mail (2.7.0)
|
68
|
-
mini_mime (>= 0.1.1)
|
69
|
-
marcel (0.3.2)
|
70
|
-
mimemagic (~> 0.3.2)
|
71
|
-
method_source (0.9.0)
|
72
|
-
mimemagic (0.3.2)
|
73
|
-
mini_mime (1.0.0)
|
74
|
-
mini_portile2 (2.3.0)
|
75
|
-
minitest (5.11.3)
|
76
|
-
nio4r (2.3.0)
|
77
|
-
nokogiri (1.8.2)
|
78
|
-
mini_portile2 (~> 2.3.0)
|
79
|
-
rack (2.0.4)
|
80
|
-
rack-test (1.0.0)
|
81
|
-
rack (>= 1.0, < 3)
|
82
|
-
rails (5.2.0)
|
83
|
-
actioncable (= 5.2.0)
|
84
|
-
actionmailer (= 5.2.0)
|
85
|
-
actionpack (= 5.2.0)
|
86
|
-
actionview (= 5.2.0)
|
87
|
-
activejob (= 5.2.0)
|
88
|
-
activemodel (= 5.2.0)
|
89
|
-
activerecord (= 5.2.0)
|
90
|
-
activestorage (= 5.2.0)
|
91
|
-
activesupport (= 5.2.0)
|
92
|
-
bundler (>= 1.3.0)
|
93
|
-
railties (= 5.2.0)
|
94
|
-
sprockets-rails (>= 2.0.0)
|
95
|
-
rails-dom-testing (2.0.3)
|
96
|
-
activesupport (>= 4.2.0)
|
97
|
-
nokogiri (>= 1.6)
|
98
|
-
rails-html-sanitizer (1.0.4)
|
99
|
-
loofah (~> 2.2, >= 2.2.2)
|
100
|
-
railties (5.2.0)
|
101
|
-
actionpack (= 5.2.0)
|
102
|
-
activesupport (= 5.2.0)
|
103
|
-
method_source
|
104
|
-
rake (>= 0.8.7)
|
105
|
-
thor (>= 0.18.1, < 2.0)
|
106
|
-
rake (10.5.0)
|
107
|
-
sprockets (3.7.1)
|
108
|
-
concurrent-ruby (~> 1.0)
|
109
|
-
rack (> 1, < 3)
|
110
|
-
sprockets-rails (3.2.1)
|
111
|
-
actionpack (>= 4.0)
|
112
|
-
activesupport (>= 4.0)
|
113
|
-
sprockets (>= 3.0.0)
|
114
|
-
thor (0.20.0)
|
115
|
-
thread_safe (0.3.6)
|
116
|
-
tzinfo (1.2.5)
|
117
|
-
thread_safe (~> 0.1)
|
118
|
-
websocket-driver (0.7.0)
|
119
|
-
websocket-extensions (>= 0.1.0)
|
120
|
-
websocket-extensions (0.1.3)
|
121
|
-
yard (0.9.12)
|
122
|
-
|
123
|
-
PLATFORMS
|
124
|
-
ruby
|
125
|
-
|
126
|
-
DEPENDENCIES
|
127
|
-
appraisal (~> 2.2)
|
128
|
-
bundler (~> 1.16)
|
129
|
-
rails_readonly_injector!
|
130
|
-
rake (~> 10.0)
|
131
|
-
yard (~> 0.9.12)
|
132
|
-
|
133
|
-
BUNDLED WITH
|
134
|
-
1.16.1
|
Binary file
|