twitter-bootswatch-rails 3.1.0.0 → 3.1.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43655ecfb6c6aa2b6a8c07b3d823ea7fd11932c7
|
4
|
+
data.tar.gz: ae5891c9bfe1afc133037a11b33f255da1ab8383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f47d03a13890c7ac34b10ba2f21384d4a34988e9200e4ea35e6b7728273f725645bf5a7645550ef8b47ac021c475aaa1d59133e31b56b32c496669cf475fedd
|
7
|
+
data.tar.gz: 6367a2ed6fa82086ef194e7ff7f4d97c3d0adf368080269b3c2997dfc92d6acdb534eed4112e709dc36f6fde72377381ab9149a86f223e7c612c4a16a2fae204
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module Bootswatch
|
4
|
+
module Generators
|
5
|
+
class ImportGenerator < ::Rails::Generators::NamedBase
|
6
|
+
|
7
|
+
def theme_name
|
8
|
+
file_name
|
9
|
+
end
|
10
|
+
|
11
|
+
def theme_directory
|
12
|
+
if class_path.empty?
|
13
|
+
theme_name
|
14
|
+
else
|
15
|
+
class_path.first
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def theme_repo_url
|
20
|
+
"https://raw.github.com/thomaspark/bootswatch/gh-pages/#{theme_name}"
|
21
|
+
end
|
22
|
+
|
23
|
+
def import_less
|
24
|
+
|
25
|
+
stylesheets_dest_path = "app/assets/stylesheets/#{theme_directory}"
|
26
|
+
empty_directory stylesheets_dest_path
|
27
|
+
|
28
|
+
get File.join(theme_repo_url,'variables.less'), File.join(stylesheets_dest_path,'variables.less')
|
29
|
+
|
30
|
+
|
31
|
+
get File.join(theme_repo_url,'bootswatch.less'), File.join(stylesheets_dest_path,'bootswatch.css.less')
|
32
|
+
|
33
|
+
prepend_to_file File.join(stylesheets_dest_path,'bootswatch.css.less') do
|
34
|
+
"@import \"#{theme_directory}/base\";\n\n"
|
35
|
+
end
|
36
|
+
|
37
|
+
gsub_file File.join(stylesheets_dest_path,'variables.less'),
|
38
|
+
'"../img/glyphicons-halflings.png"',
|
39
|
+
'"twitter/bootstrap/glyphicons-halflings.png"'
|
40
|
+
|
41
|
+
gsub_file File.join(stylesheets_dest_path, 'variables.less'),
|
42
|
+
'"../fonts/"',
|
43
|
+
'"twitter/bootstrap/"'
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter-bootswatch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott V. Rosenthal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -90,6 +90,7 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- lib/twitter/bootswatch/rails/engine.rb
|
92
92
|
- lib/twitter/bootswatch/rails/version.rb
|
93
|
+
- lib/generators/bootswatch/import/import_generator.rb
|
93
94
|
- lib/generators/bootswatch/install/install_generator.rb
|
94
95
|
- lib/generators/bootswatch/install/templates/application.css.tt
|
95
96
|
- lib/generators/bootswatch/install/templates/application.js.tt
|