extract_files 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -16,3 +16,4 @@ end
16
16
  CLEAN.add 'bin/extract_files'
17
17
 
18
18
 
19
+ task :default => [:clean, 'bin/extract_files', :test]
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module ExtractFiles
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
 
6
6
  extend self
7
7
 
@@ -9,7 +9,8 @@ Gem::Specification.new do |s|
9
9
  s.email = ["guillermo@cientifico.net"]
10
10
  s.homepage = "https://github.com/guillermo/extract_files"
11
11
  s.summary = %q{Extract files from stdin or files given an extension/extensions}
12
- s.description = File.read('README.md')
12
+ s.description = %q{Tired of generating big builds for the cdn? Just want to know wich files your designers in their css are really using? The images of all the static fiels? extract_files look inside json, html, css, and look for files based on a given extension or extensions.
13
+ run extract_files -h to have more help.}
13
14
 
14
15
  s.rubyforge_project = "extract_files"
15
16
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module ExtractFiles
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
 
5
5
  extend self
6
6
 
metadata CHANGED
@@ -1,65 +1,48 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: extract_files
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
6
11
  platform: ruby
7
- authors:
8
- - Guillermo Álvarez
12
+ authors:
13
+ - "Guillermo A\xCC\x81lvarez"
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-02-11 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-02-11 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: minitest
16
- requirement: &70282753354860 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
22
32
  type: :development
23
- prerelease: false
24
- version_requirements: *70282753354860
25
- description: ! "# extract_files\n\nExtract files from files or stdin for a given extension.\n\n##
26
- Yes, but i can do that with sed.\n\nI know. Before this I use this snippet:\n\n
27
- \ for css_file in `find css -name \"*.css\" ` ; do sed -n 's/^.*url *( *\"*\\'\"'\"'*\\([^\"]*\\)\\'\"'\"'*\"*
28
- *).*$/'`dirname $css_file`'\\/\\1/p' $css_file ; done | ruby -n -e \"puts File.expand_path(\\$_)[File.expand_path('.').size+1..-1]\"\n\nProbably
29
- could be improve.\n\n\n## Usage\n\nGiven a css file with absolute and relative images\n\n\t\t$
30
- cat style.css\n\t\tbody {\n\t\t\tbackground: url(../images/bg.jpg), url ( ../images/bg2.jpg
31
- );\n\t\t\tbackground: url(\"../images/bg3.jpg\");\n\t\t\tbackground: url('/images/bg4.jpg);\n\t\t\tbackground:
32
- url('images/bg5.jpg');\n\t\t}\n\nExtract the images only ``-e jpg -e png -e gif``\n\n\t\t$
33
- cat style.css | extract_files -e jpg\n\t\t../images/bg.jpg\n\t\t../images/bg2.jpg\n\t\t../images/bg3.jpg\n\t\t/images/bg4.jpg\n\t\timages/bg5.jpg\n\nNow,
34
- relative to the css directory ``-b css``\n\n\t\t$ cat style.css | extract_files
35
- \ -e jpg -b css\n\t\tcss/../images/bg.jpg\n\t\tcss/../images/bg2.jpg\n\t\tcss/../images/bg3.jpg\n\t\tcss/images/bg4.jpg\n\t\tcss/images/bg5.jpg\n\nAnd
36
- do the path expansion ``-p``.\n\n\t\t$ cat style.css | extract_files -e jpg -b
37
- css -p\n\t\timages/bg.jpg\n\t\timages/bg2.jpg\n\t\timages/bg3.jpg\n\t\tcss/images/bg4.jpg\n\t\tcss/images/bg5.jpg\n\nOr
38
- show the full path ``-f``.\n\n\t\t$ cat style.css | extract_files -e jpg -b css
39
- -p -f\n\t\t/Users/guillermo/Documents/extract_files/images/bg.jpg\n\t\t/Users/guillermo/Documents/extract_files/images/bg2.jpg\n\t\t/Users/guillermo/Documents/extract_files/images/bg3.jpg\n\t\t/Users/guillermo/Documents/extract_files/css/images/bg4.jpg\n\t\t/Users/guillermo/Documents/extract_files/css/images/bg5.jpg\n\n\n\nYou
40
- can pass the file/files directly: \n\n\t\t$ extract_files * -e png\n\t\timage1.png\n\t\t/images/img1.png\n\n\n##
41
- Install\n\nThere are two ways of installing this small libbrary:\n\n### Rubygems\n\n
42
- \ $ gem install extract_files\n\nYou will have the code as a library and the binary\n\n###
43
- Script only\n\n\t\tcurl -O https://raw.github.com/guillermo/extract_files/master/bin/extract_files\n\t\tchmod
44
- +x extract_files\n\n## Development\n\nThe script is generated automatically with
45
- rake, so if you fork, ensure that you edit the correct files.\n\n## License\n\n<pre>\n
46
- ____ __ __ \n| __ ) ___ ___ _ _\\ \\ / /_
47
- _ _ __ ___ \n| _ \\ / _ \\/ _ \\ '__\\ \\ /\\ / / _` | '__/ _ \\\n| |_) | __/
48
- \ __/ | \\ V V / (_| | | | __/\n|____/ \\___|\\___|_| \\_/\\_/ \\__,_|_|
49
- \ \\___|\n \n _ _ \n|
50
- | (_) ___ ___ _ __ ___ ___ \n| | | |/ __/ _ \\ '_ \\/ __|/ _ \\\n| |___| |
51
- (_| __/ | | \\__ \\ __/\n|_____|_|\\___\\___|_| |_|___/\\___|\n \n----------------------------------------------------------------------------\n\"THE
52
- BEER-WARE LICENSE\" (Revision 42):\nguillermo@cientifico.net wrote this file. As
53
- long as you retain this \nnotice you can do whatever you want with this stuff. If
54
- we meet some day,\nand you think this stuff is worth it, you can buy me a beer in
55
- return \nGuillermo Alvarez Fernandez\n----------------------------------------------------------------------------\n\n</pre>\n\n"
56
- email:
33
+ version_requirements: *id001
34
+ description: |-
35
+ Tired of generating big builds for the cdn? Just want to know wich files your designers in their css are really using? The images of all the static fiels? extract_files look inside json, html, css, and look for files based on a given extension or extensions.
36
+ run extract_files -h to have more help.
37
+ email:
57
38
  - guillermo@cientifico.net
58
- executables:
39
+ executables:
59
40
  - extract_files
60
41
  extensions: []
42
+
61
43
  extra_rdoc_files: []
62
- files:
44
+
45
+ files:
63
46
  - .gitignore
64
47
  - .travis.yml
65
48
  - Gemfile
@@ -76,29 +59,38 @@ files:
76
59
  - test/fixtures/style.css
77
60
  homepage: https://github.com/guillermo/extract_files
78
61
  licenses: []
62
+
79
63
  post_install_message:
80
64
  rdoc_options: []
81
- require_paths:
65
+
66
+ require_paths:
82
67
  - lib
83
- required_ruby_version: !ruby/object:Gem::Requirement
68
+ required_ruby_version: !ruby/object:Gem::Requirement
84
69
  none: false
85
- requirements:
86
- - - ! '>='
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
- required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
78
  none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
95
86
  requirements: []
87
+
96
88
  rubyforge_project: extract_files
97
- rubygems_version: 1.8.10
89
+ rubygems_version: 1.8.15
98
90
  signing_key:
99
91
  specification_version: 3
100
92
  summary: Extract files from stdin or files given an extension/extensions
101
- test_files:
93
+ test_files:
102
94
  - test/extract_files_test.rb
103
95
  - test/fixtures/files.json
104
96
  - test/fixtures/index.html