h2ocube_rails_assets 0.0.23 → 0.0.24

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: a72ab58f147ba57a492ef002753af5487c78637e
4
- data.tar.gz: 8e9e20d44012c2e52632a2f9dc6ae6100db6e763
3
+ metadata.gz: 0858598adafc7857c6887e654af1796c6fca23d2
4
+ data.tar.gz: be43d4610e0bd27fc8beb999680daaf11117f0b9
5
5
  SHA512:
6
- metadata.gz: a8b11d837f7b36afe36fbe210e92b9c0d92bec35db6f916f4dcb34ef96ebb2d35340c57743f7b9ef89e7c4769a7c068af8ded84e0b23eca80a57d0b4c7949430
7
- data.tar.gz: 09b79699c0beac307e4dbae3be0e437aa227a7cab50f8b0212af7842534eb5effe2d481a42db44723c247ffb897595e92fef200820965d58d50f38d9346f9253
6
+ metadata.gz: 0db802c3e66584d1e10f44bf148e0447c2344ac778a5e431918326490cda47690f926e23ee86d60db903bb22388b7bedc65e0b119e804712608ce60b17efab41
7
+ data.tar.gz: de86cbab0d5b7cd9e85831d92d8177d2f9e6f2a1dbc3fbde53e90d30c7a1918574609a395e5ab5ae86b54a1672a24adbc84660a4bff33e623edf08725ebf1189
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ tmp
18
18
  log
19
19
  *.sublime-workspace
20
20
  *.zip
21
+ .DS_Store
data/README.md CHANGED
@@ -44,6 +44,7 @@ Or install it yourself as:
44
44
  #=require backbone
45
45
  #=require turbolinks
46
46
  #=require jquery.turbolinks
47
+ #=require semantic
47
48
 
48
49
  @import compass
49
50
  @import jquery.ui
@@ -55,6 +56,7 @@ Or install it yourself as:
55
56
  @import bootstrap3
56
57
  @import normalize
57
58
  @import jasny-bootstrap
59
+ @import semantic
58
60
 
59
61
  ## Contributing
60
62
 
data/Vendorfile CHANGED
@@ -18,14 +18,33 @@ def get_zip to, url
18
18
  end
19
19
  end
20
20
 
21
- def cp_img to, from
21
+ def cp_img to, from, clear = true
22
22
  FileUtils.mkdir_p to
23
- FileUtils.rm Dir.glob("#{to}/*")
23
+ FileUtils.rm Dir.glob("#{to}/*") if clear
24
24
  Dir["#{from}/*"].select{ |f| /\.(eot|svg|ttf|woff|gif|png|jpe?g)$/ =~ f }.each do |f|
25
25
  FileUtils.cp f, "#{to}/#{File.basename f}"
26
26
  end
27
27
  end
28
28
 
29
+ # semantic-ui
30
+ get_zip "#{vendor_tmp}semantic", 'http://semantic-ui.com/release/semantic.zip'
31
+ FileUtils.cp "#{vendor_tmp}semantic/packaged/css/semantic.min.css", "#{vendor_css}semantic.scss"
32
+ FileUtils.cp "#{vendor_tmp}semantic/packaged/javascript/semantic.min.js", "#{vendor_js}semantic.js"
33
+ cp_img "#{vendor_img}semantic", "#{vendor_tmp}semantic/packaged/images"
34
+ cp_img "#{vendor_img}semantic", "#{vendor_tmp}semantic/packaged/fonts", false
35
+
36
+ body = File.read("#{vendor_css}semantic.scss").gsub(/url\([^\)]+\)/){ |s|
37
+ filename = s.gsub(/url\(..\/(images|fonts)\//, '').gsub(')', '')
38
+ "image-url(\"semantic/#{filename}\")"
39
+ }
40
+
41
+ File.open("#{vendor_css}semantic.scss", 'w') do |f|
42
+ f.write body
43
+ end
44
+
45
+ FileUtils.rm "#{vendor_tmp}semantic.zip"
46
+ FileUtils.remove_dir "#{vendor_tmp}semantic"
47
+
29
48
  # jquery
30
49
  get "#{vendor_js}jquery/1.8.js", 'http://code.jquery.com/jquery-1.8.3.min.js'
31
50
  get "#{vendor_js}jquery/1.9.js", 'http://code.jquery.com/jquery-1.9.1.min.js'
@@ -145,10 +164,10 @@ FileUtils.remove_dir "#{vendor_tmp}bootstrap"
145
164
 
146
165
  # bootstrap3
147
166
  version = '3.0.0'
148
- get_zip "#{vendor_tmp}bootstrap", "https://github.com/twbs/bootstrap/releases/download/v#{version}/bootstrap-#{version}-dist.zip"
167
+ get_zip "#{vendor_tmp}bootstrap", "https://github.com/twbs/bootstrap/archive/v#{version}.zip"
149
168
 
150
- FileUtils.cp "#{vendor_tmp}bootstrap/dist/js/bootstrap.min.js", "#{vendor_js}bootstrap3.js"
151
- FileUtils.cp "#{vendor_tmp}bootstrap/dist/css/bootstrap.min.css", "#{vendor_css}bootstrap3.scss"
169
+ FileUtils.cp "#{vendor_tmp}bootstrap/bootstrap-#{version}/dist/js/bootstrap.min.js", "#{vendor_js}bootstrap3.js"
170
+ FileUtils.cp "#{vendor_tmp}bootstrap/bootstrap-#{version}/dist/css/bootstrap.min.css", "#{vendor_css}bootstrap3.scss"
152
171
 
153
172
  body = File.read("#{vendor_css}bootstrap3.scss").gsub(/url\([^\)]+\)/){ |s|
154
173
  filename = s.gsub("url('../fonts/", '').gsub("')", '')
@@ -159,11 +178,11 @@ File.open("#{vendor_css}bootstrap3.scss", 'w') do |f|
159
178
  f.write body
160
179
  end
161
180
 
162
- cp_img "#{vendor_img}bootstrap3", "#{vendor_tmp}bootstrap/dist/fonts"
181
+ cp_img "#{vendor_img}bootstrap3", "#{vendor_tmp}bootstrap/bootstrap-#{version}/dist/fonts"
163
182
 
164
183
  FileUtils.rm "#{vendor_tmp}bootstrap.zip"
165
184
  FileUtils.remove_dir "#{vendor_tmp}bootstrap"
166
- exit
185
+
167
186
  # underscore
168
187
  get "#{vendor_js}underscore.js", 'http://underscorejs.org/underscore-min.js'
169
188
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = 'h2ocube_rails_assets'
7
- gem.version = '0.0.23'
7
+ gem.version = '0.0.24'
8
8
  gem.authors = ['Ben']
9
9
  gem.email = ['ben@h2ocube.com']
10
10
  gem.description = %q{Just an assets collection}