console1984 0.2.2 → 0.2.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
  SHA256:
3
- metadata.gz: 2780f949e661adfabca876c59cbe208b724728ba49d48e06caa3301c58419eb5
4
- data.tar.gz: c6e5dd28ac9aab44c1eb8be6a76a34606cadac94a3d3545a1c6991fde636173c
3
+ metadata.gz: 3bcb1c5436456f551d695a6b3ffdf284959846303adf6afaaee8fe0ff66ecb6e
4
+ data.tar.gz: 317f00e5e0c25b8f2e18876782872cc7288df2038c25139538c98c1e77dbeb85
5
5
  SHA512:
6
- metadata.gz: 94f9f5032b7211bf3bec1b798417aa02ce33ac383b166808e92f7fff654fe150fb48a2d846adc2cfc14465abed6cc017061c0ebf7694192932744b64962f685d
7
- data.tar.gz: 0f8e68ebd3aadbcee4904605b74ba47ef88e1ee3b99e3693ad97c39ca223f696f5484794457631348205ecc75283ae19477b926599aaa53ccb010aea6710cf7a
6
+ metadata.gz: 0a9fc5c6bb7c6c36580dfae29f4cfaadbc18930d11061a77609bbec85c9a3b44131e873bc347e04f7db2b8ce7dc2d239c9d18a74cedcde14dcb28858697e7c86
7
+ data.tar.gz: fb53e1d21f930e80b4d05a77a2e3b2eeed5eb7af22fd242874452cce10b141e65e4f4b7eda3a22a2d52335d7aeed923d22c6732905587f0890d1cfcb630cd78d
data/README.md CHANGED
@@ -192,8 +192,31 @@ The test suite runs against SQLite by default, but can be run against Postgres a
192
192
  To run the suite in your computer, first, run `bin/setup` to create the docker containers for MySQL/PostgreSQL and create the databases. Then run:
193
193
 
194
194
  ```bash
195
- bin/rails test # against SQLite (default)
196
- bin/rails test TARGET_DB=mysql
197
- bin/rails test TARGET_DB=postgres
198
- bin/rails test TARGET_DB=sqlite
195
+ bin/rails test # against SQLite (default)
196
+ bin/rails test TARGET_DB=mysql
197
+ bin/rails test TARGET_DB=postgres
198
+ bin/rails test TARGET_DB=sqlite
199
+ ```
200
+
201
+ ### Testing against different Rails versions
202
+
203
+ This project uses [Appraisal](https://github.com/thoughtbot/appraisal) to test against multiple Rails versions. The `Appraisals` file defines the matrix and the generated gemfiles live in `gemfiles/`.
204
+
205
+ To run tests against a specific Rails version:
206
+
207
+ ```bash
208
+ bundle exec appraisal rails-8-0 bin/rails test
209
+ bundle exec appraisal rails-8-1 bin/rails test
210
+ ```
211
+
212
+ To run tests against all Rails versions:
213
+
214
+ ```bash
215
+ bundle exec appraisal bin/rails test
216
+ ```
217
+
218
+ To regenerate the appraisal gemfiles after changing the `Appraisals` file:
219
+
220
+ ```bash
221
+ bundle exec appraisal install
199
222
  ```
data/Rakefile CHANGED
@@ -17,8 +17,6 @@ end
17
17
  APP_RAKEFILE = File.expand_path('test/dummy/Rakefile', __dir__)
18
18
  load 'rails/tasks/engine.rake'
19
19
 
20
- load 'rails/tasks/statistics.rake'
21
-
22
20
  require 'bundler/gem_tasks'
23
21
 
24
22
  require 'rake/testtask'
@@ -10,6 +10,8 @@ module Console1984
10
10
 
11
11
  def perform(session)
12
12
  session.incinerate
13
+ rescue Console1984::Errors::ForbiddenIncineration
14
+ self.class.set(wait_until: session.created_at + Console1984.incinerate_after).perform_later(session)
13
15
  end
14
16
  end
15
17
  end
@@ -40,7 +40,7 @@ class Console1984::CommandValidator::CommandParser < ::Parser::AST::Processor
40
40
  def on_const(node)
41
41
  super
42
42
  name, const_name = *node
43
- const_name = const_name.to_s
43
+ const_name = const_name.to_s.dup
44
44
  last_constant = @constants.last
45
45
 
46
46
  if name.nil? || (name && name.type == :cbase) # cbase = leading ::
@@ -31,7 +31,13 @@ module Console1984::InputOutput
31
31
 
32
32
  def ask_for_value(message)
33
33
  puts Rainbow("#{message}").green
34
- reason = $stdin.gets.strip until reason.present?
35
- reason
34
+ original_output_modifier_proc = Reline.output_modifier_proc
35
+ begin
36
+ Reline.output_modifier_proc = nil
37
+ reason = Reline.readline.strip until reason.present?
38
+ reason
39
+ ensure
40
+ Reline.output_modifier_proc = original_output_modifier_proc
41
+ end
36
42
  end
37
43
  end
@@ -1,3 +1,3 @@
1
1
  module Console1984
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console1984
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
  - Jorge Manrubia
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rainbow
@@ -220,7 +219,20 @@ dependencies:
220
219
  - - ">="
221
220
  - !ruby/object:Gem::Version
222
221
  version: '0'
223
- description:
222
+ - !ruby/object:Gem::Dependency
223
+ name: ostruct
224
+ requirement: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ version: '0'
229
+ type: :development
230
+ prerelease: false
231
+ version_requirements: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - ">="
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
224
236
  email:
225
237
  - jorge@basecamp.com
226
238
  executables: []
@@ -283,7 +295,6 @@ licenses:
283
295
  - MIT
284
296
  metadata:
285
297
  allowed_push_host: https://rubygems.org
286
- post_install_message:
287
298
  rdoc_options: []
288
299
  require_paths:
289
300
  - lib
@@ -298,8 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
309
  - !ruby/object:Gem::Version
299
310
  version: '0'
300
311
  requirements: []
301
- rubygems_version: 3.5.3
302
- signing_key:
312
+ rubygems_version: 3.6.9
303
313
  specification_version: 4
304
314
  summary: Your Rails console, 1984 style
305
315
  test_files: []