swf_ruby 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +3 -1
- data/lib/swf_ruby/swf/focalgradient.rb +1 -1
- data/lib/swf_ruby/swf/gradient.rb +1 -1
- data/lib/swf_ruby/swf_tamperer.rb +1 -1
- data/lib/swf_ruby/version.rb +1 -1
- data/swf_ruby.gemspec +1 -1
- metadata +34 -44
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
SwfRuby
|
2
2
|
=======
|
3
3
|
|
4
|
+
[](http://coderwall.com/tmtysk)
|
5
|
+
|
4
6
|
SwfRuby is a utilities to dump or manipulate a SWF with Ruby.
|
5
7
|
|
6
8
|
* features
|
@@ -10,7 +12,7 @@ SwfRuby is a utilities to dump or manipulate a SWF with Ruby.
|
|
10
12
|
* SwfRuby::SwfTamperer
|
11
13
|
* Manipulating(replagcing) resources in SWF.
|
12
14
|
* Used from 'swf_jpeg_replace', 'swf_lossless_replace', 'swf_as_var_replace' and 'swf_sprite_replace' command.
|
13
|
-
* compatible on ruby-1.8.7 and ruby-1.9.
|
15
|
+
* compatible on ruby-1.8.7 and ruby-1.9.3.
|
14
16
|
|
15
17
|
Dependencies
|
16
18
|
============
|
@@ -13,7 +13,7 @@ module SwfRuby
|
|
13
13
|
|
14
14
|
def initialize(bytearray, shape_version)
|
15
15
|
@shape_version = shape_version
|
16
|
-
bits_str = bytearray[0, 1].unpack("B").first
|
16
|
+
bits_str = bytearray[0, 1].unpack("B*").first
|
17
17
|
@spread_mode = bits_str[0, 2].to_i(2)
|
18
18
|
@interpolation_mode = bits_str[2, 2].to_i(2)
|
19
19
|
@num_gradients = bits_str[4, 4].to_i(2)
|
@@ -12,7 +12,7 @@ module SwfRuby
|
|
12
12
|
|
13
13
|
def initialize(bytearray, shape_version)
|
14
14
|
@shape_version = shape_version
|
15
|
-
bits_str = bytearray[0, 1].unpack("B").first
|
15
|
+
bits_str = bytearray[0, 1].unpack("B*").first
|
16
16
|
@spread_mode = bits_str[0, 2].to_i(2)
|
17
17
|
@interpolation_mode = bits_str[2, 2].to_i(2)
|
18
18
|
@num_gradients = bits_str[4, 4].to_i(2)
|
@@ -143,7 +143,7 @@ module SwfRuby
|
|
143
143
|
else
|
144
144
|
raise ReplaceTargetError
|
145
145
|
end
|
146
|
-
elsif format == 5
|
146
|
+
elsif lossless.format == 5
|
147
147
|
if org_format == 3
|
148
148
|
org_image_length = swf[offset+2, 4].unpack("i").first - 8
|
149
149
|
delta_length = lossless.zlib_bitmap_data.size - org_image_length - 1
|
data/lib/swf_ruby/version.rb
CHANGED
data/swf_ruby.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "swf_ruby"
|
7
7
|
s.version = SwfRuby::VERSION
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = []
|
9
|
+
s.authors = ["tmtysk"]
|
10
10
|
s.email = []
|
11
11
|
s.homepage = "http://github.com/tmtysk/swf_ruby"
|
12
12
|
s.summary = "Utilities to dump or manipulate Swf binary file."
|
metadata
CHANGED
@@ -1,54 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: swf_ruby
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.2.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
|
7
|
+
authors:
|
8
|
+
- tmtysk
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: bundler
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &89664670 !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
24
21
|
version: 1.0.0.rc.5
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rmagick
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: *89664670
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rmagick
|
27
|
+
requirement: &89664450 !ruby/object:Gem::Requirement
|
31
28
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
35
32
|
version: 2.13.0
|
36
33
|
type: :runtime
|
37
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *89664450
|
38
36
|
description: SwfRuby is utilities to dump or manipulate Swf binary file.
|
39
37
|
email: []
|
40
|
-
|
41
|
-
executables:
|
38
|
+
executables:
|
42
39
|
- swf_dump
|
43
40
|
- swf_jpeg_replace
|
44
41
|
- swf_lossless_replace
|
45
42
|
- swf_as_var_replace
|
46
43
|
- swf_sprite_replace
|
47
44
|
extensions: []
|
48
|
-
|
49
45
|
extra_rdoc_files: []
|
50
|
-
|
51
|
-
files:
|
46
|
+
files:
|
52
47
|
- .bundle/config
|
53
48
|
- .gitignore
|
54
49
|
- COPYING
|
@@ -89,33 +84,28 @@ files:
|
|
89
84
|
- samples/icon.gif
|
90
85
|
- samples/sample.swf
|
91
86
|
- swf_ruby.gemspec
|
92
|
-
has_rdoc: true
|
93
87
|
homepage: http://github.com/tmtysk/swf_ruby
|
94
88
|
licenses: []
|
95
|
-
|
96
89
|
post_install_message:
|
97
90
|
rdoc_options: []
|
98
|
-
|
99
|
-
require_paths:
|
91
|
+
require_paths:
|
100
92
|
- lib
|
101
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
94
|
none: false
|
103
|
-
requirements:
|
104
|
-
- -
|
105
|
-
- !ruby/object:Gem::Version
|
106
|
-
version:
|
107
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
100
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
112
104
|
version: 1.3.6
|
113
105
|
requirements: []
|
114
|
-
|
115
106
|
rubyforge_project: swf_ruby
|
116
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.8.11
|
117
108
|
signing_key:
|
118
109
|
specification_version: 3
|
119
110
|
summary: Utilities to dump or manipulate Swf binary file.
|
120
111
|
test_files: []
|
121
|
-
|