wbzyl-sinatra-math 0.0.5 → 0.0.7

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.
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 5
2
+ :patch: 7
3
3
  :major: 0
4
4
  :minor: 0
@@ -23,5 +23,4 @@ App = Rack::Builder.new do
23
23
  map '/lobster' do
24
24
  run Rack::Lobster.new
25
25
  end
26
-
27
26
  end
@@ -1,2 +1,7 @@
1
+ # euler.ru
2
+
3
+ path = File.expand_path("../lib")
4
+ $:.unshift(path) unless $:.include?(path)
5
+
1
6
  require 'sinatra-math'
2
7
  run Sinatra::Euler.new
@@ -1,3 +1,6 @@
1
+ path = File.expand_path("../lib")
2
+ $:.unshift(path) unless $:.include?(path)
3
+
1
4
  require 'sinatra-math'
2
5
 
3
6
  # module Sinatra
@@ -1,2 +1,7 @@
1
+ # phi.ru
2
+
3
+ path = File.expand_path("../lib")
4
+ $:.unshift(path) unless $:.include?(path)
5
+
1
6
  require 'sinatra-math'
2
7
  run Sinatra::Phi.new
@@ -1,3 +1,7 @@
1
- gem 'sinatra-math'
1
+ # pi.ru
2
+
3
+ path = File.expand_path("../lib")
4
+ $:.unshift(path) unless $:.include?(path)
5
+
2
6
  require 'sinatra-math'
3
7
  run Sinatra::Pi.new
@@ -1,3 +1,7 @@
1
- # app.ru
1
+ # rapp.ru
2
+
3
+ path = File.expand_path("../lib")
4
+ $:.unshift(path) unless $:.include?(path)
5
+
2
6
  require 'app'
3
7
  run App
@@ -1,3 +1,5 @@
1
- gem 'sinatra-math'
2
- require 'sinatra-math'
1
+ path = File.expand_path("../lib")
2
+ $:.unshift(path) unless $:.include?(path)
3
+
4
+ require '../lib/sinatra-math'
3
5
  run Sinatra::Sqrt2.new
@@ -15,6 +15,7 @@ module Sinatra
15
15
  end
16
16
 
17
17
  class Phi < Sinatra::Base
18
+ set :app_file, __FILE__ # required
18
19
  set :static, true
19
20
  end
20
21
 
@@ -4,13 +4,11 @@ include BigMath
4
4
 
5
5
  module Sinatra
6
6
  class Phi < Sinatra::Base
7
-
8
7
  get '/?' do
9
8
  prec = params[:prec].to_i
10
9
  @phi = ((BigDecimal('5').sqrt(prec + 1) + 1) / 2).to_s("10F")
11
10
  @cname = 'golden ratio'
12
11
  erb :phi
13
12
  end
14
-
15
13
  end
16
14
  end
@@ -1,4 +1,7 @@
1
- gem 'sinatra-static-assets'
1
+ gem 'emk-sinatra-url-for'
2
+ require 'sinatra/url_for'
3
+
4
+ gem 'wbzyl-sinatra-static-assets'
2
5
  require 'sinatra/static_assets'
3
6
 
4
7
  require 'bigdecimal'
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{sinatra-math}
5
- s.version = "0.0.5"
5
+ s.version = "0.0.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Wlodek Bzyl"]
9
- s.date = %q{2009-05-25}
9
+ s.date = %q{2009-07-26}
10
10
  s.description = %q{This gem contains four modular Sinatra applications:
11
11
  Pi, Euler, Sqrt2, Phi (golden ratio).
12
12
 
@@ -54,12 +54,12 @@ These applications can be used to play with:
54
54
  s.homepage = %q{http://github.com/wbzyl/sinatra-math}
55
55
  s.rdoc_options = ["--charset=UTF-8"]
56
56
  s.require_paths = ["lib"]
57
- s.rubygems_version = %q{1.3.3}
57
+ s.rubygems_version = %q{1.3.5}
58
58
  s.summary = %q{Several modular Sinatra apps to play with and iteratively construct new Rack apps.}
59
59
  s.test_files = [
60
- "examples/menagerie.rb",
61
- "examples/app.rb",
62
- "examples/mathlobster.rb"
60
+ "examples/app.rb",
61
+ "examples/mathlobster.rb",
62
+ "examples/menagerie.rb"
63
63
  ]
64
64
 
65
65
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbzyl-sinatra-math
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wlodek Bzyl
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-25 00:00:00 -07:00
12
+ date: 2009-07-26 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -108,6 +108,6 @@ signing_key:
108
108
  specification_version: 3
109
109
  summary: Several modular Sinatra apps to play with and iteratively construct new Rack apps.
110
110
  test_files:
111
- - examples/menagerie.rb
112
111
  - examples/app.rb
113
112
  - examples/mathlobster.rb
113
+ - examples/menagerie.rb