strobe 0.1.6 → 0.2.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/strobe.rb +32 -16
- data/lib/strobe/addons/social.rb +130 -0
- data/lib/strobe/cli.rb +20 -12
- data/lib/strobe/cli/main.rb +53 -11
- data/lib/strobe/cli/preview.rb +4 -2
- data/lib/strobe/cli/settings.rb +95 -42
- data/lib/strobe/cli/users.rb +4 -2
- data/lib/strobe/collection.rb +1 -1
- data/lib/strobe/config.rb +181 -0
- data/lib/strobe/connection.rb +58 -19
- data/lib/strobe/exception_notifier.rb +59 -0
- data/lib/strobe/identity_map.rb +4 -2
- data/lib/strobe/middleware/addons.rb +73 -0
- data/lib/strobe/middleware/proxy.rb +315 -105
- data/lib/strobe/middleware/rewrite.rb +14 -1
- data/lib/strobe/resource/base.rb +2 -2
- data/lib/strobe/resources.rb +1 -0
- data/lib/strobe/resources/application.rb +10 -1
- data/lib/strobe/resources/deploy.rb +14 -0
- data/lib/strobe/sproutcore.rb +2 -1
- metadata +46 -8
@@ -6,12 +6,25 @@ module Strobe
|
|
6
6
|
|
7
7
|
def call(env)
|
8
8
|
status, hdrs, body = @app.call(env)
|
9
|
+
original_response = [status, hdrs, body]
|
9
10
|
|
10
11
|
if status == 404
|
11
12
|
path_info = env['PATH_INFO']
|
12
13
|
env['PATH_INFO'] = "#{path_info}/index.html".gsub('//', '/')
|
13
14
|
|
14
|
-
|
15
|
+
status, hdrs, body = @app.call(env)
|
16
|
+
|
17
|
+
if status == 404
|
18
|
+
env['PATH_INFO'] = "/404.html"
|
19
|
+
|
20
|
+
status, hdrs, body = @app.call(env)
|
21
|
+
|
22
|
+
if status == 404
|
23
|
+
status, hdrs, body = original_response
|
24
|
+
else
|
25
|
+
status = 404
|
26
|
+
end
|
27
|
+
end
|
15
28
|
end
|
16
29
|
|
17
30
|
[ status, hdrs, body ]
|
data/lib/strobe/resource/base.rb
CHANGED
@@ -202,13 +202,13 @@ module Strobe
|
|
202
202
|
errors = @response.body['errors']
|
203
203
|
|
204
204
|
if msg = errors['request']
|
205
|
-
raise RequestError,
|
205
|
+
raise RequestError.new(msg, :request => @response.request, :response => @response)
|
206
206
|
end
|
207
207
|
|
208
208
|
errors = errors[root] if errors
|
209
209
|
handle_errors(errors) if errors
|
210
210
|
else
|
211
|
-
raise
|
211
|
+
raise ServerError.new(msg, :request => @response.request, :response => @response)
|
212
212
|
end
|
213
213
|
|
214
214
|
false
|
data/lib/strobe/resources.rb
CHANGED
@@ -9,6 +9,7 @@ module Strobe
|
|
9
9
|
has 1, :account
|
10
10
|
has n, :teams
|
11
11
|
has n, :users
|
12
|
+
has n, :deploys
|
12
13
|
|
13
14
|
filter :path
|
14
15
|
|
@@ -44,11 +45,19 @@ module Strobe
|
|
44
45
|
end
|
45
46
|
|
46
47
|
def ensure_sane_application_path
|
47
|
-
if self[:path] &&
|
48
|
+
if self[:path] && empty?
|
48
49
|
errors.add('path', 'is not a sane application directory')
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
53
|
+
def empty?
|
54
|
+
path = self[:path]
|
55
|
+
files = Dir["#{path}/**/*"] -
|
56
|
+
Dir["#{path}/strobe/**/*"] -
|
57
|
+
["#{path}/strobe"]
|
58
|
+
files.empty?
|
59
|
+
end
|
60
|
+
|
52
61
|
def build_packfile(opts)
|
53
62
|
Dir.chdir self[:path] do
|
54
63
|
PackFile.build(opts) do |m|
|
data/lib/strobe/sproutcore.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strobe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 0.1
|
4
|
+
prerelease: 6
|
5
|
+
version: 0.2.0.beta.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Carl Lerche
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-07-16 00:00:00 +09:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -47,27 +47,60 @@ dependencies:
|
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: thin
|
51
51
|
prerelease: false
|
52
52
|
requirement: &id004 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 1.2.0
|
58
58
|
type: :runtime
|
59
59
|
version_requirements: *id004
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
|
-
name:
|
61
|
+
name: em-http-request
|
62
62
|
prerelease: false
|
63
63
|
requirement: &id005 !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.0.0.beta
|
69
|
+
type: :runtime
|
70
|
+
version_requirements: *id005
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: thor
|
73
|
+
prerelease: false
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ~>
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: 0.14.0
|
80
|
+
type: :runtime
|
81
|
+
version_requirements: *id006
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: oauth
|
84
|
+
prerelease: false
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ~>
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: 0.4.4
|
91
|
+
type: :runtime
|
92
|
+
version_requirements: *id007
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: launchy
|
95
|
+
prerelease: false
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
64
97
|
none: false
|
65
98
|
requirements:
|
66
99
|
- - ">="
|
67
100
|
- !ruby/object:Gem::Version
|
68
101
|
version: "0"
|
69
102
|
type: :runtime
|
70
|
-
version_requirements: *
|
103
|
+
version_requirements: *id008
|
71
104
|
description: The client library for deploying applications to Strobe's HTML5 deployment platform
|
72
105
|
email:
|
73
106
|
- carl@strobecorp.com
|
@@ -78,6 +111,7 @@ extensions: []
|
|
78
111
|
extra_rdoc_files: []
|
79
112
|
|
80
113
|
files:
|
114
|
+
- lib/strobe/addons/social.rb
|
81
115
|
- lib/strobe/association.rb
|
82
116
|
- lib/strobe/cli/deploy_progress.rb
|
83
117
|
- lib/strobe/cli/input.rb
|
@@ -89,9 +123,12 @@ files:
|
|
89
123
|
- lib/strobe/cli/users.rb
|
90
124
|
- lib/strobe/cli.rb
|
91
125
|
- lib/strobe/collection.rb
|
126
|
+
- lib/strobe/config.rb
|
92
127
|
- lib/strobe/connection.rb
|
128
|
+
- lib/strobe/exception_notifier.rb
|
93
129
|
- lib/strobe/identity_map.rb
|
94
130
|
- lib/strobe/key.rb
|
131
|
+
- lib/strobe/middleware/addons.rb
|
95
132
|
- lib/strobe/middleware/proxy.rb
|
96
133
|
- lib/strobe/middleware/rewrite.rb
|
97
134
|
- lib/strobe/resource/base.rb
|
@@ -100,6 +137,7 @@ files:
|
|
100
137
|
- lib/strobe/resources/account.rb
|
101
138
|
- lib/strobe/resources/application.rb
|
102
139
|
- lib/strobe/resources/assignment.rb
|
140
|
+
- lib/strobe/resources/deploy.rb
|
103
141
|
- lib/strobe/resources/me.rb
|
104
142
|
- lib/strobe/resources/membership.rb
|
105
143
|
- lib/strobe/resources/signup.rb
|
@@ -136,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
174
|
requirements: []
|
137
175
|
|
138
176
|
rubyforge_project: strobe
|
139
|
-
rubygems_version: 1.
|
177
|
+
rubygems_version: 1.5.3
|
140
178
|
signing_key:
|
141
179
|
specification_version: 3
|
142
180
|
summary: A deployment tool for HTML5 applications
|