trestle 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53abdb7410eddcbc8964772c60fb759385fd0cc94574234473d29613e3dc62ef
4
- data.tar.gz: a204be909209b9d159d1c6939911ccd7b5cddaf8437d7e20158c68c2051e3528
3
+ metadata.gz: d5f74ea1864e543221e224711053214f59d7ebaaa302ae105a566e6105dc8486
4
+ data.tar.gz: a3fd93cbc5acb0bacd23cc4354a0c6d2875709c20f84222d5c6a461e38b19505
5
5
  SHA512:
6
- metadata.gz: 7542b845d75753fd65f9908674a9728977f11657babfdf4a59489f5c023778ae29ce0a38d423d6fff4dc2249cb264cbe541b5e530ca5d9f60bfe0d06b901c1f6
7
- data.tar.gz: 4a16e94cc8a64ad8691f99243b137ea897258ac4fa2595d7ce45573e1cc2ffd96dcba6e801c2e587f910587e89713fe671fa62209f79cd6c3f1cda8f6964ce65
6
+ metadata.gz: a821671d5f9f3d1fc49ce3bde54890957c0562def8d512f016c8860ad6aa8f39bdbeb38dd821f587819db3e90bb2f239f187d81fdb22dfc28ec2be58b20790d3
7
+ data.tar.gz: 49fc89e2f174f9988ca56ba168b2b229b72bde4a8de88d2936b8e9712cbe87fa166d52211d11576d6dfe5e2ea0ed3a8f2393b250c2a7424bbf19fbe89c401d30
@@ -12,3 +12,6 @@ gemfile:
12
12
  - gemfiles/rails-5.1.gemfile
13
13
  - gemfiles/rails-5.2.gemfile
14
14
  - gemfiles/rails-edge.gemfile
15
+
16
+ addons:
17
+ chrome: stable
data/Gemfile CHANGED
@@ -10,6 +10,8 @@ group :test do
10
10
  gem 'capybara'
11
11
  gem 'capybara-selenium'
12
12
  gem 'selenium-webdriver'
13
+ gem 'chromedriver-helper'
14
+ gem 'puma'
13
15
  end
14
16
 
15
17
  gem 'haml'
@@ -5,7 +5,7 @@
5
5
  width: 40px;
6
6
  height: 40px;
7
7
 
8
- background: #fafafa;
8
+ background: #ccc;
9
9
  border-radius: 50%;
10
10
  box-shadow: rgba(black, 0.25) 0 1px 0;
11
11
 
@@ -28,7 +28,6 @@
28
28
  right: 0;
29
29
  border-radius: 50%;
30
30
 
31
- background: #ccc;
32
31
  color: white;
33
32
 
34
33
  display: flex;
@@ -1,8 +1,10 @@
1
1
  module Trestle
2
2
  module AvatarHelper
3
3
  def avatar(options={})
4
- content_tag(:div, class: "avatar") do
5
- concat content_tag(:span, options[:fallback], class: "avatar-fallback") if options[:fallback]
4
+ fallback = options.delete(:fallback) if options[:fallback]
5
+
6
+ content_tag(:div, options.reverse_merge(class: "avatar")) do
7
+ concat content_tag(:span, fallback, class: "avatar-fallback") if fallback
6
8
  concat yield if block_given?
7
9
  end
8
10
  end
@@ -1,5 +1,9 @@
1
1
  module Trestle
2
- module DebugHelper
2
+ module FlashHelper
3
+ def normalize_flash_alert(flash)
4
+ flash.is_a?(Hash) ? flash.with_indifferent_access : { message: flash }
5
+ end
6
+
3
7
  def debug_form_errors?
4
8
  Trestle.config.debug_form_errors && instance_has_errors?
5
9
  end
@@ -4,7 +4,7 @@
4
4
  </div>
5
5
 
6
6
  <div class="modal-flash">
7
- <%= render "flash" %>
7
+ <%= render "trestle/flash/flash" %>
8
8
  </div>
9
9
 
10
10
  <div class="modal-tabs">
@@ -4,7 +4,10 @@
4
4
  <%= icon %>
5
5
 
6
6
  <div class="alert-content">
7
- <h3><%= alert[:title] %></h3>
7
+ <% if alert[:title] %>
8
+ <h3><%= alert[:title] %></h3>
9
+ <% end %>
10
+
8
11
  <p><%= alert[:message] %></p>
9
12
 
10
13
  <%= yield if block_given? %>
@@ -1,7 +1,7 @@
1
1
  <% if flash[:message] -%>
2
- <%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: flash[:message].with_indifferent_access %>
2
+ <%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: normalize_flash_alert(flash[:message]) %>
3
3
  <% elsif flash[:error] -%>
4
- <%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: flash[:error].with_indifferent_access } do %>
4
+ <%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: normalize_flash_alert(flash[:error]) } do %>
5
5
  <%= render "trestle/flash/debug" if debug_form_errors? %>
6
6
  <% end %>
7
7
  <% end -%>
@@ -7,6 +7,8 @@ group :test do
7
7
  gem 'capybara'
8
8
  gem 'capybara-selenium'
9
9
  gem 'selenium-webdriver'
10
+ gem 'chromedriver-helper'
11
+ gem 'puma'
10
12
  end
11
13
 
12
14
  gem 'rails', '~> 4.2.0'
@@ -7,6 +7,8 @@ group :test do
7
7
  gem 'capybara'
8
8
  gem 'capybara-selenium'
9
9
  gem 'selenium-webdriver'
10
+ gem 'chromedriver-helper'
11
+ gem 'puma'
10
12
  end
11
13
 
12
14
  gem 'rails', '~> 5.0.0'
@@ -7,6 +7,8 @@ group :test do
7
7
  gem 'capybara'
8
8
  gem 'capybara-selenium'
9
9
  gem 'selenium-webdriver'
10
+ gem 'chromedriver-helper'
11
+ gem 'puma'
10
12
  end
11
13
 
12
14
  gem 'rails', '~> 5.1.0'
@@ -7,6 +7,8 @@ group :test do
7
7
  gem 'capybara'
8
8
  gem 'capybara-selenium'
9
9
  gem 'selenium-webdriver'
10
+ gem 'chromedriver-helper'
11
+ gem 'puma'
10
12
  end
11
13
 
12
14
  gem 'rails', '~> 5.2.0'
@@ -7,6 +7,8 @@ group :test do
7
7
  gem 'capybara'
8
8
  gem 'capybara-selenium'
9
9
  gem 'selenium-webdriver'
10
+ gem 'chromedriver-helper'
11
+ gem 'puma'
10
12
  end
11
13
 
12
14
  gem 'rails', github: 'rails/rails'
@@ -1,3 +1,3 @@
1
1
  module Trestle
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trestle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-23 00:00:00.000000000 Z
11
+ date: 2018-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -258,8 +258,8 @@ files:
258
258
  - app/controllers/trestle/dashboard_controller.rb
259
259
  - app/helpers/trestle/avatar_helper.rb
260
260
  - app/helpers/trestle/container_helper.rb
261
- - app/helpers/trestle/debug_helper.rb
262
261
  - app/helpers/trestle/display_helper.rb
262
+ - app/helpers/trestle/flash_helper.rb
263
263
  - app/helpers/trestle/form_helper.rb
264
264
  - app/helpers/trestle/format_helper.rb
265
265
  - app/helpers/trestle/grid_helper.rb
@@ -626,7 +626,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
626
626
  version: '0'
627
627
  requirements: []
628
628
  rubyforge_project:
629
- rubygems_version: 2.7.3
629
+ rubygems_version: 2.7.6
630
630
  signing_key:
631
631
  specification_version: 4
632
632
  summary: A modern, responsive admin framework for Ruby on Rails