jefferies_tube 1.1.1 → 1.5

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
  SHA256:
3
- metadata.gz: 06d45e26cc3c3f6db3337acf9d656e02dd4afdad972aea8f1e298482805a1520
4
- data.tar.gz: e8e8a23b284b5a03e65bc9c3a3d7df73fdee46573972353c1c34616b7d56dbd6
3
+ metadata.gz: 5d8559f8d9ea14fa4e3fadba12b86c710fa6466f69dedcb076f3baff26dfd2af
4
+ data.tar.gz: 6efef12d39e44e3dd174e3cd2ada93aeac7ec577092176cbff29034e9c92cdc0
5
5
  SHA512:
6
- metadata.gz: b485c95ad3b92bf78a32c54e1b70b3a38b09dec3d4314ba5e6b3f45e2f691dbad4df4e864ba4a880fefbe0d4229c70a5480f13fbd39727e4544353d340802932
7
- data.tar.gz: b1e7081ebbf93d900d471e9ffdc2bce83f91eb8a941430e0939586dded1095a0e128149231d51da169fa2157e9522d6fea7ce0b5d4bec0d5f14ad8f86ef093bc
6
+ metadata.gz: 927415fb43ab50e81c33fba7ffcc9d876c1c6510883beb81848f91b141992026f1279d75979dc6c5175acfc37f4b30473d83342b2dced716d4b4261c70f1fa41
7
+ data.tar.gz: 931b995f90b0c43cab247ef7346fa3c0422a9f3be9944ff611838c6dfd4ea1653584a84d8716a098d029605cccac2c7d80946e9064df9869ecda28c4601c3f18
data/CHANGELOG.md CHANGED
@@ -1,11 +1,33 @@
1
1
  # Changelog
2
2
 
3
- This is a [changelog](https://keepachangelog.com/en/0.3.0/).
3
+ This is a [changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
5
  This project attempts to follow [semantic versioning](https://semver.org/)
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ## 1.5
10
+
11
+ * enhancements
12
+ * Add rails:allthelogs capistrano command to tail all of the rails logs at once.
13
+
14
+ ## 1.4
15
+
16
+ * enhancements
17
+ * Rails 6.1 support - fix deprecations and outdated gem dependencies.
18
+
19
+ ## 1.3
20
+
21
+ * enhancements
22
+ * Remove `compass-rails` dependency.
23
+
24
+ ## 1.2
25
+
26
+ * enhancements
27
+ * Allow passing through bundler-audit ignore with `set :bundler_audit_ignore, ["CVE-1234-5678"]`
28
+
29
+ ## 1.1.1
30
+
9
31
  * enhancements
10
32
  * Add colorful IRB prompts based on Rails environment
11
33
 
data/README.md CHANGED
@@ -67,6 +67,10 @@ Open database console.
67
67
 
68
68
  Open log file. Can specify log file like so: `LOG=foobar cap beta rails:log`
69
69
 
70
+ * `cap beta rails:allthelogs`
71
+
72
+ Open the logfile for all servers (has the role :app) combined. Can specify log file like so: `LOG=foobar cap beta rails:allthelogs`
73
+
70
74
  * `cap beta db:backup`
71
75
 
72
76
  Make a database backup.
@@ -99,6 +103,15 @@ To automatically tag the code that is about to be released (lazy programmer solu
99
103
  before 'deploy', 'deploy:create_tag'
100
104
  ```
101
105
 
106
+ #### Bundler Audit
107
+
108
+ By default jefferies_tube will raise an error and stop if it detects any vulnerabilities is your installed gems. If you need to deploy anyway even with vulnerabilities you can do `I_KNOW_GEMS_ARE_INSECURE=true cap <environment> deploy`.
109
+
110
+ To ignore specific CVE's when running bundler-audit, inside `config/deploy.rb`:
111
+ ```ruby
112
+ set :bundler_audit_ignore, ["CVE-1234-5678"]
113
+ ```
114
+
102
115
  ### Enable/Disable Maintence Mode
103
116
 
104
117
  ```
@@ -170,5 +183,13 @@ end
170
183
  1. Fork it ( http://github.com/<my-github-username>/jefferies_tube/fork )
171
184
  2. Create your feature branch (`git checkout -b my-new-feature`)
172
185
  3. Commit your changes (`git commit -am 'Add some feature'`)
173
- 4. Push to the branch (`git push origin my-new-feature`)
174
- 5. Create new Pull Request
186
+ 4. Add changes to the CHANGELOG file in the 'Unreleased' section.
187
+ 5. Push to the branch (`git push origin my-new-feature`)
188
+ 6. Create new Pull Request
189
+
190
+ ### Release
191
+
192
+ - Update `lib/jefferies_tube/version.rb` with the new version number (be sure to follow
193
+ [semver](https://semver.org/)).
194
+ - Update `CHANGELOG.md` and move everything in 'Unreleased' to a new section for the new version.
195
+ - Tag the final commit in that release.
@@ -1,4 +1,4 @@
1
- @import compass/reset
1
+ @import 'meyer_reset'
2
2
 
3
3
  html
4
4
  box-sizing: border-box
@@ -0,0 +1,48 @@
1
+ /* http://meyerweb.com/eric/tools/css/reset/
2
+ v2.0 | 20110126
3
+ License: none (public domain)
4
+ */
5
+
6
+ html, body, div, span, applet, object, iframe,
7
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8
+ a, abbr, acronym, address, big, cite, code,
9
+ del, dfn, em, img, ins, kbd, q, s, samp,
10
+ small, strike, strong, sub, sup, tt, var,
11
+ b, u, i, center,
12
+ dl, dt, dd, ol, ul, li,
13
+ fieldset, form, label, legend,
14
+ table, caption, tbody, tfoot, thead, tr, th, td,
15
+ article, aside, canvas, details, embed,
16
+ figure, figcaption, footer, header, hgroup,
17
+ menu, nav, output, ruby, section, summary,
18
+ time, mark, audio, video {
19
+ margin: 0;
20
+ padding: 0;
21
+ border: 0;
22
+ font-size: 100%;
23
+ font: inherit;
24
+ vertical-align: baseline;
25
+ }
26
+ /* HTML5 display-role reset for older browsers */
27
+ article, aside, details, figcaption, figure,
28
+ footer, header, hgroup, menu, nav, section {
29
+ display: block;
30
+ }
31
+ body {
32
+ line-height: 1;
33
+ }
34
+ ol, ul {
35
+ list-style: none;
36
+ }
37
+ blockquote, q {
38
+ quotes: none;
39
+ }
40
+ blockquote:before, blockquote:after,
41
+ q:before, q:after {
42
+ content: '';
43
+ content: none;
44
+ }
45
+ table {
46
+ border-collapse: collapse;
47
+ border-spacing: 0;
48
+ }
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "awesome_print"
22
22
  spec.add_development_dependency "bundler"
23
- spec.add_development_dependency "pry"
23
+ spec.add_development_dependency "pry", '~> 0.13'
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency "rspec", '~> 3.0'
26
26
 
27
- spec.add_dependency "bundler-audit", '~> 0.6.1'
28
- spec.add_dependency 'compass-rails'
27
+ spec.add_dependency "bundler-audit", '~> 0.7.0'
28
+ spec.add_dependency "pry", '~> 0.13'
29
29
  end
@@ -19,8 +19,18 @@ module JefferiesTube
19
19
  attr_accessor :prompt_name
20
20
 
21
21
  def initialize
22
- @environment = ::Rails.env.downcase || nil
23
- @prompt_name = ::Rails.application.class.parent_name || nil
22
+ if defined?(Rails)
23
+ @environment = ::Rails.env.downcase || nil
24
+ @prompt_name =
25
+ if ::Rails::VERSION::MAJOR >= 6
26
+ ::Rails.application.class.module_parent_name || nil
27
+ else
28
+ ::Rails.application.class.parent_name || nil
29
+ end
30
+ else
31
+ @environment = "development"
32
+ @prompt_name = "JefferiesTube"
33
+ end
24
34
  end
25
35
  end
26
36
  end
@@ -30,7 +30,8 @@ namespace :deploy do
30
30
  Bundler::Audit::Database.update!
31
31
  scanner = Bundler::Audit::Scanner.new
32
32
  vulnerable = false
33
- scanner.scan do |result|
33
+ ignore = fetch(:bundler_audit_ignore, [])
34
+ scanner.scan(ignore: ignore) do |result|
34
35
  vulnerable = true
35
36
  case result
36
37
  when Bundler::Audit::Scanner::InsecureSource
@@ -22,6 +22,24 @@ namespace :rails do
22
22
  end
23
23
  end
24
24
 
25
+ desc "Open all rails log using multitail"
26
+ task :allthelogs do
27
+ commands = []
28
+ roles(:app).each do |host|
29
+ filename = ENV['LOG'] || rails_env
30
+ port = host.port || 22
31
+ commands << "ssh #{host.user}@#{host} -p #{port} \"tail -f #{deploy_to}/current/log/#{filename}.log\" | grep --line-buffered --invert \"Delayed::Backend::ActiveRecord::Job Load\""
32
+ end
33
+
34
+ command = "multitail"
35
+ commands.each do |c|
36
+ command += " -L '#{c}'"
37
+ end
38
+
39
+ puts command
40
+ exec command
41
+ end
42
+
25
43
  desc "Run a rake task"
26
44
  task :rake, :task_to_run do |_, parameters|
27
45
  task_to_run = parameters[:task_to_run]
@@ -13,9 +13,7 @@ module JefferiesTube
13
13
  ARGV.push "-r", File.join(File.dirname(__FILE__),"custom_prompts.irbrc.rb")
14
14
 
15
15
  if defined? Pry
16
- Pry.config.prompt = proc {
17
- JefferiesTube::Console.prompt
18
- }
16
+ Pry.prompt = Pry::Prompt.new(:jefferies_tube, '', Array.new(2) { proc { JefferiesTube::Console.prompt } })
19
17
  end
20
18
  end
21
19
 
@@ -40,7 +38,9 @@ module JefferiesTube
40
38
  end
41
39
 
42
40
  initializer "jefferies_tube.view_helpers" do
43
- ActionView::Base.send :include, JefferiesTube::ApplicationHelper
41
+ ::Rails.application.reloader.to_prepare do
42
+ ActionView::Base.send :include, JefferiesTube::ApplicationHelper
43
+ end
44
44
  end
45
45
 
46
46
  initializer "fix spring + figaro" do |config|
@@ -1,7 +1,7 @@
1
1
  require 'open-uri'
2
2
 
3
3
  module JefferiesTube
4
- VERSION = "1.1.1"
4
+ VERSION = "1.5"
5
5
 
6
6
  def self.latest_rubygems_version
7
7
  JSON.parse(URI.parse("https://rubygems.org/api/v1/versions/jefferies_tube/latest.json").read)["version"]
@@ -1,6 +1,4 @@
1
1
  require_relative '../lib/jefferies_tube'
2
- require 'rails'
3
-
4
2
 
5
3
  RSpec.describe "Configuration" do
6
4
  describe 'configuration' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jefferies_tube
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: '1.5'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Samson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2021-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '0.13'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '0.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,28 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.6.1
89
+ version: 0.7.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.6.1
96
+ version: 0.7.0
97
97
  - !ruby/object:Gem::Dependency
98
- name: compass-rails
98
+ name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '0.13'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '0.13'
111
111
  description: Useful tools for Rails.
112
112
  email:
113
113
  - brian@tenforwardconsulting.com
@@ -125,6 +125,7 @@ files:
125
125
  - README.md
126
126
  - Rakefile
127
127
  - app/assets/stylesheets/jefferies_tube.sass
128
+ - app/assets/stylesheets/meyer_reset.css
128
129
  - app/controllers/jefferies_tube/errors_controller.rb
129
130
  - app/helpers/jefferies_tube/application_helper.rb
130
131
  - app/views/errors/404.html.haml
@@ -160,7 +161,7 @@ homepage: https://github.com/tenforwardconsulting/jefferies_tube/
160
161
  licenses:
161
162
  - MIT
162
163
  metadata: {}
163
- post_install_message:
164
+ post_install_message:
164
165
  rdoc_options: []
165
166
  require_paths:
166
167
  - lib
@@ -176,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
177
  version: '0'
177
178
  requirements: []
178
179
  rubygems_version: 3.0.3
179
- signing_key:
180
+ signing_key:
180
181
  specification_version: 4
181
182
  summary: Ten Forward Consulting useful tools.
182
183
  test_files: