archer-rails 0.2.2 → 0.2.3

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: e24e705b2a54aa7e5778f9815d1497079e176469388b3bd6cb9dcee865e56cf0
4
- data.tar.gz: c9bbc62ae1c5f9b64d1b0940550d4cf6eb8f0d7be688df38881f723e83545f37
3
+ metadata.gz: 19712b8bc5685ad3770bb596c00281b60ea6c394ec3a748c2874121660d1d90f
4
+ data.tar.gz: 2470e42aa3128bac2e2c59994a0aab8a8bfb04e9887bac37d951dd294e4a1004
5
5
  SHA512:
6
- metadata.gz: 04bac162f51b18677c3e16b7cb6c38af60750969e4519cf436006ba36eda926b4a9487d0c5506e3bc89e479a9682aa66c8753c02c0827a196782d34e66c0a3a1
7
- data.tar.gz: 5da4e2f34f4e18a4840da7e69ab19e11deb3bc63380cd9e5ff38a0bb5f199504ee6b15ee1ed2e26753f19726c5acb0f281d8749f5307cac1bc5304d817b87eaf
6
+ metadata.gz: 14bb6c24f59394f76688c4eb75698d6d340a600e04c44f96f5214406cc7489fba74d68c3c4d5e953774915875f535eb2cbce3453f2a664d954308c4625c1395e
7
+ data.tar.gz: 9809857aa33df6b242f104845e1eaa43185e79c28c4177ed7cc6de08750ca0e097cd44c853124b873ea7d1d65aea6b6a343c11d21dc132a8609831a53a6f0f95
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## 0.2.2 (2020-01-07)
1
+ ## 0.2.3 (2021-08-03)
2
+
3
+ - Added `save_session` option
4
+
5
+ ## 0.2.2 (2021-01-07)
2
6
 
3
7
  - Fixed issue with Reline detection
4
8
 
data/README.md CHANGED
@@ -53,14 +53,20 @@ Archer.user
53
53
 
54
54
  ## Clearing History
55
55
 
56
+ Disable saving history for the current session with:
57
+
58
+ ```ruby
59
+ Archer.save_session = false
60
+ ```
61
+
62
+ You should do this when running sensitive commands.
63
+
56
64
  Clear history for current user with:
57
65
 
58
66
  ```ruby
59
67
  Archer.clear
60
68
  ```
61
69
 
62
- You should do this after running sensitive commands.
63
-
64
70
  ## Configuration
65
71
 
66
72
  Change the number of commands to remember
data/lib/archer.rb CHANGED
@@ -15,6 +15,9 @@ module Archer
15
15
  mattr_accessor :user
16
16
  self.user = ENV["USER"]
17
17
 
18
+ mattr_accessor :save_session
19
+ self.save_session = true
20
+
18
21
  # TODO remove in 0.3.0
19
22
  mattr_accessor :history_file
20
23
 
@@ -54,6 +57,7 @@ module Archer
54
57
  end
55
58
 
56
59
  # private
60
+ # TODO use IRB.CurrentContext.io.class::HISTORY
57
61
  def self.history_object
58
62
  reline? ? Reline::HISTORY : Readline::HISTORY
59
63
  end
data/lib/archer/engine.rb CHANGED
@@ -8,7 +8,7 @@ module Archer
8
8
  ::IRB::Irb.prepend(Archer::Irb)
9
9
 
10
10
  at_exit do
11
- Archer.save
11
+ Archer.save if Archer.save_session
12
12
  end
13
13
  end
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Archer
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-07 00:00:00.000000000 Z
11
+ date: 2021-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 3.2.3
77
+ rubygems_version: 3.2.22
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Rails console history for Heroku, Docker, and more