spring 2.0.2 → 3.1.0

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.
data/lib/spring/env.rb CHANGED
@@ -1,10 +1,7 @@
1
1
  require "pathname"
2
- require "fileutils"
3
2
  require "digest/md5"
4
- require "tmpdir"
5
3
 
6
4
  require "spring/version"
7
- require "spring/sid"
8
5
  require "spring/configuration"
9
6
 
10
7
  module Spring
@@ -33,10 +30,12 @@ module Spring
33
30
  end
34
31
 
35
32
  def tmp_path
33
+ require "tmpdir"
36
34
  path = Pathname.new(
37
35
  ENV["SPRING_TMP_PATH"] ||
38
36
  File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, "spring-#{Process.uid}")
39
37
  )
38
+ require "fileutils"
40
39
  FileUtils.mkdir_p(path) unless path.exist?
41
40
  path
42
41
  end
data/lib/spring/errors.rb CHANGED
@@ -24,7 +24,7 @@ module Spring
24
24
 
25
25
  def message
26
26
  "Spring was unable to find your config/application.rb file. " \
27
- "Your project root was detected at #{project_root}, so spring " \
27
+ "Your project root was detected at #{project_root}, so Spring " \
28
28
  "looked for #{project_root}/config/application.rb but it doesn't exist. You can " \
29
29
  "configure the root of your application by setting Spring.application_root in " \
30
30
  "config/spring.rb."
data/lib/spring/json.rb CHANGED
@@ -49,8 +49,8 @@ end
49
49
  require 'stringio'
50
50
 
51
51
  # Some parts adapted from
52
- # http://golang.org/src/pkg/json/decode.go and
53
- # http://golang.org/src/pkg/utf8/utf8.go
52
+ # https://golang.org/src/pkg/json/decode.go and
53
+ # https://golang.org/src/pkg/utf8/utf8.go
54
54
  module Spring
55
55
  module OkJson
56
56
  Upstream = '43'
@@ -1,6 +1,6 @@
1
1
  module Spring
2
2
  # Yes, I know this reimplements a bunch of stuff in Active Support, but
3
- # I don't want the spring client to depend on AS, in order to keep its
3
+ # I don't want the Spring client to depend on AS, in order to keep its
4
4
  # load time down.
5
5
  class ProcessTitleUpdater
6
6
  SECOND = 1
data/lib/spring/server.rb CHANGED
@@ -81,7 +81,8 @@ module Spring
81
81
  # This will cause it to be automatically killed once the session
82
82
  # ends (i.e. when the user closes their terminal).
83
83
  def set_pgid
84
- Process.setpgid(0, SID.pgid)
84
+ pgid = Process.getpgid(Process.getsid)
85
+ Process.setpgid(0, pgid)
85
86
  end
86
87
 
87
88
  # Ignore SIGINT and SIGQUIT otherwise the user typing ^C or ^\ on the command line
@@ -1,3 +1,3 @@
1
1
  module Spring
2
- VERSION = "2.0.2"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spring
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Leighton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-21 00:00:00.000000000 Z
11
+ date: 2021-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: activesupport
14
+ name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.2'
20
- type: :runtime
19
+ version: '0'
20
+ type: :development
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: '4.2'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: bump
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bump
42
+ name: activesupport
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -90,13 +90,6 @@ files:
90
90
  - lib/spring/json.rb
91
91
  - lib/spring/process_title_updater.rb
92
92
  - lib/spring/server.rb
93
- - lib/spring/sid.rb
94
- - lib/spring/test.rb
95
- - lib/spring/test/acceptance_test.rb
96
- - lib/spring/test/application.rb
97
- - lib/spring/test/application_generator.rb
98
- - lib/spring/test/rails_version.rb
99
- - lib/spring/test/watcher_test.rb
100
93
  - lib/spring/version.rb
101
94
  - lib/spring/watcher.rb
102
95
  - lib/spring/watcher/abstract.rb
@@ -113,15 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
106
  requirements:
114
107
  - - ">="
115
108
  - !ruby/object:Gem::Version
116
- version: '0'
109
+ version: 2.5.0
117
110
  required_rubygems_version: !ruby/object:Gem::Requirement
118
111
  requirements:
119
112
  - - ">="
120
113
  - !ruby/object:Gem::Version
121
114
  version: '0'
122
115
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.6.8
116
+ rubygems_version: 3.2.22
125
117
  signing_key:
126
118
  specification_version: 4
127
119
  summary: Rails application preloader
data/lib/spring/sid.rb DELETED
@@ -1,42 +0,0 @@
1
- begin
2
- # If rubygems is present, keep it out of the way when loading fiddle,
3
- # otherwise if fiddle is not installed then rubygems will load all
4
- # gemspecs in its (futile) search for fiddle, which is slow.
5
- if respond_to?(:gem_original_require, true)
6
- gem_original_require 'fiddle'
7
- else
8
- require 'fiddle'
9
- end
10
- rescue LoadError
11
- end
12
-
13
- module Spring
14
- module SID
15
- def self.fiddle_func
16
- @fiddle_func ||= Fiddle::Function.new(
17
- DL::Handle::DEFAULT['getsid'],
18
- [Fiddle::TYPE_INT],
19
- Fiddle::TYPE_INT
20
- )
21
- end
22
-
23
- def self.sid
24
- @sid ||= begin
25
- if Process.respond_to?(:getsid)
26
- # Ruby 2
27
- Process.getsid
28
- elsif defined?(Fiddle) and defined?(DL)
29
- # Ruby 1.9.3 compiled with libffi support
30
- fiddle_func.call(0)
31
- else
32
- # last resort: shell out
33
- `ps -p #{Process.pid} -o sess=`.to_i
34
- end
35
- end
36
- end
37
-
38
- def self.pgid
39
- Process.getpgid(sid)
40
- end
41
- end
42
- end