archer-rails 0.4.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/archer/coder.rb +14 -0
- data/lib/archer/history.rb +6 -0
- data/lib/archer/version.rb +1 -1
- data/lib/archer.rb +9 -2
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfa9d6ae65482f9657b535e1ca99438e16406e18558d73697b5575253276cab1
|
4
|
+
data.tar.gz: '0937dacd28a350d8915e03aac407b0478e174e760eea1c00f721da8e30b96a7e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08fe1b21ec6ae0fe7754b133080aba32c08fde40ad1db4915a8154527191b78353a43c6dacccfc7ce22360520bf90f8b4440ddd0c7672a2dc9d488f35bd3f0a9'
|
7
|
+
data.tar.gz: cece8d087aee4bfda33d3fb36984fa3b5f55cd2995c60c7fa5ad3c32a2c10d398274263ac00d4ad72a30006bf4e4234dca0207e648bf89b53bed4a0c08beabd9
|
data/CHANGELOG.md
CHANGED
data/lib/archer/coder.rb
ADDED
data/lib/archer/history.rb
CHANGED
data/lib/archer/version.rb
CHANGED
data/lib/archer.rb
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
# dependencies
|
2
2
|
require "active_support/core_ext/module/attribute_accessors"
|
3
3
|
|
4
|
+
# stdlib
|
5
|
+
require "json"
|
6
|
+
|
4
7
|
# modules
|
8
|
+
require_relative "archer/coder"
|
5
9
|
require_relative "archer/engine" if defined?(Rails)
|
6
10
|
require_relative "archer/irb"
|
7
11
|
require_relative "archer/version"
|
@@ -35,12 +39,15 @@ module Archer
|
|
35
39
|
end
|
36
40
|
|
37
41
|
if history
|
38
|
-
commands = history.commands
|
42
|
+
commands = history.commands
|
39
43
|
history_object.clear
|
40
44
|
history_object.push(*commands)
|
41
45
|
end
|
42
46
|
|
43
47
|
IRB.conf[:AT_EXIT].push(proc { Archer.save if Archer.save_session })
|
48
|
+
rescue
|
49
|
+
# never prevent console from booting
|
50
|
+
warn "[archer] Error loading history"
|
44
51
|
end
|
45
52
|
|
46
53
|
def save
|
@@ -48,7 +55,7 @@ module Archer
|
|
48
55
|
|
49
56
|
quietly do
|
50
57
|
history = Archer::History.where(user: user).first_or_initialize
|
51
|
-
history.commands = history_object.to_a.last(limit)
|
58
|
+
history.commands = history_object.to_a.last(limit)
|
52
59
|
history.save!
|
53
60
|
end
|
54
61
|
rescue ActiveRecord::StatementInvalid
|
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6'
|
19
|
+
version: '6.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '6'
|
26
|
+
version: '6.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '6'
|
33
|
+
version: '6.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '6'
|
40
|
+
version: '6.1'
|
41
41
|
description:
|
42
42
|
email: andrew@ankane.org
|
43
43
|
executables: []
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- README.md
|
50
50
|
- lib/archer-rails.rb
|
51
51
|
- lib/archer.rb
|
52
|
+
- lib/archer/coder.rb
|
52
53
|
- lib/archer/engine.rb
|
53
54
|
- lib/archer/history.rb
|
54
55
|
- lib/archer/irb.rb
|
@@ -67,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
68
|
requirements:
|
68
69
|
- - ">="
|
69
70
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
71
|
+
version: '3'
|
71
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
74
|
- - ">="
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: '0'
|
76
77
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.5.3
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: Rails console history for Heroku, Docker, and more
|