Sha256: acdb67909c3a8756efe773d74e64c2178ee69969d29fdaa4e728e48b1aa8970c
Contents?: true
Size: 744 Bytes
Versions: 8
Compression:
Stored size: 744 Bytes
Contents
#!/usr/bin/env ruby def install current_dir = File.expand_path(File.dirname(__FILE__)) filename = "json-bloomfilter.min.js" source = "#{current_dir}/../js/#{filename}" target_dir = Dir.pwd rails_gems = `bundle list | grep rail` js_dir = "#{target_dir}/app/assets/javascripts" if !rails_gems.empty? && File.directory?(js_dir) target = "#{js_dir}/#{filename}" else target = "#{target_dir}/#{filename}" end puts "Copying #{filename} to #{target}" `cp #{source} #{target}` puts "\t...done" end case ARGV.first when "install" install else puts "No command found" puts "Usage: json-bloomfilter [command]" puts "Command:" puts "\tinstall: installs the json-bloomfilter.min.js into your current folder" end
Version data entries
8 entries across 8 versions & 1 rubygems