wd_sinatra 1.0.0 → 1.0.1
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/CHANGELOG.md +4 -0
- data/lib/wd_sinatra/sinatra_ext.rb +2 -2
- data/lib/wd_sinatra/test_unit_helpers.rb +2 -2
- data/lib/wd_sinatra/version.rb +1 -1
- data/templates/Rakefile +1 -1
- data/templates/api/hello_world.rb +1 -1
- data/templates/lib/tasks/doc_generator/template.erb +1 -1
- data/wd-sinatra.gemspec +1 -1
- metadata +50 -62
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Weasel Diesel Sinatra Changelog
|
2
2
|
|
3
|
+
## 1.0.1
|
4
|
+
* Added dependency on `WeaselDiesel` `1.2.0` or greater since the API
|
5
|
+
slightly changed.
|
6
|
+
|
3
7
|
## 1.0.0
|
4
8
|
* It's time for WD to graduate, it's been behaving well in production
|
5
9
|
for a while and no major problems were reported. A new rake task was
|
@@ -108,14 +108,14 @@ class WeaselDiesel
|
|
108
108
|
service = self
|
109
109
|
upcase_verb = service.verb.to_s.upcase
|
110
110
|
unless ENV['DONT_PRINT_ROUTES']
|
111
|
-
LOGGER.info "Available endpoint: #{self.http_verb.upcase}
|
111
|
+
LOGGER.info "Available endpoint: #{self.http_verb.upcase} #{self.url}"
|
112
112
|
end
|
113
113
|
raise "DSL is missing the implementation block" unless ['SKIP_SERVICE_CHECK'] || self.handler
|
114
114
|
|
115
115
|
# Define the route directly to save some object allocations on the critical path
|
116
116
|
# Note that we are using a private API to define the route and that unlike sinatra usual DSL
|
117
117
|
# we do NOT define a HEAD route for every GET route.
|
118
|
-
Sinatra::Base.send(:route, upcase_verb,
|
118
|
+
Sinatra::Base.send(:route, upcase_verb, self.url) do
|
119
119
|
env['wd.service'] = service
|
120
120
|
service.handler.dispatch(self)
|
121
121
|
end
|
@@ -6,8 +6,8 @@ module TestUnitHelpers
|
|
6
6
|
response ||= TestApi.json_response
|
7
7
|
print response.rest_response.errors if response.status === 500
|
8
8
|
assert response.success?, message || ["Body: #{response.rest_response.body}", "Errors: #{response.errors}", "Status code: #{response.status}"].join("\n")
|
9
|
-
service = WSList.
|
10
|
-
raise "Service for (#{response.verb.upcase} #{response.uri
|
9
|
+
service = WSList.find(response.verb, response.uri)
|
10
|
+
raise "Service for (#{response.verb.upcase} #{response.uri}) not found" unless service
|
11
11
|
unless service.response.nodes.empty?
|
12
12
|
assert response.body.is_a?(Hash), "Invalid JSON response:\n#{response.body}"
|
13
13
|
valid, errors = service.validate_hash_response(response.body)
|
data/lib/wd_sinatra/version.rb
CHANGED
data/templates/Rakefile
CHANGED
@@ -63,7 +63,7 @@
|
|
63
63
|
<% WSList.all.each do |api| %>
|
64
64
|
<div class="api" id="<%= "raw-#{api.verb}-#{api.url}" %>">
|
65
65
|
<div>
|
66
|
-
<h2><%= api.verb.upcase %> <%= '[SSL]' if api.ssl %>
|
66
|
+
<h2><%= api.verb.upcase %> <%= '[SSL]' if api.ssl %> <%= api.url %></h2>
|
67
67
|
<% if api.auth_required %>
|
68
68
|
<span class='label important'>Authentication required</span>
|
69
69
|
<% end %>
|
data/wd-sinatra.gemspec
CHANGED
metadata
CHANGED
@@ -1,60 +1,57 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: wd_sinatra
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 1.0.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Matt Aimonetti
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-10-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: weasel_diesel
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.2.0
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: thor
|
36
23
|
prerelease: false
|
37
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.2.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: thor
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
38
33
|
none: false
|
39
|
-
requirements:
|
40
|
-
- -
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 0
|
45
|
-
version: "0"
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
46
38
|
type: :runtime
|
47
|
-
|
48
|
-
|
49
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra
|
47
|
+
apps using the Weasel Diesel DSL
|
48
|
+
email:
|
50
49
|
- mattaimonetti@gmail.com
|
51
|
-
executables:
|
50
|
+
executables:
|
52
51
|
- wd_sinatra
|
53
52
|
extensions: []
|
54
|
-
|
55
53
|
extra_rdoc_files: []
|
56
|
-
|
57
|
-
files:
|
54
|
+
files:
|
58
55
|
- .gitignore
|
59
56
|
- CHANGELOG.md
|
60
57
|
- Gemfile
|
@@ -147,37 +144,28 @@ files:
|
|
147
144
|
- wd-sinatra.gemspec
|
148
145
|
homepage: https://github.com/mattetti/wd-sinatra
|
149
146
|
licenses: []
|
150
|
-
|
151
147
|
post_install_message:
|
152
148
|
rdoc_options: []
|
153
|
-
|
154
|
-
require_paths:
|
149
|
+
require_paths:
|
155
150
|
- lib
|
156
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
152
|
none: false
|
158
|
-
requirements:
|
159
|
-
- -
|
160
|
-
- !ruby/object:Gem::Version
|
161
|
-
|
162
|
-
|
163
|
-
- 0
|
164
|
-
version: "0"
|
165
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
158
|
none: false
|
167
|
-
requirements:
|
168
|
-
- -
|
169
|
-
- !ruby/object:Gem::Version
|
170
|
-
|
171
|
-
segments:
|
172
|
-
- 0
|
173
|
-
version: "0"
|
159
|
+
requirements:
|
160
|
+
- - ! '>='
|
161
|
+
- !ruby/object:Gem::Version
|
162
|
+
version: '0'
|
174
163
|
requirements: []
|
175
|
-
|
176
164
|
rubyforge_project:
|
177
165
|
rubygems_version: 1.8.24
|
178
166
|
signing_key:
|
179
167
|
specification_version: 3
|
180
|
-
summary: Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra apps
|
168
|
+
summary: Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra apps
|
169
|
+
using the Weasel Diesel DSL
|
181
170
|
test_files: []
|
182
|
-
|
183
171
|
has_rdoc:
|