gemstash 2.6.0-java → 2.7.0-java

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: 2f9413aec2ce0f9af1d98dc5f56e0bdfe8e974ed4a390a05ee0eb648e4c6d65a
4
- data.tar.gz: eeb7f4aa36d4162467c9f20cf69b8c16ad9d5add6f73571c4ec63d24a4562750
3
+ metadata.gz: e1a0787f0056a3ecc62b1f9a42d1a9b17de0e7dd04078937e4357cd547473856
4
+ data.tar.gz: 2d820a53d23a6b3d8eaea49ba58f9afd279745926c6b072fb7e695f58871638d
5
5
  SHA512:
6
- metadata.gz: 7b288f7fa477452839963a78b22d38635dac29a904947c5b04d2d5a67be222e5f1220b253baaf7ac4ca168ee9a8591245bd63d2de80edf52f12cb92bab39d9a2
7
- data.tar.gz: f8b30aebbe19b38313e5ad1a6a68b0074865adac73d52fb39a0c7be0f43f36eeae053463ca524786f05ac579d53fed39d3ce54594b0a0a868492213c4af32648
6
+ metadata.gz: d15376223d9f71771fe63a7b0faa47b0e531fbdd68fc278e7b2fbcc58caebceb02fb2eaaaebf4d095d53cb94ef895f8096b8aba0332aaacafd5001b78e78e513
7
+ data.tar.gz: f5e26c9cc3ed44a92a142b4e529a62106dd8c31c080db03477b6a48b7cd3bea1c716454dc572d0a4a4f127ce1dc0f7838e116e584aabcb142852dcf2217b1c0c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.7.0 (2023-10-08)
2
+
3
+ ### Fixes
4
+
5
+ - Fix uninitialized constant error when using Redis cache ([#375](https://github.com/rubygems/gemstash/pull/375), [@chris72205](https://github.com/chris72205))
6
+ - Remove --daemonize option, no longer supported by Puma. ([#359](https://github.com/rubygems/gemstash/issues/359) [@olleolleolle](https://github.com/olleolleolle))
7
+
1
8
  ## 2.6.0 (2023-09-30)
2
9
 
3
10
  ### Changes
@@ -20,7 +27,7 @@
20
27
 
21
28
  ### Fixes
22
29
 
23
- - Require a now-needed file for Puma 6. Thanks, [@ktreis](https://github.com/ktreis)! ([#362](https://github.com/rubygems/gemstash/pull/362), [@olleolleolle](https://github.com/olleolleolle))
30
+ - Require a now-needed file for Puma 6. Thanks, @ktreis! ([#362](https://github.com/rubygems/gemstash/pull/362), [@olleolleolle](https://github.com/olleolleolle))
24
31
 
25
32
  ## 2.3.1 (2023-09-05)
26
33
 
@@ -90,8 +90,8 @@ module Gemstash
90
90
 
91
91
  def ask_redis_details
92
92
  say_current_config(:redis_servers, "Current Redis servers")
93
- servers = @cli.ask "What is the comma-separated list of Redis servers? [localhost:6379]"
94
- servers = "localhost:6379" if servers.empty?
93
+ servers = @cli.ask "What is the comma-separated list of Redis servers? [redis://localhost:6379]"
94
+ servers = "redis://localhost:6379" if servers.empty?
95
95
  @config[:redis_servers] = servers
96
96
  end
97
97
 
@@ -10,47 +10,23 @@ module Gemstash
10
10
  class Start < Gemstash::CLI::Base
11
11
  def run
12
12
  prepare
13
- setup_logging
14
- store_daemonized
15
13
  @cli.say("Starting gemstash!", :green)
16
14
  Puma::CLI.new(args, Gemstash::Logging::StreamLogger.puma_events).run
17
15
  end
18
16
 
19
17
  private
20
18
 
21
- def setup_logging
22
- return unless daemonize?
23
-
24
- Gemstash::Logging.setup_logger(gemstash_env.log_file)
25
- end
26
-
27
- def store_daemonized
28
- Gemstash::Env.daemonized = daemonize?
29
- end
30
-
31
- def daemonize?
32
- @cli.options[:daemonize]
33
- end
34
-
35
19
  def puma_config
36
20
  File.expand_path("../puma.rb", __dir__)
37
21
  end
38
22
 
39
23
  def args
40
- config_args + pidfile_args + daemonize_args
24
+ config_args + pidfile_args
41
25
  end
42
26
 
43
27
  def config_args
44
28
  ["--config", puma_config]
45
29
  end
46
-
47
- def daemonize_args
48
- if daemonize?
49
- ["--daemon"]
50
- else
51
- []
52
- end
53
- end
54
30
  end
55
31
  end
56
32
  end
data/lib/gemstash/cli.rb CHANGED
@@ -75,8 +75,6 @@ module Gemstash
75
75
  end
76
76
 
77
77
  desc "start", "Starts your gemstash server"
78
- method_option :daemonize, :type => :boolean, :default => true, :desc =>
79
- "Daemonize the server"
80
78
  method_option :config_file, :type => :string, :desc =>
81
79
  "Config file to load when starting"
82
80
  def start
@@ -6,8 +6,6 @@ require "puma/commonlogger"
6
6
  use Rack::Deflater
7
7
  use Gemstash::Logging::RackMiddleware
8
8
 
9
- use Puma::CommonLogger, Gemstash::Logging::StreamLogger.for_stdout if Gemstash::Env.daemonized?
10
-
11
9
  use Gemstash::Env::RackMiddleware, Gemstash::Env.current
12
10
  use Gemstash::GemSource::RackMiddleware
13
11
  use Gemstash::Health::RackMiddleware
data/lib/gemstash/env.rb CHANGED
@@ -59,17 +59,6 @@ module Gemstash
59
59
  Thread.current[:gemstash_env] = value
60
60
  end
61
61
 
62
- def self.daemonized?
63
- raise "Daemonized hasn't been set yet!" if @daemonized.nil?
64
-
65
- @daemonized
66
- end
67
-
68
- def self.daemonized=(value)
69
- value = false if value.nil?
70
- @daemonized = value
71
- end
72
-
73
62
  def config
74
63
  @config ||= Gemstash::Configuration.new
75
64
  end
@@ -181,6 +181,3 @@ The file will be placed in the base path.
181
181
  \f[CR]server.log\f[R]
182
182
  .SS Valid values
183
183
  Any valid file name, or \f[CR]:stdout\f[R] to log to \f[CR]$stdout\f[R]
184
- .PP
185
- \f[I]Note: Using \f[CI]:stdout\f[I] for the \f[CI]:log_file\f[I]
186
- requires running with \f[CI]--no-daemonize\f[I].\f[R]
@@ -202,7 +202,4 @@
202
202
  1mValid values0m
203
203
  Any valid file name, or :stdout to log to $stdout
204
204
 
205
- 4mNote:24m 4mUsing24m 4m:stdout24m 4mfor24m 4mthe24m 4m:log_file24m 4mrequires24m 4mrunning24m 4mwith24m 4m--no-daemo-0m
206
- 4mnize.0m
207
-
208
205
  October 13, 2015 4mgemstash-configuration24m(5)
@@ -10,11 +10,10 @@ directory.
10
10
  By default, this will be at \f[CR]\[ti]/.gemstash/server.log\f[R].
11
11
  .PP
12
12
  You might find it easier to view the log directly in your terminal.
13
- If you run Gemstash in non-daemonized form, the log will be output
14
- directly to standard out:
13
+ Gemstash outputs its log directly to standard out:
15
14
  .IP
16
15
  .EX
17
- $ gemstash start --no-daemonize
16
+ $ gemstash start
18
17
  .EE
19
18
  .PP
20
19
  You can also check the status of the server:
@@ -24,7 +23,7 @@ $ gemstash status
24
23
  .EE
25
24
  .PP
26
25
  The server status is checked by passing through to
27
- pumactl (https://github.com/puma/puma#pumactl).
26
+ pumactl (https://github.com/puma/puma#controlstatus-server).
28
27
  .PP
29
28
  If you find a bug, please don\[cq]t hesitate to open a bug
30
29
  report (https://github.com/rubygems/gemstash#contributing)!
@@ -8,18 +8,17 @@
8
8
  at server.log within your base directory. By default, this will be at
9
9
  ~/.gemstash/server.log.
10
10
 
11
- You might find it easier to view the log directly in your terminal. If
12
- you run Gemstash in non-daemonized form, the log will be output di-
13
- rectly to standard out:
11
+ You might find it easier to view the log directly in your terminal.
12
+ Gemstash outputs its log directly to standard out:
14
13
 
15
- $ gemstash start --no-daemonize
14
+ $ gemstash start
16
15
 
17
16
  You can also check the status of the server:
18
17
 
19
18
  $ gemstash status
20
19
 
21
20
  The server status is checked by passing through to pumactl
22
- (https://github.com/puma/puma#pumactl).
21
+ (https://github.com/puma/puma#controlstatus-server).
23
22
 
24
23
  If you find a bug, please don't hesitate to open a bug report
25
24
  (https://github.com/rubygems/gemstash#contributing)!
@@ -101,7 +101,7 @@ end
101
101
  And run the Gemstash with the credentials set in an ENV variable:
102
102
  .IP
103
103
  .EX
104
- GEMSTASH_MY__GEM___SOURCE__LOCAL=user:password gemstash start --no-daemonize --config-file config.yml.erb
104
+ GEMSTASH_MY__GEM___SOURCE__LOCAL=user:password gemstash start --config-file config.yml.erb
105
105
  .EE
106
106
  .PP
107
107
  The name of the ENV variable is the uppercase version of the host name,
@@ -88,7 +88,7 @@
88
88
 
89
89
  And run the Gemstash with the credentials set in an ENV variable:
90
90
 
91
- GEMSTASH_MY__GEM___SOURCE__LOCAL=user:password gemstash start --no-daemonize --config-file config.yml.erb
91
+ GEMSTASH_MY__GEM___SOURCE__LOCAL=user:password gemstash start --config-file config.yml.erb
92
92
 
93
93
  The name of the ENV variable is the uppercase version of the host name,
94
94
  with all . characters replaced with __, all - with ___ and a GEMSTASH_
@@ -7,7 +7,7 @@
7
7
  Gemstash is both a cache for remote servers such as
8
8
  https://rubygems.org, and a private gem source.
9
9
  .PP
10
- If you are using bundler (http://bundler.io/) across many machines that
10
+ If you are using bundler (https://bundler.io/) across many machines that
11
11
  have access to a server within your control, you might want to use
12
12
  Gemstash.
13
13
  .PP
@@ -143,9 +143,9 @@ Gem files are always cached permanently, so bundling with a
143
143
  \f[CR]Gemfile.lock\f[R] with all gems cached will never call out to
144
144
  https://rubygems.org.
145
145
  .PP
146
- The server you ran is provided via Puma (http://puma.io/) and
147
- Rack (http://rack.github.io/), however they are not customizable at this
148
- point.
146
+ The server you ran is provided via Puma (https://puma.io/) and
147
+ Rack (https://github.com/rack/rack), however they are not customizable
148
+ at this point.
149
149
  .SS Deep Dive
150
150
  Deep dive into more subjects:
151
151
  .IP \[bu] 2
@@ -178,7 +178,7 @@ Setup
178
178
  Version
179
179
  .PP
180
180
  To see what has changed in recent versions of Gemstash, see the
181
- CHANGELOG (https://github.com/rubygems/gemstash/blob/master/CHANGELOG.md).
181
+ CHANGELOG (https://github.com/rubygems/gemstash/blob/main/CHANGELOG.md).
182
182
  .SS Development
183
183
  After checking out the repo, run \f[CR]bin/setup\f[R] to install
184
184
  dependencies.
@@ -192,7 +192,7 @@ https://github.com/rubygems/gemstash.
192
192
  This project is intended to be a safe, welcoming space for
193
193
  collaboration, and contributors are expected to adhere to the
194
194
  Contributor
195
- Covenant (https://github.com/rubygems/gemstash/blob/master/CODE_OF_CONDUCT.md)
195
+ Covenant (https://github.com/rubygems/gemstash/blob/main/CODE_OF_CONDUCT.md)
196
196
  code of conduct.
197
197
  .SS License
198
198
  The gem is available as open source under the terms of the MIT
@@ -7,11 +7,11 @@
7
7
  Gemstash is both a cache for remote servers such as
8
8
  https://rubygems.org, and a private gem source.
9
9
 
10
- If you are using bundler (http://bundler.io/) across many machines that
11
- have access to a server within your control, you might want to use Gem-
12
- stash.
10
+ If you are using bundler (https://bundler.io/) across many machines
11
+ that have access to a server within your control, you might want to use
12
+ Gemstash.
13
13
 
14
- If you produce gems that you don't want everyone in the world to have
14
+ If you produce gems that you don't want everyone in the world to have
15
15
  access to, you might want to use Gemstash.
16
16
 
17
17
  If you frequently bundle the same set of gems across multiple projects,
@@ -20,34 +20,34 @@
20
20
  Are you only using gems from https://rubygems.org, and don't bundle the
21
21
  same gems frequently? Well, maybe you don't need Gemstash... yet.
22
22
 
23
- Gemstash is maintained by Ruby Central (https://rubycentral.org/), a
23
+ Gemstash is maintained by Ruby Central (https://rubycentral.org/), a
24
24
  non-profit committed to supporting the critical Ruby infrastructure you
25
- rely on. Contribute today as an individual, or even better, as a com-
25
+ rely on. Contribute today as an individual, or even better, as a com-
26
26
  pany (https://rubycentral.org/#/portal/signup), and ensure that
27
- Bundler, RubyGems, Gemstash, and other shared tooling is around for
27
+ Bundler, RubyGems, Gemstash, and other shared tooling is around for
28
28
  years to come.
29
29
 
30
30
  1mQuickstart Guide0m
31
31
  1mSetup0m
32
- Gemstash is designed to be quick and painless to get set up. By the
33
- end of this Quickstart Guide, you will be able to bundle stashed gems
32
+ Gemstash is designed to be quick and painless to get set up. By the
33
+ end of this Quickstart Guide, you will be able to bundle stashed gems
34
34
  from public sources against a Gemstash server running on your machine.
35
35
 
36
36
  Install Gemstash to get started:
37
37
 
38
38
  $ gem install gemstash
39
39
 
40
- After it is installed, starting Gemstash requires no additional steps.
40
+ After it is installed, starting Gemstash requires no additional steps.
41
41
  Simply start the Gemstash server with the gemstash command:
42
42
 
43
43
  $ gemstash start
44
44
 
45
- You may have noticed that the command finished quickly. This is be-
46
- cause Gemstash will run the server in the background by default. The
45
+ You may have noticed that the command finished quickly. This is be-
46
+ cause Gemstash will run the server in the background by default. The
47
47
  server runs on port 9292.
48
48
 
49
49
  1mBundling0m
50
- With the server running, you can bundle against it. Tell Bundler that
50
+ With the server running, you can bundle against it. Tell Bundler that
51
51
  you want to use Gemstash to find gems from RubyGems.org:
52
52
 
53
53
  $ bundle config mirror.https://rubygems.org http://localhost:9292
@@ -58,7 +58,7 @@
58
58
  source "https://rubygems.org"
59
59
  gem "rubywarrior"
60
60
 
61
- The gems you include should be gems you don't yet have installed, oth-
61
+ The gems you include should be gems you don't yet have installed, oth-
62
62
  erwise Gemstash will have nothing to stash. Now bundle:
63
63
 
64
64
  $ bundle install --path .bundle
@@ -67,7 +67,7 @@
67
67
  cached them for you! To prove this, you can disable your Internet con-
68
68
  nection and try again. Gem files (*.gem) are cached indefinitely. Gem
69
69
  dependencies metadata are cached for 30 minutes, so if you bundle again
70
- before that, you can successfully bundle without an Internet connec-
70
+ before that, you can successfully bundle without an Internet connec-
71
71
  tion:
72
72
 
73
73
  $ # Disable your Internet first!
@@ -75,51 +75,51 @@
75
75
  $ bundle
76
76
 
77
77
  1mFalling back to rubygems.org0m
78
- If you want to make sure that your bundling from https://rubygems.org
79
- still works as expected when the Gemstash server is not running, you
78
+ If you want to make sure that your bundling from https://rubygems.org
79
+ still works as expected when the Gemstash server is not running, you
80
80
  can easily configure Bundler to fallback to https://rubygems.org.
81
81
 
82
82
  $ bundle config mirror.https://rubygems.org.fallback_timeout true
83
83
 
84
84
  You can also configure this fallback as a number of seconds in case the
85
- Gemstash server is simply unresponsive. This example uses a 3 second
85
+ Gemstash server is simply unresponsive. This example uses a 3 second
86
86
  timeout:
87
87
 
88
88
  $ bundle config mirror.https://rubygems.org.fallback_timeout 3
89
89
 
90
90
  1mStopping the Server0m
91
- Once you've finish using your Gemstash server, you can stop it just as
91
+ Once you've finish using your Gemstash server, you can stop it just as
92
92
  easily as you started it:
93
93
 
94
94
  $ gemstash stop
95
95
 
96
- You'll also want to tell Bundler that it can go back to getting gems
96
+ You'll also want to tell Bundler that it can go back to getting gems
97
97
  from RubyGems.org directly, instead of going through Gemstash:
98
98
 
99
99
  $ bundle config --delete mirror.https://rubygems.org
100
100
 
101
101
  1mUnder the Hood0m
102
102
  You might wonder where the gems are stored. After running the commands
103
- above, you will find a new directory at ~/.gemstash. This directory
104
- holds all the cached and private gems. It also has a server log, the
103
+ above, you will find a new directory at ~/.gemstash. This directory
104
+ holds all the cached and private gems. It also has a server log, the
105
105
  database, and configuration for Gemstash. If you prefer, you can point
106
106
  to a different directory.
107
107
 
108
- Gemstash uses SQLite (https://www.sqlite.org/) to store details about
108
+ Gemstash uses SQLite (https://www.sqlite.org/) to store details about
109
109
  private gems. The database will be located in ~/.gemstash, however you
110
- won't see the database appear until you start using private gems. If
110
+ won't see the database appear until you start using private gems. If
111
111
  you prefer, you can use a different database.
112
112
 
113
- Gemstash temporarily caches things like gem dependencies in memory.
114
- Anything cached in memory will last for 30 minutes before being re-
115
- trieved again. You can use memcached instead of caching in memory.
116
- Gem files are always cached permanently, so bundling with a Gem-
113
+ Gemstash temporarily caches things like gem dependencies in memory.
114
+ Anything cached in memory will last for 30 minutes before being re-
115
+ trieved again. You can use memcached instead of caching in memory.
116
+ Gem files are always cached permanently, so bundling with a Gem-
117
117
  file.lock with all gems cached will never call out to
118
118
  https://rubygems.org.
119
119
 
120
- The server you ran is provided via Puma (http://puma.io/) and Rack
121
- (http://rack.github.io/), however they are not customizable at this
122
- point.
120
+ The server you ran is provided via Puma (https://puma.io/) and Rack
121
+ (https://github.com/rack/rack), however they are not customizable at
122
+ this point.
123
123
 
124
124
  1mDeep Dive0m
125
125
  Deep dive into more subjects:
@@ -153,25 +153,25 @@
153
153
 
154
154
  o Version
155
155
 
156
- To see what has changed in recent versions of Gemstash, see the
157
- CHANGELOG (https://github.com/rubygems/gemstash/blob/mas-
158
- ter/CHANGELOG.md).
156
+ To see what has changed in recent versions of Gemstash, see the
157
+ CHANGELOG (https://github.com/rubygems/gem-
158
+ stash/blob/main/CHANGELOG.md).
159
159
 
160
160
  1mDevelopment0m
161
- After checking out the repo, run bin/setup to install dependencies.
161
+ After checking out the repo, run bin/setup to install dependencies.
162
162
  Then, run rake to run RuboCop and the tests. While developing, you can
163
- run bin/gemstash to run Gemstash. You can also run bin/console for an
163
+ run bin/gemstash to run Gemstash. You can also run bin/console for an
164
164
  interactive prompt that will allow you to experiment.
165
165
 
166
166
  1mContributing0m
167
- Bug reports and pull requests are welcome on GitHub at
167
+ Bug reports and pull requests are welcome on GitHub at
168
168
  https://github.com/rubygems/gemstash. This project is intended to be a
169
- safe, welcoming space for collaboration, and contributors are expected
169
+ safe, welcoming space for collaboration, and contributors are expected
170
170
  to adhere to the Contributor Covenant (https://github.com/rubygems/gem-
171
- stash/blob/master/CODE_OF_CONDUCT.md) code of conduct.
171
+ stash/blob/main/CODE_OF_CONDUCT.md) code of conduct.
172
172
 
173
173
  1mLicense0m
174
- The gem is available as open source under the terms of the MIT License
174
+ The gem is available as open source under the terms of the MIT License
175
175
  (http://opensource.org/licenses/MIT).
176
176
 
177
177
  November 30, 2015 4mgemstash-readme24m(7)
@@ -5,7 +5,7 @@
5
5
  .SH Name
6
6
  gemstash-start - Starts the Gemstash server
7
7
  .SH Synopsis
8
- \f[CR]gemstash start [--no-daemonize] [--config-file FILE]\f[R]
8
+ \f[CR]gemstash start [--config-file FILE]\f[R]
9
9
  .SH Description
10
10
  Starts the Gemstash server.
11
11
  .SH Options
@@ -15,9 +15,3 @@ If you aren\[cq]t using the default config file at
15
15
  \f[CR]\[ti]/.gemstash/config.yml\f[R] or
16
16
  \f[CR]\[ti]/.gemstash/config.yml.erb\f[R], then you must specify the
17
17
  config file via this option.
18
- .IP \[bu] 2
19
- \f[CR]--no-daemonize\f[R]: The Gemstash server daemonizes itself by
20
- default.
21
- Provide this option to instead run the server until \f[CR]Ctrl-C\f[R] is
22
- typed.
23
- When not daemonized, the log will be output to standard out.
@@ -6,7 +6,7 @@
6
6
  gemstash-start - Starts the Gemstash server
7
7
 
8
8
  1mSynopsis0m
9
- gemstash start [--no-daemonize] [--config-file FILE]
9
+ gemstash start [--config-file FILE]
10
10
 
11
11
  1mDescription0m
12
12
  Starts the Gemstash server.
@@ -17,8 +17,4 @@
17
17
  stash/config.yml.erb, then you must specify the config file via this
18
18
  option.
19
19
 
20
- o --no-daemonize: The Gemstash server daemonizes itself by default.
21
- Provide this option to instead run the server until Ctrl-C is typed.
22
- When not daemonized, the log will be output to standard out.
23
-
24
20
  October 9, 2015 4mgemstash-start24m(1)
@@ -2,5 +2,5 @@
2
2
 
3
3
  # :nodoc:
4
4
  module Gemstash
5
- VERSION = "2.6.0"
5
+ VERSION = "2.7.0"
6
6
  end
data/lib/gemstash.rb CHANGED
@@ -20,6 +20,7 @@ module Gemstash
20
20
  autoload :LruReduxClient, "gemstash/cache"
21
21
  autoload :NotAuthorizedError, "gemstash/authorization"
22
22
  autoload :RackEnvRewriter, "gemstash/rack_env_rewriter"
23
+ autoload :RedisClient, "gemstash/cache"
23
24
  autoload :Resource, "gemstash/storage"
24
25
  autoload :SpecsBuilder, "gemstash/specs_builder"
25
26
  autoload :Storage, "gemstash/storage"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: java
6
6
  authors:
7
7
  - Andre Arko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-30 00:00:00.000000000 Z
11
+ date: 2023-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement