strelka 0.0.1.pre184 → 0.0.1.pre.185

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/IDEAS.rdoc CHANGED
@@ -6,11 +6,11 @@ planned for a future release.
6
6
  Everything here is subject to change, but we'll try to keep this document
7
7
  up-to-date if it does.
8
8
 
9
- == Leash
9
+ == /bin/strelka CLI App
10
10
 
11
11
  Show a list of installed applications:
12
12
 
13
- $ leash discover
13
+ $ strelka discover
14
14
  Searching for Strelka applications...
15
15
 
16
16
  strelka:
@@ -27,7 +27,7 @@ mongrel2 config database:
27
27
 
28
28
  $ mkdir /service/cms
29
29
  $ cd /service/cms
30
- $ leash -c /usr/local/etc/mongrel2.sqlite setup strelka-cms content-manager
30
+ $ strelka -c /usr/local/etc/mongrel2.sqlite setup strelka-cms content-manager
31
31
 
32
32
  The application can register pre- and post-install hooks that run migrations,
33
33
  prompt for config values, etc.
@@ -35,7 +35,7 @@ prompt for config values, etc.
35
35
  Then, to start the app:
36
36
 
37
37
  $ cd /service/cms
38
- $ leash --sudo start
38
+ $ strelka --sudo start
39
39
 
40
40
  This stuff will probably use Isolate[https://github.com/jbarnette/isolate] for
41
41
  gem sandboxing.
data/Manifest.txt CHANGED
@@ -5,7 +5,7 @@ IDEAS.rdoc
5
5
  Manifest.txt
6
6
  README.rdoc
7
7
  Rakefile
8
- bin/leash
8
+ bin/strelka
9
9
  contrib/hoetemplate/History.rdoc.erb
10
10
  contrib/hoetemplate/Manifest.txt.erb
11
11
  contrib/hoetemplate/README.rdoc.erb
@@ -10,8 +10,8 @@ gem 'sysexits'
10
10
  require 'sysexits'
11
11
 
12
12
 
13
- # A tool for setting up and controlling a Mongrel2 cluster.
14
- class Strelka::LeashCommand
13
+ # A tool for setting up and running Strelka apps
14
+ class Strelka::CLICommand
15
15
  extend ::Sysexits
16
16
  include Sysexits,
17
17
  Strelka::Loggable,
@@ -104,6 +104,8 @@ class Strelka::LeashCommand
104
104
 
105
105
  text 'Global Options'
106
106
  opt :config, "Specify the config file to load.", :type => :string
107
+ opt :datadir, "Override the Strelka data directory.", :type => :string,
108
+ :short => :D
107
109
  text ''
108
110
 
109
111
  text 'Other Options:'
@@ -194,6 +196,9 @@ class Strelka::LeashCommand
194
196
  command ||= 'shell'
195
197
  cmd_method = nil
196
198
 
199
+ # Set the datadir override if it's given
200
+ Strelka.datadir = Pathname( options.datadir ) if self.options.datadir
201
+
197
202
  begin
198
203
  cmd_method = self.method( "#{command}_command" )
199
204
  rescue NameError => err
@@ -365,8 +370,8 @@ class Strelka::LeashCommand
365
370
  message( self.prompt.list(items.flatten.compact.map(&:to_s), :columns_down) )
366
371
  end
367
372
 
368
- end # class Strelka::LeashCommand
373
+ end # class Strelka::CLICommand
369
374
 
370
375
 
371
- Strelka::LeashCommand.run( ARGV.dup )
376
+ Strelka::CLICommand.run( ARGV.dup )
372
377
 
data/lib/strelka/app.rb CHANGED
@@ -81,7 +81,7 @@ class Strelka::App < Mongrel2::Handler
81
81
  ### keyed by gemspec name .
82
82
  def self::discover_paths
83
83
  appfiles = {
84
- 'strelka' => Pathname.glob( DATADIR + APP_GLOB_PATTERN )
84
+ 'strelka' => Pathname.glob( Strelka.datadir + APP_GLOB_PATTERN )
85
85
  }
86
86
 
87
87
  # Find all the gems that depend on Strelka
@@ -12,7 +12,7 @@ module Strelka::Constants
12
12
  include Mongrel2::Constants
13
13
 
14
14
  # The data directory in the project if that exists, otherwise the gem datadir
15
- DATADIR = if ENV['STRELKA_DATADIR']
15
+ DEFAULT_DATADIR = if ENV['STRELKA_DATADIR']
16
16
  Pathname( ENV['STRELKA_DATADIR'] )
17
17
  elsif File.directory?( 'data/strelka' )
18
18
  Pathname( 'data/strelka' )
data/lib/strelka.rb CHANGED
@@ -21,7 +21,7 @@ module Strelka
21
21
  VERSION = '0.0.1'
22
22
 
23
23
  # Version-control revision constant
24
- REVISION = %q$Revision: 28465ed81190 $
24
+ REVISION = %q$Revision: 195b7937f42a $
25
25
 
26
26
 
27
27
  require 'strelka/logging'
@@ -35,6 +35,8 @@ module Strelka
35
35
  include Strelka::Constants
36
36
 
37
37
  require 'strelka/exceptions'
38
+ require 'strelka/mixins'
39
+ extend Strelka::MethodUtilities
38
40
 
39
41
 
40
42
  ### Get the library version. If +include_buildnum+ is true, the version string will
@@ -45,8 +47,16 @@ module Strelka
45
47
  return vstring
46
48
  end
47
49
 
50
+
51
+ ##
52
+ # The Pathname of the directory that will be searched for default applications,
53
+ # config, etc.
54
+ singleton_attr_accessor :datadir
55
+ self.datadir = DEFAULT_DATADIR
56
+
48
57
  require 'strelka/app'
49
58
  require 'strelka/httprequest'
59
+ require 'strelka/httpresponse'
50
60
 
51
61
 
52
62
  # The installed Configurability::Config object
data.tar.gz.sig CHANGED
Binary file
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.0.1.pre184
4
+ version: 0.0.1.pre.185
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -305,7 +305,7 @@ description: ! 'Strelka is a framework for creating and deploying Mongrel2 web a
305
305
  email:
306
306
  - ged@FaerieMUD.org
307
307
  executables:
308
- - leash
308
+ - strelka
309
309
  extensions: []
310
310
  extra_rdoc_files:
311
311
  - History.rdoc
@@ -320,7 +320,7 @@ files:
320
320
  - Manifest.txt
321
321
  - README.rdoc
322
322
  - Rakefile
323
- - bin/leash
323
+ - bin/strelka
324
324
  - contrib/hoetemplate/History.rdoc.erb
325
325
  - contrib/hoetemplate/Manifest.txt.erb
326
326
  - contrib/hoetemplate/README.rdoc.erb
metadata.gz.sig CHANGED
Binary file