restpack-web 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.
data/.gitignore ADDED
@@ -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/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'rspec', :require => 'spec'
5
+ end
6
+
7
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+ -----------
3
+
4
+ Copyright (c) 2013 Gavin Joyce and RestPack contributors
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
7
+ this software and associated documentation files (the "Software"), to deal in
8
+ the Software without restriction, including without limitation the rights to
9
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
10
+ of the Software, and to permit persons to whom the Software is furnished to do
11
+ so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ require_relative 'lib/restpack-web/version'
2
+
3
+ task :default => :test
4
+ task :test => :spec
5
+
6
+ begin
7
+ require "rspec/core/rake_task"
8
+
9
+ desc "Run all specs"
10
+ RSpec::Core::RakeTask.new(:spec) do |t|
11
+ t.rspec_opts = ['-cfs']
12
+ end
13
+ rescue LoadError
14
+ end
15
+
16
+
17
+ task :gem do
18
+ ["gem:build", "gem:push"].each do |task|
19
+ Rake::Task[task].reenable
20
+ Rake::Task[task].invoke
21
+ end
22
+ end
23
+
24
+ namespace :gem do
25
+ task :build do
26
+ sh "gem build restpack-web.gemspec"
27
+ end
28
+
29
+ task :push do
30
+ sh "gem push restpack-web-#{RestPack::Web::VERSION}.gem"
31
+ end
32
+ end
@@ -0,0 +1,5 @@
1
+ module RestPack
2
+ module Web
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ require 'restpack-web/version'
2
+
3
+ module RestPack
4
+ class Web
5
+ def initialize(app)
6
+ @app = app
7
+ end
8
+
9
+ def call(env)
10
+ env["restpack"] ||= {}
11
+ host = env["SERVER_NAME"]
12
+
13
+ env["restpack"][:host] = host #TODO: GJ: add some magic
14
+
15
+ @app.call(env)
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'restpack-web/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "restpack-web"
8
+ gem.version = RestPack::Web::VERSION
9
+ gem.authors = ["Gavin Joyce"]
10
+ gem.email = ["gavinjoyce@gmail.com"]
11
+ gem.description = %q{...}
12
+ gem.summary = %q{...}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+
20
+ gem.add_dependency 'rack-auto-session-domain'
21
+ gem.add_development_dependency 'rack'
22
+ gem.add_development_dependency 'rspec', '~> 2.12'
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -65,7 +65,14 @@ email:
65
65
  executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
- files: []
68
+ files:
69
+ - .gitignore
70
+ - Gemfile
71
+ - LICENSE
72
+ - Rakefile
73
+ - lib/restpack-web.rb
74
+ - lib/restpack-web/version.rb
75
+ - restpack-web.gemspec
69
76
  homepage: ''
70
77
  licenses: []
71
78
  post_install_message: