Permalink
Browse files

Merge branch 'master' of github.com:radiant/radiant

  • Loading branch information...
2 parents 488c2a4 + b6cc6d4 commit a8c4395077bd67a304a84f3e059eb3121359bcc5 @saturnflyer saturnflyer committed Jun 24, 2010
View
5 INSTALL
@@ -33,8 +33,3 @@ install Radiant:
When using Radiant on a production system you may also need to set permissions
on the public and cache directories so that your Web server can access those
directories with the user that it runs under.
-
-Once you've installed Radiant on your own Web site, be sure to add your name
-and Web site to the list of radiant users:
-
-http://wiki.github.com/radiant/radiant/radiant-users
View
2 app/models/status.rb
@@ -25,7 +25,7 @@ def self.find_all
@@statuses = [
Status.new(:id => 1, :name => 'Draft' ),
Status.new(:id => 50, :name => 'Reviewed' ),
- Status.new(:id => 90, :name => 'Scheduled' ),
+ Status.new(:id => 90, :name => 'Scheduled'),
Status.new(:id => 100, :name => 'Published'),
Status.new(:id => 101, :name => 'Hidden' )
]
View
11 lib/radiant/extension/script.rb
@@ -182,20 +182,25 @@ def checkout_command
end
class Gem < Download
+ def gem_name(name)
+ name.gsub(/-\d+\.\d+\.\d+(.+)?\.gem/, '')
+ end
+
def download
# Don't download the gem if it's already installed
+ extension = gem_name(filename)
begin
- gem filename.split('-').first
+ gem extension
rescue ::Gem::LoadError
super
- `gem install #{filename}`
+ `gem install #{extension}`
end
end
def unpack
output = nil
cd(Dir.tmpdir) do
- output = `gem unpack #{filename.split('-').first}`
+ output = `gem unpack #{gem_name(filename)}`
end
self.path = output.match(/'(.*)'/)[1]
end
View
4 public/javascripts/admin/cookie.js
@@ -58,7 +58,7 @@ Cookie = {
accept: function() {
Cookie.set('b49f729efde9b2578ea9f00563d06e57', 'true');
if (Cookie.get('b49f729efde9b2578ea9f00563d06e57') == 'true') {
- Cookie.unset('b49f729efde9b2578ea9f00563d06e57');
+ Cookie.erase('b49f729efde9b2578ea9f00563d06e57');
return true;
}
return false;
@@ -77,4 +77,4 @@ Cookie = {
return now.toGMTString();
}
}
-}
+}
View
2 spec/lib/radiant/extension/script_spec.rb
@@ -398,7 +398,7 @@
File.should_receive(:open).with(/example-1.0.0\.gem/, 'w').and_yield(@file)
@gem.should_receive(:open).and_return(StringIO.new('test'))
@file.should_receive(:write).with('test')
- @gem.should_receive(:`).with("gem install example-1.0.0.gem")
+ @gem.should_receive(:`).with("gem install example")
@gem.download
end

0 comments on commit a8c4395

Please sign in to comment.