faenza-file-icons-rails 0.0.2 → 0.0.3
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: 192beba0267f91418cb1fb37c2c52ef673f44f36
|
4
|
+
data.tar.gz: c1b7aa69397debe6191966d82b06e0782efcf893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c73a9ab3f4c294c1e443e490946e32066703075b95151399e17aaa663840f6d9e79cad652fd07366c17a13f695ee351379b5bf0a0b865003ff3f4501422d649
|
7
|
+
data.tar.gz: 70ac20e5828dd736e17f2ab8ef7bf1fa7b668113c464addc213a40c0b37b28b7a55604c60a7bfee6f4ede5efd763f4deb98b0f8188698f5122e516ce555f76dd
|
@@ -1,19 +1,12 @@
|
|
1
|
-
class
|
1
|
+
class FaenzaGenerator < Rails::Generators::Base
|
2
|
+
desc "This generator creates an initializer file at config/initializers"
|
2
3
|
source_root File.expand_path('../resources', __FILE__)
|
3
4
|
|
4
|
-
def
|
5
|
-
"filetype-icons"
|
6
|
-
end
|
7
|
-
|
8
|
-
def icons_destination_dir
|
9
|
-
"app/assets/images"
|
10
|
-
end
|
11
|
-
|
12
|
-
def copy_icons
|
5
|
+
def generate_icons
|
13
6
|
directory self.icons_source_dir, self.icons_destination_dir + "/" + self.icons_source_dir
|
14
7
|
end
|
15
8
|
|
16
|
-
def
|
9
|
+
def generate_known_types_initializer
|
17
10
|
initializer_content = "FAENZA_ICONS_FILES = { \n"
|
18
11
|
Dir.chdir(self.icons_destination_dir) do
|
19
12
|
icons = Dir[self.icons_source_dir + "/*.png"]
|
@@ -31,4 +24,14 @@ class FaenzaFileIconsGenerator < Rails::Generators::Base
|
|
31
24
|
#puts icons
|
32
25
|
create_file "config/initializers/filetype_icons_faenza_rails.rb", initializer_content
|
33
26
|
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def icons_source_dir
|
31
|
+
"filetype-icons"
|
32
|
+
end
|
33
|
+
|
34
|
+
def icons_destination_dir
|
35
|
+
"app/assets/images"
|
36
|
+
end
|
34
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faenza-file-icons-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yavor Stoychev
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- Rakefile
|
38
38
|
- lib/faenza_file_icons_rails.rb
|
39
39
|
- lib/faenza_file_icons_rails/version.rb
|
40
|
-
- lib/generators/
|
40
|
+
- lib/generators/faenza_generator.rb
|
41
41
|
- lib/generators/resources/filetype-icons/filetype-3gp.png
|
42
42
|
- lib/generators/resources/filetype-icons/filetype-7z.png
|
43
43
|
- lib/generators/resources/filetype-icons/filetype-ace.png
|