kindle-drm 0.5.0 → 0.8.0
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/.project +17 -0
 - data/VERSION +1 -1
 - data/kindle-drm.gemspec +4 -3
 - data/lib/kindle/drm.rb +3 -1
 - metadata +19 -9
 
    
        data/.project
    ADDED
    
    | 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <?xml version="1.0" encoding="UTF-8"?>
         
     | 
| 
      
 2 
     | 
    
         
            +
            <projectDescription>
         
     | 
| 
      
 3 
     | 
    
         
            +
            	<name>kindle-drm</name>
         
     | 
| 
      
 4 
     | 
    
         
            +
            	<comment></comment>
         
     | 
| 
      
 5 
     | 
    
         
            +
            	<projects>
         
     | 
| 
      
 6 
     | 
    
         
            +
            	</projects>
         
     | 
| 
      
 7 
     | 
    
         
            +
            	<buildSpec>
         
     | 
| 
      
 8 
     | 
    
         
            +
            		<buildCommand>
         
     | 
| 
      
 9 
     | 
    
         
            +
            			<name>org.rubypeople.rdt.core.rubybuilder</name>
         
     | 
| 
      
 10 
     | 
    
         
            +
            			<arguments>
         
     | 
| 
      
 11 
     | 
    
         
            +
            			</arguments>
         
     | 
| 
      
 12 
     | 
    
         
            +
            		</buildCommand>
         
     | 
| 
      
 13 
     | 
    
         
            +
            	</buildSpec>
         
     | 
| 
      
 14 
     | 
    
         
            +
            	<natures>
         
     | 
| 
      
 15 
     | 
    
         
            +
            		<nature>org.rubypeople.rdt.core.rubynature</nature>
         
     | 
| 
      
 16 
     | 
    
         
            +
            	</natures>
         
     | 
| 
      
 17 
     | 
    
         
            +
            </projectDescription>
         
     | 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.8.0
         
     | 
    
        data/kindle-drm.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{kindle-drm}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.8.0"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Preston Lee", "Igor Skochinsky"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = %q{2010-02- 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2010-02-20}
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.default_executable = %q{serial_to_pid.rb}
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.description = %q{A Ruby library for performing DRM-related operations on .mobi files, know as DRM'd .azw files on the Amazon Kindle.}
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.email = %q{conmotto@gmail.com}
         
     | 
| 
         @@ -21,6 +21,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       21 
21 
     | 
    
         
             
              s.files = [
         
     | 
| 
       22 
22 
     | 
    
         
             
                ".document",
         
     | 
| 
       23 
23 
     | 
    
         
             
                 ".gitignore",
         
     | 
| 
      
 24 
     | 
    
         
            +
                 ".project",
         
     | 
| 
       24 
25 
     | 
    
         
             
                 "LICENSE",
         
     | 
| 
       25 
26 
     | 
    
         
             
                 "README.rdoc",
         
     | 
| 
       26 
27 
     | 
    
         
             
                 "Rakefile",
         
     | 
| 
         @@ -35,7 +36,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       35 
36 
     | 
    
         
             
              s.homepage = %q{http://github.com/preston/kindle-drm}
         
     | 
| 
       36 
37 
     | 
    
         
             
              s.rdoc_options = ["--charset=UTF-8"]
         
     | 
| 
       37 
38 
     | 
    
         
             
              s.require_paths = ["lib"]
         
     | 
| 
       38 
     | 
    
         
            -
              s.rubygems_version = %q{1.3. 
     | 
| 
      
 39 
     | 
    
         
            +
              s.rubygems_version = %q{1.3.6}
         
     | 
| 
       39 
40 
     | 
    
         
             
              s.summary = %q{Amazon Kindle .azw file manipulation library.}
         
     | 
| 
       40 
41 
     | 
    
         
             
              s.test_files = [
         
     | 
| 
       41 
42 
     | 
    
         
             
                "test/helper.rb",
         
     | 
    
        data/lib/kindle/drm.rb
    CHANGED
    
    | 
         @@ -35,7 +35,9 @@ module Kindle 
     | 
|
| 
       35 
35 
     | 
    
         
             
            			crc = crc32(s)  
         
     | 
| 
       36 
36 
     | 
    
         
             
            			arr1 = Array.new(l, 0)
         
     | 
| 
       37 
37 
     | 
    
         
             
            			for i in 0..(s.length - 1) do
         
     | 
| 
       38 
     | 
    
         
            -
            				 
     | 
| 
      
 38 
     | 
    
         
            +
            				code = s[i]
         
     | 
| 
      
 39 
     | 
    
         
            +
            				code = code.ord if code.class == String # Fix for Ruby 1.9+
         
     | 
| 
      
 40 
     | 
    
         
            +
            				arr1[i%l] ^= code
         
     | 
| 
       39 
41 
     | 
    
         
             
            			end
         
     | 
| 
       40 
42 
     | 
    
         | 
| 
       41 
43 
     | 
    
         
             
            			# Grab each CRC byte and OR with a portion of the 
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: kindle-drm
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
      
 4 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 5 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 8
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.8.0
         
     | 
| 
       5 
10 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
11 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
12 
     | 
    
         
             
            - Preston Lee
         
     | 
| 
         @@ -10,19 +15,21 @@ autorequire: 
     | 
|
| 
       10 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
17 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            date: 2010-02- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2010-02-20 00:00:00 -07:00
         
     | 
| 
       14 
19 
     | 
    
         
             
            default_executable: serial_to_pid.rb
         
     | 
| 
       15 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       16 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       17 
22 
     | 
    
         
             
              name: thoughtbot-shoulda
         
     | 
| 
       18 
     | 
    
         
            -
               
     | 
| 
       19 
     | 
    
         
            -
               
     | 
| 
       20 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 23 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 24 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       21 
25 
     | 
    
         
             
                requirements: 
         
     | 
| 
       22 
26 
     | 
    
         
             
                - - ">="
         
     | 
| 
       23 
27 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 28 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 29 
     | 
    
         
            +
                    - 0
         
     | 
| 
       24 
30 
     | 
    
         
             
                    version: "0"
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
      
 31 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 32 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
       26 
33 
     | 
    
         
             
            description: A Ruby library for performing DRM-related operations on .mobi files, know as DRM'd .azw files on the Amazon Kindle.
         
     | 
| 
       27 
34 
     | 
    
         
             
            email: conmotto@gmail.com
         
     | 
| 
       28 
35 
     | 
    
         
             
            executables: 
         
     | 
| 
         @@ -35,6 +42,7 @@ extra_rdoc_files: 
     | 
|
| 
       35 
42 
     | 
    
         
             
            files: 
         
     | 
| 
       36 
43 
     | 
    
         
             
            - .document
         
     | 
| 
       37 
44 
     | 
    
         
             
            - .gitignore
         
     | 
| 
      
 45 
     | 
    
         
            +
            - .project
         
     | 
| 
       38 
46 
     | 
    
         
             
            - LICENSE
         
     | 
| 
       39 
47 
     | 
    
         
             
            - README.rdoc
         
     | 
| 
       40 
48 
     | 
    
         
             
            - Rakefile
         
     | 
| 
         @@ -58,18 +66,20 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       58 
66 
     | 
    
         
             
              requirements: 
         
     | 
| 
       59 
67 
     | 
    
         
             
              - - ">="
         
     | 
| 
       60 
68 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 69 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 70 
     | 
    
         
            +
                  - 0
         
     | 
| 
       61 
71 
     | 
    
         
             
                  version: "0"
         
     | 
| 
       62 
     | 
    
         
            -
              version: 
         
     | 
| 
       63 
72 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
       64 
73 
     | 
    
         
             
              requirements: 
         
     | 
| 
       65 
74 
     | 
    
         
             
              - - ">="
         
     | 
| 
       66 
75 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 76 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 77 
     | 
    
         
            +
                  - 0
         
     | 
| 
       67 
78 
     | 
    
         
             
                  version: "0"
         
     | 
| 
       68 
     | 
    
         
            -
              version: 
         
     | 
| 
       69 
79 
     | 
    
         
             
            requirements: []
         
     | 
| 
       70 
80 
     | 
    
         | 
| 
       71 
81 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       72 
     | 
    
         
            -
            rubygems_version: 1.3. 
     | 
| 
      
 82 
     | 
    
         
            +
            rubygems_version: 1.3.6
         
     | 
| 
       73 
83 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       74 
84 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       75 
85 
     | 
    
         
             
            summary: Amazon Kindle .azw file manipulation library.
         
     |