safer_rails_console 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60c8081453e2c1e79dac6dd7c34a566990041483
4
- data.tar.gz: c453c7ff11d75ab9a8f23b46cb49760ea1bc7cdb
3
+ metadata.gz: e22a55eb2977ecd729a7839b196333e48099183b
4
+ data.tar.gz: 7521fecaac6acc88c8707325cd65ba441f20b4e7
5
5
  SHA512:
6
- metadata.gz: 9457c08b8a04f898095a52c7528a7e965b6acd0bce97b7e25276f5c1c14be48389402040038d1c3c01d206499db5437ed8b15d52a5a3491507fe6797433c4d6d
7
- data.tar.gz: 3e0acbfd930e450e049d037a1444cdafed20b6fdbf4a1a54b29c1e752a47ef8b3fdbe7b33910e2d2de95e7d3a09fad569b5fd853f770d012b6e103b7275d5896
6
+ metadata.gz: ee7b35dda3fa5ca743625ffba0649e99996fef4f1b30d57c81071830799ee1ee3572a387e598b70d3c8cc2c3e908bfdd147ed7d6e4da7b01d170cf9c71cb034c
7
+ data.tar.gz: a3e5e78324986964cb026a7b3e25406bad453431befd662692f1f17af923c085c30d07d3039324adfaf79619089b3c65edf4991394aae2549be34ba30714e628
data/.travis.yml CHANGED
@@ -24,6 +24,5 @@ matrix:
24
24
  allow_failures:
25
25
  - gemfile: gemfiles/4.1.gemfile
26
26
  rvm: 2.4.1
27
- - gemfile: gemfiles/5.1.gemfile
28
27
 
29
28
  fast_finish: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.3](https://github.com/salsify/safer_rails_console/tree/v0.1.3) (2017-08-02)
4
+ [Full Changelog](https://github.com/salsify/safer_rails_console/compare/v0.1.2...v0.1.3)
5
+
6
+ **Fixed bugs:**
7
+
8
+ - Auto-sandboxing on environment does not work in Rails 5.1 [\#4](https://github.com/salsify/safer_rails_console/issues/4)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Default sandbox flag to nil in Rails 5.1 [\#12](https://github.com/salsify/safer_rails_console/pull/12) ([timothysu](https://github.com/timothysu))
13
+ - Resolve sqlite3 dependency warning [\#11](https://github.com/salsify/safer_rails_console/pull/11) ([timothysu](https://github.com/timothysu))
14
+
3
15
  ## [v0.1.2](https://github.com/salsify/safer_rails_console/tree/v0.1.2) (2017-07-21)
4
16
  [Full Changelog](https://github.com/salsify/safer_rails_console/compare/v0.1.1...v0.1.2)
5
17
 
@@ -76,6 +76,14 @@ if SaferRailsConsole::RailsVersion.four_one? || SaferRailsConsole::RailsVersion.
76
76
  elsif SaferRailsConsole::RailsVersion.five_zero?
77
77
  require 'rails/commands/commands_tasks'
78
78
  ::Rails::CommandsTasks.prepend(SaferRailsConsole::Patches::Boot::SandboxFlag::Rails::CommandsTasks50)
79
+ elsif SaferRailsConsole::RailsVersion.five_one?
80
+ require 'rails/command'
81
+ require 'rails/commands/console/console_command'
82
+ # Rails 5.1 defaults `sandbox` to `false`, but we need it to NOT have a default value and be `nil` when it is not user-specified
83
+ ::Rails::Command::ConsoleCommand.class_eval do
84
+ remove_class_option :sandbox
85
+ class_option :sandbox, aliases: '-s', type: :boolean, desc: 'Explicitly enable/disable sandbox mode.'
86
+ end
79
87
  else
80
88
  unless SaferRailsConsole::RailsVersion.supported?
81
89
  raise "No boot/sandbox_flag patch for rails version '#{::Rails.version}' exists. "\
@@ -4,10 +4,6 @@ module SaferRailsConsole
4
4
  module Rails
5
5
  module Console
6
6
  def start(*args)
7
- if SaferRailsConsole::RailsVersion.five_one? && SaferRailsConsole.sandbox_environment?
8
- # TODO: Fix Rails 5.1 support
9
- end
10
-
11
7
  options = args.last
12
8
 
13
9
  options[:sandbox] = SaferRailsConsole.sandbox_environment? if options[:sandbox].nil?
@@ -1,3 +1,3 @@
1
1
  module SaferRailsConsole
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency 'rake', '~> 12.0'
38
38
  spec.add_development_dependency 'rspec', '~> 3.6'
39
39
  spec.add_development_dependency 'salsify_rubocop', '~> 0.48.0'
40
- spec.add_development_dependency 'sqlite3', '~> 1.3.13'
40
+ spec.add_development_dependency 'sqlite3', '~> 1.3'
41
41
  spec.add_development_dependency 'wwtd', '~> 1.3'
42
42
  spec.add_runtime_dependency 'rails', '>= 4.1', '< 5.2'
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safer_rails_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.3.13
117
+ version: '1.3'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 1.3.13
124
+ version: '1.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: wwtd
127
127
  requirement: !ruby/object:Gem::Requirement