trinidad_sandbox_extension 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Rakefile +4 -7
- data/lib/trinidad_sandbox_extension.rb +1 -1
- data/lib/trinidad_sandbox_extension/app/model/application_context.rb +13 -2
- data/lib/trinidad_sandbox_extension/app/views/app.xml.haml +2 -0
- data/spec/spec_helper.rb +3 -3
- data/trinidad-libs/trinidad-sandbox-extension.jar +0 -0
- data/trinidad_sandbox_extension.gemspec +3 -3
- metadata +6 -5
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -81,14 +81,11 @@ end
|
|
81
81
|
|
82
82
|
task :default => :spec
|
83
83
|
|
84
|
-
require '
|
85
|
-
Spec::Rake::SpecTask.new(:spec) do |spec|
|
86
|
-
spec.libs << 'lib' << 'spec'
|
87
|
-
spec.spec_opts = ['--options', 'spec/spec.opts']
|
88
|
-
spec.spec_files = FileList['spec/**/*_spec.rb']
|
89
|
-
end
|
90
|
-
|
84
|
+
require 'rspec/core/rake_task'
|
91
85
|
|
86
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
87
|
+
spec.rspec_opts = ['--colour', "--format documentation"]
|
88
|
+
end
|
92
89
|
|
93
90
|
#############################################################################
|
94
91
|
#
|
@@ -16,8 +16,11 @@ module Trinidad
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.find(name)
|
19
|
-
|
20
|
-
|
19
|
+
escaped_name = ''
|
20
|
+
unless name == 'default'
|
21
|
+
escaped_name = '/' + name unless name[0..1] == '/'
|
22
|
+
end
|
23
|
+
path = CGI.unescape(escaped_name)
|
21
24
|
context = host.findChild(path)
|
22
25
|
ApplicationContext.new(context) if context
|
23
26
|
end
|
@@ -30,6 +33,14 @@ module Trinidad
|
|
30
33
|
@slug ||= CGI.escape(name.sub('/', ''))
|
31
34
|
end
|
32
35
|
|
36
|
+
def name
|
37
|
+
@name ||= super.empty? ? 'default' : super
|
38
|
+
end
|
39
|
+
|
40
|
+
def path
|
41
|
+
@path ||= super.empty? ? '/' : super
|
42
|
+
end
|
43
|
+
|
33
44
|
def self_path
|
34
45
|
@self_path ||= "#{ApplicationContext.sandbox_context.path}/apps/#{slug}"
|
35
46
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
begin
|
2
|
-
require '
|
2
|
+
require 'rspec'
|
3
3
|
rescue LoadError
|
4
4
|
require 'rubygems'
|
5
5
|
gem 'rspec'
|
6
|
-
require '
|
6
|
+
require 'rspec'
|
7
7
|
end
|
8
8
|
|
9
9
|
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
@@ -12,6 +12,6 @@ require 'java'
|
|
12
12
|
require 'trinidad_sandbox_extension'
|
13
13
|
require 'mocha'
|
14
14
|
|
15
|
-
|
15
|
+
RSpec.configure do |config|
|
16
16
|
config.mock_with :mocha
|
17
17
|
end
|
Binary file
|
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'trinidad_sandbox_extension'
|
16
|
-
s.version = '0.4.
|
17
|
-
s.date = '2010-
|
16
|
+
s.version = '0.4.2'
|
17
|
+
s.date = '2010-12-21'
|
18
18
|
s.rubyforge_project = 'trinidad_sandbox_extension'
|
19
19
|
|
20
20
|
## Make sure your summary is short. The description may be as long
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
|
48
48
|
## List your development dependencies here. Development dependencies are
|
49
49
|
## those that are only needed during development
|
50
|
-
s.add_development_dependency('rspec')
|
50
|
+
s.add_development_dependency('rspec', '>=2.2')
|
51
51
|
s.add_development_dependency('mocha')
|
52
52
|
|
53
53
|
## Leave this section as-is. It will be automatically generated from the
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 4
|
8
|
-
-
|
9
|
-
version: 0.4.
|
8
|
+
- 2
|
9
|
+
version: 0.4.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- David Calavera
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-12-21 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -99,8 +99,9 @@ dependencies:
|
|
99
99
|
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
segments:
|
102
|
-
-
|
103
|
-
|
102
|
+
- 2
|
103
|
+
- 2
|
104
|
+
version: "2.2"
|
104
105
|
type: :development
|
105
106
|
version_requirements: *id007
|
106
107
|
- !ruby/object:Gem::Dependency
|