rails_db 1.1.1 → 1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -3
  3. data/Gemfile.lock +4 -19
  4. data/app/assets/stylesheets/rails_db/{app.css.scss → app.css} +28 -34
  5. data/app/assets/stylesheets/rails_db/application.css +0 -4
  6. data/app/assets/stylesheets/rails_db/{forms.css.scss → forms.css} +0 -0
  7. data/app/assets/stylesheets/rails_db/{foundation_and_overrides.css.scss → foundation_and_overrides.css} +1 -1
  8. data/app/assets/stylesheets/rails_db/{pagination.css.scss → pagination.css} +1 -1
  9. data/app/assets/stylesheets/rails_db/search.css +7 -0
  10. data/app/assets/stylesheets/rails_db/sidebar.css +22 -0
  11. data/app/assets/stylesheets/rails_db/{table.css.scss → table.css} +1 -1
  12. data/app/helpers/rails_db/application_helper.rb +11 -2
  13. data/app/helpers/rails_db/tables_helper.rb +1 -1
  14. data/app/views/layouts/rails_db/application.html.erb +2 -0
  15. data/app/views/rails_db/tables/data.js.erb +1 -1
  16. data/app/views/rails_db/tables/show.js.erb +1 -1
  17. data/config/initializers/simple_form.rb +168 -0
  18. data/config/locales/simple_form.en.yml +31 -0
  19. data/lib/ext/simple_form_ext.rb +1 -0
  20. data/lib/generators/templates/rails_db.rb +1 -1
  21. data/lib/rails_db.rb +2 -4
  22. data/lib/rails_db/version.rb +1 -1
  23. data/lib/standalone.rb +1 -0
  24. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  25. data/rails_db.gemspec +2 -4
  26. data/test/dummy/db/rails_db.sqlite3 +0 -0
  27. data/test/standalone/Gemfile +1 -6
  28. data/test/standalone/Gemfile.lock +73 -62
  29. data/test/standalone/config/initializers/{quite_assets.rb → quiet_assets.rb} +1 -2
  30. metadata +35 -59
  31. data/app/assets/stylesheets/rails_db/search.css.scss +0 -15
  32. data/app/assets/stylesheets/rails_db/sidebar.css.scss +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 343cb080b3bc03e4a19c62be335bac1efc6eaf28
4
- data.tar.gz: 7320bc1da67869161c141f91844ec81da81805c0
3
+ metadata.gz: 74f9007f5a20bba8d137e16225eec8c228e759c3
4
+ data.tar.gz: d9fcaa4b91379b4ef9ab51680ce2cf1032cbda88
5
5
  SHA512:
6
- metadata.gz: b108845168d465cedc6acea96b924e809667452a75e1342008ae9905dd4e7f78d3b14c2d7cd6cd19e2b80cec798c170c2de6cc0a372346eeaf91792bf8965bf7
7
- data.tar.gz: 119723036d9862956623750a3d2163e9acf1341e57761f4cd1d250a22f686d4f3f0df09646a17da344cbb3da5119ee97ca859bfb2826cece4118e0c22f909331
6
+ metadata.gz: 54244b49bfa40501caf7bcb28d77f327ae1a28d722c04474c9e7d3d45a3cf4e636d4d1d4d233c29f89a29cac398ec7ecd9fb6f472b2a0b9b274f51309d14dd7b
7
+ data.tar.gz: c08362351be2776606ad4c9c267c8838ffa524945a94db7a62aff15467d4b01689178c6eefcae90589e91e080b4531e016e8361c99c1a73df429da436ab503f1
data/Gemfile CHANGED
@@ -3,9 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'rails'
6
- gem 'sass'
7
6
  gem 'jquery-rails'
8
- gem 'font-awesome-rails'
9
7
  gem 'codemirror-rails'
10
8
  gem 'terminal-table'
11
9
  gem 'simple_form'
@@ -13,7 +11,6 @@ gem 'ransack'
13
11
  gem 'kaminari'
14
12
 
15
13
  group :assets do
16
- gem 'sass-rails'
17
14
  gem 'uglifier'
18
15
  end
19
16
 
@@ -1,16 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_db (1.1.1)
4
+ rails_db (1.2)
5
5
  codemirror-rails
6
- font-awesome-rails
7
6
  jquery-rails
8
7
  kaminari
9
- launchy
10
8
  rails (>= 3.1.0)
11
9
  ransack
12
- sass
13
- sass-rails
14
10
  simple_form
15
11
  terminal-table
16
12
 
@@ -66,8 +62,6 @@ GEM
66
62
  railties (>= 3.0, < 5)
67
63
  erubis (2.7.0)
68
64
  execjs (2.6.0)
69
- font-awesome-rails (4.4.0.0)
70
- railties (>= 3.2, < 5.0)
71
65
  globalid (0.3.6)
72
66
  activesupport (>= 4.1.0)
73
67
  htmlentities (4.3.4)
@@ -130,13 +124,6 @@ GEM
130
124
  i18n
131
125
  polyamorous (~> 1.2)
132
126
  rubyzip (1.0.0)
133
- sass (3.4.19)
134
- sass-rails (5.0.4)
135
- railties (>= 4.0.0, < 5.0)
136
- sass (~> 3.1)
137
- sprockets (>= 2.8, < 4.0)
138
- sprockets-rails (>= 2.0, < 4.0)
139
- tilt (>= 1.1, < 3)
140
127
  simple_form (3.2.0)
141
128
  actionpack (~> 4.0)
142
129
  activemodel (~> 4.0)
@@ -150,7 +137,6 @@ GEM
150
137
  terminal-table (1.5.2)
151
138
  thor (0.19.1)
152
139
  thread_safe (0.3.5)
153
- tilt (2.0.1)
154
140
  tzinfo (1.2.2)
155
141
  thread_safe (~> 0.1)
156
142
  uglifier (2.7.2)
@@ -164,16 +150,15 @@ PLATFORMS
164
150
  DEPENDENCIES
165
151
  axlsx_rails
166
152
  codemirror-rails
167
- font-awesome-rails
168
153
  jquery-rails
169
154
  kaminari
155
+ launchy
156
+ mime-types (< 3.0)
170
157
  mysql2 (<= 0.3.20)
171
158
  pg
172
159
  rails
173
160
  rails_db!
174
161
  ransack
175
- sass
176
- sass-rails
177
162
  simple_form
178
163
  sqlite3
179
164
  terminal-table
@@ -181,4 +166,4 @@ DEPENDENCIES
181
166
  will_paginate (~> 3.0.6)
182
167
 
183
168
  BUNDLED WITH
184
- 1.10.6
169
+ 1.11.2
@@ -17,32 +17,29 @@ body {
17
17
 
18
18
  table {
19
19
  border-spacing: 2px;
20
+ }
20
21
 
21
- th .current {
22
- padding-right: 12px;
23
- background-repeat: no-repeat;
24
- background-position: right center;
25
- }
26
-
27
- &.custom_sorting {
28
- th .asc {
29
- background-image: asset-url('rails_db/up_arrow.gif');
30
- }
22
+ table th .current {
23
+ padding-right: 12px;
24
+ background-repeat: no-repeat;
25
+ background-position: right center;
26
+ }
31
27
 
32
- th .desc {
33
- background-image: asset-url('rails_db/down_arrow.gif');
34
- }
35
- }
28
+ table.custom_sorting th .asc {
29
+ background-image: <%= asset_path('rails_db/up_arrow.gif') %>;
30
+ }
36
31
 
37
- th, td {
38
- white-space: nowrap;
39
- vertical-align: top;
40
- }
32
+ table.custom_sorting th .desc {
33
+ background-image: <%= asset_path('rails_db/down_arrow.gif') %>;
34
+ }
41
35
 
42
- td.text {
43
- white-space: normal;
44
- }
36
+ table th, table td {
37
+ white-space: nowrap;
38
+ vertical-align: top;
39
+ }
45
40
 
41
+ table td.text {
42
+ white-space: normal;
46
43
  }
47
44
 
48
45
  .scrollable {
@@ -76,22 +73,19 @@ table {
76
73
  color: white;
77
74
  }
78
75
 
79
- .expanded {
80
- .collapse {
81
- display: inline;
82
- }
83
- .expand {
84
- display: none;
85
- }
76
+ .expanded .collapse {
77
+ display: inline;
86
78
  }
87
79
 
88
- .collapsed {
89
- .collapse {
90
- display: none;
91
- }
92
- .expand {
80
+ .expanded .expand {
81
+ display: none;
82
+ }
83
+
84
+ .collapsed .collapse {
85
+ display: none;
86
+ }
87
+ .collapsed .expand {
93
88
  display: inline;
94
- }
95
89
  }
96
90
 
97
91
  .sql_exp_col {
@@ -1,5 +1,4 @@
1
1
  /*
2
- *= require_self
3
2
  *= require rails_db/foundation.min
4
3
  *= require rails_db/foundation_and_overrides
5
4
  *= require codemirror
@@ -11,7 +10,4 @@
11
10
  *= require rails_db/table
12
11
  *= require rails_db/forms
13
12
  *= require rails_db/search
14
- *= require font-awesome
15
13
  */
16
-
17
-
@@ -5,4 +5,4 @@
5
5
 
6
6
  body {
7
7
  font-family: 'Open Sans', "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif;
8
- }
8
+ }
@@ -14,4 +14,4 @@
14
14
  .per_page_pagination {
15
15
  padding-top: 8px;
16
16
  padding-left: 10px;
17
- }
17
+ }
@@ -0,0 +1,7 @@
1
+ #search_form select, #search_form input, #search_form button {
2
+ width: auto;
3
+ display: inline-block;
4
+ }
5
+ #search_form .sorting_options select {
6
+ margin-right: 5px;
7
+ }
@@ -0,0 +1,22 @@
1
+ .side-nav.tables {
2
+ padding-top: 6px;
3
+ }
4
+
5
+ .side-nav.tables li {
6
+ margin: 0;
7
+ margin-left: 3px;
8
+ }
9
+
10
+ .side-nav.tables li a {
11
+ padding: 2px 4px;
12
+ }
13
+
14
+ .side-nav.tables li a.selected {
15
+ font-weight: bold;
16
+ }
17
+
18
+ #sidebar h3 {
19
+ font-size: 18px;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
@@ -9,4 +9,4 @@ span.pk {
9
9
  .column-name {
10
10
  float: left;
11
11
  width: 20%;
12
- }
12
+ }
@@ -1,7 +1,5 @@
1
1
  module RailsDb
2
2
  module ApplicationHelper
3
- include ::FontAwesome::Rails::IconHelper
4
-
5
3
  def rails_db_tables
6
4
  RailsDb::Database.accessible_tables
7
5
  end
@@ -42,6 +40,10 @@ module RailsDb
42
40
  end
43
41
  end
44
42
 
43
+ def fa_icon(icon_name)
44
+ %{<i class="fa fa-#{icon_name}"></i>}.html_safe
45
+ end
46
+
45
47
  def db_hint_options
46
48
  result = {}
47
49
  RailsDb::Database.accessible_tables.each do |table_name|
@@ -50,5 +52,12 @@ module RailsDb
50
52
  result
51
53
  end
52
54
 
55
+ def params_to_hash(p)
56
+ if p.respond_to?(:to_unsafe_h)
57
+ p.to_unsafe_h
58
+ else
59
+ p
60
+ end
61
+ end
53
62
  end
54
63
  end
@@ -32,7 +32,7 @@ module RailsDb
32
32
 
33
33
  def table_pagination_path
34
34
  params.delete(:pk_id)
35
- params.merge({action: :data})
35
+ params_to_hash params.merge({action: :data})
36
36
  end
37
37
 
38
38
  def column_is_checked?(table_name, column_name)
@@ -2,9 +2,11 @@
2
2
  <html>
3
3
  <head>
4
4
  <title><%= [yield(:title), 'Rails DB'].reject(&:blank?).join(' - ') %></title>
5
+ <%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" %>
5
6
  <%= stylesheet_link_tag "rails_db/application", media: "all" %>
6
7
  <%= javascript_include_tag "rails_db/application" %>
7
8
  <%= csrf_meta_tags %>
9
+
8
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
11
  </head>
10
12
 
@@ -11,4 +11,4 @@ $(document).foundation('reflow');
11
11
 
12
12
  $(document).scrollTop(0);
13
13
 
14
- set_browser_url('<%= url_for(params) %>');
14
+ set_browser_url('<%= url_for(params_to_hash(params)) %>');
@@ -11,4 +11,4 @@ $(document).foundation('reflow');
11
11
 
12
12
  $(document).scrollTop(0);
13
13
 
14
- set_browser_url('<%= url_for(params) %>');
14
+ set_browser_url('<%= url_for(params_to_hash(params)) %>');
@@ -0,0 +1,168 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, class: :input,
9
+ hint_class: :field_with_hint, error_class: :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input placeholder: "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => true`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, wrap_with: { tag: :span, class: :hint }
45
+ b.use :error, wrap_with: { tag: :span, class: :error }
46
+
47
+ ## full_messages_for
48
+ # If you want to display the full error message for the attribute, you can
49
+ # use the component :full_error, like:
50
+ #
51
+ # b.use :full_error, wrap_with: { tag: :span, class: :error }
52
+ end
53
+
54
+ # The default wrapper to be used by the FormBuilder.
55
+ config.default_wrapper = :default
56
+
57
+ # Define the way to render check boxes / radio buttons with labels.
58
+ # Defaults to :nested for bootstrap config.
59
+ # inline: input + label
60
+ # nested: label > input
61
+ config.boolean_style = :nested
62
+
63
+ # Default class for buttons
64
+ config.button_class = 'btn'
65
+
66
+ # Method used to tidy up errors. Specify any Rails Array method.
67
+ # :first lists the first message for each field.
68
+ # Use :to_sentence to list all errors for each field.
69
+ # config.error_method = :first
70
+
71
+ # Default tag used for error notification helper.
72
+ config.error_notification_tag = :div
73
+
74
+ # CSS class to add for error notification helper.
75
+ config.error_notification_class = 'error_notification'
76
+
77
+ # ID to add for error notification helper.
78
+ # config.error_notification_id = nil
79
+
80
+ # Series of attempts to detect a default label method for collection.
81
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
82
+
83
+ # Series of attempts to detect a default value method for collection.
84
+ # config.collection_value_methods = [ :id, :to_s ]
85
+
86
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
87
+ # config.collection_wrapper_tag = nil
88
+
89
+ # You can define the class to use on all collection wrappers. Defaulting to none.
90
+ # config.collection_wrapper_class = nil
91
+
92
+ # You can wrap each item in a collection of radio/check boxes with a tag,
93
+ # defaulting to :span.
94
+ # config.item_wrapper_tag = :span
95
+
96
+ # You can define a class to use in all item wrappers. Defaulting to none.
97
+ # config.item_wrapper_class = nil
98
+
99
+ # How the label text should be generated altogether with the required text.
100
+ # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" }
101
+
102
+ # You can define the class to use on all labels. Default is nil.
103
+ # config.label_class = nil
104
+
105
+ # You can define the default class to be used on forms. Can be overriden
106
+ # with `html: { :class }`. Defaulting to none.
107
+ # config.default_form_class = nil
108
+
109
+ # You can define which elements should obtain additional classes
110
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
111
+
112
+ # Whether attributes are required by default (or not). Default is true.
113
+ # config.required_by_default = true
114
+
115
+ # Tell browsers whether to use the native HTML5 validations (novalidate form option).
116
+ # These validations are enabled in SimpleForm's internal config but disabled by default
117
+ # in this configuration, which is recommended due to some quirks from different browsers.
118
+ # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
119
+ # change this configuration to true.
120
+ config.browser_validations = false
121
+
122
+ # Collection of methods to detect if a file type was given.
123
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
124
+
125
+ # Custom mappings for input types. This should be a hash containing a regexp
126
+ # to match as key, and the input type that will be used when the field name
127
+ # matches the regexp as value.
128
+ # config.input_mappings = { /count/ => :integer }
129
+
130
+ # Custom wrappers for input types. This should be a hash containing an input
131
+ # type as key and the wrapper that will be used for all inputs with specified type.
132
+ # config.wrapper_mappings = { string: :prepend }
133
+
134
+ # Namespaces where SimpleForm should look for custom input classes that
135
+ # override default inputs.
136
+ # config.custom_inputs_namespaces << "CustomInputs"
137
+
138
+ # Default priority for time_zone inputs.
139
+ # config.time_zone_priority = nil
140
+
141
+ # Default priority for country inputs.
142
+ # config.country_priority = nil
143
+
144
+ # When false, do not use translations for labels.
145
+ # config.translate_labels = true
146
+
147
+ # Automatically discover new inputs in Rails' autoload path.
148
+ # config.inputs_discovery = true
149
+
150
+ # Cache SimpleForm inputs discovery
151
+ # config.cache_discovery = !Rails.env.development?
152
+
153
+ # Default class for inputs
154
+ # config.input_class = nil
155
+
156
+ # Define the default class of the input wrapper of the boolean input.
157
+
158
+ if config.respond_to?(:boolean_label_class)
159
+ config.boolean_label_class = 'checkbox'
160
+ end
161
+
162
+ # Defines if the default input wrapper class should be included in radio
163
+ # collection wrappers.
164
+ # config.include_default_input_wrapper_class = true
165
+
166
+ # Defines which i18n scope will be used in Simple Form.
167
+ # config.i18n_scope = 'simple_form'
168
+ end
@@ -0,0 +1,31 @@
1
+ en:
2
+ simple_form:
3
+ "yes": 'Yes'
4
+ "no": 'No'
5
+ required:
6
+ text: 'required'
7
+ mark: '*'
8
+ # You can uncomment the line below if you need to overwrite the whole required html.
9
+ # When using html, text and mark won't be used.
10
+ # html: '<abbr title="required">*</abbr>'
11
+ error_notification:
12
+ default_message: "Please review the problems below:"
13
+ # Examples
14
+ # labels:
15
+ # defaults:
16
+ # password: 'Password'
17
+ # user:
18
+ # new:
19
+ # email: 'E-mail to sign in.'
20
+ # edit:
21
+ # email: 'E-mail.'
22
+ # hints:
23
+ # defaults:
24
+ # username: 'User name to sign in.'
25
+ # password: 'No special characters, please.'
26
+ # include_blanks:
27
+ # defaults:
28
+ # age: 'Rather not say'
29
+ # prompts:
30
+ # defaults:
31
+ # age: 'Select your age'
@@ -0,0 +1 @@
1
+ SimpleForm::FormBuilder.mappings[:inet] ||= SimpleForm::Inputs::StringInput
@@ -1,7 +1,7 @@
1
1
  if Object.const_defined?('RailsDb')
2
2
  RailsDb.setup do |config|
3
3
  # # enabled or not
4
- # config.enabled = Rails.env.to_s == 'development'
4
+ # config.enabled = Rails.env.development?
5
5
 
6
6
  # # automatic engine routes mounting
7
7
  # config.automatic_routes_mount = true
@@ -1,7 +1,4 @@
1
1
  require "rails"
2
- require "font-awesome-rails"
3
- require "sass"
4
- require "sass-rails"
5
2
  require "jquery-rails"
6
3
  require 'codemirror-rails'
7
4
  require 'terminal-table'
@@ -64,4 +61,5 @@ module RailsDb
64
61
  end
65
62
 
66
63
  require_relative "rails_db/engine"
67
- require_relative "rails/routes"
64
+ require_relative "rails/routes"
65
+ require_relative "ext/simple_form_ext"
@@ -1,3 +1,3 @@
1
1
  module RailsDb
2
- VERSION = "1.1.1"
2
+ VERSION = "1.3"
3
3
  end
@@ -36,6 +36,7 @@ module Standalone
36
36
  require 'launchy'
37
37
  Launchy.open("http://#{HOST}:#{PORT}/rails/db")
38
38
  rescue Exception
39
+ puts 'Please run `gem install launchy` to have the browser window opened automatically at launch'
39
40
  # silence
40
41
  # in case it won't work
41
42
  end
@@ -0,0 +1,13 @@
1
+ <%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
2
+ <%%= f.error_notification %>
3
+
4
+ <div class="form-inputs">
5
+ <%- attributes.each do |attribute| -%>
6
+ <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %>
7
+ <%- end -%>
8
+ </div>
9
+
10
+ <div class="form-actions">
11
+ <%%= f.button :submit %>
12
+ </div>
13
+ <%% end %>
@@ -18,22 +18,20 @@ Gem::Specification.new do |s|
18
18
  s.executables = ["railsdb", "rails_db", 'runsql']
19
19
 
20
20
  s.add_dependency 'rails', ">= 3.1.0"
21
- s.add_dependency 'font-awesome-rails'
22
- s.add_dependency 'sass'
23
- s.add_dependency 'sass-rails'
24
21
  s.add_dependency 'jquery-rails'
25
22
  s.add_dependency 'codemirror-rails'
26
- s.add_dependency 'launchy'
27
23
  s.add_dependency 'terminal-table'
28
24
  s.add_dependency 'simple_form'
29
25
  s.add_dependency 'ransack'
30
26
  s.add_dependency 'kaminari'
31
27
 
28
+ s.add_development_dependency "launchy"
32
29
  s.add_development_dependency "sqlite3"
33
30
  s.add_development_dependency "mysql2", '<= 0.3.20'
34
31
  s.add_development_dependency "pg"
35
32
  s.add_development_dependency "axlsx_rails"
36
33
  s.add_development_dependency 'will_paginate', '~> 3.0.6'
34
+ s.add_development_dependency 'mime-types', '< 3.0'
37
35
  # s.add_development_dependency 'populator'
38
36
  # s.add_development_dependency 'faker'
39
37
  # s.add_development_dependency 'pry'
@@ -1,11 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
-
4
-
5
3
  gem 'rails'
6
- gem 'sass'
7
4
  gem 'jquery-rails'
8
- gem 'font-awesome-rails'
9
5
  gem 'codemirror-rails'
10
6
  gem 'terminal-table'
11
7
  gem 'axlsx_rails'
@@ -14,6 +10,5 @@ gem 'ransack'
14
10
  gem 'kaminari'
15
11
 
16
12
  group :assets do
17
- gem 'sass-rails'
18
13
  gem 'uglifier'
19
- end
14
+ end
@@ -1,82 +1,91 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (4.2.4)
5
- actionpack (= 4.2.4)
6
- actionview (= 4.2.4)
7
- activejob (= 4.2.4)
4
+ actionmailer (4.2.5.1)
5
+ actionpack (= 4.2.5.1)
6
+ actionview (= 4.2.5.1)
7
+ activejob (= 4.2.5.1)
8
8
  mail (~> 2.5, >= 2.5.4)
9
9
  rails-dom-testing (~> 1.0, >= 1.0.5)
10
- actionpack (4.2.4)
11
- actionview (= 4.2.4)
12
- activesupport (= 4.2.4)
10
+ actionpack (4.2.5.1)
11
+ actionview (= 4.2.5.1)
12
+ activesupport (= 4.2.5.1)
13
13
  rack (~> 1.6)
14
14
  rack-test (~> 0.6.2)
15
15
  rails-dom-testing (~> 1.0, >= 1.0.5)
16
16
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
17
- actionview (4.2.4)
18
- activesupport (= 4.2.4)
17
+ actionview (4.2.5.1)
18
+ activesupport (= 4.2.5.1)
19
19
  builder (~> 3.1)
20
20
  erubis (~> 2.7.0)
21
21
  rails-dom-testing (~> 1.0, >= 1.0.5)
22
22
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- activejob (4.2.4)
24
- activesupport (= 4.2.4)
23
+ activejob (4.2.5.1)
24
+ activesupport (= 4.2.5.1)
25
25
  globalid (>= 0.3.0)
26
- activemodel (4.2.4)
27
- activesupport (= 4.2.4)
26
+ activemodel (4.2.5.1)
27
+ activesupport (= 4.2.5.1)
28
28
  builder (~> 3.1)
29
- activerecord (4.2.4)
30
- activemodel (= 4.2.4)
31
- activesupport (= 4.2.4)
29
+ activerecord (4.2.5.1)
30
+ activemodel (= 4.2.5.1)
31
+ activesupport (= 4.2.5.1)
32
32
  arel (~> 6.0)
33
- activesupport (4.2.4)
33
+ activesupport (4.2.5.1)
34
34
  i18n (~> 0.7)
35
35
  json (~> 1.7, >= 1.7.7)
36
36
  minitest (~> 5.1)
37
37
  thread_safe (~> 0.3, >= 0.3.4)
38
38
  tzinfo (~> 1.1)
39
39
  arel (6.0.3)
40
+ axlsx (2.0.1)
41
+ htmlentities (~> 4.3.1)
42
+ nokogiri (>= 1.4.1)
43
+ rubyzip (~> 1.0.0)
44
+ axlsx_rails (0.4.0)
45
+ axlsx (>= 2.0.1)
46
+ rails (>= 3.1)
40
47
  builder (3.2.2)
41
48
  codemirror-rails (5.6)
42
49
  railties (>= 3.0, < 5)
50
+ concurrent-ruby (1.0.0)
43
51
  erubis (2.7.0)
44
52
  execjs (2.6.0)
45
- font-awesome-rails (4.4.0.0)
46
- railties (>= 3.2, < 5.0)
47
53
  globalid (0.3.6)
48
54
  activesupport (>= 4.1.0)
55
+ htmlentities (4.3.4)
49
56
  i18n (0.7.0)
50
- jquery-rails (4.0.5)
57
+ jquery-rails (4.1.0)
51
58
  rails-dom-testing (~> 1.0)
52
59
  railties (>= 4.2.0)
53
60
  thor (>= 0.14, < 2.0)
54
61
  json (1.8.3)
55
- libv8 (3.16.14.11)
62
+ kaminari (0.16.3)
63
+ actionpack (>= 3.0.0)
64
+ activesupport (>= 3.0.0)
56
65
  loofah (2.0.3)
57
66
  nokogiri (>= 1.5.9)
58
67
  mail (2.6.3)
59
68
  mime-types (>= 1.16, < 3)
60
- mime-types (2.6.2)
61
- mini_portile (0.6.2)
62
- minitest (5.8.2)
63
- mysql2 (0.4.1)
64
- nokogiri (1.6.6.2)
65
- mini_portile (~> 0.6.0)
66
- pg (0.18.3)
69
+ mime-types (2.99)
70
+ mini_portile2 (2.0.0)
71
+ minitest (5.8.4)
72
+ nokogiri (1.6.7.2)
73
+ mini_portile2 (~> 2.0.0.rc2)
74
+ polyamorous (1.3.0)
75
+ activerecord (>= 3.0)
67
76
  rack (1.6.4)
68
77
  rack-test (0.6.3)
69
78
  rack (>= 1.0)
70
- rails (4.2.4)
71
- actionmailer (= 4.2.4)
72
- actionpack (= 4.2.4)
73
- actionview (= 4.2.4)
74
- activejob (= 4.2.4)
75
- activemodel (= 4.2.4)
76
- activerecord (= 4.2.4)
77
- activesupport (= 4.2.4)
79
+ rails (4.2.5.1)
80
+ actionmailer (= 4.2.5.1)
81
+ actionpack (= 4.2.5.1)
82
+ actionview (= 4.2.5.1)
83
+ activejob (= 4.2.5.1)
84
+ activemodel (= 4.2.5.1)
85
+ activerecord (= 4.2.5.1)
86
+ activesupport (= 4.2.5.1)
78
87
  bundler (>= 1.3.0, < 2.0)
79
- railties (= 4.2.4)
88
+ railties (= 4.2.5.1)
80
89
  sprockets-rails
81
90
  rails-deprecated_sanitizer (1.0.3)
82
91
  activesupport (>= 4.2.0.alpha)
@@ -84,33 +93,34 @@ GEM
84
93
  activesupport (>= 4.2.0.beta, < 5.0)
85
94
  nokogiri (~> 1.6.0)
86
95
  rails-deprecated_sanitizer (>= 1.0.1)
87
- rails-html-sanitizer (1.0.2)
96
+ rails-html-sanitizer (1.0.3)
88
97
  loofah (~> 2.0)
89
- railties (4.2.4)
90
- actionpack (= 4.2.4)
91
- activesupport (= 4.2.4)
98
+ railties (4.2.5.1)
99
+ actionpack (= 4.2.5.1)
100
+ activesupport (= 4.2.5.1)
92
101
  rake (>= 0.8.7)
93
102
  thor (>= 0.18.1, < 2.0)
94
- rake (10.4.2)
95
- ref (2.0.0)
96
- sass (3.4.19)
97
- sass-rails (5.0.4)
98
- railties (>= 4.0.0, < 5.0)
99
- sass (~> 3.1)
100
- sprockets (>= 2.8, < 4.0)
101
- sprockets-rails (>= 2.0, < 4.0)
102
- tilt (>= 1.1, < 3)
103
- sprockets (3.4.0)
104
- rack (> 1, < 3)
105
- sprockets-rails (2.3.3)
103
+ rake (10.5.0)
104
+ ransack (1.7.0)
106
105
  actionpack (>= 3.0)
106
+ activerecord (>= 3.0)
107
107
  activesupport (>= 3.0)
108
- sprockets (>= 2.8, < 4.0)
109
- sqlite3 (1.3.11)
108
+ i18n
109
+ polyamorous (~> 1.2)
110
+ rubyzip (1.0.0)
111
+ simple_form (3.2.1)
112
+ actionpack (> 4, < 5.1)
113
+ activemodel (> 4, < 5.1)
114
+ sprockets (3.5.2)
115
+ concurrent-ruby (~> 1.0)
116
+ rack (> 1, < 3)
117
+ sprockets-rails (3.0.0)
118
+ actionpack (>= 4.0)
119
+ activesupport (>= 4.0)
120
+ sprockets (>= 3.0.0)
110
121
  terminal-table (1.5.2)
111
122
  thor (0.19.1)
112
123
  thread_safe (0.3.5)
113
- tilt (2.0.1)
114
124
  tzinfo (1.2.2)
115
125
  thread_safe (~> 0.1)
116
126
  uglifier (2.7.2)
@@ -121,14 +131,15 @@ PLATFORMS
121
131
  ruby
122
132
 
123
133
  DEPENDENCIES
134
+ axlsx_rails
124
135
  codemirror-rails
125
- font-awesome-rails
126
136
  jquery-rails
127
- mysql2
128
- pg
137
+ kaminari
129
138
  rails
130
- sass
131
- sass-rails
132
- sqlite3
139
+ ransack
140
+ simple_form
133
141
  terminal-table
134
142
  uglifier
143
+
144
+ BUNDLED WITH
145
+ 1.11.2
@@ -1,4 +1,3 @@
1
- Rails.application.assets.logger = Logger.new('/dev/null')
2
1
  Rails::Rack::Logger.class_eval do
3
2
  def call_with_quiet_assets(env)
4
3
  previous_level = Rails.logger.level
@@ -8,4 +7,4 @@ Rails::Rack::Logger.class_eval do
8
7
  Rails.logger.level = previous_level
9
8
  end
10
9
  alias_method_chain :call, :quiet_assets
11
- end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Kasyanchuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,48 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.1.0
27
- - !ruby/object:Gem::Dependency
28
- name: font-awesome-rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: sass
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: sass-rails
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
27
  - !ruby/object:Gem::Dependency
70
28
  name: jquery-rails
71
29
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +53,7 @@ dependencies:
95
53
  - !ruby/object:Gem::Version
96
54
  version: '0'
97
55
  - !ruby/object:Gem::Dependency
98
- name: launchy
56
+ name: terminal-table
99
57
  requirement: !ruby/object:Gem::Requirement
100
58
  requirements:
101
59
  - - ">="
@@ -109,7 +67,7 @@ dependencies:
109
67
  - !ruby/object:Gem::Version
110
68
  version: '0'
111
69
  - !ruby/object:Gem::Dependency
112
- name: terminal-table
70
+ name: simple_form
113
71
  requirement: !ruby/object:Gem::Requirement
114
72
  requirements:
115
73
  - - ">="
@@ -123,7 +81,7 @@ dependencies:
123
81
  - !ruby/object:Gem::Version
124
82
  version: '0'
125
83
  - !ruby/object:Gem::Dependency
126
- name: simple_form
84
+ name: ransack
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - ">="
@@ -137,7 +95,7 @@ dependencies:
137
95
  - !ruby/object:Gem::Version
138
96
  version: '0'
139
97
  - !ruby/object:Gem::Dependency
140
- name: ransack
98
+ name: kaminari
141
99
  requirement: !ruby/object:Gem::Requirement
142
100
  requirements:
143
101
  - - ">="
@@ -151,13 +109,13 @@ dependencies:
151
109
  - !ruby/object:Gem::Version
152
110
  version: '0'
153
111
  - !ruby/object:Gem::Dependency
154
- name: kaminari
112
+ name: launchy
155
113
  requirement: !ruby/object:Gem::Requirement
156
114
  requirements:
157
115
  - - ">="
158
116
  - !ruby/object:Gem::Version
159
117
  version: '0'
160
- type: :runtime
118
+ type: :development
161
119
  prerelease: false
162
120
  version_requirements: !ruby/object:Gem::Requirement
163
121
  requirements:
@@ -234,6 +192,20 @@ dependencies:
234
192
  - - "~>"
235
193
  - !ruby/object:Gem::Version
236
194
  version: 3.0.6
195
+ - !ruby/object:Gem::Dependency
196
+ name: mime-types
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "<"
200
+ - !ruby/object:Gem::Version
201
+ version: '3.0'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "<"
207
+ - !ruby/object:Gem::Version
208
+ version: '3.0'
237
209
  description: Quick way to inspect your Rails database, see content of tables, filter,
238
210
  export them to CSV, Excel, EXPLAIN SQL and run SQL queries.
239
211
  email:
@@ -285,17 +257,17 @@ files:
285
257
  - app/assets/javascripts/rails_db/vendor/jquery.js
286
258
  - app/assets/javascripts/rails_db/vendor/modernizr.js
287
259
  - app/assets/javascripts/rails_db/vendor/placeholder.js
288
- - app/assets/stylesheets/rails_db/app.css.scss
260
+ - app/assets/stylesheets/rails_db/app.css
289
261
  - app/assets/stylesheets/rails_db/application.css
290
- - app/assets/stylesheets/rails_db/forms.css.scss
262
+ - app/assets/stylesheets/rails_db/forms.css
291
263
  - app/assets/stylesheets/rails_db/foundation.css
292
264
  - app/assets/stylesheets/rails_db/foundation.min.css
293
- - app/assets/stylesheets/rails_db/foundation_and_overrides.css.scss
265
+ - app/assets/stylesheets/rails_db/foundation_and_overrides.css
294
266
  - app/assets/stylesheets/rails_db/normalize.css
295
- - app/assets/stylesheets/rails_db/pagination.css.scss
296
- - app/assets/stylesheets/rails_db/search.css.scss
297
- - app/assets/stylesheets/rails_db/sidebar.css.scss
298
- - app/assets/stylesheets/rails_db/table.css.scss
267
+ - app/assets/stylesheets/rails_db/pagination.css
268
+ - app/assets/stylesheets/rails_db/search.css
269
+ - app/assets/stylesheets/rails_db/sidebar.css
270
+ - app/assets/stylesheets/rails_db/table.css
299
271
  - app/controllers/rails_db/application_controller.rb
300
272
  - app/controllers/rails_db/dashboard_controller.rb
301
273
  - app/controllers/rails_db/sql_controller.rb
@@ -346,8 +318,11 @@ files:
346
318
  - bin/runsql
347
319
  - config/database.travis.yml
348
320
  - config/initializers/mime_types.rb
321
+ - config/initializers/simple_form.rb
349
322
  - config/initializers/will_paginate_fix.rb
323
+ - config/locales/simple_form.en.yml
350
324
  - config/routes.rb
325
+ - lib/ext/simple_form_ext.rb
351
326
  - lib/ext/string_ext.rb
352
327
  - lib/generators/USAGE
353
328
  - lib/generators/rails_db_generator.rb
@@ -377,6 +352,7 @@ files:
377
352
  - lib/rails_db/version.rb
378
353
  - lib/standalone.rb
379
354
  - lib/tasks/rails_db_tasks.rake
355
+ - lib/templates/erb/scaffold/_form.html.erb
380
356
  - rails_db.gemspec
381
357
  - test/dashboard_controller_test.rb
382
358
  - test/database_test.rb
@@ -501,7 +477,7 @@ files:
501
477
  - test/standalone/config/initializers/filter_parameter_logging.rb
502
478
  - test/standalone/config/initializers/inflections.rb
503
479
  - test/standalone/config/initializers/mime_types.rb
504
- - test/standalone/config/initializers/quite_assets.rb
480
+ - test/standalone/config/initializers/quiet_assets.rb
505
481
  - test/standalone/config/initializers/rails_db.rb
506
482
  - test/standalone/config/initializers/session_store.rb
507
483
  - test/standalone/config/initializers/wrap_parameters.rb
@@ -662,7 +638,7 @@ test_files:
662
638
  - test/standalone/config/initializers/filter_parameter_logging.rb
663
639
  - test/standalone/config/initializers/inflections.rb
664
640
  - test/standalone/config/initializers/mime_types.rb
665
- - test/standalone/config/initializers/quite_assets.rb
641
+ - test/standalone/config/initializers/quiet_assets.rb
666
642
  - test/standalone/config/initializers/rails_db.rb
667
643
  - test/standalone/config/initializers/session_store.rb
668
644
  - test/standalone/config/initializers/wrap_parameters.rb
@@ -1,15 +0,0 @@
1
- #search_form {
2
- select, input, button {
3
- width: auto;
4
- display: inline-block;
5
- }
6
- .sorting_options {
7
- select {
8
- margin-right: 5px;
9
- }
10
- }
11
- }
12
-
13
- #search_records {
14
-
15
- }
@@ -1,21 +0,0 @@
1
- .side-nav.tables {
2
- padding-top: 6px;
3
- li {
4
- margin: 0;
5
- margin-left: 3px;
6
- a {
7
- padding: 2px 4px;
8
- &.selected {
9
- font-weight: bold;
10
- }
11
- }
12
- }
13
- }
14
-
15
- #sidebar {
16
- h3 {
17
- font-size: 18px;
18
- margin: 0;
19
- padding: 0;
20
- }
21
- }