rails-semantic-ui 0.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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +23 -0
- data/lib/generators/semantic_ui/files/layout.slim +63 -0
- data/lib/generators/semantic_ui/files/resources/normalize.coffee +1 -0
- data/lib/generators/semantic_ui/files/resources/semantic-ui.coffee +5 -0
- data/lib/generators/semantic_ui/files/semantic-ui.coffee +6 -0
- data/lib/generators/semantic_ui/install_generator.rb +85 -0
- data/lib/generators/semantic_ui/layout_generator.rb +10 -0
- data/lib/generators/semantic_ui/update_generator.rb +11 -0
- data/lib/rails/semantic/ui.rb +1 -0
- data/lib/rails/semantic_ui.rb +7 -0
- data/lib/rails/semantic_ui/dependencies.rb +14 -0
- data/lib/rails/semantic_ui/railtie.rb +12 -0
- data/lib/rails/semantic_ui/version.rb +5 -0
- data/lib/rails_semantic_ui.rb +1 -0
- data/lib/tasks/semantic_ui.rake +12 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5559ecef2ae83e44d196b2a8311b2bfd794c56f2
|
4
|
+
data.tar.gz: 7a2f0911f65b4bb7aa24e0eecf6d5a5a3fc0e1cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f031303617cba4eddb4dd2b125f3242071eab46444d6dfd06751160c4ea26552a5a68bc0e8ede761dec02d2c6d526ec1173c66088e451055310e07c44c53afb0
|
7
|
+
data.tar.gz: 7995cc311b7276e61f3c18563009ab02c4a4948bc78f01ed4e016b5f4e21446a7a6014bf1b197f947d5177020899f5f5e75acfb807fbc8044ddf111b91f08fde
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2015 Jeong, Jiung
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'RailsSemanticUi'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
Bundler::GemHelper.install_tasks
|
23
|
+
|
@@ -0,0 +1,63 @@
|
|
1
|
+
doctype html
|
2
|
+
html
|
3
|
+
head
|
4
|
+
meta charset='utf-8'
|
5
|
+
meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'
|
6
|
+
meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'
|
7
|
+
title #{Rails.application.class.parent.name}
|
8
|
+
== stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
|
9
|
+
== csrf_meta_tags
|
10
|
+
|
11
|
+
body
|
12
|
+
.ui.fixed.inverted.menu
|
13
|
+
.ui.container
|
14
|
+
a.header.item href='/' #{Rails.application.class.parent.name}
|
15
|
+
.ui.simple.dropdown.item
|
16
|
+
| Dashboards
|
17
|
+
'
|
18
|
+
i.dropdown.icon
|
19
|
+
.menu
|
20
|
+
.item Link Item
|
21
|
+
.item Link Item
|
22
|
+
.divider
|
23
|
+
.header Header Item
|
24
|
+
.item
|
25
|
+
i.dropdown.icon
|
26
|
+
'
|
27
|
+
| Sub Menu
|
28
|
+
.menu
|
29
|
+
.item Link Item
|
30
|
+
.item Link Item
|
31
|
+
.item Link Item
|
32
|
+
= link_to 'Hosts', hosts_path, class: 'item'
|
33
|
+
.right.menu
|
34
|
+
.ui.search.item
|
35
|
+
.ui.inverted.transparent.icon.input
|
36
|
+
input.prompt type='text' placeholder='Search...'
|
37
|
+
i.search.link.icon
|
38
|
+
.results
|
39
|
+
.ui.simple.dropdown.item
|
40
|
+
i.settings.icon
|
41
|
+
'
|
42
|
+
i.dropdown.icon
|
43
|
+
.menu
|
44
|
+
.header Data Administration
|
45
|
+
= link_to 'Tags', tags_path, class: 'item'
|
46
|
+
= link_to 'Schema', schemas_path, class: 'item'
|
47
|
+
.divider
|
48
|
+
.header Configuration
|
49
|
+
= link_to 'Server Types', server_types_path, class: 'item'
|
50
|
+
|
51
|
+
.ui.main.container
|
52
|
+
== yield
|
53
|
+
.ui.inverted.vertical.footer.segment
|
54
|
+
.ui.center.aligned.container
|
55
|
+
img.ui.centered.medium.image src="#{asset_path 'saltstack-full.png'}"
|
56
|
+
.ui.horizontal.inverted.small.divided.link.list
|
57
|
+
a.item href='https://docs.saltstack.com/en/latest/' Documents
|
58
|
+
a.item href='#' Contact Us
|
59
|
+
a.item href='#' Privacy Policy
|
60
|
+
|
61
|
+
== javascript_include_tag 'application'
|
62
|
+
- if content_for? :inline_script
|
63
|
+
== yield :inline_script
|
@@ -0,0 +1 @@
|
|
1
|
+
require('file?name=normalize.css!normalize-css')
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require 'rails/semantic_ui'
|
2
|
+
|
3
|
+
module SemanticUi
|
4
|
+
class InstallGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('files', __dir__)
|
6
|
+
|
7
|
+
def install_tasks
|
8
|
+
copy_file 'semantic-ui.coffee', 'app/webpack/tasks/semantic-ui.coffee'
|
9
|
+
end
|
10
|
+
|
11
|
+
def add_bower_dependencies
|
12
|
+
template = "\\1#{bower_dependencies.to_s}\n"
|
13
|
+
|
14
|
+
gsub_file 'config/webpack.yml', /(bower:\s*\n(\s+)dependencies:\s*\n)(\s+[^\n]+\n)*/m, template
|
15
|
+
end
|
16
|
+
|
17
|
+
def add_npm_dev_dependencies
|
18
|
+
template = "\\1#{gulp_loaders.to_s}\n"
|
19
|
+
|
20
|
+
gsub_file 'config/webpack.yml', /(npm:\s*\n([-~a-zA-Z0-9\s:'+\/@\.\[\]]+\n)+\s{2}develop_dependencies:\s*\n)(\s{4,}[\s\S]+\n)*/m, template
|
21
|
+
end
|
22
|
+
|
23
|
+
def install_assets
|
24
|
+
empty_directory 'app/webpack/src/statics'
|
25
|
+
copy_file 'resources/semantic-ui.coffee', 'app/webpack/src/statics/semantic-ui.coffee'
|
26
|
+
copy_file 'resources/normalize.coffee', 'app/webpack/src/statics/normalize.coffee'
|
27
|
+
end
|
28
|
+
|
29
|
+
def combine_semantic_ui
|
30
|
+
inject_into_file 'app/webpack/src/pages/common.coffee', after: "# run webpack pipeline against files in src/pages automatically\n" do
|
31
|
+
"require 'statics/normalize.coffee'\nrequire 'statics/semantic-ui.coffee'\n"
|
32
|
+
end
|
33
|
+
copy_file 'resources/normalize.coffee', 'app/webpack/src/statics/normalize.coffee'
|
34
|
+
|
35
|
+
inject_into_file 'app/webpack/src/pages/common.coffee', before: " *= require_self\n" do
|
36
|
+
" *= require normailzie\n *= require semantic\n"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def inject_into_assets
|
41
|
+
css = Dir['app/assets/stylesheets/application.*'].first
|
42
|
+
js = Dir['app/assets/javascripts/application.*'].first
|
43
|
+
js_ext = File.extname js
|
44
|
+
|
45
|
+
pattern = case js_ext
|
46
|
+
when 'coffee'
|
47
|
+
"#\n"
|
48
|
+
else 'js'
|
49
|
+
"//\n"
|
50
|
+
end
|
51
|
+
|
52
|
+
inject_into_file css, after: " *\n" do
|
53
|
+
" *= require normalize\n *= require semantic\n"
|
54
|
+
end
|
55
|
+
|
56
|
+
inject_into_file js, after: pattern do
|
57
|
+
"#= require common.bundle\n"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def sync
|
62
|
+
rake 'webpack:sync'
|
63
|
+
end
|
64
|
+
|
65
|
+
def initial_build
|
66
|
+
rake 'npm:install'
|
67
|
+
rake 'gulp:webpack'
|
68
|
+
rake 'prepare:semantic'
|
69
|
+
end
|
70
|
+
|
71
|
+
no_tasks do
|
72
|
+
def gulp_loaders
|
73
|
+
deps = Rails::SemanticUI::Dependencies.new Rails.configuration.webpack.npm.develop_dependencies
|
74
|
+
deps.add('file-loader', '~0.8')
|
75
|
+
deps.add('expose-loader', '~0.7')
|
76
|
+
end
|
77
|
+
|
78
|
+
def bower_dependencies
|
79
|
+
deps = Rails::SemanticUI::Dependencies.new Rails.configuration.webpack.bower.dependencies
|
80
|
+
deps.add('normalize-css', '~3.0'}
|
81
|
+
deps.add('semantic-ui', '~2.0'}
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module SemanticUi
|
2
|
+
class LayoutGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('files', __dir__)
|
4
|
+
argument :layout_name, type: :string, default: 'application'
|
5
|
+
|
6
|
+
def overwrite_layout
|
7
|
+
copy_file 'layout.slim', "app/views/layout/#{layout_name.underscore}.html.slim", force: true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module SemanticUi
|
2
|
+
class UpdateGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('files', __dir__)
|
4
|
+
argument :layout_name, type: :string, default: 'application'
|
5
|
+
class_option :force, type: :boolean, default: false
|
6
|
+
|
7
|
+
def overwrite_layout
|
8
|
+
copy_file 'layout.slim', "app/views/layout/#{layout_name.underscore}.html.slim" if options.force?
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rails/semantic_ui'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class Rails::SemanticUI::Dependencies
|
2
|
+
def initialize(hashes)
|
3
|
+
@dependencies = hashes.map {|d| {}.merge d}
|
4
|
+
end
|
5
|
+
|
6
|
+
def add(name, version_spec)
|
7
|
+
@dependencies << {'name' => name, 'version' => version_spec}
|
8
|
+
end
|
9
|
+
|
10
|
+
def to_s
|
11
|
+
@dependencies.uniq!
|
12
|
+
@dependencies.to_yaml.lines[1..-1].map(&:rstrip).join("\n").gsub('"', "'").gsub /^/, ' '
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rails/semantic_ui'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :prepare do
|
2
|
+
desc 'Prepare Semantic UI'
|
3
|
+
task :semantic do
|
4
|
+
Dir.chdir 'app/webpack' do
|
5
|
+
sh 'gulp semantic-ui' do |ok, _|
|
6
|
+
fail 'Error in installing semantic-ui theme' unless ok
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
Rake::Task['prepare:webpack'].enhance ['prepare:semantic']
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-semantic-ui
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeong, Jiung
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails-webpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.2'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.2.2
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.2'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.2.2
|
47
|
+
description: Rails plugin for using semantic-ui with rails-webpack
|
48
|
+
email:
|
49
|
+
- ethernuiel@sanultari.com
|
50
|
+
executables: []
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- MIT-LICENSE
|
55
|
+
- README.rdoc
|
56
|
+
- Rakefile
|
57
|
+
- lib/generators/semantic_ui/files/layout.slim
|
58
|
+
- lib/generators/semantic_ui/files/resources/normalize.coffee
|
59
|
+
- lib/generators/semantic_ui/files/resources/semantic-ui.coffee
|
60
|
+
- lib/generators/semantic_ui/files/semantic-ui.coffee
|
61
|
+
- lib/generators/semantic_ui/install_generator.rb
|
62
|
+
- lib/generators/semantic_ui/layout_generator.rb
|
63
|
+
- lib/generators/semantic_ui/update_generator.rb
|
64
|
+
- lib/rails/semantic/ui.rb
|
65
|
+
- lib/rails/semantic_ui.rb
|
66
|
+
- lib/rails/semantic_ui/dependencies.rb
|
67
|
+
- lib/rails/semantic_ui/railtie.rb
|
68
|
+
- lib/rails/semantic_ui/version.rb
|
69
|
+
- lib/rails_semantic_ui.rb
|
70
|
+
- lib/tasks/semantic_ui.rake
|
71
|
+
homepage: https://github.com/astral1/rails-semantic-ui
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.4.5
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Rails plugin for using semantic-ui with rails-webpack
|
95
|
+
test_files: []
|