semanticui-generators 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73bf17669438796831b805abee028a4f2b313692
4
- data.tar.gz: 93fc0dffb1092bd08edd394c3cefc135346b9cdf
3
+ metadata.gz: fb0965173122a6a7426f0a71e261a003f4f7f6a9
4
+ data.tar.gz: ef437b228919e571776560e9a6e6cc819a5a8360
5
5
  SHA512:
6
- metadata.gz: 6d27b01874247f5ad90a9638f25d2a108ed9d1db663c992641296d6232d4e063d6845d385e9bd4f7d2bac93d562eb33f95bc841a4c7e3303706b7fd59cf5248c
7
- data.tar.gz: e275a1c8ca0ab71570c129cebb1c1ac489c45ec8057df4cd6c44e86d0b8978ec0268069e4befe1073ba5bbc046237ae2a20167fc9847ab6eee091b1d23876ab0
6
+ metadata.gz: 33a5b7b476c7646b5985c22b9801c5d0d3b4bc6fd171f50b6d52c51b8f2833850068b57b17b7c2f7bc9ec3739a5ad98e8ab8b8dffb339d952e02f9b0691ee60c
7
+ data.tar.gz: 702a17ef21c981e6983a893265b2d8a2643f351a618b0a79147c3acbb691a17e04c3eee165e9733222ddb3c96e567fa909a925fd0d2c45f5c6358902d923cdf0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SemanticUI Generators
2
2
 
3
- semanticui-generators provides [SemanticUI](http://semantic-ui.com/) scaffold generators for Rails 4 (supported Rails >= 3.1).
3
+ semanticui-generators provides [SemanticUI](http://semantic-ui.com/) scaffold generators for Rails 5 (supported Rails >= 3.1).
4
4
 
5
5
  ## Screenshots
6
6
 
@@ -10,7 +10,7 @@ semanticui-generators provides [SemanticUI](http://semantic-ui.com/) scaffold ge
10
10
 
11
11
  ## SemanticUI Installation
12
12
 
13
- Installs [SemanticUI](http://semantic-ui.com/) via [RailsAssets] (https://rails-assets.org/).
13
+ Installs [SemanticUI](http://semantic-ui.com/) via [Semantic-UI-Rails-LESS](https://github.com/Semantic-Org/Semantic-UI-Rails-LESS)
14
14
 
15
15
  ## Give it a try
16
16
 
@@ -6,8 +6,6 @@ module Semanticui
6
6
  desc 'Copy SemanticUI Generators default files'
7
7
  source_root ::File.expand_path('../templates', __FILE__)
8
8
 
9
- class_option :skip_turbolinks, type: :boolean, default: false, desc: "Skip Turbolinks on assets"
10
-
11
9
  def copy_lib
12
10
  directory "lib/templates/erb"
13
11
  end
@@ -29,18 +27,22 @@ module Semanticui
29
27
  end
30
28
 
31
29
  def add_semanticui_gem
32
- add_source "https://rails-assets.org"
33
- gem "rails-assets-semantic-ui"
30
+ gem "less-rails"
31
+ gem "less-rails-semantic_ui"
32
+ gem "autoprefixer-rails"
33
+
34
34
  Bundler.with_clean_env do
35
35
  run 'bundle install'
36
36
  end
37
+
38
+ generate "semantic_ui:install"
37
39
  end
38
40
 
39
41
  def inject_semanticui_requires
40
42
  application_js_path = "app/assets/javascripts/application.js"
41
43
  if ::File.exists?(::File.join(destination_root, application_js_path))
42
44
  inject_into_file application_js_path, before: "//= require_tree" do
43
- "//= require semantic-ui\n" +
45
+ "//= require semantic_ui/semantic_ui\n" +
44
46
  "//= require semanticui-scaffold\n"
45
47
  end
46
48
  end
@@ -48,7 +50,7 @@ module Semanticui
48
50
  application_css_path = "app/assets/stylesheets/application.css"
49
51
  if ::File.exists?(::File.join(destination_root, application_css_path))
50
52
  inject_into_file application_css_path, before: '*= require_tree .' do
51
- "*= require semantic-ui\n"
53
+ "*= require semantic_ui/semantic_ui\n"
52
54
  end
53
55
  end
54
56
  end
@@ -4,11 +4,5 @@ body {
4
4
 
5
5
  .page {
6
6
  background-color: #f7f7f7;
7
- margin: 0 auto;
8
- padding: 50px 0;
9
- width: 85%;
10
- }
11
-
12
- .title.column {
13
- text-align: center;
7
+ margin-top: 5em;
14
8
  }
@@ -13,13 +13,13 @@
13
13
  </div>
14
14
  <%% end %>
15
15
 
16
- <div class="ui secondary segment">
17
- <% attributes.each do |attribute| -%>
18
- <div class="field">
19
- <%%= f.label :<%= attribute.name %> %>
20
- <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
21
- </div>
22
- <% end -%>
23
- <%%= f.submit class: "ui submit blue button" %>
24
- <%% end %>
25
- </div>
16
+ <div class="ui secondary segment">
17
+ <% attributes.each do |attribute| -%>
18
+ <div class="field">
19
+ <%%= f.label :<%= attribute.name %> %>
20
+ <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %>
21
+ </div>
22
+ <% end -%>
23
+ <%%= f.submit class: "ui submit blue button" %>
24
+ </div>
25
+ <%% end %>
@@ -11,13 +11,8 @@
11
11
  <%%= javascript_include_tag "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js", "https://oss.maxcdn.com/respond/1.4.2/respond.min.js" %>
12
12
  <![endif]-->
13
13
 
14
- <%- if options[:skip_turbolinks] -%>
15
- <%%= stylesheet_link_tag 'application', media: 'all' %>
16
- <%%= javascript_include_tag 'application' %>
17
- <%- else -%>
18
14
  <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
19
15
  <%%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
20
- <%- end -%>
21
16
  <%%= csrf_meta_tags %>
22
17
  </head>
23
18
  <body>
@@ -28,17 +23,17 @@
28
23
  <%% end %>
29
24
  </div>
30
25
 
31
- <div class="ui fixed inverted main menu">
32
- <a class="item side toggle" href="#">
33
- <i class="content icon"></i>
34
- </a>
35
- <div class="item header">
36
- <%= application_name %>
26
+ <div class="pusher">
27
+ <div class="ui top fixed inverted main menu">
28
+ <a class="item side toggle" href="#">
29
+ <i class="content icon"></i>
30
+ </a>
31
+ <div class="item header">
32
+ <%= application_name %>
33
+ </div>
37
34
  </div>
38
- </div>
39
35
 
40
- <div class="pusher">
41
- <div class="page">
36
+ <div class="ui page container">
42
37
  <%% flash.each do |name, msg| %>
43
38
  <%%= content_tag :div, class: "ui message #{ name == :error ? "negative" : "positive" }" do %>
44
39
  <i class="close icon"></i>
@@ -46,7 +41,7 @@
46
41
  <%% end %>
47
42
  <%% end %>
48
43
 
49
- <div class="ui primary segment">
44
+ <div class="ui segment">
50
45
  <%%= yield %>
51
46
  </div>
52
47
  </div>
@@ -1,20 +1,25 @@
1
1
  <div class="ui stackable grid">
2
- <div class="two wide column">
2
+ <div class="row">
3
+ <div class="two wide column">
4
+ </div>
5
+ <div class="center aligned twelve wide title column">
6
+ <h2>
7
+ Editing <%= singular_table_name.titleize %>
8
+ </h2>
9
+ </div>
10
+ <div class="right aligned two wide column">
11
+ <%%= link_to 'Destroy', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui tiny fluid red button' %>
12
+ </div>
3
13
  </div>
4
- <div class="center aligned twelve wide title column">
5
- <h2>
6
- Editing <%= singular_table_name.titleize %>
7
- </h2>
8
- </div>
9
- <div class="right aligned two wide column">
10
- <%%= link_to 'Destroy', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui tiny fluid red button' %>
11
- </div>
12
- </div>
14
+ <div class="one column row">
15
+ <div class="column">
16
+ <div class="ui breadcrumb">
17
+ <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
18
+ <i class="right chevron icon divider"></i>
19
+ <div class="active section">Edit</div>
20
+ </div>
13
21
 
14
- <div class="ui breadcrumb">
15
- <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
16
- <i class="right chevron icon divider"></i>
17
- <div class="active section">Edit</div>
22
+ <%%= render 'form' %>
23
+ </div>
24
+ </div>
18
25
  </div>
19
-
20
- <%%= render 'form' %>
@@ -1,48 +1,55 @@
1
1
  <div class="ui stackable grid">
2
- <div class="two wide column">
2
+ <div class="row">
3
+ <div class="two wide column">
4
+ </div>
5
+ <div class="center aligned twelve wide title column">
6
+ <h2>
7
+ <%= plural_table_name.titleize %>
8
+ </h2>
9
+ </div>
10
+ <div class="right aligned two wide column">
11
+ <%%= link_to 'New', new_<%= singular_table_name %>_path, class: 'ui tiny fluid green button' %>
12
+ </div>
3
13
  </div>
4
- <div class="center aligned twelve wide title column">
5
- <h2>
6
- <%= plural_table_name.titleize %>
7
- </h2>
8
- </div>
9
- <div class="right aligned two wide column">
10
- <%%= link_to 'New', new_<%= singular_table_name %>_path, class: 'ui tiny fluid green button' %>
14
+ <div class="one column row">
15
+ <div class="column">
16
+ <%% if !@<%= plural_table_name %>.empty? %>
17
+ <table class="ui striped table">
18
+ <thead>
19
+ <tr>
20
+ <% attributes.first(3).each do |attribute| -%>
21
+ <th><%= attribute.human_name %></th>
22
+ <% end -%>
23
+ <th></th>
24
+ </tr>
25
+ </thead>
26
+
27
+ <tbody>
28
+ <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
29
+ <tr>
30
+ <% attributes.first(3).each do |attribute| -%>
31
+ <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
32
+ <% end -%>
33
+ <td class="right aligned">
34
+ <span class="ui icon buttons">
35
+ <%%= link_to <%= singular_table_name %>, class: 'ui button' do %>
36
+ <i class="icon folder open"></i>
37
+ <%% end %>
38
+ <%%= link_to edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'ui button' do %>
39
+ <i class="icon edit"></i>
40
+ <%% end %>
41
+ <%%= link_to <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui button' do %>
42
+ <i class="icon remove"></i>
43
+ <%% end %>
44
+ </span>
45
+ </td>
46
+ </tr>
47
+ <%% end %>
48
+ </tbody>
49
+ </table>
50
+ <%% else %>
51
+ <div class="ui message">No <%= plural_table_name %> to display.</div>
52
+ <%% end %>
53
+ </div>
11
54
  </div>
12
55
  </div>
13
-
14
- <%% if !@<%= plural_table_name %>.empty? %>
15
- <table class="ui striped table">
16
- <thead>
17
- <tr>
18
- <% attributes.first(3).each do |attribute| -%>
19
- <th><%= attribute.human_name %></th>
20
- <% end -%>
21
- <th></th>
22
- </tr>
23
- </thead>
24
-
25
- <tbody>
26
- <%%= content_tag_for(:tr, @<%= plural_table_name %>) do |<%= singular_table_name %>| %>
27
- <% attributes.first(3).each do |attribute| -%>
28
- <td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
29
- <% end -%>
30
- <td class="right aligned">
31
- <span class="ui icon buttons">
32
- <%%= link_to <%= singular_table_name %>, class: 'ui button' do %>
33
- <i class="icon folder open"></i>
34
- <%% end %>
35
- <%%= link_to edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'ui button' do %>
36
- <i class="icon edit"></i>
37
- <%% end %>
38
- <%%= link_to <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui button' do %>
39
- <i class="icon remove"></i>
40
- <%% end %>
41
- </span>
42
- </td>
43
- <%% end %>
44
- </tbody>
45
- </table>
46
- <%% else %>
47
- <div class="ui message">No <%= plural_table_name %> to display.</div>
48
- <%% end %>
@@ -1,19 +1,24 @@
1
1
  <div class="ui stackable grid">
2
- <div class="two wide column">
2
+ <div class="row">
3
+ <div class="two wide column">
4
+ </div>
5
+ <div class="center aligned twelve wide title column">
6
+ <h2>
7
+ Adding <%= singular_table_name.titleize %>
8
+ </h2>
9
+ </div>
10
+ <div class="two wide column">
11
+ </div>
3
12
  </div>
4
- <div class="center aligned twelve wide title column">
5
- <h2>
6
- Adding <%= singular_table_name.titleize %>
7
- </h2>
8
- </div>
9
- <div class="two wide column">
10
- </div>
11
- </div>
13
+ <div class="one column row">
14
+ <div class="column">
15
+ <div class="ui breadcrumb">
16
+ <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
17
+ <i class="right chevron icon divider"></i>
18
+ <div class="active section">New</div>
19
+ </div>
12
20
 
13
- <div class="ui breadcrumb">
14
- <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
15
- <i class="right chevron icon divider"></i>
16
- <div class="active section">New</div>
21
+ <%%= render 'form' %>
22
+ </div>
23
+ </div>
17
24
  </div>
18
-
19
- <%%= render 'form' %>
@@ -1,34 +1,40 @@
1
1
  <div class="ui stackable grid">
2
- <div class="four wide column">
2
+ <div class="row">
3
+ <div class="four wide column">
4
+ </div>
5
+ <div class="center aligned eight wide title column">
6
+ <h2>
7
+ Showing <%= singular_table_name.titleize %>
8
+ </h2>
9
+ </div>
10
+ <div class="right aligned two wide column">
11
+ <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'ui tiny fluid orange button' %>
12
+ </div>
13
+ <div class="right aligned two wide column">
14
+ <%%= link_to 'Destroy', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui tiny fluid red button' %>
15
+ </div>
3
16
  </div>
4
- <div class="center aligned eight wide title column">
5
- <h2>
6
- Showing <%= singular_table_name.titleize %>
7
- </h2>
8
- </div>
9
- <div class="right aligned two wide column">
10
- <%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'ui tiny fluid orange button' %>
11
- </div>
12
- <div class="right aligned two wide column">
13
- <%%= link_to 'Destroy', <%= singular_table_name %>_path(@<%= singular_table_name %>), method: :delete, data: { confirm: 'Are you sure?' }, class: 'ui tiny fluid red button' %>
14
- </div>
15
- </div>
16
-
17
- <div class="ui breadcrumb">
18
- <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
19
- <i class="right chevron icon divider"></i>
20
- <div class="active section">Show</div>
21
- </div>
17
+ <div class="one column row">
18
+ <div class="column">
19
+ <div class="ui breadcrumb">
20
+ <%%= link_to '<%= plural_table_name.titleize %>', <%= index_helper %>_path, class: 'section' %>
21
+ <i class="right chevron icon divider"></i>
22
+ <div class="active section">Show</div>
23
+ </div>
22
24
 
23
- <div class="ui secondary segment">
24
- <div class="ui list">
25
- <%- attributes.each do |attribute| -%>
26
- <div class="item">
27
- <div class="header">
28
- <%= attribute.human_name %>:
25
+ <div class="ui secondary segment">
26
+ <div class="ui list">
27
+ <%- attributes.each do |attribute| -%>
28
+ <div class="item">
29
+ <div class="header">
30
+ <%= attribute.human_name %>:
31
+ </div>
32
+ <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
33
+ </div>
34
+ <%- end -%>
29
35
  </div>
30
- <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
31
36
  </div>
32
- <%- end -%>
37
+ </div>
33
38
  </div>
34
39
  </div>
40
+
@@ -1,5 +1,5 @@
1
1
  module Semanticui
2
2
  module Generators
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semanticui-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Lins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,7 +72,6 @@ files:
72
72
  - lib/generators/semanticui/install/templates/assets/stylesheets/semanticui-scaffold.scss
73
73
  - lib/generators/semanticui/install/templates/form_builders/form_builder/_form.html.erb
74
74
  - lib/generators/semanticui/install/templates/layouts/application.html.erb
75
- - lib/generators/semanticui/install/templates/lib/templates/erb/controller/view.html.erb
76
75
  - lib/generators/semanticui/install/templates/lib/templates/erb/scaffold/edit.html.erb
77
76
  - lib/generators/semanticui/install/templates/lib/templates/erb/scaffold/index.html.erb
78
77
  - lib/generators/semanticui/install/templates/lib/templates/erb/scaffold/new.html.erb
@@ -100,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
99
  version: '0'
101
100
  requirements: []
102
101
  rubyforge_project:
103
- rubygems_version: 2.2.2
102
+ rubygems_version: 2.5.1
104
103
  signing_key:
105
104
  specification_version: 4
106
105
  summary: SemanticUI generators for Rails
@@ -1,4 +0,0 @@
1
- <div class="header">
2
- <%= class_name %>#<%= @action %>
3
- </div>
4
- <p>Find me in <%= @path %></p>