swee 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6d3fb00b524dff4a95f163d99ce8de1499007de
4
- data.tar.gz: 64cf3eb2bfe632c48dcf730daf801516590cdfbc
3
+ metadata.gz: 6f676a6ce94740eea37b0702fb058d2a92aa0b6d
4
+ data.tar.gz: aee59465637b5c54a7c5a1c0c396cc88909999c2
5
5
  SHA512:
6
- metadata.gz: 1d61382816067f99614e37f005f91df500e50381323de38e8c469157b05d809ab01d8f62e61d8f0bf636d6b702ac8f3c4686c88a9bfe21dbe7ed15c3a60fd537
7
- data.tar.gz: af69221ebecf0aec1211765ec80ec7bfc782c2f2f64e6367e7bfff21316a68c46e65b1693e2f34b39af276aca84c0b2d3cf5767103cdcc1acac38710dbfba8a9
6
+ metadata.gz: 27e6b710d77dfc1292695510d0f61715b22f212137a837d1ee02b06e1d50ee3a6eb829f22e15354d18b612282739171c9bbb43eb0fdc7579388913001ae68d6f
7
+ data.tar.gz: 749910ee7fab1010d5c8ae6bafc6ed0eb7afc11b6fba31930a11bf41c6bcdab4b27d89b811e1991b6366f0a056d6eafc5c57bea4e238fe68787a9c371a15b82c
data/README.md CHANGED
@@ -15,8 +15,15 @@ Swee 是一个轻量级的 ruby web 框架, 包含一个http服务器。
15
15
 
16
16
  请使用ruby2.1.0或以上版本, 然后安装 swee 的Gem
17
17
 
18
- ```ruby
19
- gem 'swee'
18
+ ```console
19
+ gem install swee -v=0.0.1
20
+ ```
21
+
22
+ bundler 安装方式
23
+ 添加以下代码到 Gemfile
24
+
25
+ ```console
26
+ gem 'swee', '~> 0.0.1'
20
27
  ```
21
28
 
22
29
  ## 使用方法
@@ -205,8 +212,8 @@ render方法(可省略)
205
212
 
206
213
  ## 贡献代码
207
214
 
208
- 1. Fork it ( https://github.com/[my-github-username]/swee/fork )
209
- 2. Create your feature branch (`git checkout -b my-new-feature`)
210
- 3. Commit your changes (`git commit -am 'Add some feature'`)
211
- 4. Push to the branch (`git push origin my-new-feature`)
212
- 5. Create a new Pull Request
215
+ 1. Fork 分支 ( https://github.com/yoshikizh/swee/fork )
216
+ 2. 创建你自己的分支 (`git checkout -b my-new-feature`)
217
+ 3. 并提交 (`git commit -am 'Add some feature'`)
218
+ 4. 推送到新分支 (`git push origin my-new-feature`)
219
+ 5. github上请求一个 pull request
data/bin/swee CHANGED
@@ -1,38 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # argv = ARGV
4
-
5
- # _cmd = argv.shift
6
-
7
- # # 简单解析命令行参数 启动服务 和 设置环境
8
-
9
- # ENV["start_port"] = "3000"
10
- # ENV["app_env"] = "development"
11
-
12
- # case _cmd
13
- # when "s"
14
- # while !argv.empty?
15
- # _cmd = argv.shift
16
- # s = argv.shift
17
- # raise "命令#{_cmd}缺少参数" if s.nil?
18
- # case _cmd
19
- # when "-p"
20
- # ENV["start_port"] = s if s =~ /[0-9]+/
21
- # when "-e"
22
- # ENV["app_env"] = s if s =~ /[a-z]+/
23
- # end
24
- # end
25
- # require 'swee'
26
- # Swee::Server.boot!
27
- # when "c"
28
- # require 'irb'
29
- # require 'swee'
30
-
31
- # IRB.start
32
- # else
33
- # p "help"
34
- # end
35
-
36
3
  require 'swee'
37
4
 
38
5
  Swee::Engine.boot! ARGV
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "swee/version"
2
3
  require "swee/engine"
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  class AppExecutor
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  class Config
3
4
  class BaseConfig
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  class Connection < EventMachine::Connection
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "erb"
2
3
 
3
4
  module Swee
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  module ControllerFilter
3
4
  @@fliter_methods = Hash.new {|h1,k1| h1[k1] = [] }
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Daemonize
2
3
  def safefork
3
4
  tryagain = true
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require 'optparse'
2
3
  require 'erb'
3
4
  require 'rack'
@@ -1,2 +1,3 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class OptionsError < ArgumentError
2
3
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "erb"
2
3
  # require "cgi"
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  module Installer
3
4
  module_function
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  module Lodder
3
4
  @@mtime_files_cache = {}
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Rack
2
3
  class CommonLogger
3
4
  def initialize(app, logger=nil)
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
 
3
4
  class ContentLength
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
 
3
4
  class Reloader
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "logger" if !defined? Logger
2
3
 
3
4
  class Logger
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  class Routes
3
4
  @@tables = {}
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
  class Server
3
4
  include Daemonize
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class Object
2
3
  def try(*a, &b)
3
4
  try!(*a, &b) if a.empty? || respond_to?(a.first)
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "fiber"
2
3
 
3
4
  class Swee::SweeLogger
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Thin
2
3
  # Store HTTP header name-value pairs direcly to a string
3
4
  # and allow duplicated entries on some names.
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require 'tempfile'
2
3
 
3
4
  module Thin
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Thin
2
3
 
3
4
  module VERSION #:nodoc:
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
3
4
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require "erb"
2
3
 
3
4
  module Swee
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
 
3
4
  # 服务器配置
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class HomeController < Swee::Controller
2
3
  before_filter :set_variable, :only => [:index]
3
4
 
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  class Swee::Routes
2
3
  # 参考 rails 设计的 3种方式
3
4
  # get,post,match 分别对应 controller 中的 action
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  module Swee
2
3
 
3
4
  # 应用配置
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "秀秀"