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: a55684eb64a0760b7ab44b4365b04b2746acea21
4
- data.tar.gz: 3339284d1d64dba67023ab88816591add3eebe6f
3
+ metadata.gz: 43655ecfb6c6aa2b6a8c07b3d823ea7fd11932c7
4
+ data.tar.gz: ae5891c9bfe1afc133037a11b33f255da1ab8383
5
5
  SHA512:
6
- metadata.gz: f1fab2a87eda6b5aca3a2b59d80931fe12ba1c708af26b1680973fca4f0a56d9dfbf25eeffd8ecf61c221071ae0aaacfa713d1b56bb2de3865ad57c006ec4ee5
7
- data.tar.gz: 9ff85cbb119b71d31db02b5eae434066e014a930bf09e26597038f2124b92ffdac89e623bb2d3026bec0535f98b88ad3f8b8c3ee0e1fe7e753eedb3e860a084c
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
@@ -1,7 +1,7 @@
1
1
  module Twitter
2
2
  module Bootswatch
3
3
  module Rails
4
- VERSION = '3.1.0.0'
4
+ VERSION = '3.1.0.1'
5
5
  end
6
6
  end
7
7
  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.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-03 00:00:00.000000000 Z
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