ui_bibz 2.0.0.alpha16 → 2.0.0.alpha18

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
  SHA1:
3
- metadata.gz: fb8c1e667454c9d57e9b900f6dbd7e912a920910
4
- data.tar.gz: 9e0d4643fc0c4195521aa81f412d2824e6c542ad
3
+ metadata.gz: 0074edb5080eef17f9af372db829881d7609c21c
4
+ data.tar.gz: 13c3afee43afbfa0d19f67786603f401296aca8a
5
5
  SHA512:
6
- metadata.gz: a87e6a3d0f2540cd4e69c87f7344e3483682514bed320ed6b5f8abcc716ca4a85414d899e393c1a7c22c1d1ad91f7fc4f28f6cac9bcc36909c46830924091895
7
- data.tar.gz: de68c829c23900d28b568cf9f6746736bf530027c8fba48e941f40b45e3acfd7c4a54476c162fc7ea5d2f1c85b33b0229a89ce077263917249bb62747d0a1e90
6
+ metadata.gz: 09b4dd02a5a9e1fc55164ca2e8916c64e9ee2b48be54da02c2f4d9d0e8414b64d7a00c9a46c329ce67083b7e1d9f16be435a0137a866cab32390dcaeb3c7970c
7
+ data.tar.gz: 465db5b249cc8fa956b6f146b39c5dbec58d46c788bd434a293cb3acd0ff0e4fdf3c745ae1ea8f6e0e3593fb8198ff7ee155b04ad471c2b2a64306aba802c09f
data/.travis.yml CHANGED
@@ -1,13 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.0
3
+ - 2.2.3
4
4
  branches:
5
5
  only:
6
6
  - master
7
7
  install:
8
8
  - "travis_retry bundle install"
9
- gemfile:
10
- - gemfiles/rails4.2.gemfile
11
9
  addons:
12
10
  code_climate:
13
11
  repo_token: 95196f8dbe3406321c6e7b406585532102784f0a3d4141a25f53937eedb844b6 bundle exec rake
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.0.0.alpha16)
5
- bootstrap (= 4.0.0.alpha3)
4
+ ui_bibz (2.0.0.alpha18)
5
+ bootstrap (= 4.0.0.alpha3.1)
6
6
  font-awesome-sass
7
7
  haml
8
8
  haml-rails
@@ -15,48 +15,48 @@ PATH
15
15
  GEM
16
16
  remote: https://rubygems.org/
17
17
  specs:
18
- actioncable (5.0.0)
19
- actionpack (= 5.0.0)
18
+ actioncable (5.0.0.1)
19
+ actionpack (= 5.0.0.1)
20
20
  nio4r (~> 1.2)
21
21
  websocket-driver (~> 0.6.1)
22
- actionmailer (5.0.0)
23
- actionpack (= 5.0.0)
24
- actionview (= 5.0.0)
25
- activejob (= 5.0.0)
22
+ actionmailer (5.0.0.1)
23
+ actionpack (= 5.0.0.1)
24
+ actionview (= 5.0.0.1)
25
+ activejob (= 5.0.0.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (5.0.0)
29
- actionview (= 5.0.0)
30
- activesupport (= 5.0.0)
28
+ actionpack (5.0.0.1)
29
+ actionview (= 5.0.0.1)
30
+ activesupport (= 5.0.0.1)
31
31
  rack (~> 2.0)
32
32
  rack-test (~> 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
35
- actionview (5.0.0)
36
- activesupport (= 5.0.0)
35
+ actionview (5.0.0.1)
36
+ activesupport (= 5.0.0.1)
37
37
  builder (~> 3.1)
38
38
  erubis (~> 2.7.0)
39
39
  rails-dom-testing (~> 2.0)
40
40
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
41
- activejob (5.0.0)
42
- activesupport (= 5.0.0)
41
+ activejob (5.0.0.1)
42
+ activesupport (= 5.0.0.1)
43
43
  globalid (>= 0.3.6)
44
- activemodel (5.0.0)
45
- activesupport (= 5.0.0)
46
- activerecord (5.0.0)
47
- activemodel (= 5.0.0)
48
- activesupport (= 5.0.0)
44
+ activemodel (5.0.0.1)
45
+ activesupport (= 5.0.0.1)
46
+ activerecord (5.0.0.1)
47
+ activemodel (= 5.0.0.1)
48
+ activesupport (= 5.0.0.1)
49
49
  arel (~> 7.0)
50
- activesupport (5.0.0)
50
+ activesupport (5.0.0.1)
51
51
  concurrent-ruby (~> 1.0, >= 1.0.2)
52
52
  i18n (~> 0.7)
53
53
  minitest (~> 5.1)
54
54
  tzinfo (~> 1.1)
55
- arel (7.0.0)
56
- autoprefixer-rails (6.3.7)
55
+ arel (7.1.1)
56
+ autoprefixer-rails (6.4.0.1)
57
57
  execjs
58
58
  awesome_print (1.7.0)
59
- bootstrap (4.0.0.alpha3)
59
+ bootstrap (4.0.0.alpha3.1)
60
60
  autoprefixer-rails (>= 6.0.3)
61
61
  sass (>= 3.4.19)
62
62
  builder (3.2.2)
@@ -73,7 +73,7 @@ GEM
73
73
  railties (>= 3.0.0)
74
74
  font-awesome-sass (4.6.2)
75
75
  sass (>= 3.2)
76
- globalid (0.3.6)
76
+ globalid (0.3.7)
77
77
  activesupport (>= 4.1.0)
78
78
  haml (4.0.7)
79
79
  tilt
@@ -89,7 +89,7 @@ GEM
89
89
  nokogiri (~> 1.6.0)
90
90
  ruby_parser (~> 3.5)
91
91
  i18n (0.7.0)
92
- json (1.8.3)
92
+ json (2.0.2)
93
93
  loofah (2.0.3)
94
94
  nokogiri (>= 1.5.9)
95
95
  mail (2.6.4)
@@ -108,36 +108,34 @@ GEM
108
108
  rack (2.0.1)
109
109
  rack-test (0.6.3)
110
110
  rack (>= 1.0)
111
- rails (5.0.0)
112
- actioncable (= 5.0.0)
113
- actionmailer (= 5.0.0)
114
- actionpack (= 5.0.0)
115
- actionview (= 5.0.0)
116
- activejob (= 5.0.0)
117
- activemodel (= 5.0.0)
118
- activerecord (= 5.0.0)
119
- activesupport (= 5.0.0)
111
+ rails (5.0.0.1)
112
+ actioncable (= 5.0.0.1)
113
+ actionmailer (= 5.0.0.1)
114
+ actionpack (= 5.0.0.1)
115
+ actionview (= 5.0.0.1)
116
+ activejob (= 5.0.0.1)
117
+ activemodel (= 5.0.0.1)
118
+ activerecord (= 5.0.0.1)
119
+ activesupport (= 5.0.0.1)
120
120
  bundler (>= 1.3.0, < 2.0)
121
- railties (= 5.0.0)
121
+ railties (= 5.0.0.1)
122
122
  sprockets-rails (>= 2.0.0)
123
123
  rails-dom-testing (2.0.1)
124
124
  activesupport (>= 4.2.0, < 6.0)
125
125
  nokogiri (~> 1.6.0)
126
126
  rails-html-sanitizer (1.0.3)
127
127
  loofah (~> 2.0)
128
- railties (5.0.0)
129
- actionpack (= 5.0.0)
130
- activesupport (= 5.0.0)
128
+ railties (5.0.0.1)
129
+ actionpack (= 5.0.0.1)
130
+ activesupport (= 5.0.0.1)
131
131
  method_source
132
132
  rake (>= 0.8.7)
133
133
  thor (>= 0.18.1, < 2.0)
134
134
  rake (11.2.2)
135
- rdoc (4.2.2)
136
- json (~> 1.4)
137
135
  ruby_parser (3.8.2)
138
136
  sexp_processor (~> 4.1)
139
137
  sass (3.4.22)
140
- sass-rails (5.0.5)
138
+ sass-rails (5.0.6)
141
139
  railties (>= 4.0.0, < 6)
142
140
  sass (~> 3.1)
143
141
  sprockets (>= 2.8, < 4.0)
@@ -149,7 +147,7 @@ GEM
149
147
  json (>= 1.8, < 3)
150
148
  simplecov-html (~> 0.10.0)
151
149
  simplecov-html (0.10.0)
152
- sprockets (3.6.3)
150
+ sprockets (3.7.0)
153
151
  concurrent-ruby (~> 1.0)
154
152
  rack (> 1, < 3)
155
153
  sprockets-rails (3.1.1)
@@ -178,7 +176,6 @@ DEPENDENCIES
178
176
  codeclimate-test-reporter
179
177
  factory_girl_rails (~> 4.0)
180
178
  minitest
181
- rdoc
182
179
  sqlite3
183
180
  ui_bibz!
184
181
 
@@ -38,11 +38,14 @@
38
38
  @table = new window.UiBibzTable()
39
39
  @form = new window.UiBibzForm()
40
40
  @interface = new window.UiBibzInterface()
41
+ @formula = new window.UiBibzFormula()
41
42
  #delete window.UiBibzTable
42
43
  #delete window.UiBibzForm
43
44
  #delete window.UiBibzInterface
44
45
 
45
46
  ready = ->
46
47
  new UiBibz
48
+ # Fix for turbolinks
49
+ $( "textarea[data-provide*='markdown']" ).markdown() # fix markdown js if turbolinks exists
47
50
 
48
- $(document).on('turbolinks:load page:change', ready)
51
+ $(document).on('ready turbolinks:load page:change', ready) # catch event for turbolinks and fix in ready() function
@@ -9,25 +9,3 @@
9
9
  label, span.help-block
10
10
  color: $value
11
11
 
12
- // fix dropdown size
13
- .btn-group
14
- // fix dropdown sticky
15
- padding: 0 0 0.2rem 0.05rem
16
- // size default (md)
17
- .btn + .dropdown-toggle
18
- height: 2.37rem
19
- padding-right: 8px
20
- padding-left: 8px
21
- // size sm
22
- .btn-sm + .dropdown-toggle
23
- height: 1.94rem
24
- // size lg
25
- .btn-lg + .dropdown-toggle
26
- height: 3.28rem
27
-
28
- // Add xs size
29
- .btn-xs, .btn-group-xs > .btn
30
- padding: 0.15rem 0.5rem
31
- font-size: 0.79rem
32
- line-height: 1.5
33
- border-radius: 0.2rem
@@ -4,7 +4,7 @@ module UiBibz::Concerns::Models::Searchable
4
4
  included do
5
5
  # Maybe create a class to put all methods of table_search_pagination
6
6
  def self.table_search_pagination params, session, args = {}
7
- @params = params.clone
7
+ @params = params.permit!
8
8
  @session = session
9
9
  @arguments = args
10
10
 
@@ -103,6 +103,7 @@ module UiBibz::Concerns::Models::Searchable
103
103
  end
104
104
 
105
105
  def self.search_by_query sql
106
+ raise 'Add searchable_attributes method in Model' if @searchable_attributes.nil?
106
107
  sql_query = []
107
108
  sql_attributes = {}
108
109
  search_patterns = @params[:search].strip.gsub(/(?<=[\\s])\\s*|^\\s+|\\s+$/, '').downcase
@@ -285,7 +285,7 @@ module UiBibz::Helpers::UiCoreHelper
285
285
  #
286
286
  # Use "etiquette" instead of "label" : due to "actionview (4.2.0) lib/action_view/helpers/form_helper.rb" conflict
287
287
  def etiquette content = nil, options = nil, html_options = nil, &block
288
- UiBibz::Ui::Core::Label.new(content, options, html_options, &block).render
288
+ UiBibz::Ui::Core::Tag.new(content, options, html_options, &block).render
289
289
  end
290
290
 
291
291
  # List Group Component
@@ -52,6 +52,10 @@ module UiBibz::Ui::Core
52
52
 
53
53
  private
54
54
 
55
+ def component_html_classes
56
+ "breadcrumb-item"
57
+ end
58
+
55
59
  def link_html
56
60
  if options[:url]
57
61
  link_to glyph_and_content_html, options[:url], options[:link_html_options]
@@ -73,11 +73,11 @@ module UiBibz::Ui::Core::Buttons
73
73
 
74
74
  def status
75
75
  s = options[:status] || :primary
76
- "btn-#{ s }#{ outline }"
76
+ ["btn", outline, s].compact.join('-')
77
77
  end
78
78
 
79
79
  def outline
80
- "-outline" unless options[:outline].nil?
80
+ "outline" unless options[:outline].nil?
81
81
  end
82
82
 
83
83
  def toggle
@@ -84,11 +84,11 @@ module UiBibz::Ui::Core::Buttons
84
84
  end
85
85
 
86
86
  def split_html
87
- content_tag :button, split_content, class: join_classes("btn", button_status, size, "dropdown-toggle"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
87
+ content_tag :button, split_content, class: join_classes("btn", button_status, size, "dropdown-toggle", "dropdown-toggle-split"), type: 'button', "data-toggle" => 'dropdown', "aria-haspopup" => true, "aria-expanded" => false
88
88
  end
89
89
 
90
90
  def split_content
91
- [caret, src_only].join.html_safe
91
+ src_only
92
92
  end
93
93
 
94
94
  def src_only
@@ -84,8 +84,8 @@ module UiBibz::Ui::Core
84
84
  Glyph.new(glyph_info).render unless glyph_info.nil?
85
85
  end
86
86
 
87
- def label_html
88
- UiBibz::Ui::Core::Label.new(options[:label], class: 'pull-right', type: :pill, status: (options[:label_status] || :default)).render
87
+ def tag_html
88
+ UiBibz::Ui::Core::Tag.new(options[:tag], class: 'pull-right', type: :pill, status: (options[:tag_status] || :default)).render
89
89
  end
90
90
 
91
91
  # Know if component is tapped or not
@@ -85,7 +85,7 @@ module UiBibz::Ui::Core::Layouts
85
85
 
86
86
  # col-md-offset-9
87
87
  def offset size, n
88
- "col-#{ size }-offset-#{ n }"
88
+ "offset-#{ size }-#{ n }"
89
89
  end
90
90
 
91
91
  # col-md-push-9
@@ -68,7 +68,7 @@ module UiBibz::Ui::Core
68
68
  concat glyph_and_content_html if @content
69
69
  concat header_html if @body
70
70
  concat body_html if @body
71
- concat label_html if @options[:label]
71
+ concat tag_html if @options[:tag]
72
72
  end
73
73
  end
74
74
 
@@ -28,7 +28,7 @@ module UiBibz::Ui::Core::Navs
28
28
  def render
29
29
  link_to options[:url], html_options do
30
30
  concat glyph_and_content_html
31
- concat label_html if options[:label]
31
+ concat tag_html if options[:tag]
32
32
  end
33
33
  end
34
34
 
@@ -1,6 +1,6 @@
1
1
  module UiBibz::Ui::Core
2
2
 
3
- # Create a label
3
+ # Create a tag
4
4
  #
5
5
  # This element is an extend of UiBibz::Ui::Core::Component.
6
6
  # The helper use 'etiquette' method to avoid conflict with Rails.
@@ -26,17 +26,17 @@ module UiBibz::Ui::Core
26
26
  #
27
27
  # ==== Signatures
28
28
  #
29
- # UiBibz::Ui::Core::Label.new(content, options = nil, html_options = nil)
29
+ # UiBibz::Ui::Core::Tag.new(content, options = nil, html_options = nil)
30
30
  #
31
- # UiBibz::Ui::Core::Label.new(options = nil, html_options = nil) do
31
+ # UiBibz::Ui::Core::Tag.new(options = nil, html_options = nil) do
32
32
  # content
33
33
  # end
34
34
  #
35
35
  # ==== Examples
36
36
  #
37
- # UiBibz::Ui::Core::Label.new(content, status: :success, type: :pill).render
37
+ # UiBibz::Ui::Core::Tag.new(content, status: :success, type: :pill).render
38
38
  #
39
- # UiBibz::Ui::Core::Label.new() do
39
+ # UiBibz::Ui::Core::Tag.new() do
40
40
  # #content
41
41
  # end.render
42
42
  #
@@ -48,7 +48,7 @@ module UiBibz::Ui::Core
48
48
  # content
49
49
  # end
50
50
  #
51
- class Label < Component
51
+ class Tag < Component
52
52
 
53
53
  # See UiBibz::Ui::Core::Component.initialize
54
54
  def initialize content = nil, options = nil, html_options = nil, &block
@@ -63,16 +63,16 @@ module UiBibz::Ui::Core
63
63
  private
64
64
 
65
65
  def component_html_classes
66
- ['label', type]
66
+ ['tag', type]
67
67
  end
68
68
 
69
69
  def status
70
70
  sym = @options[:status] || :default
71
- "label-#{ sym }"
71
+ "tag-#{ sym }"
72
72
  end
73
73
 
74
74
  def type
75
- "label-pill" if @options[:type] == :pill
75
+ "tag-pill" if @options[:type] == :pill
76
76
  end
77
77
 
78
78
  end
@@ -73,7 +73,7 @@ module UiBibz::Ui::Ux::Tables
73
73
  end
74
74
 
75
75
  def parameters
76
- @store.params
76
+ @store.params.to_h
77
77
  end
78
78
 
79
79
  def action
@@ -31,7 +31,7 @@ module UiBibz::Ui::Ux::Tables
31
31
  unless @actions.nil?
32
32
  @actions.format_action.call(record) unless @actions.format_action.nil?
33
33
  unless (default_actions? != true && @actions.raw_list.empty?)
34
- UiBibz::Ui::Core::Buttons::ButtonDropdown.new(dropdown_action_name, { position: :right, size: :xs, glyph: actions_glyph }, { class: 'dropdown-action' }).tap do |d|
34
+ UiBibz::Ui::Core::Buttons::ButtonDropdown.new(dropdown_action_name, { position: :right, size: :sm, glyph: actions_glyph }, { class: 'dropdown-action' }).tap do |d|
35
35
  actions_links(record).each do |l|
36
36
  d.html l.to_s.html_safe
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module UiBibz
2
- VERSION = "2.0.0.alpha16"
2
+ VERSION = "2.0.0.alpha18"
3
3
  end
data/lib/ui_bibz.rb CHANGED
@@ -64,7 +64,7 @@ module UiBibz
64
64
  autoload :Dropdown, "ui_bibz/ui/core/dropdown/dropdown"
65
65
  autoload :Glyph, "ui_bibz/ui/core/glyph"
66
66
  autoload :Jumbotron, "ui_bibz/ui/core/jumbotron"
67
- autoload :Label, "ui_bibz/ui/core/label"
67
+ autoload :Tag, "ui_bibz/ui/core/tag"
68
68
  autoload :ListGroup, "ui_bibz/ui/core/list/list_group"
69
69
  autoload :Modal, "ui_bibz/ui/core/modal/modal"
70
70
  autoload :Progress, "ui_bibz/ui/core/progress"
data/test/store_test.rb CHANGED
@@ -7,14 +7,14 @@ class StoreTest < ActionView::TestCase
7
7
 
8
8
  setup do
9
9
  create_list(:user, 25)
10
- params = {
10
+ params = ActionController::Parameters.new({
11
11
  controller: 'users',
12
12
  action: 'index',
13
13
  sort: 'users.name_fr',
14
14
  direction: 'asc',
15
15
  per_page: 10,
16
16
  page: 1
17
- }
17
+ })
18
18
  users = User.table_search_pagination(params, session)
19
19
  @store = UiBibz::Ui::Ux::Tables::Store.new users
20
20
  end
@@ -7,7 +7,7 @@ class NavTest < ActionView::TestCase
7
7
  b.link 'Home', url: '#home', glyph: 'home'
8
8
  b.link 'state', { url: '#state', state: :active }
9
9
  end.render
10
- expected = "<ol class=\"breadcrumb\"><li><a href=\"#home\"><i class=\"glyph fa fa-home\"></i> Home</a></li><li class=\"active\"><a href=\"#state\">state</a></li></ol>"
10
+ expected = "<ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"#home\"><i class=\"glyph fa fa-home\"></i> Home</a></li><li class=\"active breadcrumb-item\"><a href=\"#state\">state</a></li></ol>"
11
11
 
12
12
  assert_equal expected, actual
13
13
  end
@@ -15,7 +15,7 @@ class NavTest < ActionView::TestCase
15
15
  test 'breadcrumb with store' do
16
16
  users = create_list(:user, 3)
17
17
  actual = UiBibz::Ui::Core::Breadcrumb.new(store: users, link_label: :name_fr, link_url: user_path(:id)).render
18
- expected = "<ol class=\"breadcrumb\"><li><a href=\"/users/1/\">Name fr</a></li><li><a href=\"/users/2/\">Name fr</a></li><li>Name fr</li></ol>"
18
+ expected = "<ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"/users/1/\">Name fr</a></li><li class=\"breadcrumb-item\"><a href=\"/users/2/\">Name fr</a></li><li class=\"breadcrumb-item\">Name fr</li></ol>"
19
19
 
20
20
  assert_equal expected, actual
21
21
  end
@@ -28,7 +28,7 @@ class ButtonTest < ActionView::TestCase
28
28
 
29
29
  test 'button outline' do
30
30
  actual = UiBibz::Ui::Core::Buttons::Button.new('state', status: :success, outline: true).render
31
- expected = "<button class=\"btn-success-outline btn\">state</button>"
31
+ expected = "<button class=\"btn-outline-success btn\">state</button>"
32
32
 
33
33
  assert_equal expected, actual
34
34
  end
@@ -88,7 +88,7 @@ class ButtonTest < ActionView::TestCase
88
88
  d.divider
89
89
  d.link 'lolo'
90
90
  end.render
91
- expected = "<div class=\"btn-group dropup\" role=\"group\"><button class=\"btn btn-primary\">Dropdown</button><button class=\"btn btn-primary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><span class=\"caret\"></span><span class=\"sr-only\">Toggle Dropdown</span></button><div class=\"dropdown-menu dropdown-menu-left\"><a class=\"dropdown-item\" href=\"#\">state</a><h6 class=\"dropdown-header\" role=\"presentation\">header</h6><a class=\"dropdown-item\" href=\"#\">momo</a><div class=\"dropdown-divider\"></div><a class=\"dropdown-item\" href=\"#\">lolo</a></div></div>"
91
+ expected = "<div class=\"btn-group dropup\" role=\"group\"><button class=\"btn btn-primary\">Dropdown</button><button class=\"btn btn-primary dropdown-toggle dropdown-toggle-split\" type=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\"><span class=\"sr-only\">Toggle Dropdown</span></button><div class=\"dropdown-menu dropdown-menu-left\"><a class=\"dropdown-item\" href=\"#\">state</a><h6 class=\"dropdown-header\" role=\"presentation\">header</h6><a class=\"dropdown-item\" href=\"#\">momo</a><div class=\"dropdown-divider\"></div><a class=\"dropdown-item\" href=\"#\">lolo</a></div></div>"
92
92
 
93
93
  assert_equal expected, actual
94
94
  end
data/test/ui/grid_test.rb CHANGED
@@ -14,7 +14,7 @@ class GridTest < ActionView::TestCase
14
14
 
15
15
  test "col" do
16
16
  actual = UiBibz::Ui::Core::Layouts::Col.new('test', { num: 1, push: 2, offset: 3, pull: 4 }, { class: 'test' }).render
17
- expected = "<div class=\"test col-md-1 col-md-push-2 col-md-offset-3 col-md-pull-4\">test</div>"
17
+ expected = "<div class=\"test col-md-1 col-md-push-2 offset-md-3 col-md-pull-4\">test</div>"
18
18
 
19
19
  assert_equal expected, actual
20
20
  end
@@ -23,7 +23,7 @@ class GridTest < ActionView::TestCase
23
23
  actual = UiBibz::Ui::Core::Layouts::Col.new(md: { num: 1, push: 2, pull: 4 }, xl: { num: 6, offset: 5 }, class: 'test') do
24
24
  "test"
25
25
  end.render
26
- expected = "<div class=\"test col-md-1 col-md-push-2 col-md-pull-4 col-xl-6 col-xl-offset-5\">test</div>"
26
+ expected = "<div class=\"test col-md-1 col-md-push-2 col-md-pull-4 col-xl-6 offset-xl-5\">test</div>"
27
27
 
28
28
  assert_equal expected, actual
29
29
  end
data/test/ui/nav_test.rb CHANGED
@@ -18,7 +18,7 @@ class NavTest < ActionView::TestCase
18
18
  n.link 'Profile', url: "#profile", selector: 'profile', label: 16
19
19
  n.link 'Messages', url: "#messages", selector: 'messages', state: :disabled
20
20
  end.render
21
- expected = "<ul class=\"nav nav-pills pull-justified\"><li class=\"nav-item\"><a class=\"active nav-link\" href=\"#Home\">Home</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"#profile\">Profile<span class=\"label-default pull-right label label-pill\">16</span></a></li><li class=\"nav-item\"><a class=\"disabled nav-link\" href=\"#messages\">Messages</a></li></ul>"
21
+ expected = "<ul class=\"nav nav-pills pull-justified\"><li class=\"nav-item\"><a class=\"active nav-link\" href=\"#Home\">Home</a></li><li class=\"nav-item\"><a class=\"nav-link\" href=\"#profile\">Profile</a></li><li class=\"nav-item\"><a class=\"disabled nav-link\" href=\"#messages\">Messages</a></li></ul>"
22
22
 
23
23
  assert_equal expected, actual
24
24
  end
@@ -10,7 +10,7 @@ class TableTest < ActionView::TestCase
10
10
 
11
11
  setup do
12
12
  create_list(:user, 25)
13
- params = {
13
+ params = ActionController::Parameters.new({
14
14
  controller: 'users',
15
15
  action: 'index',
16
16
  sort: 'users.name_fr',
@@ -18,14 +18,14 @@ class TableTest < ActionView::TestCase
18
18
  search: 'Name fr',
19
19
  per_page: 2,
20
20
  page: 1
21
- }
21
+ })
22
22
  @users = User.table_search_pagination(params, session)
23
23
  @store = UiBibz::Ui::Ux::Tables::Store.new @users
24
24
  end
25
25
 
26
26
  test 'table search field' do
27
27
  actual = UiBibz::Ui::Ux::Tables::TableSearchField.new({ store: @users}).render
28
- expected = "<form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-addon\"><i class=\"glyph fa fa-search\"></i></span><input type=\"hidden\" name=\"controller\" value=\"users\" /><input type=\"hidden\" name=\"action\" value=\"index\" /><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"search\" value=\"Name fr\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><span class=\"input-group-btn\"><button type=\"button\" class=\"btn btn-secondary\"><i class=\"glyph fa fa-times-circle\"></i></button></span></div></form>"
28
+ expected = "<form class=\"form-table-search-field\" action=\"/users?direction=asc&amp;page=1&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\" accept-charset=\"UTF-8\" method=\"get\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><div class=\"input-group input-group-sm table-search-field\"><span class=\"input-group-addon\"><i class=\"glyph fa fa-search\"></i></span><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><input type=\"search\" value=\"Name fr\" name=\"search\" class=\"form-control\" placeholder=\"Search by Name fr and Name en...\" /><span class=\"input-group-btn\"><button type=\"button\" class=\"btn btn-secondary\"><i class=\"glyph fa fa-times-circle\"></i></button></span></div></form>"
29
29
 
30
30
  assert_equal expected, actual
31
31
  end
@@ -48,7 +48,7 @@ class TableTest < ActionView::TestCase
48
48
  test 'table sortable' do
49
49
  options = { sortable: true }
50
50
  actual = UiBibz::Ui::Ux::Tables::Sortable.new(@store, options).header(@store.columns.list.first)
51
- expected = "<a class=\"dropup\" href=\"/users?column_id=id&amp;direction=asc&amp;search=Name+fr&amp;sort=users.id\">Id</a>"
51
+ expected = "<a class=\"dropup\" href=\"/users?action=index&amp;column_id=id&amp;direction=asc&amp;search=Name+fr&amp;sort=users.id\">Id</a>"
52
52
 
53
53
  assert_equal expected, actual
54
54
  end
@@ -66,7 +66,7 @@ class TableTest < ActionView::TestCase
66
66
  options = { paginable: true }
67
67
  pagination = UiBibz::Ui::Ux::Tables::Paginable.new(@store, options)
68
68
  actual = pagination.render if pagination.paginable?
69
- expected = "<div><ul class=\"pagination pagination\"><li class=\"prev disabled\"><span>&#8592; Previous</span></li> <li class=\"active\"><span>1</span></li> <li><a rel=\"next\" href=\"/users?direction=asc&amp;page=2&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">2</a></li> <li><a href=\"/users?direction=asc&amp;page=3&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">3</a></li> <li><a href=\"/users?direction=asc&amp;page=4&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">4</a></li> <li><a href=\"/users?direction=asc&amp;page=5&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">5</a></li> <li><a href=\"/users?direction=asc&amp;page=6&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">6</a></li> <li><a href=\"/users?direction=asc&amp;page=7&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">7</a></li> <li><a href=\"/users?direction=asc&amp;page=8&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">8</a></li> <li><a href=\"/users?direction=asc&amp;page=9&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">9</a></li> <li class=\"disabled\"><span>&hellip;</span></li> <li><a href=\"/users?direction=asc&amp;page=12&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">12</a></li> <li><a href=\"/users?direction=asc&amp;page=13&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">13</a></li> <li class=\"next\"><a rel=\"next\" href=\"/users?direction=asc&amp;page=2&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">Next &#8594;</a></li></ul><form action=\"/users\" accept-charset=\"UTF-8\" method=\"get\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><div class=\"table-pagination-per-page\">Displaying User <b>1&nbsp;-&nbsp;2</b> of <b>25</b> in total | Per page: <input type=\"hidden\" name=\"controller\" value=\"users\" /><input type=\"hidden\" name=\"action\" value=\"index\" /><input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"search\" value=\"Name fr\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><select name=\"per_page\" id=\"per_page\" class=\"form-control\"><option value=\"5\">5</option>
69
+ expected = "<div><ul class=\"pagination pagination\"><li class=\"prev disabled\"><span>&#8592; Previous</span></li> <li class=\"active\"><span>1</span></li> <li><a rel=\"next\" href=\"/users?direction=asc&amp;page=2&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">2</a></li> <li><a href=\"/users?direction=asc&amp;page=3&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">3</a></li> <li><a href=\"/users?direction=asc&amp;page=4&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">4</a></li> <li><a href=\"/users?direction=asc&amp;page=5&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">5</a></li> <li><a href=\"/users?direction=asc&amp;page=6&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">6</a></li> <li><a href=\"/users?direction=asc&amp;page=7&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">7</a></li> <li><a href=\"/users?direction=asc&amp;page=8&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">8</a></li> <li><a href=\"/users?direction=asc&amp;page=9&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">9</a></li> <li class=\"disabled\"><span>&hellip;</span></li> <li><a href=\"/users?direction=asc&amp;page=12&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">12</a></li> <li><a href=\"/users?direction=asc&amp;page=13&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">13</a></li> <li class=\"next\"><a rel=\"next\" href=\"/users?direction=asc&amp;page=2&amp;per_page=2&amp;search=Name+fr&amp;sort=users.name_fr\">Next &#8594;</a></li></ul><form action=\"/users\" accept-charset=\"UTF-8\" method=\"get\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /><div class=\"table-pagination-per-page\">Displaying User <b>1&nbsp;-&nbsp;2</b> of <b>25</b> in total | Per page: <input type=\"hidden\" name=\"sort\" value=\"users.name_fr\" /><input type=\"hidden\" name=\"direction\" value=\"asc\" /><input type=\"hidden\" name=\"per_page\" value=\"2\" /><input type=\"hidden\" name=\"page\" value=\"1\" /><select name=\"per_page\" id=\"per_page\" class=\"form-control\"><option value=\"5\">5</option>
70
70
  <option value=\"10\">10</option>
71
71
  <option value=\"20\">20</option>
72
72
  <option value=\"30\">30</option>
@@ -9,7 +9,7 @@ class UiHelperTest < ActionView::TestCase
9
9
  b.link 'Home', url: '#home', glyph: 'home'
10
10
  b.link 'state', { url: '#state', state: :active }
11
11
  end
12
- expected = "<ol class=\"breadcrumb\"><li><a href=\"#home\"><i class=\"glyph fa fa-home\"></i> Home</a></li><li class=\"active\"><a href=\"#state\">state</a></li></ol>"
12
+ expected = "<ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"#home\"><i class=\"glyph fa fa-home\"></i> Home</a></li><li class=\"active breadcrumb-item\"><a href=\"#state\">state</a></li></ol>"
13
13
 
14
14
  assert_equal expected, actual
15
15
  end
@@ -17,7 +17,7 @@ class UiHelperTest < ActionView::TestCase
17
17
  test 'breadcrumb with store' do
18
18
  users = create_list(:user, 3)
19
19
  actual = breadcrumb store: users, link_label: :name_fr, link_url: user_path(:id)
20
- expected = "<ol class=\"breadcrumb\"><li><a href=\"/users/1/\">Name fr</a></li><li><a href=\"/users/2/\">Name fr</a></li><li>Name fr</li></ol>"
20
+ expected = "<ol class=\"breadcrumb\"><li class=\"breadcrumb-item\"><a href=\"/users/1/\">Name fr</a></li><li class=\"breadcrumb-item\"><a href=\"/users/2/\">Name fr</a></li><li class=\"breadcrumb-item\">Name fr</li></ol>"
21
21
 
22
22
  assert_equal expected, actual
23
23
  end
@@ -31,14 +31,14 @@ class UiHelperTest < ActionView::TestCase
31
31
 
32
32
  test 'etiquette' do
33
33
  actual = etiquette 'state', status: :success, glyph: 'pencil'
34
- expected = "<span class=\"label-success label\"><i class=\"glyph fa fa-pencil\"></i> state</span>"
34
+ expected = "<span class=\"tag-success tag\"><i class=\"glyph fa fa-pencil\"></i> state</span>"
35
35
 
36
36
  assert_equal expected, actual
37
37
  end
38
38
 
39
39
  test 'etiquette pill' do
40
40
  actual = etiquette 'state', status: :success, type: :pill, glyph: 'pencil'
41
- expected = "<span class=\"label-success label label-pill\"><i class=\"glyph fa fa-pencil\"></i> state</span>"
41
+ expected = "<span class=\"tag-success tag tag-pill\"><i class=\"glyph fa fa-pencil\"></i> state</span>"
42
42
 
43
43
  assert_equal expected, actual
44
44
  end
data/ui_bibz.gemspec CHANGED
@@ -11,12 +11,15 @@ Gem::Specification.new do |s|
11
11
  s.name = "ui_bibz"
12
12
  s.version = UiBibz::VERSION
13
13
  s.authors = ["Thooams"]
14
- s.email = ["thomas@hummel.link"]
14
+ s.email = "thomas@hummel.link"
15
15
  s.homepage = "http://thooams.github.io/Ui-Bibz/"
16
16
  s.summary = "Create your project with Ui Bibz. Over a thirty reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more."
17
17
  s.description = "A Rails Interface Framework using Bootstrap."
18
18
  s.license = "MIT"
19
19
 
20
+ s.required_ruby_version = '>= 2.0'
21
+ s.post_install_message = 'Thanks for installing Ui Bibz!'
22
+
20
23
  s.files = `git ls-files`.split("\n")
21
24
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
22
25
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -32,7 +35,7 @@ Gem::Specification.new do |s|
32
35
  s.add_dependency 'haml-rails'
33
36
  s.add_dependency 'sass-rails', '>= 5.0.0'
34
37
  s.add_dependency 'font-awesome-sass'
35
- s.add_dependency 'bootstrap', '4.0.0.alpha3'
38
+ s.add_dependency 'bootstrap', '4.0.0.alpha3.1'
36
39
 
37
40
  # Javascript gems (rails-assets.org)
38
41
  #s.add_dependency 'rails-assets-tether', '>= 1.1.0'
@@ -45,7 +48,6 @@ Gem::Specification.new do |s|
45
48
 
46
49
  # Development gems
47
50
  s.add_development_dependency "minitest"
48
- s.add_development_dependency "rdoc"
49
51
  s.add_development_dependency "sqlite3"
50
52
  s.add_development_dependency "factory_girl_rails", "~> 4.0"
51
53
  s.add_development_dependency "codeclimate-test-reporter"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.alpha16
4
+ version: 2.0.0.alpha18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 4.0.0.alpha3
131
+ version: 4.0.0.alpha3.1
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 4.0.0.alpha3
138
+ version: 4.0.0.alpha3.1
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: minitest
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -150,20 +150,6 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: rdoc
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: sqlite3
169
155
  requirement: !ruby/object:Gem::Requirement
@@ -207,8 +193,7 @@ dependencies:
207
193
  - !ruby/object:Gem::Version
208
194
  version: '0'
209
195
  description: A Rails Interface Framework using Bootstrap.
210
- email:
211
- - thomas@hummel.link
196
+ email: thomas@hummel.link
212
197
  executables: []
213
198
  extensions: []
214
199
  extra_rdoc_files: []
@@ -288,7 +273,6 @@ files:
288
273
  - lib/ui_bibz/ui/core/inputs/surround_field.rb
289
274
  - lib/ui_bibz/ui/core/inputs/switch_field.rb
290
275
  - lib/ui_bibz/ui/core/jumbotron.rb
291
- - lib/ui_bibz/ui/core/label.rb
292
276
  - lib/ui_bibz/ui/core/layouts/col.rb
293
277
  - lib/ui_bibz/ui/core/layouts/container.rb
294
278
  - lib/ui_bibz/ui/core/layouts/row.rb
@@ -312,6 +296,7 @@ files:
312
296
  - lib/ui_bibz/ui/core/navs/navbar.rb
313
297
  - lib/ui_bibz/ui/core/progress.rb
314
298
  - lib/ui_bibz/ui/core/stars.rb
299
+ - lib/ui_bibz/ui/core/tag.rb
315
300
  - lib/ui_bibz/ui/ux/tables/components/actions.rb
316
301
  - lib/ui_bibz/ui/ux/tables/components/as.rb
317
302
  - lib/ui_bibz/ui/ux/tables/components/column.rb
@@ -422,7 +407,7 @@ homepage: http://thooams.github.io/Ui-Bibz/
422
407
  licenses:
423
408
  - MIT
424
409
  metadata: {}
425
- post_install_message:
410
+ post_install_message: Thanks for installing Ui Bibz!
426
411
  rdoc_options: []
427
412
  require_paths:
428
413
  - lib
@@ -431,7 +416,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
431
416
  requirements:
432
417
  - - ">="
433
418
  - !ruby/object:Gem::Version
434
- version: '0'
419
+ version: '2.0'
435
420
  required_rubygems_version: !ruby/object:Gem::Requirement
436
421
  requirements:
437
422
  - - ">"
@@ -439,7 +424,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
439
424
  version: 1.3.1
440
425
  requirements: []
441
426
  rubyforge_project:
442
- rubygems_version: 2.4.8
427
+ rubygems_version: 2.6.6
443
428
  signing_key:
444
429
  specification_version: 4
445
430
  summary: Create your project with Ui Bibz. Over a thirty reusable components built