catalyst 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,6 +2,7 @@ source "http://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
5
+ gem 'moneta'
5
6
 
6
7
  # Add dependencies to develop your gem here.
7
8
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -7,6 +7,7 @@ GEM
7
7
  git (>= 1.2.5)
8
8
  rake
9
9
  mocha (0.9.12)
10
+ moneta (0.6.0)
10
11
  rake (0.8.7)
11
12
  rcov (0.9.9)
12
13
  shoulda (2.11.3)
@@ -18,5 +19,6 @@ DEPENDENCIES
18
19
  bundler (~> 1.0.0)
19
20
  jeweler (~> 1.5.2)
20
21
  mocha
22
+ moneta
21
23
  rcov
22
24
  shoulda
data/Rakefile CHANGED
@@ -15,8 +15,8 @@ Jeweler::Tasks.new do |gem|
15
15
  gem.name = "catalyst"
16
16
  gem.homepage = "http://github.com/auser/catalyst"
17
17
  gem.license = "MIT"
18
- gem.summary = %Q{TODO: one-line summary of your gem}
19
- gem.description = %Q{TODO: longer description of your gem}
18
+ gem.summary = %Q{Quickly build a framework for providing a middleware-like structure}
19
+ gem.description = %Q{Quickly build a framework for providing a middleware-like structure}
20
20
  gem.email = "arilerner@mac.com"
21
21
  gem.authors = ["Ari Lerner"]
22
22
  # Include your dependencies below. Runtime dependencies are required when using your gem,
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
data/catalyst.gemspec ADDED
@@ -0,0 +1,72 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{catalyst}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Ari Lerner"]
12
+ s.date = %q{2011-06-15}
13
+ s.description = %q{Quickly build a framework for providing a middleware-like structure}
14
+ s.email = %q{arilerner@mac.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "catalyst.gemspec",
28
+ "lib/catalyst.rb",
29
+ "lib/catalyst/runner.rb",
30
+ "test/helper.rb",
31
+ "test/test_catalyst.rb",
32
+ "test/test_runner.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/auser/catalyst}
35
+ s.licenses = ["MIT"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.6.2}
38
+ s.summary = %q{Quickly build a framework for providing a middleware-like structure}
39
+ s.test_files = [
40
+ "test/helper.rb",
41
+ "test/test_catalyst.rb",
42
+ "test/test_runner.rb"
43
+ ]
44
+
45
+ if s.respond_to? :specification_version then
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_runtime_dependency(%q<moneta>, [">= 0"])
50
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
51
+ s.add_development_dependency(%q<mocha>, [">= 0"])
52
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
53
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
54
+ s.add_development_dependency(%q<rcov>, [">= 0"])
55
+ else
56
+ s.add_dependency(%q<moneta>, [">= 0"])
57
+ s.add_dependency(%q<shoulda>, [">= 0"])
58
+ s.add_dependency(%q<mocha>, [">= 0"])
59
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
60
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
61
+ s.add_dependency(%q<rcov>, [">= 0"])
62
+ end
63
+ else
64
+ s.add_dependency(%q<moneta>, [">= 0"])
65
+ s.add_dependency(%q<shoulda>, [">= 0"])
66
+ s.add_dependency(%q<mocha>, [">= 0"])
67
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
68
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
69
+ s.add_dependency(%q<rcov>, [">= 0"])
70
+ end
71
+ end
72
+
data/lib/catalyst.rb CHANGED
@@ -1,11 +1,12 @@
1
1
  $:.unshift(File.dirname(__FILE__))
2
+ require 'moneta'
2
3
 
3
4
  module Catalyst
4
5
  autoload :Runner, 'catalyst/runner'
5
- autoload :Environment, 'catalyst/environment'
6
6
 
7
7
  class RunStack
8
8
 
9
+ # Start a RunStack with a block
9
10
  def initialize(&block)
10
11
  instance_eval(&block) if block_given?
11
12
  end
@@ -37,7 +38,7 @@ module Catalyst
37
38
 
38
39
  # Start off the middleware
39
40
  def call(env)
40
- to_app.call(env.is_a?(Environment) ? env : Environment.new(env))
41
+ to_app.call(env)
41
42
  end
42
43
  end
43
44
  end
data/test/helper.rb CHANGED
@@ -18,7 +18,7 @@ require 'catalyst'
18
18
  class Test::Unit::TestCase
19
19
 
20
20
  def new_environment(env={})
21
- Catalyst::Environment.new(env)
21
+ {}.merge(env)
22
22
  end
23
23
 
24
24
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: catalyst
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.1
5
+ version: 0.0.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ari Lerner
@@ -10,11 +10,11 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-14 00:00:00 -04:00
13
+ date: 2011-06-15 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: shoulda
17
+ name: moneta
18
18
  prerelease: false
19
19
  requirement: &id001 !ruby/object:Gem::Requirement
20
20
  none: false
@@ -22,10 +22,10 @@ dependencies:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
24
  version: "0"
25
- type: :development
25
+ type: :runtime
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency
28
- name: mocha
28
+ name: shoulda
29
29
  prerelease: false
30
30
  requirement: &id002 !ruby/object:Gem::Requirement
31
31
  none: false
@@ -36,38 +36,49 @@ dependencies:
36
36
  type: :development
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
39
- name: bundler
39
+ name: mocha
40
40
  prerelease: false
41
41
  requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: bundler
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
42
53
  none: false
43
54
  requirements:
44
55
  - - ~>
45
56
  - !ruby/object:Gem::Version
46
57
  version: 1.0.0
47
58
  type: :development
48
- version_requirements: *id003
59
+ version_requirements: *id004
49
60
  - !ruby/object:Gem::Dependency
50
61
  name: jeweler
51
62
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
63
+ requirement: &id005 !ruby/object:Gem::Requirement
53
64
  none: false
54
65
  requirements:
55
66
  - - ~>
56
67
  - !ruby/object:Gem::Version
57
68
  version: 1.5.2
58
69
  type: :development
59
- version_requirements: *id004
70
+ version_requirements: *id005
60
71
  - !ruby/object:Gem::Dependency
61
72
  name: rcov
62
73
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
74
+ requirement: &id006 !ruby/object:Gem::Requirement
64
75
  none: false
65
76
  requirements:
66
77
  - - ">="
67
78
  - !ruby/object:Gem::Version
68
79
  version: "0"
69
80
  type: :development
70
- version_requirements: *id005
81
+ version_requirements: *id006
71
82
  description: Quickly build a framework for providing a middleware-like structure
72
83
  email: arilerner@mac.com
73
84
  executables: []
@@ -85,8 +96,8 @@ files:
85
96
  - README.rdoc
86
97
  - Rakefile
87
98
  - VERSION
99
+ - catalyst.gemspec
88
100
  - lib/catalyst.rb
89
- - lib/catalyst/environment.rb
90
101
  - lib/catalyst/runner.rb
91
102
  - test/helper.rb
92
103
  - test/test_catalyst.rb
@@ -1,15 +0,0 @@
1
- module Catalyst
2
- class Environment
3
-
4
- attr_reader :hash
5
-
6
- def initialize(hsh={})
7
- @hash = hsh
8
- end
9
-
10
- def []=(k,v)
11
- @hash[k] = v
12
- end
13
-
14
- end
15
- end