Skip to content

Commit

Permalink
We need to include the public directory in the gem, since it's part o…
Browse files Browse the repository at this point in the history
…f the generated app.
  • Loading branch information
lazyatom committed May 6, 2009
1 parent b309edc commit c031ee1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -35,7 +35,7 @@ spec = Gem::Specification.new do |s|
s.rdoc_options = %w(--main README)

# Add any extra files to include in the gem
s.files = %w(config.example.yml config.ru Rakefile README) + Dir.glob("{spec,lib,bin}/**/*")
s.files = %w(config.example.yml config.ru Rakefile README) + Dir.glob("{spec,lib,bin,public}/**/*")
s.executables = ['vanilla']
s.require_paths = ["lib"]

Expand Down
7 changes: 3 additions & 4 deletions lib/tasks/vanilla.rake
Expand Up @@ -20,7 +20,6 @@ namespace :vanilla do
Dynasnip.persist_all!(overwrite=true)

Dir[File.join(File.dirname(__FILE__), '..', 'vanilla', 'snips', '*.rb')].each do |f|
p "loading #{f}"
load f
end

Expand Down Expand Up @@ -105,7 +104,7 @@ namespace :vanilla do
OpenSSL::Random.seed(rand(0).to_s + Time.now.usec.to_s)
end
data = OpenSSL::BN.rand(2048, -1, false).to_s
secret = OpenSSL::Digest::SHA512.new(data).hexdigest
secret = OpenSSL::Digest::SHA1.new(data).hexdigest
app = Vanilla::App.new(ENV['VANILLA_CONFIG'])
app.config[:secret] = secret
app.config.save!
Expand All @@ -114,8 +113,8 @@ namespace :vanilla do

desc 'Prepare standard files to run Vanilla'
task :prepare_files do
cp File.join(File.dirname(__FILE__), *%w[.. .. config.ru]), 'config.ru'
cp_r File.join(File.dirname(__FILE__), *%w[.. .. public]), 'public'
cp File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. config.ru])), 'config.ru'
cp_r File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. public])), 'public'
mkdir 'tmp'
File.open("Rakefile", "w") do |f|
rakefile =<<-EOF
Expand Down
4 changes: 2 additions & 2 deletions vanilla.gemspec
Expand Up @@ -6,12 +6,12 @@ Gem::Specification.new do |s|

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["James Adam"]
s.date = %q{2009-04-09}
s.date = %q{2009-05-06}
s.default_executable = %q{vanilla}
s.email = %q{james@lazyatom.com.com}
s.executables = ["vanilla"]
s.extra_rdoc_files = ["README"]
s.files = ["config.example.yml", "config.ru", "Rakefile", "README", "spec/dynasnip_spec.rb", "spec/renderers", "spec/renderers/base_renderer_spec.rb", "spec/renderers/erb_renderer_spec.rb", "spec/renderers/markdown_renderer_spec.rb", "spec/renderers/raw_renderer_spec.rb", "spec/renderers/ruby_renderer_spec.rb", "spec/renderers/vanilla_app_detecting_renderer_spec.rb", "spec/soup_test.db", "spec/spec_helper.rb", "spec/vanilla_app_spec.rb", "spec/vanilla_presenting_spec.rb", "spec/vanilla_request_spec.rb", "spec/vanilla_snip_finding_spec.rb", "lib/defensio.rb", "lib/tasks", "lib/tasks/vanilla.rake", "lib/vanilla", "lib/vanilla/app.rb", "lib/vanilla/console.rb", "lib/vanilla/dynasnip.rb", "lib/vanilla/dynasnips", "lib/vanilla/dynasnips/comments.rb", "lib/vanilla/dynasnips/current_snip.rb", "lib/vanilla/dynasnips/debug.rb", "lib/vanilla/dynasnips/edit.rb", "lib/vanilla/dynasnips/edit_link.rb", "lib/vanilla/dynasnips/index.rb", "lib/vanilla/dynasnips/kind.rb", "lib/vanilla/dynasnips/link_to.rb", "lib/vanilla/dynasnips/link_to_current_snip.rb", "lib/vanilla/dynasnips/login.rb", "lib/vanilla/dynasnips/new.rb", "lib/vanilla/dynasnips/notes.rb", "lib/vanilla/dynasnips/pre.rb", "lib/vanilla/dynasnips/rand.rb", "lib/vanilla/dynasnips/raw.rb", "lib/vanilla/dynasnips/url_to.rb", "lib/vanilla/renderers", "lib/vanilla/renderers/base.rb", "lib/vanilla/renderers/bold.rb", "lib/vanilla/renderers/erb.rb", "lib/vanilla/renderers/markdown.rb", "lib/vanilla/renderers/raw.rb", "lib/vanilla/renderers/ruby.rb", "lib/vanilla/renderers/textile.rb", "lib/vanilla/request.rb", "lib/vanilla/routes.rb", "lib/vanilla/snip_handling.rb", "lib/vanilla/snips", "lib/vanilla/snips/start.rb", "lib/vanilla/snips/system.rb", "lib/vanilla/snips/tutorial.rb", "lib/vanilla/test_snips.rb", "lib/vanilla.rb", "bin/vanilla"]
s.files = ["config.example.yml", "config.ru", "Rakefile", "README", "spec/dynasnip_spec.rb", "spec/renderers", "spec/renderers/base_renderer_spec.rb", "spec/renderers/erb_renderer_spec.rb", "spec/renderers/markdown_renderer_spec.rb", "spec/renderers/raw_renderer_spec.rb", "spec/renderers/ruby_renderer_spec.rb", "spec/renderers/vanilla_app_detecting_renderer_spec.rb", "spec/soup_test.db", "spec/spec_helper.rb", "spec/vanilla_app_spec.rb", "spec/vanilla_presenting_spec.rb", "spec/vanilla_request_spec.rb", "spec/vanilla_snip_finding_spec.rb", "lib/defensio.rb", "lib/tasks", "lib/tasks/vanilla.rake", "lib/vanilla", "lib/vanilla/app.rb", "lib/vanilla/console.rb", "lib/vanilla/dynasnip.rb", "lib/vanilla/dynasnips", "lib/vanilla/dynasnips/comments.rb", "lib/vanilla/dynasnips/current_snip.rb", "lib/vanilla/dynasnips/debug.rb", "lib/vanilla/dynasnips/edit.rb", "lib/vanilla/dynasnips/edit_link.rb", "lib/vanilla/dynasnips/index.rb", "lib/vanilla/dynasnips/kind.rb", "lib/vanilla/dynasnips/link_to.rb", "lib/vanilla/dynasnips/link_to_current_snip.rb", "lib/vanilla/dynasnips/login.rb", "lib/vanilla/dynasnips/new.rb", "lib/vanilla/dynasnips/notes.rb", "lib/vanilla/dynasnips/pre.rb", "lib/vanilla/dynasnips/rand.rb", "lib/vanilla/dynasnips/raw.rb", "lib/vanilla/dynasnips/url_to.rb", "lib/vanilla/renderers", "lib/vanilla/renderers/base.rb", "lib/vanilla/renderers/bold.rb", "lib/vanilla/renderers/erb.rb", "lib/vanilla/renderers/markdown.rb", "lib/vanilla/renderers/raw.rb", "lib/vanilla/renderers/ruby.rb", "lib/vanilla/renderers/textile.rb", "lib/vanilla/request.rb", "lib/vanilla/routes.rb", "lib/vanilla/snip_handling.rb", "lib/vanilla/snips", "lib/vanilla/snips/start.rb", "lib/vanilla/snips/system.rb", "lib/vanilla/snips/tutorial.rb", "lib/vanilla/test_snips.rb", "lib/vanilla.rb", "bin/vanilla", "public/hatch.png", "public/javascripts", "public/javascripts/jquery-1.2.6.js", "public/javascripts/vanilla.js"]
s.has_rdoc = true
s.homepage = %q{http://github.com/lazyatom/vanilla-rb}
s.rdoc_options = ["--main", "README"]
Expand Down

0 comments on commit c031ee1

Please sign in to comment.