193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
# File 'lib/json-rigs/server.rb', line 193
def start(fixture_path)
puts 'Starting fixture server...'
port = choose_port()
FixtureServer.set(:port, port)
FixtureServer.set(:fixture_path, fixture_path)
FixtureServer::load_fixtures
JsonRigs::Fixtures::load_active_fixtures
listener = Listen.to(fixture_path, only: /\.(json|rb)$/) { |modified, added, removed|
on_fixture_change(modified, added, removed)
}
listener.start
FixtureServer.run!
end
|