websocket-rails 0.1.2 → 0.1.3

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.
Files changed (40) hide show
  1. data/CHANGELOG.md +34 -0
  2. data/Gemfile +1 -0
  3. data/README.md +34 -34
  4. data/assets/javascripts/http_dispatcher.js +6 -5
  5. data/assets/javascripts/websocket_dispatcher.js +7 -6
  6. data/lib/websocket-rails.rb +22 -2
  7. data/lib/websocket_rails/base_controller.rb +24 -8
  8. data/lib/websocket_rails/connection_adapters.rb +43 -16
  9. data/lib/websocket_rails/connection_adapters/http.rb +14 -10
  10. data/lib/websocket_rails/connection_adapters/web_socket.rb +13 -12
  11. data/lib/websocket_rails/connection_manager.rb +19 -47
  12. data/lib/websocket_rails/dispatcher.rb +39 -33
  13. data/lib/websocket_rails/event.rb +71 -0
  14. data/lib/websocket_rails/event_map.rb +120 -0
  15. data/lib/websocket_rails/version.rb +1 -1
  16. data/spec/dummy/config/initializers/events.rb +2 -2
  17. data/spec/dummy/{public/stylesheets/.gitkeep → log/development.log} +0 -0
  18. data/spec/dummy/log/production.log +0 -0
  19. data/spec/dummy/log/server.log +0 -0
  20. data/spec/dummy/log/test.log +454 -0
  21. data/spec/integration/connection_manager_spec.rb +29 -13
  22. data/spec/spec_helper.rb +3 -3
  23. data/spec/support/helper_methods.rb +29 -0
  24. data/spec/support/mock_web_socket.rb +6 -2
  25. data/spec/unit/connection_adapters/http_spec.rb +1 -3
  26. data/spec/unit/connection_adapters/web_socket_spec.rb +1 -11
  27. data/spec/unit/connection_adapters_spec.rb +51 -19
  28. data/spec/unit/connection_manager_spec.rb +22 -46
  29. data/spec/unit/dispatcher_spec.rb +56 -25
  30. data/spec/unit/event_map_spec.rb +96 -0
  31. data/spec/unit/event_spec.rb +99 -0
  32. metadata +23 -25
  33. data/.gitignore +0 -11
  34. data/.rspec +0 -2
  35. data/.travis.yml +0 -3
  36. data/Gemfile.lock +0 -144
  37. data/Guardfile +0 -9
  38. data/lib/websocket_rails/events.rb +0 -53
  39. data/spec/unit/events_spec.rb +0 -70
  40. data/websocket-rails.gemspec +0 -26
@@ -3,12 +3,15 @@ require 'rack'
3
3
  require 'thin'
4
4
 
5
5
  module WebsocketRails
6
- class InvalidConnection < StandardError; end
7
6
  # The +ConnectionManager+ class implements the core Rack application that handles
8
7
  # incoming WebSocket connections.
9
8
  class ConnectionManager
9
+
10
+ SuccessfulResponse = [200,{'Content-Type' => 'text/plain'},['success']].freeze
11
+ BadRequestResponse = [400,{'Content-Type' => 'text/plain'},['invalid']].freeze
12
+ ExceptionResponse = [500,{'Content-Type' => 'text/plain'},['exception']].freeze
10
13
 
11
- # Contains an Array of currently open Faye::WebSocket connections.
14
+ # Contains an Array of currently open connections.
12
15
  # @return [Array]
13
16
  attr_reader :connections
14
17
 
@@ -22,74 +25,43 @@ module WebsocketRails
22
25
  end
23
26
 
24
27
  # Primary entry point for the Rack application
25
- def call(env)
26
- request = Rack::Request.new( env )
28
+ def call(env)
29
+ request = Rack::Request.new env
27
30
  if request.post?
28
- response = parse_incoming_event( request.params )
31
+ response = parse_incoming_event request.params
29
32
  else
30
- response = open_connection( env )
33
+ response = open_connection env
31
34
  end
32
35
  response
33
- end
34
-
35
- # Used to broadcast a message to all connected clients. This method should never
36
- # be called directly. Instead, users should use {BaseController#broadcast_message}
37
- # and {BaseController#send_message} in their applications.
38
- def broadcast_message(message)
39
- @connections.map do |connection|
40
- connection.send message
41
- end
36
+ rescue InvalidConnectionError
37
+ BadRequestResponse
42
38
  end
43
39
 
44
40
  private
45
41
 
46
42
  def parse_incoming_event(params)
47
43
  connection = find_connection_by_id params["client_id"]
48
- data = params["data"]
49
- @dispatcher.receive( data, connection )
50
- [200,{'Content-Type' => 'text/plain'},['success']]
51
- rescue InvalidConnection
52
- [400,{'Content-Type' => 'text/plain'},['invalid connection']]
44
+ connection.on_message params["data"]
45
+ SuccessfulResponse
53
46
  end
54
47
 
55
48
  def find_connection_by_id(id)
56
- connections.detect { |connection| connection.id == id.to_i } || (raise InvalidConnection)
49
+ connections.detect { |connection| connection.id == id.to_i } || (raise InvalidConnectionError)
57
50
  end
58
51
 
59
52
  # Opens a persistent connection using the appropriate {ConnectionAdapter}. Stores
60
53
  # active connections in the {connections} array.
61
54
  def open_connection(env)
62
- connection = ConnectionAdapters.establish_connection( env )
63
- return invalid_connection_attempt unless connection
64
-
65
- puts "Client #{connection} connected\n"
66
- @dispatcher.dispatch( 'client_connected', {}, connection )
67
- @dispatcher.send_message( connection.id, :connection_open, {}, connection )
68
-
69
- connection.onmessage = lambda do |event|
70
- @dispatcher.receive( event.data, connection )
71
- end
72
-
73
- connection.onerror = lambda do |event|
74
- @dispatcher.dispatch( 'client_error', {}, connection )
75
- connection.onclose
76
- end
77
-
78
- connection.onclose = lambda do |event|
79
- @dispatcher.dispatch( 'client_disconnected', {}, connection )
80
- connections.delete( connection )
81
-
82
- puts "Client #{connection} disconnected\n"
83
- connection = nil
84
- end
85
-
55
+ connection = ConnectionAdapters.establish_connection( env, dispatcher )
86
56
  connections << connection
87
57
  connection.rack_response
88
58
  end
89
59
 
90
- def invalid_connection_attempt
91
- [400,{'Content-Type' => 'text/plain'}, ['Connection was not a valid WebSocket connection']]
60
+ def close_connection(connection)
61
+ connections.delete connection
62
+ connection = nil
92
63
  end
64
+ public :close_connection
93
65
 
94
66
  end
95
67
  end
@@ -1,50 +1,56 @@
1
- require 'json'
2
-
3
1
  module WebsocketRails
4
2
  class Dispatcher
5
3
 
6
- def self.describe_events(&block)
7
- raise "This method has been deprecated. Please use WebsocketRails::Events.describe_events instead."
8
- end
9
-
10
- attr_reader :events
4
+ attr_reader :event_map, :connection_manager
11
5
 
12
6
  def initialize(connection_manager)
13
7
  @connection_manager = connection_manager
14
- @events = Events.new( self )
8
+ @event_map = EventMap.new( self )
15
9
  end
16
10
 
17
- def receive(enc_message,connection)
18
- message = JSON.parse( enc_message )
19
- event_name = message.first
20
- data = message.last
21
- data['received'] = Time.now.strftime("%I:%M:%p")
22
- dispatch( event_name, data, connection )
11
+ def receive_encoded(encoded_data,connection)
12
+ event = Event.new_from_json( encoded_data, connection )
13
+ dispatch( event )
23
14
  end
24
-
25
- def send_message(client_id,event_name,data,connection)
26
- connection.send encoded_message( client_id, event_name, data )
27
- end
28
-
29
- def broadcast_message(client_id,event_name,data)
30
- @connection_manager.broadcast_message encoded_message( client_id, event_name, data )
15
+
16
+ def receive(event_name,data,connection)
17
+ event = Event.new event_name, data, connection
18
+ dispatch( event )
31
19
  end
32
20
 
33
- def dispatch(event_name,message,connection)
34
- Fiber.new {
35
- event_symbol = event_name.to_sym
36
- events.routes_for(event_symbol) do |controller,method|
37
- controller.instance_variable_set(:@_message,message)
38
- controller.instance_variable_set(:@_connection,connection)
39
- controller.send :execute_observers, event_symbol
40
- controller.send method if controller.respond_to?(method)
21
+ def dispatch(event)
22
+ actions = []
23
+ event_map.routes_for event do |controller,method|
24
+ actions << Fiber.new do
25
+ begin
26
+ controller.instance_variable_set(:@_event,event)
27
+ controller.send :execute_observers, event.name if controller.respond_to?(:execute_observers)
28
+ controller.send method if controller.respond_to?(method)
29
+ rescue Exception => e
30
+ puts "Application Exception: #{e.inspect}"
31
+ end
41
32
  end
42
- }.resume
33
+ end
34
+ execute actions
43
35
  end
44
36
 
45
- def encoded_message(client_id,event_name,data)
46
- [client_id, event_name, data].to_json
37
+ def send_message(event)
38
+ event.connection.send event.serialize
47
39
  end
48
-
40
+
41
+ def broadcast_message(event)
42
+ connection_manager.connections.map do |connection|
43
+ connection.send event.serialize
44
+ end
45
+ end
46
+
47
+ private
48
+
49
+ def execute(actions)
50
+ actions.map do |action|
51
+ EM.next_tick { action.resume }
52
+ end
53
+ end
54
+
49
55
  end
50
56
  end
@@ -0,0 +1,71 @@
1
+ require 'json'
2
+
3
+ module WebsocketRails
4
+ class Event
5
+
6
+ def self.new_from_json(encoded_data,connection)
7
+ event_name, data, namespace = decode encoded_data
8
+ Event.new event_name, data, connection, namespace: namespace
9
+ end
10
+
11
+ def self.new_on_open(connection,data=nil)
12
+ connection_id = { :connection_id => connection.id }
13
+ on_open_data = data.is_a?(Hash) ? data.merge(connection_id) : connection_id
14
+
15
+ Event.new :client_connected, on_open_data, connection
16
+ end
17
+
18
+ def self.new_on_close(connection,data=nil)
19
+ Event.new :client_disconnected, data, connection
20
+ end
21
+
22
+ def self.new_on_error(connection,data=nil)
23
+ Event.new :client_error, data, connection
24
+ end
25
+
26
+ attr_reader :name, :data, :connection, :namespace
27
+
28
+ def initialize(event_name,data,connection,options={})
29
+ @name = event_name.to_sym
30
+ @data = data.is_a?(Hash) ? data.with_indifferent_access : data
31
+ @connection = connection
32
+ validate_namespace options[:namespace]
33
+ end
34
+
35
+ def serialize
36
+ [encoded_name, data].to_json
37
+ end
38
+
39
+ private
40
+
41
+ def validate_namespace(namespace)
42
+ namespace = [namespace] unless namespace.is_a?(Array)
43
+ namespace.unshift :global unless namespace.first == :global
44
+ @namespace = namespace.map(&:to_sym) rescue [:global]
45
+ end
46
+
47
+ def encoded_name
48
+ if namespace.size > 1
49
+ child_namespace = namespace.dup[1..-1]
50
+ child_namespace << name
51
+ combined_name = child_namespace.join('.')
52
+ else
53
+ combined_name = name
54
+ end
55
+ combined_name
56
+ end
57
+
58
+ def self.decode(encoded_data)
59
+ message = JSON.parse( encoded_data )
60
+ event_name = message[0]
61
+ data = message[1]
62
+
63
+ namespace = event_name.split('.')
64
+ event_name = namespace.pop
65
+
66
+ data['received'] = Time.now if data.is_a?(Hash)
67
+ [event_name,data,namespace]
68
+ end
69
+
70
+ end
71
+ end
@@ -0,0 +1,120 @@
1
+ module WebsocketRails
2
+ # Provides a DSL for mapping client events to controller actions. A single event can be mapped to any
3
+ # number of controllers and actions. You can define your event routes by creating an +events.rb+ file in
4
+ # your application's +initializers+ directory. The DSL currently consists of two methods. The first is
5
+ # {#subscribe}, which takes a symbolized event name as the first argument, and a Hash with the controller
6
+ # and method name as the second argument. The second is {#namespace} which allows you to scope your
7
+ # actions within particular namespaces. The {#namespace} method takes a symbol representing the name
8
+ # of the namespace, and a block which contains the actions you wish to subscribe within that namespace.
9
+ # When an event is dispatched to the client, the namespace will be attached to the front of the event
10
+ # name separated by a period. The `new` event listed in the example below under the `product` namespace
11
+ # would arrive on the client as `product.new`. Similarly, incoming events in the `namespace.event_name`
12
+ # format will be properly dispatched to the `event_name` under the correct `namespace`. Namespaces can
13
+ # be nested.
14
+ #
15
+ # == Example events.rb file
16
+ # # located in config/initializers/events.rb
17
+ # WebsocketRails::EventMap.describe do
18
+ # subscribe :client_connected, to: ChatController, with_method: :client_connected
19
+ # subscribe :new_user, to: ChatController, with_method: :new_user
20
+ #
21
+ # namespace :product do
22
+ # subscribe :new, to: ProductController, with_method: :new
23
+ # end
24
+ # end
25
+ class EventMap
26
+
27
+ def self.describe(&block)
28
+ WebsocketRails.route_block = block
29
+ end
30
+
31
+ attr_reader :namespace
32
+
33
+ def initialize(dispatcher)
34
+ @dispatcher = dispatcher
35
+ @namespace = DSL.new.evaluate WebsocketRails.route_block, dispatcher
36
+ end
37
+
38
+ def routes_for(event, &block)
39
+ @namespace.routes_for event, &block
40
+ end
41
+
42
+ # Provides the DSL methods available to the Event routes file
43
+ class DSL
44
+
45
+ def evaluate(route_block,dispatcher)
46
+ @namespace = Namespace.new :global, dispatcher
47
+ instance_eval &route_block
48
+ @namespace
49
+ end
50
+
51
+ def subscribe(event_name,options)
52
+ @namespace.store event_name, options
53
+ end
54
+
55
+ def namespace(new_namespace,&block)
56
+ @namespace = @namespace.find_or_create new_namespace
57
+ instance_eval &block if block.present?
58
+ @namespace = @namespace.parent
59
+ end
60
+
61
+ end
62
+
63
+ # Stores route map for nested namespaces
64
+ class Namespace
65
+
66
+ attr_reader :name, :controllers, :actions, :namespaces, :parent
67
+
68
+ def initialize(name,dispatcher,parent=nil)
69
+ @name = name
70
+ @parent = parent
71
+ @dispatcher = dispatcher
72
+ @actions = Hash.new {|h,k| h[k] = Array.new}
73
+ @controllers = Hash.new
74
+ @namespaces = Hash.new
75
+ end
76
+
77
+ def find_or_create(namespace)
78
+ unless child = namespaces[namespace]
79
+ child = Namespace.new namespace, @dispatcher, self
80
+ namespaces[namespace] = child
81
+ end
82
+ child
83
+ end
84
+
85
+ def store(event_name,options)
86
+ klass = options[:to] || raise("Must specify a class for to: option in event route")
87
+ action = options[:with_method] || raise("Must specify a method for with_method: option in event route")
88
+ create_controller_instance_for klass if controllers[klass].nil?
89
+ actions[event_name] << [klass,action]
90
+ end
91
+
92
+ def routes_for(event,event_namespace=nil,&block)
93
+ event_namespace = event.namespace.dup if event_namespace.nil?
94
+ return if event_namespace.nil?
95
+ namespace = event_namespace.shift
96
+ if namespace == @name and event_namespace.empty?
97
+ actions[event.name].each do |klass,action|
98
+ controller = controllers[klass]
99
+ block.call controller, action
100
+ end
101
+ else
102
+ child_namespace = event_namespace.first
103
+ child = namespaces[child_namespace]
104
+ child.routes_for event, event_namespace, &block unless child.nil?
105
+ end
106
+ end
107
+
108
+ private
109
+
110
+ def create_controller_instance_for(klass)
111
+ controller = klass.new
112
+ controllers[klass] = controller
113
+ controller.instance_variable_set(:@_dispatcher,@dispatcher)
114
+ controller.send :initialize_session if controller.respond_to?(:initialize_session)
115
+ end
116
+
117
+ end
118
+
119
+ end
120
+ end
@@ -1,3 +1,3 @@
1
1
  module WebsocketRails
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -1,7 +1,7 @@
1
- WebsocketRails::Events.describe_events do
1
+ WebsocketRails::EventMap.describe do
2
2
  subscribe :client_connected, to: ChatController, with_method: :client_connected
3
3
  subscribe :new_message, to: ChatController, with_method: :new_message
4
4
  subscribe :new_user, to: ChatController, with_method: :new_user
5
5
  subscribe :change_username, to: ChatController, with_method: :change_username
6
6
  subscribe :client_disconnected, to: ChatController, with_method: :delete_user
7
- end
7
+ end
File without changes
File without changes
@@ -0,0 +1,454 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+ Connecting to database specified by database.yml
4
+ Connecting to database specified by database.yml
5
+ Connecting to database specified by database.yml
6
+ Connecting to database specified by database.yml
7
+ Connecting to database specified by database.yml
8
+ Connecting to database specified by database.yml
9
+ Connecting to database specified by database.yml
10
+ Connecting to database specified by database.yml
11
+ Connecting to database specified by database.yml
12
+ Connecting to database specified by database.yml
13
+ Connecting to database specified by database.yml
14
+ Connecting to database specified by database.yml
15
+ Connecting to database specified by database.yml
16
+ Connecting to database specified by database.yml
17
+ Connecting to database specified by database.yml
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+ Connecting to database specified by database.yml
21
+ Connecting to database specified by database.yml
22
+ Connecting to database specified by database.yml
23
+ Connecting to database specified by database.yml
24
+ Connecting to database specified by database.yml
25
+ Connecting to database specified by database.yml
26
+ Connecting to database specified by database.yml
27
+ Connecting to database specified by database.yml
28
+ Connecting to database specified by database.yml
29
+ Connecting to database specified by database.yml
30
+ Connecting to database specified by database.yml
31
+ Connecting to database specified by database.yml
32
+ Connecting to database specified by database.yml
33
+ Connecting to database specified by database.yml
34
+ Connecting to database specified by database.yml
35
+ Connecting to database specified by database.yml
36
+ Connecting to database specified by database.yml
37
+ Connecting to database specified by database.yml
38
+ Connecting to database specified by database.yml
39
+ Connecting to database specified by database.yml
40
+ Connecting to database specified by database.yml
41
+ Connecting to database specified by database.yml
42
+ Connecting to database specified by database.yml
43
+ Connecting to database specified by database.yml
44
+ Connecting to database specified by database.yml
45
+ Connecting to database specified by database.yml
46
+ Connecting to database specified by database.yml
47
+ Connecting to database specified by database.yml
48
+ Connecting to database specified by database.yml
49
+ Connecting to database specified by database.yml
50
+ Connecting to database specified by database.yml
51
+ Connecting to database specified by database.yml
52
+ Connecting to database specified by database.yml
53
+ Connecting to database specified by database.yml
54
+ Connecting to database specified by database.yml
55
+ Connecting to database specified by database.yml
56
+ Connecting to database specified by database.yml
57
+ Connecting to database specified by database.yml
58
+ Connecting to database specified by database.yml
59
+ Connecting to database specified by database.yml
60
+ Connecting to database specified by database.yml
61
+ Connecting to database specified by database.yml
62
+ Connecting to database specified by database.yml
63
+ Connecting to database specified by database.yml
64
+ Connecting to database specified by database.yml
65
+ Connecting to database specified by database.yml
66
+ Connecting to database specified by database.yml
67
+ Connecting to database specified by database.yml
68
+ Connecting to database specified by database.yml
69
+ Connecting to database specified by database.yml
70
+ Connecting to database specified by database.yml
71
+ Connecting to database specified by database.yml
72
+ Connecting to database specified by database.yml
73
+ Connecting to database specified by database.yml
74
+ Connecting to database specified by database.yml
75
+ Connecting to database specified by database.yml
76
+ Connecting to database specified by database.yml
77
+ Connecting to database specified by database.yml
78
+ Connecting to database specified by database.yml
79
+ Connecting to database specified by database.yml
80
+ Connecting to database specified by database.yml
81
+ Connecting to database specified by database.yml
82
+ Connecting to database specified by database.yml
83
+ Connecting to database specified by database.yml
84
+ Connecting to database specified by database.yml
85
+ Connecting to database specified by database.yml
86
+ Connecting to database specified by database.yml
87
+ Connecting to database specified by database.yml
88
+ Connecting to database specified by database.yml
89
+ Connecting to database specified by database.yml
90
+ Connecting to database specified by database.yml
91
+ Connecting to database specified by database.yml
92
+ Connecting to database specified by database.yml
93
+ Connecting to database specified by database.yml
94
+ Connecting to database specified by database.yml
95
+ Connecting to database specified by database.yml
96
+ Connecting to database specified by database.yml
97
+ Connecting to database specified by database.yml
98
+ Connecting to database specified by database.yml
99
+ Connecting to database specified by database.yml
100
+ Connecting to database specified by database.yml
101
+ Connecting to database specified by database.yml
102
+ Connecting to database specified by database.yml
103
+ Connecting to database specified by database.yml
104
+ Connecting to database specified by database.yml
105
+ Connecting to database specified by database.yml
106
+ Connecting to database specified by database.yml
107
+ Connecting to database specified by database.yml
108
+ Connecting to database specified by database.yml
109
+ Connecting to database specified by database.yml
110
+ Connecting to database specified by database.yml
111
+ Connecting to database specified by database.yml
112
+ Connecting to database specified by database.yml
113
+ Connecting to database specified by database.yml
114
+ Connecting to database specified by database.yml
115
+ Connecting to database specified by database.yml
116
+ Connecting to database specified by database.yml
117
+ Connecting to database specified by database.yml
118
+ Connecting to database specified by database.yml
119
+ Connecting to database specified by database.yml
120
+ Connecting to database specified by database.yml
121
+ Connecting to database specified by database.yml
122
+ Connecting to database specified by database.yml
123
+ Connecting to database specified by database.yml
124
+ Connecting to database specified by database.yml
125
+ Connecting to database specified by database.yml
126
+ Connecting to database specified by database.yml
127
+ Connecting to database specified by database.yml
128
+ Connecting to database specified by database.yml
129
+ Connecting to database specified by database.yml
130
+ Connecting to database specified by database.yml
131
+ Connecting to database specified by database.yml
132
+ Connecting to database specified by database.yml
133
+ Connecting to database specified by database.yml
134
+ Connecting to database specified by database.yml
135
+ Connecting to database specified by database.yml
136
+ Connecting to database specified by database.yml
137
+ Connecting to database specified by database.yml
138
+ Connecting to database specified by database.yml
139
+ Connecting to database specified by database.yml
140
+ Connecting to database specified by database.yml
141
+ Connecting to database specified by database.yml
142
+ Connecting to database specified by database.yml
143
+ Connecting to database specified by database.yml
144
+ Connecting to database specified by database.yml
145
+ Connecting to database specified by database.yml
146
+ Connecting to database specified by database.yml
147
+ Connecting to database specified by database.yml
148
+ Connecting to database specified by database.yml
149
+ Connecting to database specified by database.yml
150
+ Connecting to database specified by database.yml
151
+ Connecting to database specified by database.yml
152
+ Connecting to database specified by database.yml
153
+ Connecting to database specified by database.yml
154
+ Connecting to database specified by database.yml
155
+ Connecting to database specified by database.yml
156
+ Connecting to database specified by database.yml
157
+ Connecting to database specified by database.yml
158
+ Connecting to database specified by database.yml
159
+ Connecting to database specified by database.yml
160
+ Connecting to database specified by database.yml
161
+ Connecting to database specified by database.yml
162
+ Connecting to database specified by database.yml
163
+ Connecting to database specified by database.yml
164
+ Connecting to database specified by database.yml
165
+ Connecting to database specified by database.yml
166
+ Connecting to database specified by database.yml
167
+ Connecting to database specified by database.yml
168
+ Connecting to database specified by database.yml
169
+ Connecting to database specified by database.yml
170
+ Connecting to database specified by database.yml
171
+ Connecting to database specified by database.yml
172
+ Connecting to database specified by database.yml
173
+ Connecting to database specified by database.yml
174
+ Connecting to database specified by database.yml
175
+ Connecting to database specified by database.yml
176
+ Connecting to database specified by database.yml
177
+ Connecting to database specified by database.yml
178
+ Connecting to database specified by database.yml
179
+ Connecting to database specified by database.yml
180
+ Connecting to database specified by database.yml
181
+ Connecting to database specified by database.yml
182
+ Connecting to database specified by database.yml
183
+ Connecting to database specified by database.yml
184
+ Connecting to database specified by database.yml
185
+ Connecting to database specified by database.yml
186
+ Connecting to database specified by database.yml
187
+ Connecting to database specified by database.yml
188
+ Connecting to database specified by database.yml
189
+ Connecting to database specified by database.yml
190
+ Connecting to database specified by database.yml
191
+ Connecting to database specified by database.yml
192
+ Connecting to database specified by database.yml
193
+ Connecting to database specified by database.yml
194
+ Connecting to database specified by database.yml
195
+ Connecting to database specified by database.yml
196
+ Connecting to database specified by database.yml
197
+ Connecting to database specified by database.yml
198
+ Connecting to database specified by database.yml
199
+ Connecting to database specified by database.yml
200
+ Connecting to database specified by database.yml
201
+ Connecting to database specified by database.yml
202
+ Connecting to database specified by database.yml
203
+ Connecting to database specified by database.yml
204
+ Connecting to database specified by database.yml
205
+ Connecting to database specified by database.yml
206
+ Connecting to database specified by database.yml
207
+ Connecting to database specified by database.yml
208
+ Connecting to database specified by database.yml
209
+ Connecting to database specified by database.yml
210
+ Connecting to database specified by database.yml
211
+ Connecting to database specified by database.yml
212
+ Connecting to database specified by database.yml
213
+ Connecting to database specified by database.yml
214
+ Connecting to database specified by database.yml
215
+ Connecting to database specified by database.yml
216
+ Connecting to database specified by database.yml
217
+ Connecting to database specified by database.yml
218
+ Connecting to database specified by database.yml
219
+ Connecting to database specified by database.yml
220
+ Connecting to database specified by database.yml
221
+ Connecting to database specified by database.yml
222
+ Connecting to database specified by database.yml
223
+ Connecting to database specified by database.yml
224
+ Connecting to database specified by database.yml
225
+ Connecting to database specified by database.yml
226
+ Connecting to database specified by database.yml
227
+ Connecting to database specified by database.yml
228
+ Connecting to database specified by database.yml
229
+ Connecting to database specified by database.yml
230
+ Connecting to database specified by database.yml
231
+ Connecting to database specified by database.yml
232
+ Connecting to database specified by database.yml
233
+ Connecting to database specified by database.yml
234
+ Connecting to database specified by database.yml
235
+ Connecting to database specified by database.yml
236
+ Connecting to database specified by database.yml
237
+ Connecting to database specified by database.yml
238
+ Connecting to database specified by database.yml
239
+ Connecting to database specified by database.yml
240
+ Connecting to database specified by database.yml
241
+ Connecting to database specified by database.yml
242
+ Connecting to database specified by database.yml
243
+ Connecting to database specified by database.yml
244
+ Connecting to database specified by database.yml
245
+ Connecting to database specified by database.yml
246
+ Connecting to database specified by database.yml
247
+ Connecting to database specified by database.yml
248
+ Connecting to database specified by database.yml
249
+ Connecting to database specified by database.yml
250
+ Connecting to database specified by database.yml
251
+ Connecting to database specified by database.yml
252
+ Connecting to database specified by database.yml
253
+ Connecting to database specified by database.yml
254
+ Connecting to database specified by database.yml
255
+ Connecting to database specified by database.yml
256
+ Connecting to database specified by database.yml
257
+ Connecting to database specified by database.yml
258
+ Connecting to database specified by database.yml
259
+ Connecting to database specified by database.yml
260
+ Connecting to database specified by database.yml
261
+ Connecting to database specified by database.yml
262
+ Connecting to database specified by database.yml
263
+ Connecting to database specified by database.yml
264
+ Connecting to database specified by database.yml
265
+ Connecting to database specified by database.yml
266
+ Connecting to database specified by database.yml
267
+ Connecting to database specified by database.yml
268
+ Connecting to database specified by database.yml
269
+ Connecting to database specified by database.yml
270
+ Connecting to database specified by database.yml
271
+ Connecting to database specified by database.yml
272
+ Connecting to database specified by database.yml
273
+ Connecting to database specified by database.yml
274
+ Connecting to database specified by database.yml
275
+ Connecting to database specified by database.yml
276
+ Connecting to database specified by database.yml
277
+ Connecting to database specified by database.yml
278
+ Connecting to database specified by database.yml
279
+ Connecting to database specified by database.yml
280
+ Connecting to database specified by database.yml
281
+ Connecting to database specified by database.yml
282
+ Connecting to database specified by database.yml
283
+ Connecting to database specified by database.yml
284
+ Connecting to database specified by database.yml
285
+ Connecting to database specified by database.yml
286
+ Connecting to database specified by database.yml
287
+ Connecting to database specified by database.yml
288
+ Connecting to database specified by database.yml
289
+ Connecting to database specified by database.yml
290
+ Connecting to database specified by database.yml
291
+ Connecting to database specified by database.yml
292
+ Connecting to database specified by database.yml
293
+ Connecting to database specified by database.yml
294
+ Connecting to database specified by database.yml
295
+ Connecting to database specified by database.yml
296
+ Connecting to database specified by database.yml
297
+ Connecting to database specified by database.yml
298
+ Connecting to database specified by database.yml
299
+ Connecting to database specified by database.yml
300
+ Connecting to database specified by database.yml
301
+ Connecting to database specified by database.yml
302
+ Connecting to database specified by database.yml
303
+ Connecting to database specified by database.yml
304
+ Connecting to database specified by database.yml
305
+ Connecting to database specified by database.yml
306
+ Connecting to database specified by database.yml
307
+ Connecting to database specified by database.yml
308
+ Connecting to database specified by database.yml
309
+ Connecting to database specified by database.yml
310
+ Connecting to database specified by database.yml
311
+ Connecting to database specified by database.yml
312
+ Connecting to database specified by database.yml
313
+ Connecting to database specified by database.yml
314
+ Connecting to database specified by database.yml
315
+ Connecting to database specified by database.yml
316
+ Connecting to database specified by database.yml
317
+ Connecting to database specified by database.yml
318
+ Connecting to database specified by database.yml
319
+ Connecting to database specified by database.yml
320
+ Connecting to database specified by database.yml
321
+ Connecting to database specified by database.yml
322
+ Connecting to database specified by database.yml
323
+ Connecting to database specified by database.yml
324
+ Connecting to database specified by database.yml
325
+ Connecting to database specified by database.yml
326
+ Connecting to database specified by database.yml
327
+ Connecting to database specified by database.yml
328
+ Connecting to database specified by database.yml
329
+ Connecting to database specified by database.yml
330
+ Connecting to database specified by database.yml
331
+ Connecting to database specified by database.yml
332
+ Connecting to database specified by database.yml
333
+ Connecting to database specified by database.yml
334
+ Connecting to database specified by database.yml
335
+ Connecting to database specified by database.yml
336
+ Connecting to database specified by database.yml
337
+ Connecting to database specified by database.yml
338
+ Connecting to database specified by database.yml
339
+ Connecting to database specified by database.yml
340
+ Connecting to database specified by database.yml
341
+ Connecting to database specified by database.yml
342
+ Connecting to database specified by database.yml
343
+ Connecting to database specified by database.yml
344
+ Connecting to database specified by database.yml
345
+ Connecting to database specified by database.yml
346
+ Connecting to database specified by database.yml
347
+ Connecting to database specified by database.yml
348
+ Connecting to database specified by database.yml
349
+ Connecting to database specified by database.yml
350
+ Connecting to database specified by database.yml
351
+ Connecting to database specified by database.yml
352
+ Connecting to database specified by database.yml
353
+ Connecting to database specified by database.yml
354
+ Connecting to database specified by database.yml
355
+ Connecting to database specified by database.yml
356
+ Connecting to database specified by database.yml
357
+ Connecting to database specified by database.yml
358
+ Connecting to database specified by database.yml
359
+ Connecting to database specified by database.yml
360
+ Connecting to database specified by database.yml
361
+ Connecting to database specified by database.yml
362
+ Connecting to database specified by database.yml
363
+ Connecting to database specified by database.yml
364
+ Connecting to database specified by database.yml
365
+ Connecting to database specified by database.yml
366
+ Connecting to database specified by database.yml
367
+ Connecting to database specified by database.yml
368
+ Connecting to database specified by database.yml
369
+ Connecting to database specified by database.yml
370
+ Connecting to database specified by database.yml
371
+ Connecting to database specified by database.yml
372
+ Connecting to database specified by database.yml
373
+ Connecting to database specified by database.yml
374
+ Connecting to database specified by database.yml
375
+ Connecting to database specified by database.yml
376
+ Connecting to database specified by database.yml
377
+ Connecting to database specified by database.yml
378
+ Connecting to database specified by database.yml
379
+ Connecting to database specified by database.yml
380
+ Connecting to database specified by database.yml
381
+ Connecting to database specified by database.yml
382
+ Connecting to database specified by database.yml
383
+ Connecting to database specified by database.yml
384
+ Connecting to database specified by database.yml
385
+ Connecting to database specified by database.yml
386
+ Connecting to database specified by database.yml
387
+ Connecting to database specified by database.yml
388
+ Connecting to database specified by database.yml
389
+ Connecting to database specified by database.yml
390
+ Connecting to database specified by database.yml
391
+ Connecting to database specified by database.yml
392
+ Connecting to database specified by database.yml
393
+ Connecting to database specified by database.yml
394
+ Connecting to database specified by database.yml
395
+ Connecting to database specified by database.yml
396
+ Connecting to database specified by database.yml
397
+ Connecting to database specified by database.yml
398
+ Connecting to database specified by database.yml
399
+ Connecting to database specified by database.yml
400
+ Connecting to database specified by database.yml
401
+ Connecting to database specified by database.yml
402
+ Connecting to database specified by database.yml
403
+ Connecting to database specified by database.yml
404
+ Connecting to database specified by database.yml
405
+ Connecting to database specified by database.yml
406
+ Connecting to database specified by database.yml
407
+ Connecting to database specified by database.yml
408
+ Connecting to database specified by database.yml
409
+ Connecting to database specified by database.yml
410
+ Connecting to database specified by database.yml
411
+ Connecting to database specified by database.yml
412
+ Connecting to database specified by database.yml
413
+ Connecting to database specified by database.yml
414
+ Connecting to database specified by database.yml
415
+ Connecting to database specified by database.yml
416
+ Connecting to database specified by database.yml
417
+ Connecting to database specified by database.yml
418
+ Connecting to database specified by database.yml
419
+ Connecting to database specified by database.yml
420
+ Connecting to database specified by database.yml
421
+ Connecting to database specified by database.yml
422
+ Connecting to database specified by database.yml
423
+ Connecting to database specified by database.yml
424
+ Connecting to database specified by database.yml
425
+ Connecting to database specified by database.yml
426
+ Connecting to database specified by database.yml
427
+ Connecting to database specified by database.yml
428
+ Connecting to database specified by database.yml
429
+ Connecting to database specified by database.yml
430
+ Connecting to database specified by database.yml
431
+ Connecting to database specified by database.yml
432
+ Connecting to database specified by database.yml
433
+ Connecting to database specified by database.yml
434
+ Connecting to database specified by database.yml
435
+ Connecting to database specified by database.yml
436
+ Connecting to database specified by database.yml
437
+ Connecting to database specified by database.yml
438
+ Connecting to database specified by database.yml
439
+ Connecting to database specified by database.yml
440
+ Connecting to database specified by database.yml
441
+ Connecting to database specified by database.yml
442
+ Connecting to database specified by database.yml
443
+ Connecting to database specified by database.yml
444
+ Connecting to database specified by database.yml
445
+ Connecting to database specified by database.yml
446
+ Connecting to database specified by database.yml
447
+ Connecting to database specified by database.yml
448
+ Connecting to database specified by database.yml
449
+ Connecting to database specified by database.yml
450
+ Connecting to database specified by database.yml
451
+ Connecting to database specified by database.yml
452
+ Connecting to database specified by database.yml
453
+ Connecting to database specified by database.yml
454
+ Connecting to database specified by database.yml