nav_lynx 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/MIT-LICENSE +1 -1
  2. data/README.md +29 -1
  3. data/Rakefile +1 -0
  4. data/app/helpers/nav_link_helper.rb +57 -46
  5. data/lib/nav_lynx/engine.rb +6 -0
  6. data/lib/nav_lynx/version.rb +1 -1
  7. data/lib/nav_lynx.rb +3 -2
  8. data/spec/dummy/config/application.rb +1 -11
  9. data/spec/dummy/config/boot.rb +3 -7
  10. data/spec/dummy/config/environments/development.rb +0 -7
  11. data/spec/dummy/config/environments/test.rb +2 -3
  12. data/spec/dummy/db/test.sqlite3 +0 -0
  13. data/spec/dummy/log/development.log +139 -0
  14. data/spec/dummy/log/test.log +1818 -0
  15. data/spec/dummy/tmp/cache/assets/test/sprockets/061366614f53b2e629f4ce5af7376503 +0 -0
  16. data/spec/dummy/tmp/cache/assets/test/sprockets/12e93292435b9fd9a8ead1d08efcc40b +0 -0
  17. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  18. data/spec/dummy/tmp/cache/assets/test/sprockets/16813814f2e3c416d514746de8977f71 +0 -0
  19. data/spec/dummy/tmp/cache/assets/test/sprockets/20bdd97a4de949dfc1ccc5b4881d5de6 +0 -0
  20. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  21. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  22. data/spec/dummy/tmp/cache/assets/test/sprockets/52ef98542a240e988c164c670087be82 +0 -0
  23. data/spec/dummy/tmp/cache/assets/test/sprockets/8528046f7875341a083dca3a0349725a +0 -0
  24. data/spec/dummy/tmp/cache/assets/test/sprockets/a45664b91391c11181b20e5903d4aa8f +0 -0
  25. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  26. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  27. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  28. data/spec/dummy/tmp/cache/assets/test/sprockets/fe314a8ef926518b95394d23d7967ac4 +0 -0
  29. data/spec/helpers/nav_link_helper_spec.rb +44 -26
  30. data/spec/spec_helper.rb +1 -0
  31. metadata +67 -7
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2013 YOURNAME
1
+ Copyright 2013 Dan Tello (Viget)
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- ## Behold, the nav_lynx:
1
+ # NavLYNX
2
+
3
+ [![Code Climate](https://codeclimate.com/github/vigetlabs/nav_lynx.png)](https://codeclimate.com/github/vigetlabs/nav_lynx)
2
4
 
3
5
  The nav_link_to helper works just like the standard Rails link_to helper, but adds a 'selected' class to your link (or its wrapper) if certain criteria are met. By default, if the link's destination url is the same url as the url of the current page, a default class of 'selected' is added to the link.
4
6
 
@@ -23,3 +25,29 @@ Same usage as `link_to`:
23
25
  1. Add this to your Gemfile and then `bundle install`:
24
26
  <pre><code>gem 'nav_lynx'</code></pre>
25
27
  2. Use `nav_link_to` helper in your views.
28
+
29
+ ## Config option
30
+
31
+ There is one config option `selected_class`. If you want a different class then "selected" for selected nav items globally you can use this option to change that. You can set this inside your configuration in `config/application.rb` of your Rails application like so:
32
+
33
+ module MyApplication
34
+ class Application < Rails::Application
35
+ # ...
36
+
37
+ config.nav_lynx.selected_class = 'current'
38
+ end
39
+ end
40
+
41
+ ## Contributing to NavLYNX
42
+
43
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
44
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
45
+ * Fork the project.
46
+ * Start a feature/bugfix branch.
47
+ * Commit and push until you are happy with your contribution.
48
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
49
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
50
+
51
+ ## Copyright
52
+
53
+ Copyright (c) 2013 Viget. See MIT_LICENSE for further details.
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env rake
2
2
  begin
3
3
  require 'bundler/setup'
4
+ require 'appraisal'
4
5
  rescue LoadError
5
6
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
7
  end
@@ -2,22 +2,26 @@ module NavLinkHelper
2
2
 
3
3
  def nav_link_to(*args, &block)
4
4
  title = block_given? ? capture(&block) : args.shift
5
- path = args[0]
5
+ url_options = args[0]
6
6
  html_options = args[1] || {}
7
7
  options = args[2] || {}
8
8
 
9
- LinkGenerator.new(request, title, path, html_options, options).to_html
9
+ LinkGenerator.new(request, title, url_options, controller,html_options, options).to_html
10
10
  end
11
11
 
12
12
  class LinkGenerator
13
13
  include ActionView::Helpers::UrlHelper
14
+ include Rails.application.routes.url_helpers
14
15
 
15
- def initialize(request, title, path, html_options = {}, options = {})
16
+ attr_reader :controller
17
+
18
+ def initialize(request, title, url_options, controller, html_options = {}, options = {})
16
19
  @request = request
17
20
  @title = title
18
- @path = path
21
+ @url_options = url_options
19
22
  @html_options = html_options
20
23
  @options = options
24
+ @controller = controller
21
25
  end
22
26
 
23
27
  def to_html
@@ -32,28 +36,45 @@ module NavLinkHelper
32
36
 
33
37
  private
34
38
 
39
+ def link
40
+ link_to(@title, @url_options, html_options)
41
+ end
42
+
43
+ def html_options
44
+ selected? ? @html_options.merge(:class => link_classes) : @html_options
45
+ end
46
+
47
+ def selected?
48
+ paths_match? || segments_match?
49
+ end
50
+
51
+ def paths_match?
52
+ current_path == link_path
53
+ end
54
+
35
55
  def current_path
36
56
  comparable_path_for(@request.fullpath)
37
57
  end
38
58
 
39
59
  def link_path
40
- comparable_path_for(url_for(@path))
60
+ path = url_for(@url_options)
61
+ comparable_path_for(path)
41
62
  end
42
63
 
43
- def segment_position
44
- if @options[:controller_segment]
45
- @options[:controller_segment] - 1
46
- elsif @options[:url_segment]
47
- @options[:url_segment]
64
+ def comparable_path_for(path)
65
+ if @options[:ignore_params]
66
+ path.gsub(/\?.*/, '')
67
+ else
68
+ path
48
69
  end
49
70
  end
50
71
 
51
- def path_controller
52
- controller_for(@path)
72
+ def segments_match?
73
+ path_segment && path_segment == current_segment
53
74
  end
54
75
 
55
- def current_controller
56
- controller_for(@request.path)
76
+ def path_segment
77
+ segment_for(path_controller, current_path)
57
78
  end
58
79
 
59
80
  def segment_for(controller, path)
@@ -64,28 +85,34 @@ module NavLinkHelper
64
85
  end
65
86
  end
66
87
 
67
- def path_segment
68
- segment_for(path_controller, current_path)
69
- end
70
-
71
- def current_segment
72
- segment_for(current_controller, link_path)
88
+ def path_controller
89
+ if @url_options.is_a?(Hash) && @url_options[:controller]
90
+ @url_options[:controller]
91
+ else
92
+ controller_for(url_for(@url_options))
93
+ end
73
94
  end
74
95
 
75
- def paths_match?
76
- current_path == link_path
96
+ def segment_position
97
+ if @options[:controller_segment]
98
+ @options[:controller_segment] - 1
99
+ elsif @options[:url_segment]
100
+ @options[:url_segment]
101
+ end
77
102
  end
78
103
 
79
- def segments_match?
80
- path_segment && path_segment == current_segment
104
+ def controller_for(path)
105
+ Rails.application.routes.recognize_path(path)[:controller]
106
+ rescue ActionController::RoutingError
107
+ nil
81
108
  end
82
109
 
83
- def selected?
84
- paths_match? || segments_match?
110
+ def current_segment
111
+ segment_for(current_controller, link_path)
85
112
  end
86
113
 
87
- def selected_class
88
- @options[:selected_class] || 'selected'
114
+ def current_controller
115
+ controller_for(@request.path)
89
116
  end
90
117
 
91
118
  def link_classes
@@ -96,12 +123,8 @@ module NavLinkHelper
96
123
  end
97
124
  end
98
125
 
99
- def html_options
100
- selected? ? @html_options.merge(:class => link_classes) : @html_options
101
- end
102
-
103
- def link
104
- link_to(@title, @path, html_options)
126
+ def selected_class
127
+ @options[:selected_class] || NavLYNX.selected_class
105
128
  end
106
129
 
107
130
  def wrapper_classes
@@ -111,18 +134,6 @@ module NavLinkHelper
111
134
  @options[:wrapper_class]
112
135
  end
113
136
  end
114
-
115
- def controller_for(path)
116
- Rails.application.routes.recognize_path(path)[:controller]
117
- end
118
-
119
- def comparable_path_for(path)
120
- if @options[:ignore_params]
121
- path.gsub(/\?.*/, '')
122
- else
123
- path
124
- end
125
- end
126
137
  end
127
138
 
128
139
  end
@@ -1,7 +1,13 @@
1
1
  module NavLYNX
2
2
  class Engine < ::Rails::Engine
3
+ config.nav_lynx = ActiveSupport::OrderedOptions.new
4
+
3
5
  config.generators do |g|
4
6
  g.test_framework :rspec, :fixture => false
5
7
  end
8
+
9
+ initializer "redirector.apply_options" do |app|
10
+ NavLYNX.selected_class = app.config.nav_lynx.selected_class || 'selected'
11
+ end
6
12
  end
7
13
  end
@@ -1,3 +1,3 @@
1
1
  module NavLYNX
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
data/lib/nav_lynx.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "nav_lynx/engine"
2
-
3
1
  module NavLYNX
2
+ mattr_accessor :selected_class
4
3
  end
4
+
5
+ require "nav_lynx/engine"
@@ -1,11 +1,7 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
3
  # Pick the frameworks you want:
4
- require "active_record/railtie"
5
- require "action_controller/railtie"
6
- require "action_mailer/railtie"
7
- require "active_resource/railtie"
8
- require "sprockets/railtie"
4
+ require 'rails/all'
9
5
  # require "rails/test_unit/railtie"
10
6
 
11
7
  Bundler.require(*Rails.groups)
@@ -49,12 +45,6 @@ module Dummy
49
45
  # like if you have constraints or database-specific column types
50
46
  # config.active_record.schema_format = :sql
51
47
 
52
- # Enforce whitelist mode for mass assignment.
53
- # This will create an empty whitelist of attributes available for mass-assignment for all models
54
- # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
55
- # parameters by using an attr_accessible or attr_protected declaration.
56
- config.active_record.whitelist_attributes = true
57
-
58
48
  # Enable the asset pipeline
59
49
  config.assets.enabled = true
60
50
 
@@ -1,10 +1,6 @@
1
1
  require 'rubygems'
2
- gemfile = File.expand_path('../../../../Gemfile', __FILE__)
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
9
5
 
10
- $:.unshift File.expand_path('../../../../lib', __FILE__)
6
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -22,13 +22,6 @@ Dummy::Application.configure do
22
22
  # Only use best-standards-support built into browsers
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
- # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
27
-
28
- # Log the query plan for queries taking more than this (works
29
- # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
31
-
32
25
  # Do not compress assets
33
26
  config.assets.compress = false
34
27
 
@@ -29,9 +29,8 @@ Dummy::Application.configure do
29
29
  # ActionMailer::Base.deliveries array.
30
30
  config.action_mailer.delivery_method = :test
31
31
 
32
- # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
34
-
35
32
  # Print deprecation notices to the stderr
36
33
  config.active_support.deprecation = :stderr
34
+
35
+ config.eager_load = false
37
36
  end
Binary file
@@ -40,3 +40,142 @@ Connecting to database specified by database.yml
40
40
  Connecting to database specified by database.yml
41
41
   (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
42
42
   (0.1ms) SELECT version FROM "schema_migrations"
43
+ Connecting to database specified by database.yml
44
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
45
+  (0.1ms) SELECT version FROM "schema_migrations"
46
+ Connecting to database specified by database.yml
47
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
48
+  (0.1ms) SELECT version FROM "schema_migrations"
49
+ Connecting to database specified by database.yml
50
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
51
+  (0.1ms) SELECT version FROM "schema_migrations"
52
+ Connecting to database specified by database.yml
53
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
54
+  (0.1ms) SELECT version FROM "schema_migrations"
55
+ Connecting to database specified by database.yml
56
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
57
+  (0.1ms) SELECT version FROM "schema_migrations"
58
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
59
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
60
+  (0.2ms) SELECT version FROM "schema_migrations"
61
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
62
+ Connecting to database specified by database.yml
63
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
64
+  (0.2ms) SELECT version FROM "schema_migrations"
65
+  (104.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
66
+  (326.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
67
+  (0.3ms) SELECT version FROM "schema_migrations"
68
+  (205.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
69
+ Connecting to database specified by database.yml
70
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
71
+  (0.1ms) SELECT version FROM "schema_migrations"
72
+  (17.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
73
+  (9.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
74
+  (0.2ms) SELECT version FROM "schema_migrations"
75
+  (14.0ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
76
+ Connecting to database specified by database.yml
77
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
78
+  (0.1ms) SELECT version FROM "schema_migrations"
79
+ Connecting to database specified by database.yml
80
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
81
+  (0.1ms) SELECT version FROM "schema_migrations"
82
+ Connecting to database specified by database.yml
83
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
84
+  (0.1ms) SELECT version FROM "schema_migrations"
85
+ Connecting to database specified by database.yml
86
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
87
+  (0.2ms) SELECT version FROM "schema_migrations"
88
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
89
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
90
+  (0.2ms) SELECT version FROM "schema_migrations"
91
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
92
+ Connecting to database specified by database.yml
93
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
94
+  (0.2ms) SELECT version FROM "schema_migrations"
95
+ Connecting to database specified by database.yml
96
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
97
+  (0.1ms) SELECT version FROM "schema_migrations"
98
+  (2.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
99
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
100
+  (0.2ms) SELECT version FROM "schema_migrations"
101
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
102
+ Connecting to database specified by database.yml
103
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
104
+  (0.3ms) SELECT version FROM "schema_migrations"
105
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
106
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
107
+  (0.2ms) SELECT version FROM "schema_migrations"
108
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
109
+ Connecting to database specified by database.yml
110
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
111
+  (0.2ms) SELECT version FROM "schema_migrations"
112
+ Connecting to database specified by database.yml
113
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
114
+  (0.2ms) SELECT version FROM "schema_migrations"
115
+ Connecting to database specified by database.yml
116
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
117
+  (0.1ms) SELECT version FROM "schema_migrations"
118
+  (11.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
119
+  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
120
+  (0.3ms) SELECT version FROM "schema_migrations"
121
+  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
122
+ Connecting to database specified by database.yml
123
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
124
+  (0.2ms) SELECT version FROM "schema_migrations"
125
+  (7.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
126
+  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
127
+  (0.3ms) SELECT version FROM "schema_migrations"
128
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
129
+ Connecting to database specified by database.yml
130
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
131
+  (0.1ms) SELECT version FROM "schema_migrations"
132
+  (2.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
133
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
134
+  (0.2ms) SELECT version FROM "schema_migrations"
135
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
136
+ Connecting to database specified by database.yml
137
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
138
+  (0.1ms) SELECT version FROM "schema_migrations"
139
+ Connecting to database specified by database.yml
140
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
141
+  (0.1ms) SELECT version FROM "schema_migrations"
142
+ Connecting to database specified by database.yml
143
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
144
+  (0.2ms) SELECT version FROM "schema_migrations"
145
+ Connecting to database specified by database.yml
146
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
147
+  (0.1ms) SELECT version FROM "schema_migrations"
148
+ Connecting to database specified by database.yml
149
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
150
+  (0.1ms) SELECT version FROM "schema_migrations"
151
+ Connecting to database specified by database.yml
152
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
153
+  (0.2ms) SELECT version FROM "schema_migrations"
154
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
155
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
156
+  (0.2ms) SELECT version FROM "schema_migrations"
157
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
158
+ Connecting to database specified by database.yml
159
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
160
+  (17.1ms) SELECT version FROM "schema_migrations"
161
+  (64.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
162
+  (101.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
163
+  (0.3ms) SELECT version FROM "schema_migrations"
164
+  (138.6ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
165
+ Connecting to database specified by database.yml
166
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
167
+  (0.1ms) SELECT version FROM "schema_migrations"
168
+ Connecting to database specified by database.yml
169
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
170
+  (0.1ms) SELECT version FROM "schema_migrations"
171
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
172
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
173
+  (0.2ms) SELECT version FROM "schema_migrations"
174
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
175
+ Connecting to database specified by database.yml
176
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
177
+  (0.1ms) SELECT version FROM "schema_migrations"
178
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
179
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
180
+  (0.2ms) SELECT version FROM "schema_migrations"
181
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('0')