astrotrain 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -42,6 +42,6 @@ It's far from perfect, but definitely usable.
42
42
  TODO
43
43
  ====
44
44
 
45
- Gem package - I realize the load paths could be simplified a bunch, so a gem package will come soon.
46
45
  Docs
47
- bounced emails
46
+ bounced emails (i've been rolling with http://github.com/whatcould/bounce-email for now)
47
+ Mail gem, TMail is old school
data/Rakefile CHANGED
@@ -19,7 +19,8 @@ begin
19
19
  gem.add_runtime_dependency "dm-validations", dm_ver # Validation framework
20
20
  gem.add_development_dependency "context"
21
21
  gem.add_development_dependency "rr"
22
- gem.add_development_dependency "sinatra"
22
+ gem.add_development_dependency "sinatra", "~> 1.0.0"
23
+ gem.add_development_dependency "rack-test"
23
24
  gem.add_development_dependency "xmppr4-simple"
24
25
  end
25
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{astrotrain}
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["technoweenie"]
12
- s.date = %q{2010-01-16}
12
+ s.date = %q{2010-03-31}
13
13
  s.email = %q{technoweenie@gmail.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -78,7 +78,7 @@ Gem::Specification.new do |s|
78
78
  s.homepage = %q{http://github.com/entp/astrotrain}
79
79
  s.rdoc_options = ["--charset=UTF-8"]
80
80
  s.require_paths = ["lib"]
81
- s.rubygems_version = %q{1.3.5}
81
+ s.rubygems_version = %q{1.3.6}
82
82
  s.summary = %q{email => http post}
83
83
  s.test_files = [
84
84
  "test/api_test.rb",
@@ -103,7 +103,8 @@ Gem::Specification.new do |s|
103
103
  s.add_runtime_dependency(%q<dm-validations>, ["= 0.9.11"])
104
104
  s.add_development_dependency(%q<context>, [">= 0"])
105
105
  s.add_development_dependency(%q<rr>, [">= 0"])
106
- s.add_development_dependency(%q<sinatra>, [">= 0"])
106
+ s.add_development_dependency(%q<sinatra>, ["~> 1.0.0"])
107
+ s.add_development_dependency(%q<rack-test>, [">= 0"])
107
108
  s.add_development_dependency(%q<xmppr4-simple>, [">= 0"])
108
109
  else
109
110
  s.add_dependency(%q<addressable>, ["= 2.0.2"])
@@ -115,7 +116,8 @@ Gem::Specification.new do |s|
115
116
  s.add_dependency(%q<dm-validations>, ["= 0.9.11"])
116
117
  s.add_dependency(%q<context>, [">= 0"])
117
118
  s.add_dependency(%q<rr>, [">= 0"])
118
- s.add_dependency(%q<sinatra>, [">= 0"])
119
+ s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
120
+ s.add_dependency(%q<rack-test>, [">= 0"])
119
121
  s.add_dependency(%q<xmppr4-simple>, [">= 0"])
120
122
  end
121
123
  else
@@ -128,7 +130,8 @@ Gem::Specification.new do |s|
128
130
  s.add_dependency(%q<dm-validations>, ["= 0.9.11"])
129
131
  s.add_dependency(%q<context>, [">= 0"])
130
132
  s.add_dependency(%q<rr>, [">= 0"])
131
- s.add_dependency(%q<sinatra>, [">= 0"])
133
+ s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
134
+ s.add_dependency(%q<rack-test>, [">= 0"])
132
135
  s.add_dependency(%q<xmppr4-simple>, [">= 0"])
133
136
  end
134
137
  end
@@ -7,22 +7,26 @@ class Astrotrain::ApiTest < Astrotrain::ApiTestCase
7
7
  end
8
8
 
9
9
  it "counts queue" do
10
- assert_equal '2', get("/queue_size").body
10
+ get '/queue_size'
11
+ assert_equal '2', last_response.body
11
12
  end
12
13
 
13
14
  it "lists queue files" do
14
- files = get("/queue").body.split("\n")
15
+ get '/queue'
16
+ files = last_response.body.split("\n")
15
17
  assert_equal 2, files.size
16
18
  assert files.include?(File.basename(@filename1))
17
19
  assert files.include?(File.basename(@filename2))
18
20
  end
19
21
 
20
22
  it "reads queue file" do
21
- assert_equal 'boo!', get("/queue/#{File.basename(@filename1)}").body
23
+ get "/queue/#{File.basename(@filename1)}"
24
+ assert_equal 'boo!', last_response.body
22
25
  end
23
26
 
24
27
  it "does not read missing file" do
25
- assert_equal "\"etc/passwd\" was not found.", get("/queue//etc/passwd").body
28
+ get "/queue//etc/passwd"
29
+ assert_equal "\"etc/passwd\" was not found.", last_response.body
26
30
  end
27
31
  end
28
32
 
@@ -6,16 +6,11 @@ require "context"
6
6
  require 'rr'
7
7
  require 'astrotrain'
8
8
  require 'astrotrain/api'
9
- require 'sinatra/test'
9
+ require 'rack/test'
10
10
 
11
11
  module Astrotrain
12
12
  load File.dirname(__FILE__) do
13
- DataMapper.setup(:default, {
14
- :adapter => "mysql",
15
- :database => "astrotrain_test",
16
- :username => "root",
17
- :host => "localhost"
18
- })
13
+ DataMapper.setup(:default, 'sqlite3::memory:')
19
14
  end
20
15
 
21
16
  LoggedMail.auto_migrate!
@@ -46,7 +41,11 @@ module Astrotrain
46
41
  end
47
42
 
48
43
  class ApiTestCase < TestCase
49
- include Sinatra::Test
44
+ def app
45
+ Sinatra::Application
46
+ end
47
+
48
+ include Rack::Test::Methods
50
49
  end
51
50
  end
52
51
 
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astrotrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 5
8
+ - 1
9
+ version: 0.5.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - technoweenie
@@ -9,119 +14,170 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-16 00:00:00 -08:00
17
+ date: 2010-03-31 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: addressable
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - "="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 2
29
+ - 0
30
+ - 2
23
31
  version: 2.0.2
24
- version:
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: tmail
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - "="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 2
44
+ - 3
45
+ - 1
33
46
  version: 1.2.3.1
34
- version:
47
+ type: :runtime
48
+ version_requirements: *id002
35
49
  - !ruby/object:Gem::Dependency
36
50
  name: dm-core
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
40
53
  requirements:
41
54
  - - "="
42
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
58
+ - 9
59
+ - 11
43
60
  version: 0.9.11
44
- version:
61
+ type: :runtime
62
+ version_requirements: *id003
45
63
  - !ruby/object:Gem::Dependency
46
64
  name: dm-aggregates
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
50
67
  requirements:
51
68
  - - "="
52
69
  - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ - 9
73
+ - 11
53
74
  version: 0.9.11
54
- version:
75
+ type: :runtime
76
+ version_requirements: *id004
55
77
  - !ruby/object:Gem::Dependency
56
78
  name: dm-timestamps
57
- type: :runtime
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
60
81
  requirements:
61
82
  - - "="
62
83
  - !ruby/object:Gem::Version
84
+ segments:
85
+ - 0
86
+ - 9
87
+ - 11
63
88
  version: 0.9.11
64
- version:
89
+ type: :runtime
90
+ version_requirements: *id005
65
91
  - !ruby/object:Gem::Dependency
66
92
  name: dm-types
67
- type: :runtime
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
93
+ prerelease: false
94
+ requirement: &id006 !ruby/object:Gem::Requirement
70
95
  requirements:
71
96
  - - "="
72
97
  - !ruby/object:Gem::Version
98
+ segments:
99
+ - 0
100
+ - 9
101
+ - 11
73
102
  version: 0.9.11
74
- version:
103
+ type: :runtime
104
+ version_requirements: *id006
75
105
  - !ruby/object:Gem::Dependency
76
106
  name: dm-validations
77
- type: :runtime
78
- version_requirement:
79
- version_requirements: !ruby/object:Gem::Requirement
107
+ prerelease: false
108
+ requirement: &id007 !ruby/object:Gem::Requirement
80
109
  requirements:
81
110
  - - "="
82
111
  - !ruby/object:Gem::Version
112
+ segments:
113
+ - 0
114
+ - 9
115
+ - 11
83
116
  version: 0.9.11
84
- version:
117
+ type: :runtime
118
+ version_requirements: *id007
85
119
  - !ruby/object:Gem::Dependency
86
120
  name: context
87
- type: :development
88
- version_requirement:
89
- version_requirements: !ruby/object:Gem::Requirement
121
+ prerelease: false
122
+ requirement: &id008 !ruby/object:Gem::Requirement
90
123
  requirements:
91
124
  - - ">="
92
125
  - !ruby/object:Gem::Version
126
+ segments:
127
+ - 0
93
128
  version: "0"
94
- version:
129
+ type: :development
130
+ version_requirements: *id008
95
131
  - !ruby/object:Gem::Dependency
96
132
  name: rr
97
- type: :development
98
- version_requirement:
99
- version_requirements: !ruby/object:Gem::Requirement
133
+ prerelease: false
134
+ requirement: &id009 !ruby/object:Gem::Requirement
100
135
  requirements:
101
136
  - - ">="
102
137
  - !ruby/object:Gem::Version
138
+ segments:
139
+ - 0
103
140
  version: "0"
104
- version:
141
+ type: :development
142
+ version_requirements: *id009
105
143
  - !ruby/object:Gem::Dependency
106
144
  name: sinatra
145
+ prerelease: false
146
+ requirement: &id010 !ruby/object:Gem::Requirement
147
+ requirements:
148
+ - - ~>
149
+ - !ruby/object:Gem::Version
150
+ segments:
151
+ - 1
152
+ - 0
153
+ - 0
154
+ version: 1.0.0
107
155
  type: :development
108
- version_requirement:
109
- version_requirements: !ruby/object:Gem::Requirement
156
+ version_requirements: *id010
157
+ - !ruby/object:Gem::Dependency
158
+ name: rack-test
159
+ prerelease: false
160
+ requirement: &id011 !ruby/object:Gem::Requirement
110
161
  requirements:
111
162
  - - ">="
112
163
  - !ruby/object:Gem::Version
164
+ segments:
165
+ - 0
113
166
  version: "0"
114
- version:
167
+ type: :development
168
+ version_requirements: *id011
115
169
  - !ruby/object:Gem::Dependency
116
170
  name: xmppr4-simple
117
- type: :development
118
- version_requirement:
119
- version_requirements: !ruby/object:Gem::Requirement
171
+ prerelease: false
172
+ requirement: &id012 !ruby/object:Gem::Requirement
120
173
  requirements:
121
174
  - - ">="
122
175
  - !ruby/object:Gem::Version
176
+ segments:
177
+ - 0
123
178
  version: "0"
124
- version:
179
+ type: :development
180
+ version_requirements: *id012
125
181
  description:
126
182
  email: technoweenie@gmail.com
127
183
  executables: []
@@ -203,18 +259,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
259
  requirements:
204
260
  - - ">="
205
261
  - !ruby/object:Gem::Version
262
+ segments:
263
+ - 0
206
264
  version: "0"
207
- version:
208
265
  required_rubygems_version: !ruby/object:Gem::Requirement
209
266
  requirements:
210
267
  - - ">="
211
268
  - !ruby/object:Gem::Version
269
+ segments:
270
+ - 0
212
271
  version: "0"
213
- version:
214
272
  requirements: []
215
273
 
216
274
  rubyforge_project:
217
- rubygems_version: 1.3.5
275
+ rubygems_version: 1.3.6
218
276
  signing_key:
219
277
  specification_version: 3
220
278
  summary: email => http post