rsl 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/CHANGELOG CHANGED
@@ -4,3 +4,9 @@ CHANGELOG
4
4
 
5
5
  * Initial release.
6
6
  * Simple least squares fit
7
+
8
+ == 0.0.2
9
+
10
+ * Migrate to github
11
+ * Switch to MIT licence
12
+ * Switch to bundler
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rsl.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Tim Breitkreutz
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,38 @@
1
+ # Rsl
2
+
3
+ == Ruby Scientific Library
4
+
5
+ Native Ruby scientific/statistical/numeric programs, available for use in any application.
6
+
7
+ RSL is distributed under the MIT License.
8
+
9
+ == WARNING
10
+
11
+ Alpha release.
12
+
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ gem 'rsl'
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install rsl
27
+
28
+ ## Usage
29
+
30
+ The best way to check usage is look at the files in the test directory. More detailed documentation to come.
31
+
32
+ ## Contributing
33
+
34
+ 1. Fork it
35
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
36
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
37
+ 4. Push to the branch (`git push origin my-new-feature`)
38
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,22 +1,7 @@
1
- require 'rubygems'
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
2
3
  require 'rake'
3
4
  require 'rake/testtask'
4
- require 'rake/rdoctask'
5
- require 'rake/packagetask'
6
- require 'rake/gempackagetask'
7
- require 'rake/contrib/rubyforgepublisher'
8
-
9
- $:.unshift(File.dirname(__FILE__) + "/lib")
10
- require 'rsl'
11
-
12
- PKG_NAME = 'rsl'
13
- PKG_VERSION = Rsl::VERSION
14
- PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
15
-
16
- RELEASE_NAME = "REL #{PKG_VERSION}"
17
-
18
- RUBY_FORGE_PROJECT = "rsl"
19
- RUBY_FORGE_USER = "timbreitkreutz"
20
5
 
21
6
  desc "Default Task"
22
7
  task :default => [ :clean, :test ]
@@ -34,165 +19,3 @@ Rake::TestTask.new { |t|
34
19
  t.pattern = 'test/*_test.rb'
35
20
  t.verbose = true
36
21
  }
37
-
38
-
39
- # Genereate the RDoc documentation
40
- Rake::RDocTask.new { |rdoc|
41
- rdoc.rdoc_dir = 'doc'
42
- rdoc.title = "RSL -- Ruby Scientific Library"
43
- # rdoc.options << '--line-numbers --inline-source --main README --accessor adv_attr_accessor=M'
44
- rdoc.template = "#{ENV['template']}.rb" if ENV['template']
45
- rdoc.rdoc_files.include('README', 'CHANGELOG')
46
- rdoc.rdoc_files.include('lib/rsl.rb')
47
- rdoc.rdoc_files.include('lib/rsl/*.rb')
48
- }
49
-
50
-
51
- # Create compressed packages
52
- spec = Gem::Specification.new do |s|
53
- s.platform = Gem::Platform::RUBY
54
- s.name = PKG_NAME
55
- s.summary = "A native Ruby Scientific/Numerical library."
56
- s.description = %q{Find and contribute numeric/scientific programs in native Ruby.}
57
- s.version = PKG_VERSION
58
-
59
- s.author = "Tim Breitkreutz"
60
- s.email = "tim@sbrew.com"
61
- s.rubyforge_project = RUBY_FORGE_PROJECT
62
- s.homepage = "http://www.sbrew.com/rsl"
63
-
64
- s.has_rdoc = true
65
- s.requirements << 'none'
66
- s.require_path = 'lib'
67
- s.autorequire = 'rsl'
68
-
69
- s.files = [ "Rakefile", "README", "CHANGELOG" ]
70
- s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
71
- s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
72
- end
73
-
74
- Rake::GemPackageTask.new(spec) do |p|
75
- p.gem_spec = spec
76
- p.need_tar = true
77
- p.need_zip = true
78
- end
79
-
80
- desc "Publish the API documentation"
81
- task :pgem => [:package] do
82
- Rake::SshFilePublisher.new("tim@sbrew.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
83
- end
84
-
85
- desc "Publish the release files to RubyForge."
86
- task :release => [:package] do
87
- files = ["gem", "tgz", "zip"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" }
88
-
89
- if RUBY_FORGE_PROJECT then
90
- require 'net/http'
91
- require 'open-uri'
92
-
93
- project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/"
94
- project_data = open(project_uri) { |data| data.read }
95
- group_id = project_data[/[?&]group_id=(\d+)/, 1]
96
- raise "Couldn't get group id" unless group_id
97
-
98
- # This echos password to shell which is a bit sucky
99
- if ENV["RUBY_FORGE_PASSWORD"]
100
- password = ENV["RUBY_FORGE_PASSWORD"]
101
- else
102
- print "#{RUBY_FORGE_USER}@rubyforge.org's password: "
103
- password = STDIN.gets.chomp
104
- end
105
-
106
- login_response = Net::HTTP.start("rubyforge.org", 80) do |http|
107
- data = [
108
- "login=1",
109
- "form_loginname=#{RUBY_FORGE_USER}",
110
- "form_pw=#{password}"
111
- ].join("&")
112
- http.post("/account/login.php", data)
113
- end
114
-
115
- cookie = login_response["set-cookie"]
116
- raise "Login failed" unless cookie
117
- headers = { "Cookie" => cookie }
118
-
119
- release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}"
120
- release_data = open(release_uri, headers) { |data| data.read }
121
- package_id = release_data[/[?&]package_id=(\d+)/, 1]
122
- raise "Couldn't get package id" unless package_id
123
-
124
- first_file = true
125
- release_id = ""
126
-
127
- files.each do |filename|
128
- basename = File.basename(filename)
129
- file_ext = File.extname(filename)
130
- file_data = File.open(filename, "rb") { |file| file.read }
131
-
132
- puts "Releasing #{basename}..."
133
-
134
- release_response = Net::HTTP.start("rubyforge.org", 80) do |http|
135
- release_date = Time.now.strftime("%Y-%m-%d %H:%M")
136
- type_map = {
137
- ".zip" => "3000",
138
- ".tgz" => "3110",
139
- ".gz" => "3110",
140
- ".gem" => "1400"
141
- }; type_map.default = "9999"
142
- type = type_map[file_ext]
143
- boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor"
144
-
145
- query_hash = if first_file then
146
- {
147
- "group_id" => group_id,
148
- "package_id" => package_id,
149
- "release_name" => RELEASE_NAME,
150
- "release_date" => release_date,
151
- "type_id" => type,
152
- "processor_id" => "8000", # Any
153
- "release_notes" => "",
154
- "release_changes" => "",
155
- "preformatted" => "1",
156
- "submit" => "1"
157
- }
158
- else
159
- {
160
- "group_id" => group_id,
161
- "release_id" => release_id,
162
- "package_id" => package_id,
163
- "step2" => "1",
164
- "type_id" => type,
165
- "processor_id" => "8000", # Any
166
- "submit" => "Add This File"
167
- }
168
- end
169
-
170
- query = "?" + query_hash.map do |(name, value)|
171
- [name, URI.encode(value)].join("=")
172
- end.join("&")
173
-
174
- data = [
175
- "--" + boundary,
176
- "Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"",
177
- "Content-Type: application/octet-stream",
178
- "Content-Transfer-Encoding: binary",
179
- "", file_data, ""
180
- ].join("\x0D\x0A")
181
-
182
- release_headers = headers.merge(
183
- "Content-Type" => "multipart/form-data; boundary=#{boundary}"
184
- )
185
-
186
- target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php"
187
- http.post(target + query, data, release_headers)
188
- end
189
-
190
- if first_file then
191
- release_id = release_response.body[/release_id=(\d+)/, 1]
192
- raise("Couldn't get release id") unless release_id
193
- end
194
-
195
- first_file = false
196
- end
197
- end
198
- end
data/lib/rsl.rb CHANGED
@@ -1,2 +1,2 @@
1
- require File.dirname(__FILE__) + '/rsl/base'
1
+ require File.dirname(__FILE__) + '/rsl/version'
2
2
  require File.dirname(__FILE__) + '/rsl/least_squares_fit'
@@ -0,0 +1,3 @@
1
+ module Rsl
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/rsl/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["Tim Breitkreutz, Lori Olson"]
6
+ gem.email = ["tim@sbrew.com"]
7
+ gem.description = %q{Ruby scientific/statistical library}
8
+ gem.summary = %q{Ruby scientific/statistical library with MIT licence}
9
+ gem.homepage = "https://github.com/timbreitkreutz/rsl"
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "rsl"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = Rsl::VERSION
17
+ end
metadata CHANGED
@@ -1,52 +1,57 @@
1
- --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
3
- specification_version: 1
1
+ --- !ruby/object:Gem::Specification
4
2
  name: rsl
5
- version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2006-03-30 00:00:00 -07:00
8
- summary: A native Ruby Scientific/Numerical library.
9
- require_paths:
10
- - lib
11
- email: tim@sbrew.com
12
- homepage: http://www.sbrew.com/rsl
13
- rubyforge_project: rsl
14
- description: Find and contribute numeric/scientific programs in native Ruby.
15
- autorequire: rsl
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: true
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ prerelease:
25
6
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- authors:
29
- - Tim Breitkreutz
30
- files:
31
- - Rakefile
32
- - README
7
+ authors:
8
+ - Tim Breitkreutz, Lori Olson
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-12 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Ruby scientific/statistical library
15
+ email:
16
+ - tim@sbrew.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
33
22
  - CHANGELOG
34
- - lib/rsl
23
+ - Gemfile
24
+ - LICENSE
25
+ - README.md
26
+ - Rakefile
35
27
  - lib/rsl.rb
36
- - lib/rsl/base.rb
37
28
  - lib/rsl/least_squares_fit.rb
29
+ - lib/rsl/version.rb
30
+ - rsl.gemspec
38
31
  - test/least_squares_test.rb
39
- test_files: []
40
-
32
+ homepage: https://github.com/timbreitkreutz/rsl
33
+ licenses: []
34
+ post_install_message:
41
35
  rdoc_options: []
42
-
43
- extra_rdoc_files: []
44
-
45
- executables: []
46
-
47
- extensions: []
48
-
49
- requirements:
50
- - none
51
- dependencies: []
52
-
36
+ require_paths:
37
+ - lib
38
+ required_ruby_version: !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ requirements: []
51
+ rubyforge_project:
52
+ rubygems_version: 1.8.24
53
+ signing_key:
54
+ specification_version: 3
55
+ summary: Ruby scientific/statistical library with MIT licence
56
+ test_files:
57
+ - test/least_squares_test.rb
data/README DELETED
@@ -1,11 +0,0 @@
1
- == Ruby Scientific Library
2
-
3
- Native Ruby scientific/numeric programs, available for use in any application.
4
-
5
- For more information see http://www.sbrew.com/rsl
6
-
7
- RSL is distributed under the Ruby License.
8
-
9
- == WARNING
10
-
11
- This is alpha-quality software. It is still very young.
@@ -1,3 +0,0 @@
1
- module Rsl
2
- VERSION = '0.0.1'
3
- end