archer-rails 0.2.0 → 0.2.1

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: 7efb1ead011d342fecc5b05028013de7a07fd101bbda3610b67f11d2707b8e59
4
- data.tar.gz: 26e4472b7a6e5402a4319fd148d4b921225b19cd4d47215a1f6e45b20d1300d1
3
+ metadata.gz: 2f63684ac4ad926dd2ec18d00a3cb86cae8d38224fb4cd1e33c4dfc2cca6b21e
4
+ data.tar.gz: 11e59fd2128bf6d25ff2747d79b21d21c71ddc0ec244e04bfcab5f18ebc6bf19
5
5
  SHA512:
6
- metadata.gz: 452c0c2b502e99e1d88694751ab538cab0134193ecff8de09ae27adc130cb37ab488162d48998c4e935165cf18c9c517298c7c33a04c89c4156a5ce997ac449e
7
- data.tar.gz: 7adbb6348c77d01d5a3e9ddf5bd61ef4071e54f1a5b2018d7b877f67b04a05160025852408498a2fff6fa25d45cf4c38b4663135708fa517af9569844f9e0784
6
+ metadata.gz: 1f95c26347e4820f4ac76732a72027c0cb3c87487f0b77a4cc078958f2d4b5dcc87df1beca599a9e3fe0ac06727e39542739210d46a414e1d055d4036bbb1e23
7
+ data.tar.gz: 1073804ee08fbdba5b2041074d7dd8a410a689b641af8d70ff52464dc75d6f7392cdc70647b55a2fa7b5c32528376cc2e16bc84f9a654ba0b67581bcd2ae3a7c
@@ -1,3 +1,8 @@
1
+ ## 0.2.1 (2020-11-23)
2
+
3
+ - Fixed issue with not loading history
4
+ - Use `datetime` type in migration
5
+
1
6
  ## 0.2.0 (2020-04-09)
2
7
 
3
8
  - Added support for Reline
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018-2019 Andrew Kane
3
+ Copyright (c) 2018-2020 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -3,6 +3,7 @@ require "active_support/core_ext/module/attribute_accessors"
3
3
 
4
4
  # modules
5
5
  require "archer/engine" if defined?(Rails)
6
+ require "archer/irb"
6
7
  require "archer/version"
7
8
 
8
9
  module Archer
@@ -14,6 +15,7 @@ module Archer
14
15
  mattr_accessor :user
15
16
  self.user = ENV["USER"]
16
17
 
18
+ # TODO remove in 0.3.0
17
19
  mattr_accessor :history_file
18
20
 
19
21
  def self.clear
@@ -37,9 +39,7 @@ module Archer
37
39
 
38
40
  if history
39
41
  commands = history.commands.split("\n")
40
- # can't use reline? yet, so push to all
41
- Readline::HISTORY.push(*commands) if defined?(Readline)
42
- Reline::HISTORY.push(*commands) if defined?(Reline)
42
+ history_object.push(*commands)
43
43
  end
44
44
  end
45
45
 
@@ -1,8 +1,11 @@
1
1
  module Archer
2
2
  class Engine < Rails::Engine
3
3
  console do
4
+ # TODO remove in 0.3.0
4
5
  Archer.history_file ||= Rails.root.join("tmp", ".irb-history")
5
- Archer.start
6
+
7
+ # need IRB context to be ready before Archer.start
8
+ ::IRB::Irb.prepend(Archer::Irb)
6
9
 
7
10
  at_exit do
8
11
  Archer.save
@@ -0,0 +1,8 @@
1
+ module Archer
2
+ module Irb
3
+ def run(*)
4
+ Archer.start
5
+ super
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Archer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -3,7 +3,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version
3
3
  create_table :archer_history do |t|
4
4
  t.string :user
5
5
  t.text :commands
6
- t.timestamp :updated_at
6
+ t.datetime :updated_at
7
7
  end
8
8
 
9
9
  add_index :archer_history, :user, unique: true
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-09 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,49 +24,7 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- description:
27
+ description:
70
28
  email: andrew@chartkick.com
71
29
  executables: []
72
30
  extensions: []
@@ -79,6 +37,7 @@ files:
79
37
  - lib/archer.rb
80
38
  - lib/archer/engine.rb
81
39
  - lib/archer/history.rb
40
+ - lib/archer/irb.rb
82
41
  - lib/archer/version.rb
83
42
  - lib/generators/archer/install_generator.rb
84
43
  - lib/generators/archer/templates/migration.rb.tt
@@ -86,7 +45,7 @@ homepage: https://github.com/ankane/archer
86
45
  licenses:
87
46
  - MIT
88
47
  metadata: {}
89
- post_install_message:
48
+ post_install_message:
90
49
  rdoc_options: []
91
50
  require_paths:
92
51
  - lib
@@ -101,8 +60,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
60
  - !ruby/object:Gem::Version
102
61
  version: '0'
103
62
  requirements: []
104
- rubygems_version: 3.1.2
105
- signing_key:
63
+ rubygems_version: 3.1.4
64
+ signing_key:
106
65
  specification_version: 4
107
66
  summary: Rails console history for Heroku, Docker, and more
108
67
  test_files: []