Skip to content

Commit

Permalink
remove redundancy in building gems
Browse files Browse the repository at this point in the history
gem build declarative_authorization.gemspec works just fine if
spec.files has Dir.globs in it.

Signed-off-by: Steffen Bartsch <sbartsch@tzi.org>
  • Loading branch information
timcharper authored and stffn committed Apr 30, 2010
1 parent b18d29d commit c7f75e0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
8 changes: 0 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,3 @@ desc "clone the garlic repo (for running ci tasks)"
task :get_garlic do
sh "git clone git://github.com/ianwhite/garlic.git garlic"
end

desc "Expand filelist in src gemspec"
task :build_gemspec do
gemspec_data = File.read("declarative_authorization.gemspec.src")
gemspec_data.gsub!(/\.files = (.*)/) {|m| ".files = #{eval($1).inspect}"}
File.open("declarative_authorization.gemspec", "w") {|f| f.write(gemspec_data)}
end

2 changes: 1 addition & 1 deletion declarative_authorization.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.authors = ["Steffen Bartsch"]
s.summary = "declarative_authorization is a Rails plugin for authorization based on readable authorization rules."
s.email = "sbartsch@tzi.org"
s.files = ["CHANGELOG", "MIT-LICENSE", "README.rdoc", "Rakefile", "authorization_rules.dist.rb", "garlic_example.rb", "init.rb", "app/controllers/authorization_rules_controller.rb", "app/controllers/authorization_usages_controller.rb", "app/helpers/authorization_rules_helper.rb", "app/views/authorization_usages/index.html.erb", "app/views/authorization_rules/index.html.erb", "app/views/authorization_rules/_show_graph.erb", "app/views/authorization_rules/_change.erb", "app/views/authorization_rules/_suggestions.erb", "app/views/authorization_rules/graph.dot.erb", "app/views/authorization_rules/change.html.erb", "app/views/authorization_rules/graph.html.erb", "config/routes.rb", "lib/declarative_authorization.rb", "lib/declarative_authorization/in_controller.rb", "lib/declarative_authorization/reader.rb", "lib/declarative_authorization/rails_legacy.rb", "lib/declarative_authorization/obligation_scope.rb", "lib/declarative_authorization/in_model.rb", "lib/declarative_authorization/helper.rb", "lib/declarative_authorization/development_support/analyzer.rb", "lib/declarative_authorization/development_support/change_analyzer.rb", "lib/declarative_authorization/development_support/change_supporter.rb", "lib/declarative_authorization/development_support/development_support.rb", "lib/declarative_authorization/authorization.rb", "lib/declarative_authorization/maintenance.rb", "lib/declarative_authorization.rb", "test/authorization_test.rb", "test/schema.sql", "test/maintenance_test.rb", "test/model_test.rb", "test/controller_test.rb", "test/development_support", "test/helper_test.rb", "test/dsl_reader_test.rb", "test/controller_filter_resource_access_test.rb", "test/test_helper.rb"]
s.files = %w{CHANGELOG MIT-LICENSE README.rdoc Rakefile authorization_rules.dist.rb garlic_example.rb init.rb} + Dir["app/**/*.rb"] + Dir["app/**/*.erb"] + Dir["config/*"] + Dir["lib/*.rb"] + Dir["lib/**/*.rb"] + Dir["test/*"]
s.has_rdoc = true
s.extra_rdoc_files = ['README.rdoc', 'CHANGELOG']
s.homepage = %q{http://github.com/stffn/declarative_authorization}
Expand Down
17 changes: 0 additions & 17 deletions declarative_authorization.gemspec.src

This file was deleted.

0 comments on commit c7f75e0

Please sign in to comment.