waiting_on_rails 0.0.3 → 0.0.4

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
- SHA1:
3
- metadata.gz: 81363f880d518f3f07c6e74da89610d11126b1ff
4
- data.tar.gz: c7904c199f1ab65c20c3d39bc0e8b2998e4bee97
2
+ SHA256:
3
+ metadata.gz: 8eab0ceab8bfc3b23b43b5ad68b7d6f6f48e097cb8f6ce878dd750d3ce23e69a
4
+ data.tar.gz: aad27b0e48d377a7b40323ee9af19301a70f9d145c7eef50b3a6a487d78727e4
5
5
  SHA512:
6
- metadata.gz: b71466cb78b543c4a8cc85f9cf888c33fa37a8199c2eb0dadacc4b784622926a0e57ac97b329511d9c447510883d6a73cf6abe864b0965367813cc99b83a6f84
7
- data.tar.gz: 9b5d36be0f4579c07a2d099eb171b849873d264eee9ba78f658e4a646274d14f56f028a29ad86cbddd603ac13e443772fb967966585ae085830c25cf5d06e439
6
+ metadata.gz: da4f747e7e75c11b1245f4c49fff115101eb171f6a878a9f5b747fde35295e533dc70e63770ef3166c82dbbcdc94533fe97035660b2f53a065a489422ee06a13
7
+ data.tar.gz: 5d4f9b2022441c352a02f1e98574adb073fcd1d6a7dd2c2410381cd25dfb4526881820917473e48430c23e507d874daa27a8306780903cf33eb59d3f08f0a654
data/README.md CHANGED
@@ -10,7 +10,6 @@ What's the difference? Aside from running the required task, they also play some
10
10
  You can use the third one, `waiting-on` with any command and it'll play music until it's done:
11
11
 
12
12
  waiting-on rspec spec
13
- waiting-on cucumber
14
13
  waiting-on cap deploy
15
14
 
16
15
  ## Gotchas
@@ -22,6 +21,7 @@ Also, it only works for the following webservers:
22
21
  - WEBrick
23
22
  - Mongrel
24
23
  - Thin
24
+ - Puma
25
25
 
26
26
  It should be possible to add support for more by adding to the `matches_server_start?` method in [this file](https://github.com/AndrewRadev/waiting-on-rails/blob/master/lib/waiting_on_rails/rails.rb). Again, pull requests welcome.
27
27
 
@@ -39,11 +39,10 @@ On Linux, you should use your distribution's package manager. For Arch Linux, th
39
39
 
40
40
  pacman -S mplayer
41
41
 
42
- You could run `waiting-on-rails` without using `bundle exec` (unless it's run by a bundle-exec-ed script, like with a Procfile), but you probably won't be able to with `waiting-on-rake`. So if you're serious about battling boring loading times, you're going to have to add it to your Gemfile with a `:require => false`. If you just want a quick laugh, install the gem globally and start your project with `waiting-on-rails s`. Preferably in front of your unsuspecting coworkers. Amusement not guaranteed, but very likely.
42
+ You could run `waiting-on-rails` without using `bundle exec` (unless it's run by a bundle-exec-ed script, like with a Procfile), but you probably won't be able to with `waiting-on-rake`. So if you're serious about battling boring loading times, you're going to have to add it to your Gemfile with a `require: false`. If you just want a quick laugh, install the gem globally and start your project with `waiting-on-rails s`. Preferably in front of your unsuspecting coworkers. Amusement not guaranteed, but very likely.
43
43
 
44
44
  ## TODO
45
45
 
46
- - Implement `waiting-on-spork`?
47
46
  - Implement continuing from a point. Could save a temporary file somewhere with the time at which the music was stopped.
48
47
  - Implement simple configuration, controlling what song to play, or even something different to do (like show a notification). Warning: might make the project actually useful, consider carefully.
49
48
 
data/bin/waiting-on CHANGED
@@ -1,5 +1,10 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ end
7
+
3
8
  $: << File.expand_path('../../lib', __FILE__)
4
9
 
5
10
  require 'waiting_on_rails/anything'
data/bin/waiting-on-rails CHANGED
@@ -1,5 +1,10 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ end
7
+
3
8
  $: << File.expand_path('../../lib', __FILE__)
4
9
 
5
10
  require 'waiting_on_rails/player'
data/bin/waiting-on-rake CHANGED
@@ -1,5 +1,10 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ end
7
+
3
8
  $: << File.expand_path('../../lib', __FILE__)
4
9
 
5
10
  require 'waiting_on_rails/rake'
@@ -8,7 +8,7 @@ module WaitingOnRails
8
8
  end
9
9
 
10
10
  def run(args)
11
- @music_player.start
11
+ @music_player.start(loop: true)
12
12
  Process.wait(spawn_subprocess(args))
13
13
  @music_player.stop
14
14
  sleep 0.5
@@ -6,8 +6,14 @@ module WaitingOnRails
6
6
  @music_path = full_path(music_path)
7
7
  end
8
8
 
9
- def start
10
- @pid = spawn("mplayer #{@music_path}", :out => '/dev/null', :err => '/dev/null')
9
+ def start(loop: false)
10
+ if loop
11
+ loop_flag = '-loop 0'
12
+ else
13
+ loop_flag = ''
14
+ end
15
+
16
+ @pid = spawn("mplayer #{loop_flag} #{@music_path}", out: '/dev/null', err: '/dev/null')
11
17
  end
12
18
 
13
19
  def stop
@@ -16,7 +16,7 @@ module WaitingOnRails
16
16
  end
17
17
 
18
18
  spawn_rails_subprocess(args) do |output, pid|
19
- @music_player.start
19
+ @music_player.start(loop: true)
20
20
  handle_signals(pid, output)
21
21
  main_loop(output)
22
22
  end
@@ -81,7 +81,7 @@ module WaitingOnRails
81
81
  def matches_server_start?(string)
82
82
  patterns = [
83
83
  'WEBrick::HTTPServer#start', # WEBrick
84
- 'Listening on', # Thin
84
+ 'Listening on', # Thin, Puma
85
85
  ]
86
86
 
87
87
  patterns.any? { |p| string.include?(p) }
@@ -9,7 +9,7 @@ module WaitingOnRails
9
9
 
10
10
  def run(args)
11
11
  if given_tasks_are_slow?(args)
12
- @music_player.start
12
+ @music_player.start(loop: true)
13
13
  Process.wait(spawn_rake_subprocess(args))
14
14
  else
15
15
  exec_rake_command(args)
@@ -1,3 +1,3 @@
1
1
  module WaitingOnRails
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waiting_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Radev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-06 00:00:00.000000000 Z
12
+ date: 2019-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.0
20
+ version: 3.0.0
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0
27
+ version: 3.0.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +67,7 @@ files:
67
67
  - vendor/attempt_2.mp3
68
68
  - vendor/ding.wav
69
69
  - vendor/test.mp3
70
- homepage: http://github.com/AndrewRadev/waiting_on_rails
70
+ homepage: http://github.com/AndrewRadev/waiting-on-rails
71
71
  licenses: []
72
72
  metadata: {}
73
73
  post_install_message:
@@ -85,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: 1.3.6
87
87
  requirements: []
88
- rubyforge_project: waiting_on_rails
89
- rubygems_version: 2.2.0
88
+ rubygems_version: 3.0.0
90
89
  signing_key:
91
90
  specification_version: 4
92
91
  summary: Plays elevator music until `rails server` boots