rails-semantic-ui 0.1.4 → 0.2.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 +4 -4
- data/Rakefile +0 -6
- data/lib/generators/semantic_ui/install_generator.rb +12 -25
- data/lib/generators/semantic_ui/layout_generator.rb +2 -1
- data/lib/rails/semantic_ui.rb +0 -2
- data/lib/rails/semantic_ui/version.rb +1 -1
- metadata +6 -10
- data/MIT-LICENSE +0 -20
- data/README.rdoc +0 -3
- data/lib/generators/semantic_ui/update_generator.rb +0 -11
- data/lib/rails/semantic_ui/dependencies.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8627135e7a2b87ecd9917a3dbc9172b98f925ea9
|
4
|
+
data.tar.gz: e9806b5c04b8cca89e27bc1689fe34c2cf41de3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc22b42301227a0b377796997ba248d55e652e13bbcabb131924a8f6bfa7f2427c0decfd10ab6cacf95f204effb79de936295818909baaaee77c5b72c9b91c1f
|
7
|
+
data.tar.gz: 2818de14a2386275f207ccebfa853ef8b44296d0e74c3535be709137dbb08bae21e2933569d7b0f0ee8423f7323f2d575caa9cf59c97f62f1e68a932ebdf1e8f
|
data/Rakefile
CHANGED
@@ -1,23 +1,22 @@
|
|
1
|
-
require 'rails/semantic_ui'
|
2
|
-
|
3
1
|
module SemanticUi
|
4
2
|
class InstallGenerator < Rails::Generators::Base
|
3
|
+
include Rails::Webpack::Actions
|
5
4
|
source_root File.expand_path('files', __dir__)
|
5
|
+
class_option :'skip-install', type: :boolean, aliases: :i, desc: 'Skip installation and webpack steps'
|
6
|
+
class_option :'skip', type: :boolean, aliases: :s, desc: 'Skip all additional steps. this option implied to set "--skip-install"'
|
6
7
|
|
7
8
|
def install_tasks
|
8
9
|
copy_file 'semantic-ui.coffee', 'app/webpack/tasks/semantic-ui.coffee'
|
9
10
|
end
|
10
11
|
|
11
|
-
def
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
12
|
+
def update_dependencies
|
13
|
+
dependencies do
|
14
|
+
bower 'normalize-css', '~3.0'
|
15
|
+
bower 'semantic-ui', '~2.0'
|
16
16
|
|
17
|
-
|
18
|
-
|
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
|
17
|
+
npm_develop 'file-loader', '~0.8'
|
18
|
+
npm_develop 'expose-loader', '~0.7'
|
19
|
+
end
|
21
20
|
end
|
22
21
|
|
23
22
|
def install_assets
|
@@ -59,27 +58,15 @@ module SemanticUi
|
|
59
58
|
end
|
60
59
|
|
61
60
|
def sync
|
61
|
+
return if options[:skip]
|
62
62
|
rake 'webpack:sync'
|
63
63
|
end
|
64
64
|
|
65
65
|
def initial_build
|
66
|
+
return if options[:'skip-install'] || options[:skip]
|
66
67
|
rake 'npm:install'
|
67
68
|
rake 'gulp:webpack'
|
68
69
|
rake 'prepare:semantic'
|
69
70
|
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
71
|
end
|
85
72
|
end
|
@@ -2,9 +2,10 @@ module SemanticUi
|
|
2
2
|
class LayoutGenerator < Rails::Generators::Base
|
3
3
|
source_root File.expand_path('files', __dir__)
|
4
4
|
argument :layout_name, type: :string, default: 'application'
|
5
|
+
class_option :force, type: :boolean, default: false, aliases: :f
|
5
6
|
|
6
7
|
def overwrite_layout
|
7
|
-
copy_file 'layout.slim', "app/views/layout/#{layout_name.underscore}.html.slim", force:
|
8
|
+
copy_file 'layout.slim', "app/views/layout/#{layout_name.underscore}.html.slim", force: options[:force]
|
8
9
|
end
|
9
10
|
end
|
10
11
|
end
|
data/lib/rails/semantic_ui.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-semantic-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeong, Jiung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,20 +30,20 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.3'
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: 0.
|
36
|
+
version: 0.3.1
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.3'
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.3.1
|
47
47
|
description: Rails plugin for using semantic-ui with rails-webpack
|
48
48
|
email:
|
49
49
|
- ethernuiel@sanultari.com
|
@@ -51,8 +51,6 @@ executables: []
|
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
|
-
- MIT-LICENSE
|
55
|
-
- README.rdoc
|
56
54
|
- Rakefile
|
57
55
|
- lib/generators/semantic_ui/files/layout.slim
|
58
56
|
- lib/generators/semantic_ui/files/resources/normalize.coffee
|
@@ -60,10 +58,8 @@ files:
|
|
60
58
|
- lib/generators/semantic_ui/files/semantic-ui.coffee
|
61
59
|
- lib/generators/semantic_ui/install_generator.rb
|
62
60
|
- lib/generators/semantic_ui/layout_generator.rb
|
63
|
-
- lib/generators/semantic_ui/update_generator.rb
|
64
61
|
- lib/rails/semantic/ui.rb
|
65
62
|
- lib/rails/semantic_ui.rb
|
66
|
-
- lib/rails/semantic_ui/dependencies.rb
|
67
63
|
- lib/rails/semantic_ui/railtie.rb
|
68
64
|
- lib/rails/semantic_ui/version.rb
|
69
65
|
- lib/rails_semantic_ui.rb
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
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
DELETED
@@ -1,11 +0,0 @@
|
|
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
|
@@ -1,14 +0,0 @@
|
|
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
|