Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to bundler packaging

  • Loading branch information...
commit 03d9dfc290fd036a3294c48d173dd01f2d5c34b2 1 parent ad82a7d
tim authored
View
17 .gitignore
@@ -0,0 +1,17 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
View
6 CHANGELOG
@@ -4,3 +4,9 @@ CHANGELOG
* Initial release.
* Simple least squares fit
+
+== 0.0.2
+
+* Migrate to github
+* Switch to MIT licence
+* Switch to bundler
View
4 Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in rsl.gemspec
+gemspec
View
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2012 Tim Breitkreutz
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
9 README
@@ -1,9 +0,0 @@
-== Ruby Scientific Library
-
-Native Ruby scientific/numeric programs, available for use in any application.
-
-RSL is distributed under the Ruby License.
-
-== WARNING
-
-This is alpha-quality software. It is still very young.
View
38 README.md
@@ -0,0 +1,38 @@
+# Rsl
+
+== Ruby Scientific Library
+
+Native Ruby scientific/statistical/numeric programs, available for use in any application.
+
+RSL is distributed under the MIT License.
+
+== WARNING
+
+Alpha release.
+
+
+## Installation
+
+Add this line to your application's Gemfile:
+
+ gem 'rsl'
+
+And then execute:
+
+ $ bundle
+
+Or install it yourself as:
+
+ $ gem install rsl
+
+## Usage
+
+TODO: Write usage instructions here
+
+## Contributing
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Added some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
View
181 Rakefile
@@ -1,22 +1,7 @@
-require 'rubygems'
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
require 'rake'
require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/packagetask'
-require 'rake/gempackagetask'
-require 'rake/contrib/rubyforgepublisher'
-
-$:.unshift(File.dirname(__FILE__) + "/lib")
-require 'rsl'
-
-PKG_NAME = 'rsl'
-PKG_VERSION = Rsl::VERSION
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
-
-RELEASE_NAME = "REL #{PKG_VERSION}"
-
-RUBY_FORGE_PROJECT = "rsl"
-RUBY_FORGE_USER = "timbreitkreutz"
desc "Default Task"
task :default => [ :clean, :test ]
@@ -34,165 +19,3 @@ Rake::TestTask.new { |t|
t.pattern = 'test/*_test.rb'
t.verbose = true
}
-
-
-# Genereate the RDoc documentation
-Rake::RDocTask.new { |rdoc|
- rdoc.rdoc_dir = 'doc'
- rdoc.title = "RSL -- Ruby Scientific Library"
-# rdoc.options << '--line-numbers --inline-source --main README --accessor adv_attr_accessor=M'
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
- rdoc.rdoc_files.include('README', 'CHANGELOG')
- rdoc.rdoc_files.include('lib/rsl.rb')
- rdoc.rdoc_files.include('lib/rsl/*.rb')
-}
-
-
-# Create compressed packages
-spec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = PKG_NAME
- s.summary = "A native Ruby Scientific/Numerical library."
- s.description = %q{Find and contribute numeric/scientific programs in native Ruby.}
- s.version = PKG_VERSION
-
- s.author = "Tim Breitkreutz"
- s.email = "tim@sbrew.com"
- s.rubyforge_project = RUBY_FORGE_PROJECT
- s.homepage = "http://www.sbrew.com/rsl"
-
- s.has_rdoc = true
- s.requirements << 'none'
- s.require_path = 'lib'
- s.autorequire = 'rsl'
-
- s.files = [ "Rakefile", "README", "CHANGELOG" ]
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
-end
-
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar = true
- p.need_zip = true
-end
-
-desc "Publish the API documentation"
-task :pgem => [:package] do
- Rake::SshFilePublisher.new("tim@sbrew.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
-end
-
-desc "Publish the release files to RubyForge."
-task :release => [:package] do
- files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
-
- if RUBY_FORGE_PROJECT then
- require 'net/http'
- require 'open-uri'
-
- project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
- project_data = open(project_uri) { |data| data.read }
- group_id = project_data[/[?&]group_id=(\d+)/, 1]
- raise "Couldn't get group id" unless group_id
-
- # This echos password to shell which is a bit sucky
- if ENV["RUBY_FORGE_PASSWORD"]
- password = ENV["RUBY_FORGE_PASSWORD"]
- else
- print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
- password = STDIN.gets.chomp
- end
-
- login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
- data = [
- "login=1",
- "form_loginname=#{RUBY_FORGE_USER}",
- "form_pw=#{password}"
- ].join("&")
- http.post("/account/login.php", data)
- end
-
- cookie = login_response["set-cookie"]
- raise "Login failed" unless cookie
- headers = { "Cookie" => cookie }
-
- release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
- release_data = open(release_uri, headers) { |data| data.read }
- package_id = release_data[/[?&]package_id=(\d+)/, 1]
- raise "Couldn't get package id" unless package_id
-
- first_file = true
- release_id = ""
-
- files.each do |filename|
- basename = File.basename(filename)
- file_ext = File.extname(filename)
- file_data = File.open(filename, "rb") { |file| file.read }
-
- puts "Releasing #{basename}..."
-
- release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
- release_date = Time.now.strftime("%Y-%m-%d %H:%M")
- type_map = {
- ".zip" => "3000",
- ".tgz" => "3110",
- ".gz" => "3110",
- ".gem" => "1400"
- }; type_map.default = "9999"
- type = type_map[file_ext]
- boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
-
- query_hash = if first_file then
- {
- "group_id" => group_id,
- "package_id" => package_id,
- "release_name" => RELEASE_NAME,
- "release_date" => release_date,
- "type_id" => type,
- "processor_id" => "8000", # Any
- "release_notes" => "",
- "release_changes" => "",
- "preformatted" => "1",
- "submit" => "1"
- }
- else
- {
- "group_id" => group_id,
- "release_id" => release_id,
- "package_id" => package_id,
- "step2" => "1",
- "type_id" => type,
- "processor_id" => "8000", # Any
- "submit" => "Add This File"
- }
- end
-
- query = "?" + query_hash.map do |(name, value)|
- [name, URI.encode(value)].join("=")
- end.join("&")
-
- data = [
- "--" + boundary,
- "Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
- "Content-Type: application/octet-stream",
- "Content-Transfer-Encoding: binary",
- "", file_data, ""
- ].join("\x0D\x0A")
-
- release_headers = headers.merge(
- "Content-Type" => "multipart/form-data; boundary=#{boundary}"
- )
-
- target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
- http.post(target + query, data, release_headers)
- end
-
- if first_file then
- release_id = release_response.body[/release_id=(\d+)/, 1]
- raise("Couldn't get release id") unless release_id
- end
-
- first_file = false
- end
- end
-end
View
2  lib/rsl.rb
@@ -1,2 +1,2 @@
-require File.dirname(__FILE__) + '/rsl/base'
+require File.dirname(__FILE__) + '/rsl/version'
require File.dirname(__FILE__) + '/rsl/least_squares_fit'
View
3  lib/rsl/base.rb
@@ -1,3 +0,0 @@
-module Rsl
- VERSION = '0.0.1'
-end
View
3  lib/rsl/version.rb
@@ -0,0 +1,3 @@
+module Rsl
+ VERSION = "0.0.2"
+end
View
17 rsl.gemspec
@@ -0,0 +1,17 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/rsl/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["Tim Breitkreutz, Lori Olson"]
+ gem.email = ["tim@sbrew.com"]
+ gem.description = %q{Ruby scientific/statistical library}
+ gem.summary = %q{Ruby scientific/statistical library with MIT licence}
+ gem.homepage = "https://github.com/timbreitkreutz/rsl"
+
+ gem.files = `git ls-files`.split($\)
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
+ gem.name = "rsl"
+ gem.require_paths = ["lib"]
+ gem.version = Rsl::VERSION
+end
Please sign in to comment.
Something went wrong with that request. Please try again.