engine_of_war 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Guardfile +4 -6
- data/engine_of_war.gemspec +1 -0
- data/lib/engine_of_war/app.rb +21 -14
- data/lib/engine_of_war/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +56 -46
- data/config/newrelic.yml +0 -24
data/Guardfile
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
# A sample Guardfile
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
3
3
|
|
4
|
-
guard 'rspec', :version => 2 do
|
4
|
+
guard 'rspec', :version => 2, :cli => "--backtrace" do
|
5
5
|
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
7
6
|
watch('spec/spec_helper.rb') { "spec" }
|
8
7
|
|
9
|
-
|
10
|
-
watch(%r{^spec
|
11
|
-
watch(%r{^lib/(.+)\.rb$}) {
|
12
|
-
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
watch(%r{^.rspec$}) { "spec" }
|
9
|
+
watch(%r{^config/.*$}) { "spec" }
|
10
|
+
watch(%r{^lib/(.+)\.rb$}) { "spec" }
|
13
11
|
end
|
14
12
|
|
15
13
|
guard 'bundler' do
|
data/engine_of_war.gemspec
CHANGED
@@ -34,6 +34,7 @@ Gem::Specification.new do |gem|
|
|
34
34
|
gem.add_development_dependency "rake"
|
35
35
|
gem.add_development_dependency "rspec"
|
36
36
|
gem.add_development_dependency "capybara"
|
37
|
+
gem.add_development_dependency "fakeweb"
|
37
38
|
gem.add_development_dependency 'guard-rspec'
|
38
39
|
gem.add_development_dependency "guard-bundler"
|
39
40
|
gem.add_development_dependency 'ruby_gntp'
|
data/lib/engine_of_war/app.rb
CHANGED
@@ -26,24 +26,31 @@ class EngineOfWar::App < Sinatra::Base
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def self.newrelic_key=(key)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
ENV['NEW_RELIC_LICENSE_KEY'] = key
|
35
|
-
ENV['NRCONFIG'] = filename
|
36
|
-
|
37
|
-
puts "Loading NewRelic for #{name}"
|
38
|
-
|
39
|
-
raise "Can't find #{filename}" unless File.file?(filename)
|
29
|
+
unless ENV["RACK_ENV"] == "development"
|
30
|
+
name = settings.site_title || "Unknown"
|
31
|
+
unless settings.environment == "production"
|
32
|
+
name << " (#{ENV["RACK_ENV"]})"
|
33
|
+
end
|
40
34
|
|
41
|
-
|
42
|
-
|
35
|
+
puts "Loading NewRelic for #{name}"
|
36
|
+
|
37
|
+
require 'newrelic_rpm'
|
38
|
+
require 'rpm_contrib'
|
39
|
+
NewRelic::Agent.manual_start(monitor_mode: true,
|
40
|
+
license_key: key,
|
41
|
+
app_name: name,
|
42
|
+
monitor_mode: true,
|
43
|
+
log_level: "info",
|
44
|
+
log_file_path: "STDOUT",
|
45
|
+
transaction_tracer: { enabled: false },
|
46
|
+
error_collector: { enabled: true })
|
47
|
+
end
|
43
48
|
end
|
44
49
|
|
45
50
|
def render_page_with_layout(page)
|
46
|
-
render_page(page,
|
51
|
+
render_page(page,
|
52
|
+
layout: "layouts/#{page.layout}",
|
53
|
+
layout_engine: :haml)
|
47
54
|
end
|
48
55
|
|
49
56
|
helpers do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
require "bundler/setup"
|
2
2
|
require 'rspec'
|
3
3
|
require 'capybara/rspec'
|
4
|
+
require 'fakeweb'
|
4
5
|
|
5
6
|
require "engine_of_war.rb"
|
6
7
|
|
7
8
|
Capybara.app = EngineOfWar::App
|
8
9
|
Capybara.app.set :root, "/tmp/engine-#{$$}"
|
10
|
+
FakeWeb.allow_net_connect = false
|
9
11
|
|
10
12
|
def create_template(path, content)
|
11
13
|
create_file "#{Capybara.app.settings.views}/#{path}", content.unindent
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engine_of_war
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-01-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70288957684420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70288957684420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: compass
|
27
|
-
requirement: &
|
27
|
+
requirement: &70288957672760 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70288957672760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: padrino
|
38
|
-
requirement: &
|
38
|
+
requirement: &70288957675700 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70288957675700
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: active_support
|
49
|
-
requirement: &
|
49
|
+
requirement: &70288914976900 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70288914976900
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: builder
|
60
|
-
requirement: &
|
60
|
+
requirement: &70288914683480 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70288914683480
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: haml
|
71
|
-
requirement: &
|
71
|
+
requirement: &70288914516160 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70288914516160
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sass
|
82
|
-
requirement: &
|
82
|
+
requirement: &70288909881900 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 3.1.7
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70288909881900
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: RedCloth
|
93
|
-
requirement: &
|
93
|
+
requirement: &70288909858720 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70288909858720
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rdiscount
|
104
|
-
requirement: &
|
104
|
+
requirement: &70288909857760 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70288909857760
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: coffee-script
|
115
|
-
requirement: &
|
115
|
+
requirement: &70288909857000 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70288909857000
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: rack-google-analytics
|
126
|
-
requirement: &
|
126
|
+
requirement: &70288909855840 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70288909855840
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: rack-gauges
|
137
|
-
requirement: &
|
137
|
+
requirement: &70288909854980 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70288909854980
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: rpm_contrib
|
148
|
-
requirement: &
|
148
|
+
requirement: &70288909854180 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '0'
|
154
154
|
type: :runtime
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *70288909854180
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: newrelic_rpm
|
159
|
-
requirement: &
|
159
|
+
requirement: &70288909869820 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: '0'
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *70288909869820
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: yard
|
170
|
-
requirement: &
|
170
|
+
requirement: &70288909869120 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,10 +175,10 @@ dependencies:
|
|
175
175
|
version: '0'
|
176
176
|
type: :development
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *70288909869120
|
179
179
|
- !ruby/object:Gem::Dependency
|
180
180
|
name: rake
|
181
|
-
requirement: &
|
181
|
+
requirement: &70288909868300 !ruby/object:Gem::Requirement
|
182
182
|
none: false
|
183
183
|
requirements:
|
184
184
|
- - ! '>='
|
@@ -186,10 +186,10 @@ dependencies:
|
|
186
186
|
version: '0'
|
187
187
|
type: :development
|
188
188
|
prerelease: false
|
189
|
-
version_requirements: *
|
189
|
+
version_requirements: *70288909868300
|
190
190
|
- !ruby/object:Gem::Dependency
|
191
191
|
name: rspec
|
192
|
-
requirement: &
|
192
|
+
requirement: &70288909867420 !ruby/object:Gem::Requirement
|
193
193
|
none: false
|
194
194
|
requirements:
|
195
195
|
- - ! '>='
|
@@ -197,10 +197,10 @@ dependencies:
|
|
197
197
|
version: '0'
|
198
198
|
type: :development
|
199
199
|
prerelease: false
|
200
|
-
version_requirements: *
|
200
|
+
version_requirements: *70288909867420
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: capybara
|
203
|
-
requirement: &
|
203
|
+
requirement: &70288909866540 !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
206
206
|
- - ! '>='
|
@@ -208,10 +208,21 @@ dependencies:
|
|
208
208
|
version: '0'
|
209
209
|
type: :development
|
210
210
|
prerelease: false
|
211
|
-
version_requirements: *
|
211
|
+
version_requirements: *70288909866540
|
212
|
+
- !ruby/object:Gem::Dependency
|
213
|
+
name: fakeweb
|
214
|
+
requirement: &70288909865760 !ruby/object:Gem::Requirement
|
215
|
+
none: false
|
216
|
+
requirements:
|
217
|
+
- - ! '>='
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0'
|
220
|
+
type: :development
|
221
|
+
prerelease: false
|
222
|
+
version_requirements: *70288909865760
|
212
223
|
- !ruby/object:Gem::Dependency
|
213
224
|
name: guard-rspec
|
214
|
-
requirement: &
|
225
|
+
requirement: &70288909865080 !ruby/object:Gem::Requirement
|
215
226
|
none: false
|
216
227
|
requirements:
|
217
228
|
- - ! '>='
|
@@ -219,10 +230,10 @@ dependencies:
|
|
219
230
|
version: '0'
|
220
231
|
type: :development
|
221
232
|
prerelease: false
|
222
|
-
version_requirements: *
|
233
|
+
version_requirements: *70288909865080
|
223
234
|
- !ruby/object:Gem::Dependency
|
224
235
|
name: guard-bundler
|
225
|
-
requirement: &
|
236
|
+
requirement: &70288909864240 !ruby/object:Gem::Requirement
|
226
237
|
none: false
|
227
238
|
requirements:
|
228
239
|
- - ! '>='
|
@@ -230,10 +241,10 @@ dependencies:
|
|
230
241
|
version: '0'
|
231
242
|
type: :development
|
232
243
|
prerelease: false
|
233
|
-
version_requirements: *
|
244
|
+
version_requirements: *70288909864240
|
234
245
|
- !ruby/object:Gem::Dependency
|
235
246
|
name: ruby_gntp
|
236
|
-
requirement: &
|
247
|
+
requirement: &70288909863540 !ruby/object:Gem::Requirement
|
237
248
|
none: false
|
238
249
|
requirements:
|
239
250
|
- - ! '>='
|
@@ -241,7 +252,7 @@ dependencies:
|
|
241
252
|
version: '0'
|
242
253
|
type: :development
|
243
254
|
prerelease: false
|
244
|
-
version_requirements: *
|
255
|
+
version_requirements: *70288909863540
|
245
256
|
description: Semi-static site engine.
|
246
257
|
email:
|
247
258
|
- us@thunderboltlabs.com
|
@@ -257,7 +268,6 @@ files:
|
|
257
268
|
- Guardfile
|
258
269
|
- Rakefile
|
259
270
|
- Readme.textile
|
260
|
-
- config/newrelic.yml
|
261
271
|
- engine_of_war.gemspec
|
262
272
|
- lib/engine_of_war.rb
|
263
273
|
- lib/engine_of_war/app.rb
|
@@ -297,7 +307,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
297
307
|
version: '0'
|
298
308
|
segments:
|
299
309
|
- 0
|
300
|
-
hash: -
|
310
|
+
hash: -1946110704419269560
|
301
311
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
302
312
|
none: false
|
303
313
|
requirements:
|
@@ -306,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
316
|
version: '0'
|
307
317
|
segments:
|
308
318
|
- 0
|
309
|
-
hash: -
|
319
|
+
hash: -1946110704419269560
|
310
320
|
requirements: []
|
311
321
|
rubyforge_project:
|
312
322
|
rubygems_version: 1.8.11
|
data/config/newrelic.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
common: &default_settings
|
2
|
-
monitor_mode: true
|
3
|
-
developer_mode: false
|
4
|
-
log_level: info
|
5
|
-
log_file_path: STDOUT
|
6
|
-
ssl: false
|
7
|
-
apdex_t: 0.25
|
8
|
-
capture_params: false
|
9
|
-
transaction_tracer:
|
10
|
-
enabled: false
|
11
|
-
error_collector:
|
12
|
-
enabled: true
|
13
|
-
development:
|
14
|
-
<<: *default_settings
|
15
|
-
monitor_mode: false
|
16
|
-
test:
|
17
|
-
<<: *default_settings
|
18
|
-
monitor_mode: false
|
19
|
-
production:
|
20
|
-
<<: *default_settings
|
21
|
-
monitor_mode: true
|
22
|
-
staging:
|
23
|
-
<<: *default_settings
|
24
|
-
monitor_mode: true
|