strelka 0.14.0 → 0.15.0

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: a3240568b10c3d9c47ad9523c8d41d6b9c87c9c0
4
- data.tar.gz: d6e59f27d6a5bf2bd5387a79fec0df667aee742a
2
+ SHA256:
3
+ metadata.gz: b3f507404467109d9a12cc44e9812b9a6b1dda25bc81dd31f18f98045dc29a9b
4
+ data.tar.gz: 9d22995690154b9f4506363d8d711d82c67bd8c937518d7ceafbb525134768c3
5
5
  SHA512:
6
- metadata.gz: fa0e979b77b9d5a531cee6f0ff28dac2b9ae5e67fc6b4dc27eacc7e797634a8ea14f5874dcf1e26b1143e8c96852ef796fb20a4f0cc20cdd67cf170b02e90998
7
- data.tar.gz: 6ad652606601a7ab37210e9843c4bc8e5639d35e9fc525da140e48f0a59a9a216350f6b254a0383a0b2a181acac7c30cbb2ddc774be696639dda39247bc2258e
6
+ metadata.gz: 4356e70224bd00be85f760c9a02a751d4f3cc36c47a1d4ac6e2a0317f6ef8f58ec2489adfa1def40b411df3a60832bb840b85cf6f0d3e67b73bc01eaa40c587b
7
+ data.tar.gz: b078ce2eddb2f291644b5930abb3f6f0e9dc82b9acfb324dc89941c24420f31f666ec41fffd62d515478f6a9e3f9ef9e560e02cd07a410913c260628a5582638
Binary file
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,9 +1,49 @@
1
+ 2017-05-31 Mahlon E. Smith <mahlon@martini.nu>
2
+
3
+ * spec/strelka/app_spec.rb, spec/strelka/discovery_spec.rb:
4
+ Fix tests for discovery loader, mock zmq poller.
5
+ [dbe28e0e407c] [tip]
6
+
7
+ * lib/strelka/discovery.rb, spec/strelka/app_spec.rb,
8
+ spec/strelka/discovery_spec.rb, spec/strelka/exceptions_spec.rb,
9
+ spec/strelka/websocketserver_spec.rb:
10
+ Have Discovery load the last subclass instead of the first, to
11
+ support classes that inherit from Strelka::App.
12
+ [e90ecc97e78c]
13
+
14
+ 2017-05-24 Mahlon E. Smith <mahlon@martini.nu>
15
+
16
+ * lib/strelka/command/start.rb:
17
+ Load configuration from the global options in the 'start' cli
18
+ command.
19
+ [e0744ecac370]
20
+
1
21
  2017-01-19 Michael Granger <ged@FaerieMUD.org>
2
22
 
23
+ * .hgtags:
24
+ Added tag v0.14.0 for changeset 8a6b1bb961ba
25
+ [844003989c8a]
26
+
27
+ * .hgsigs:
28
+ Added signature for changeset e44936a1b4ac
29
+ [8a6b1bb961ba] [v0.14.0]
30
+
31
+ * History.rdoc, lib/strelka.rb:
32
+ Bump the minor version, update history.
33
+ [e44936a1b4ac]
34
+
35
+ * Rakefile, lib/strelka.rb, lib/strelka/app.rb,
36
+ lib/strelka/multipartparser.rb:
37
+ Bump Inversion dependency, fix a few small issues
38
+
39
+ - Fix devmode when $DEBUG is set
40
+ - Fix spooldir when explicitly unconfigured.
41
+ [0fc4cd3ec733]
42
+
3
43
  * lib/strelka/app.rb, lib/strelka/discovery.rb,
4
44
  lib/strelka/multipartparser.rb:
5
45
  Change Strelka configuration to use 3.x syntax/naming
6
- [72c4fff2f719] [tip]
46
+ [72c4fff2f719]
7
47
 
8
48
  * lib/strelka.rb, lib/strelka/cli.rb, lib/strelka/command/config.rb,
9
49
  lib/strelka/discovery.rb, spec/strelka/app/templating_spec.rb:
@@ -1,3 +1,14 @@
1
+ == v0.15.0 [2017-06-14] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Enhancements:
4
+
5
+ - Warn instead of raising on duplicate app names during discover.
6
+ - Have Discovery load the last subclass instead of the first, to
7
+ support classes that inherit from Strelka::App.
8
+ - Load configuration from the global options in the 'start' cli
9
+ command.
10
+
11
+
1
12
  == v0.14.0 [2017-01-19] Michael Granger <ged@FaerieMUD.org>
2
13
 
3
14
  Enhancements:
@@ -25,10 +25,10 @@ module Strelka
25
25
  log_as :strelka
26
26
 
27
27
  # Library version constant
28
- VERSION = '0.14.0'
28
+ VERSION = '0.15.0'
29
29
 
30
30
  # Version-control revision constant
31
- REVISION = %q$Revision: e44936a1b4ac $
31
+ REVISION = %q$Revision: 670190273d27 $
32
32
 
33
33
  require 'strelka/mixins'
34
34
  require 'strelka/constants'
@@ -13,10 +13,9 @@ module Strelka::CLI::Start
13
13
  arg :APPNAME
14
14
  command :start do |cmd|
15
15
 
16
- cmd.action do |globals, options, args|
16
+ cmd.action do |global, options, args|
17
17
  appname = args.pop
18
18
  gemname = args.pop
19
- path = nil
20
19
 
21
20
  gem( gemname ) if gemname
22
21
 
@@ -29,7 +28,7 @@ module Strelka::CLI::Start
29
28
  end
30
29
 
31
30
  Strelka::CLI.prompt.say "Starting %s (%p)." % [ appname, app ]
32
- Strelka.load_config( options[:c] ) if options[:c]
31
+ Strelka.load_config( global.config ) if global.config
33
32
  unless_dryrun( "starting the app" ) do
34
33
  app.run
35
34
  end
@@ -131,8 +131,9 @@ module Strelka::Discovery
131
131
  @discovered_apps ||= {}
132
132
 
133
133
  if @discovered_apps.key?( name )
134
- raise "Can't register a second '%s' app at %s; already have one at %s" %
134
+ warn "Can't register a second '%s' app at %s; already have one at %s" %
135
135
  [ name, path, @discovered_apps[name] ]
136
+ return
136
137
  end
137
138
 
138
139
  self.log.debug "Registered app at %s as %p" % [ path, name ]
@@ -218,7 +219,7 @@ module Strelka::Discovery
218
219
  new_subclasses = self.discovered_classes[ loading_file ]
219
220
  self.log.debug " loaded %d new app class/es" % [ new_subclasses.size ]
220
221
 
221
- return new_subclasses.first
222
+ return new_subclasses.last
222
223
  ensure
223
224
  Thread.current[ :__loading_file ] = nil
224
225
  end
@@ -5,7 +5,6 @@
5
5
  require_relative '../helpers'
6
6
 
7
7
  require 'rspec'
8
- require 'zmq'
9
8
  require 'mongrel2'
10
9
 
11
10
  require 'strelka'
@@ -209,6 +208,8 @@ describe Strelka::App do
209
208
  it "uses the app's ID constant for the appid if .run is called without one" do
210
209
  @app.const_set( :ID, 'testing-app' )
211
210
  conn = double( "Mongrel2 connection", close: true )
211
+ allow( conn ).to receive( :request_sock )
212
+ allow( CZTop::Poller ).to receive( :new )
212
213
 
213
214
  expect( Mongrel2::Handler ).to receive( :connection_info_for ).with( 'testing-app' ).
214
215
  and_return([ TEST_SEND_SPEC, TEST_RECV_SPEC ])
@@ -225,6 +226,8 @@ describe Strelka::App do
225
226
  def self::name; "My::First::Blog" ; end
226
227
  end
227
228
  conn = double( "Mongrel2 connection", close: true )
229
+ allow( conn ).to receive( :request_sock )
230
+ allow( CZTop::Poller ).to receive( :new )
228
231
 
229
232
  expect( Mongrel2::Handler ).to receive( :connection_info_for ).with( 'my-first-blog' ).
230
233
  and_return([ TEST_SEND_SPEC, TEST_RECV_SPEC ])
@@ -5,7 +5,6 @@
5
5
  require_relative '../helpers'
6
6
 
7
7
  require 'rspec'
8
- require 'zmq'
9
8
  require 'mongrel2'
10
9
 
11
10
  require 'strelka'
@@ -54,8 +53,8 @@ describe Strelka::Discovery do
54
53
  described_class.register_app( 'foo', 'a/path/to/foo.rb' )
55
54
  expect {
56
55
  described_class.register_app( 'foo', 'a/path/to/bar.rb' )
57
- }.to raise_error( /can't register a second 'foo' app/i )
58
- end
56
+ }.to output( /can't register a second 'foo' app/i ).to_stderr
57
+ end
59
58
 
60
59
 
61
60
  it "uses Rubygems discovery to find apps" do
@@ -71,7 +70,7 @@ describe Strelka::Discovery do
71
70
  when %r{other/directory}
72
71
  described_class.register_app( 'bar', 'a/path/to/bar.rb' )
73
72
  end
74
- end
73
+ end
75
74
 
76
75
  expect( described_class.discovered_apps ).to include(
77
76
  'foo' => 'a/path/to/foo.rb',
@@ -108,7 +107,7 @@ describe Strelka::Discovery do
108
107
  end
109
108
 
110
109
 
111
- it "only returns the first class even if the file declares two" do
110
+ it "only returns the last class that was declared" do
112
111
  described_class.register_app( 'foo', 'a/path/to/foo.rb' )
113
112
 
114
113
  app_class = app_class2 = nil
@@ -119,7 +118,7 @@ describe Strelka::Discovery do
119
118
  app_class2 = Class.new( discoverable_class )
120
119
  end
121
120
 
122
- expect( described_class.load('foo') ).to eq( app_class )
121
+ expect( described_class.load('foo') ).to eq( app_class2 )
123
122
  end
124
123
 
125
124
  end
@@ -5,7 +5,6 @@
5
5
  require_relative '../helpers'
6
6
 
7
7
  require 'rspec'
8
- require 'zmq'
9
8
  require 'mongrel2'
10
9
 
11
10
  require 'strelka'
@@ -5,7 +5,6 @@
5
5
  require_relative '../helpers'
6
6
 
7
7
  require 'rspec'
8
- require 'zmq'
9
8
  require 'mongrel2'
10
9
 
11
10
  require 'strelka'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strelka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mahlon E. Smith
@@ -36,7 +36,7 @@ cert_chain:
36
36
  w8aNA5re5+Rt/Vvjxj5AcEnZnZiz5x959NaddQocX32Z1unHw44pzRNUur1GInfW
37
37
  p4vpx2kUSFSAGjtCbDGTNV2AH8w9OU4xEmNz8c5lyoA=
38
38
  -----END CERTIFICATE-----
39
- date: 2017-01-19 00:00:00.000000000 Z
39
+ date: 2017-06-14 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: configurability
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - "~>"
214
214
  - !ruby/object:Gem::Version
215
- version: '0.8'
215
+ version: '0.9'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: '0.8'
222
+ version: '0.9'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: hoe-highline
225
225
  requirement: !ruby/object:Gem::Requirement
@@ -296,14 +296,14 @@ dependencies:
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: '3.15'
299
+ version: '3.16'
300
300
  type: :development
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: '3.15'
306
+ version: '3.16'
307
307
  description: |-
308
308
  Strelka is a framework for creating and deploying
309
309
  Mongrel2[http://mongrel2.org/] web applications in Ruby.
@@ -489,7 +489,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
489
489
  version: '0'
490
490
  requirements: []
491
491
  rubyforge_project:
492
- rubygems_version: 2.6.8
492
+ rubygems_version: 2.6.12
493
493
  signing_key:
494
494
  specification_version: 4
495
495
  summary: Strelka is a framework for creating and deploying Mongrel2[http://mongrel2.org/]
metadata.gz.sig CHANGED
Binary file