asset_packer 0.2.0 → 0.3.0

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: 3e37f7b09870b8072534b03416ba0a8c7d69f67f
4
- data.tar.gz: 446434d07ecd47d498a73f6bb025b6e362aeb306
3
+ metadata.gz: ad692d5ed52ae6a35bd2bd7b45fe012ca08e70e5
4
+ data.tar.gz: d0dcca9fe154df4e495a202fd6bab067c314abbd
5
5
  SHA512:
6
- metadata.gz: f4bfe009771b200a0762285f6ec7dfdb43be35f6807d4d25e98dc4a3d37a3215bfe9414dd99f86671cb0f6e3e91c5d931cfad6ef8946689362bc47210d7f6887
7
- data.tar.gz: bf3a6e5946c338387aa50c735a460b0202e7c0ef1811be37801a4f4522893961b6487cd329757553e33318fed69ad6eee79ae8905ef84fe56296636800c2cdc5
6
+ metadata.gz: bdfbf09422db53bbd0d51deec44fb6c94ad39673dcaec12efe331e80ca2dc1c3f8086d51df5d66541909f4a3439a9a216a715d0edce2d5f7022d0f6bbb4ad818
7
+ data.tar.gz: f2a2994f2de6ff7fccaf71015dbf3a543fcc3efa12a03bcb8a20235510febd7f70ef000fcacbf72c04d48e713132c1bf2c4782849f76ad45fad66f7e191b1fec
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  pkg
2
2
  scratch
3
+ Gemfile.lock
data/.travis.yml CHANGED
@@ -1,13 +1,19 @@
1
1
  language: ruby
2
+
2
3
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.1
4
+ - 2.1
5
+ - 2.2
6
+ - jruby
7
+ - jruby-head
6
8
  - rbx
7
9
  - ruby-head
10
+
11
+ sudo: false
12
+
8
13
  matrix:
9
14
  allow_failures:
10
15
  - rvm: ruby-head
11
- - rvm: 2.1.1
16
+ - rvm: jruby
17
+ - rvm: jruby-head
12
18
  - rvm: rbx
13
- script: bundle exec rake mutant
19
+ script: bundle exec rspec
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
- # A sample Gemfile
2
1
  source "https://rubygems.org"
3
2
 
4
3
  gemspec
@@ -47,7 +47,14 @@ module AssetPacker
47
47
  def extract_css_links(base_url)
48
48
  ->(content) do
49
49
  content.gsub(/url\(['"]?([^\)'"]*)['"]?\)/) {
50
- "url(../#{ save_asset(URI.join(full_source_uri, base_url, $1), File.extname($1)[1..-1]) })"
50
+ uri = URI.join(full_source_uri, base_url, $1)
51
+ puts uri
52
+ ext = File.extname($1)[1..-1]
53
+ # TODO check for media type, not URL
54
+ # using regex instead of checking ext because
55
+ # google font files don't work otherwise
56
+ block = extract_css_links(uri) if uri.to_s =~ /css/
57
+ "url(../#{ save_asset(uri, ext, &block) })"
51
58
  }
52
59
  end
53
60
  end
@@ -1,3 +1,3 @@
1
1
  module AssetPacker
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asset_packer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Brasseur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-14 00:00:00.000000000 Z
11
+ date: 2015-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hexp
@@ -108,7 +108,6 @@ files:
108
108
  - ".travis.yml"
109
109
  - Changelog.md
110
110
  - Gemfile
111
- - Gemfile.lock
112
111
  - LICENSE
113
112
  - README.md
114
113
  - Rakefile
@@ -159,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
158
  version: '0'
160
159
  requirements: []
161
160
  rubyforge_project:
162
- rubygems_version: 2.4.5
161
+ rubygems_version: 2.2.2
163
162
  signing_key:
164
163
  specification_version: 4
165
164
  summary: Create an offline version of a HTML file.
data/Gemfile.lock DELETED
@@ -1,102 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- asset_packer (0.2.0)
5
- hexp (~> 0.4.6)
6
- mime-types (~> 2.2)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- abstract_type (0.0.7)
12
- adamantium (0.2.0)
13
- ice_nine (~> 0.11.0)
14
- memoizable (~> 0.4.0)
15
- anima (0.2.0)
16
- abstract_type (~> 0.0.7)
17
- adamantium (~> 0.1)
18
- equalizer (~> 0.0.8)
19
- ast (2.0.0)
20
- concord (0.1.5)
21
- adamantium (~> 0.2.0)
22
- equalizer (~> 0.0.9)
23
- diff-lcs (1.2.5)
24
- equalizer (0.0.9)
25
- hexp (0.4.6)
26
- concord (~> 0.0)
27
- equalizer (~> 0.0)
28
- nokogiri (~> 1.6)
29
- ice_nine (0.11.1)
30
- memoizable (0.4.2)
31
- thread_safe (~> 0.3, >= 0.3.1)
32
- mime-types (2.4.3)
33
- mini_portile (0.6.2)
34
- morpher (0.2.3)
35
- abstract_type (~> 0.0.7)
36
- adamantium (~> 0.2.0)
37
- anima (~> 0.2.0)
38
- ast (~> 2.0.0)
39
- concord (~> 0.1.4)
40
- equalizer (~> 0.0.9)
41
- ice_nine (~> 0.11.0)
42
- procto (~> 0.0.2)
43
- mutant (0.7.8)
44
- abstract_type (~> 0.0.7)
45
- adamantium (~> 0.2.0)
46
- anima (~> 0.2.0)
47
- ast (~> 2.0)
48
- concord (~> 0.1.5)
49
- diff-lcs (~> 1.2)
50
- equalizer (~> 0.0.9)
51
- ice_nine (~> 0.11.1)
52
- memoizable (~> 0.4.2)
53
- morpher (~> 0.2.3)
54
- parallel (~> 1.3)
55
- parser (~> 2.2.0.2)
56
- procto (~> 0.0.2)
57
- unparser (~> 0.2.2)
58
- mutant-rspec (0.7.8)
59
- mutant (~> 0.7.8)
60
- rspec-core (>= 3.0.0, < 3.3.0)
61
- nokogiri (1.6.6.2)
62
- mini_portile (~> 0.6.0)
63
- parallel (1.4.1)
64
- parser (2.2.0.3)
65
- ast (>= 1.1, < 3.0)
66
- procto (0.0.2)
67
- rake (10.4.2)
68
- rspec (3.2.0)
69
- rspec-core (~> 3.2.0)
70
- rspec-expectations (~> 3.2.0)
71
- rspec-mocks (~> 3.2.0)
72
- rspec-core (3.2.2)
73
- rspec-support (~> 3.2.0)
74
- rspec-expectations (3.2.0)
75
- diff-lcs (>= 1.2.0, < 2.0)
76
- rspec-support (~> 3.2.0)
77
- rspec-its (1.2.0)
78
- rspec-core (>= 3.0.0)
79
- rspec-expectations (>= 3.0.0)
80
- rspec-mocks (3.2.1)
81
- diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.2.0)
83
- rspec-support (3.2.2)
84
- thread_safe (0.3.5)
85
- unparser (0.2.2)
86
- abstract_type (~> 0.0.7)
87
- adamantium (~> 0.2.0)
88
- concord (~> 0.1.5)
89
- diff-lcs (~> 1.2.5)
90
- equalizer (~> 0.0.9)
91
- parser (~> 2.2.0.2)
92
- procto (~> 0.0.2)
93
-
94
- PLATFORMS
95
- ruby
96
-
97
- DEPENDENCIES
98
- asset_packer!
99
- mutant-rspec
100
- rake (~> 10.2)
101
- rspec
102
- rspec-its