semantic-ui-sass 2.2.12.0 → 2.2.12.1

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: d43525537d078031ec900a4c4162d44aa6deb75f
4
- data.tar.gz: b95aed629d57a76f3270dc29d95a01cb810a611f
3
+ metadata.gz: 1d31e1a407e8c1e1fa82d10e0b9773ef74832569
4
+ data.tar.gz: ed3f6f54f8e4fbc18a87874c806e2f47c6aa13a7
5
5
  SHA512:
6
- metadata.gz: 4066ff54abe02b8260cf457b1ca79874f5d865d2b0aefa919a8f439aeb779ed362a262d016fc5301553c742029e7153ba8bf57935d0df2becbca1b9369d5394f
7
- data.tar.gz: df6cac208e5ff2606eec5b89c8f65fc4dbeb4b523cdb29aa5d9dd542f10c6eb6be0fe8cd1b56a770f7604a8e834d01e9492dd6fc12d2034aaac41b4abf2170ac
6
+ metadata.gz: 7d82550a51fedbf2445ecb0dfc69198f3b1739b789b9009affca45c75a951ad88f917ef0e5f9d2638ed532623b5649f787f2f7282d75f5343e61d53aa31bebb1
7
+ data.tar.gz: c8234aa306460d21eff5888741f0b6a5a8df8a3dccfa4a4f7df3ac8e20b5933d0ebe4064dd52f4d1eb698f9c977aabbbf4e6ade5de60fe24d60c2d062221240a
@@ -1,3 +1,7 @@
1
+ ## 2.2.12.1
2
+
3
+ * Add sprockets support #120
4
+
1
5
  ## 2.2.10.1
2
6
 
3
7
  * Fix flag.png path
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Semantic UI for Sass
2
2
 
3
- `semantic-ui-sass` is an Sass-powered version of [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and ready to drop into Rails & Compass.
3
+ `semantic-ui-sass` is an Sass-powered version of [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and ready to drop into Rails, Compass, or Sprockets.
4
4
 
5
5
  [![Build Status](https://travis-ci.org/doabit/semantic-ui-sass.svg?branch=master)](https://travis-ci.org/doabit/semantic-ui-sass)
6
6
 
@@ -11,12 +11,12 @@ The gem only has default theme.
11
11
  ## Installation and Usage
12
12
 
13
13
  ```ruby
14
- gem 'semantic-ui-sass', git: 'https://github.com/doabit/semantic-ui-sass.git'
14
+ gem 'semantic-ui-sass'
15
15
  ```
16
16
 
17
17
  `bundle install` and restart your server to make the files available through the pipeline.
18
18
 
19
- # semantic-ui-sass with Rails
19
+ # semantic-ui-sass with Rails or Sprockets
20
20
 
21
21
  ## CSS
22
22
 
@@ -2,21 +2,61 @@ module Semantic
2
2
  module Ui
3
3
  module Sass
4
4
  class FrameworkNotFound < StandardError; end
5
+ class << self
6
+ def load!
7
+ if defined?(::Rails)
8
+ require 'semantic/ui/sass/engine'
9
+ elsif defined?(::Compass)
10
+ ::Compass::Frameworks.register('semantic-ui', :path => base, :stylesheets_directory => stylesheets_path, :templates_directory => templates_path)
11
+ elsif defined?(::Sprockets)
12
+ Sprockets.append_path(stylesheets_path)
13
+ Sprockets.append_path(fonts_path)
14
+ Sprockets.append_path(images_path)
15
+ Sprockets.append_path(javascripts_path)
16
+ end
5
17
 
6
- if defined?(::Rails)
7
- require 'semantic/ui/sass/engine'
8
- end
18
+ configure_sass
19
+ if !(defined?(::Rails) || defined?(::Compass) || defined?(::Sprockets))
20
+ raise Semantic::Ui::Sass::FrameworkNotFound, "semantic-ui-sass requires either Rails > 3.1 or Compass, or Sprockets, none of which are loaded"
21
+ end
22
+ end
9
23
 
10
- if defined?(::Compass)
11
- base = File.join(File.dirname(__FILE__), '..')
12
- styles = File.join(base, 'app', 'assets', 'stylesheets')
13
- templates = File.join(base, 'templates')
14
- ::Compass::Frameworks.register('semantic-ui', :path => base, :stylesheets_directory => styles, :templates_directory => templates)
15
- end
24
+ # Paths
25
+ def gem_path
26
+ @gem_path ||= File.expand_path('..', File.dirname(__FILE__))
27
+ end
28
+
29
+ def templates_path
30
+ File.join(gem_path, 'templates')
31
+ end
32
+
33
+ def assets_path
34
+ @assets_path ||= File.join(gem_path, 'app', 'assets')
35
+ end
36
+
37
+ def fonts_path
38
+ File.join(assets_path, 'fonts')
39
+ end
40
+
41
+ def images_path
42
+ File.join(assets_path, 'images')
43
+ end
44
+
45
+ def javascripts_path
46
+ File.join(assets_path, 'javascripts')
47
+ end
48
+
49
+ def stylesheets_path
50
+ File.join(assets_path, 'stylesheets')
51
+ end
52
+
53
+ def configure_sass
54
+ require 'sass'
55
+ ::Sass.load_paths << stylesheets_path
56
+ end
16
57
 
17
- if !(defined?(::Rails) || defined?(::Compass))
18
- raise Semantic::Ui::Sass::FrameworkNotFound, "semantic-ui-sass requires either Rails > 3.1 or Compass, neither of which are loaded"
19
58
  end
20
59
  end
21
60
  end
22
61
  end
62
+ Semantic::Ui::Sass.load!
@@ -1,7 +1,7 @@
1
1
  module Semantic
2
2
  module Ui
3
3
  module Sass
4
- VERSION = "2.2.12.0"
4
+ VERSION = "2.2.12.1"
5
5
  SEMANTIC_UI_SHA = 'c159046eb2937b3ecfb65e5fa3fcee01c2fee459'
6
6
  end
7
7
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Semantic::Ui::Sass::VERSION
9
9
  spec.authors = ["doabit"]
10
10
  spec.email = ["doinsist@gmail.com"]
11
- spec.description = %q{Semantic UI, converted to Sass and ready to drop into Rails & Compass.}
12
- spec.summary = %q{Semantic UI, converted to Sass and ready to drop into Rails & Compass.}
11
+ spec.description = %q{Semantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.}
12
+ spec.summary = %q{Semantic UI, converted to Sass and ready to drop into Rails, Compass, or Sprockets.}
13
13
  spec.homepage = "http://github.com/doabit/semantic-ui-sass"
14
14
  spec.license = "MIT"
15
15
 
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_runtime_dependency 'sass', '>= 3.2'
24
24
  spec.add_development_dependency 'sass-rails', '>= 3.2'
25
+ spec.add_development_dependency 'sprockets-rails', '>= 2.1.3'
25
26
  spec.add_development_dependency 'pry'
26
27
  spec.add_development_dependency 'dotenv'
27
28
  spec.add_development_dependency 'rspec-rails', '>= 3.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic-ui-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.12.0
4
+ version: 2.2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - doabit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sprockets-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 2.1.3
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.1.3
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: pry
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -136,7 +150,8 @@ dependencies:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
152
  version: '0'
139
- description: Semantic UI, converted to Sass and ready to drop into Rails & Compass.
153
+ description: Semantic UI, converted to Sass and ready to drop into Rails, Compass,
154
+ or Sprockets.
140
155
  email:
141
156
  - doinsist@gmail.com
142
157
  executables: []
@@ -312,7 +327,8 @@ rubyforge_project:
312
327
  rubygems_version: 2.6.8
313
328
  signing_key:
314
329
  specification_version: 4
315
- summary: Semantic UI, converted to Sass and ready to drop into Rails & Compass.
330
+ summary: Semantic UI, converted to Sass and ready to drop into Rails, Compass, or
331
+ Sprockets.
316
332
  test_files:
317
333
  - spec/dummy/README.rdoc
318
334
  - spec/dummy/Rakefile