cryptopunks 2.0.1 → 3.0.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -3
- data/Manifest.txt +0 -3
- data/README.md +666 -526
- data/Rakefile +40 -32
- data/bin/cryptopunk +17 -17
- data/bin/punk +17 -17
- data/lib/cryptopunks/attributes.rb +147 -147
- data/lib/cryptopunks/colors.rb +162 -162
- data/lib/cryptopunks/composite.rb +38 -38
- data/lib/cryptopunks/contract/punksdata-assets.rb +338 -338
- data/lib/cryptopunks/contract/punksdata-contract.rb +55 -55
- data/lib/cryptopunks/contract/punksdata-meta.rb +2107 -2107
- data/lib/cryptopunks/dataset.rb +67 -67
- data/lib/cryptopunks/image.rb +35 -33
- data/lib/cryptopunks/structs.rb +161 -161
- data/lib/cryptopunks/tool.rb +382 -275
- data/lib/cryptopunks/version.rb +27 -23
- data/lib/cryptopunks.rb +66 -109
- metadata +16 -19
- data/config/spritesheet.csv +0 -402
- data/config/spritesheet.png +0 -0
- data/lib/cryptopunks/generator.rb +0 -223
    
        data/lib/cryptopunks/version.rb
    CHANGED
    
    | @@ -1,23 +1,27 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 3 | 
            -
            module  | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
               | 
| 8 | 
            -
               | 
| 9 | 
            -
             | 
| 10 | 
            -
               | 
| 11 | 
            -
             | 
| 12 | 
            -
               | 
| 13 | 
            -
             | 
| 14 | 
            -
               | 
| 15 | 
            -
             | 
| 16 | 
            -
               | 
| 17 | 
            -
             | 
| 18 | 
            -
               | 
| 19 | 
            -
             | 
| 20 | 
            -
               | 
| 21 | 
            -
             | 
| 22 | 
            -
            end | 
| 23 | 
            -
             | 
| 1 | 
            +
             | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Pixelart
         | 
| 4 | 
            +
            module Module
         | 
| 5 | 
            +
            module Cryptopunks
         | 
| 6 | 
            +
             | 
| 7 | 
            +
              MAJOR = 3
         | 
| 8 | 
            +
              MINOR = 0
         | 
| 9 | 
            +
              PATCH = 1
         | 
| 10 | 
            +
              VERSION = [MAJOR,MINOR,PATCH].join('.')
         | 
| 11 | 
            +
             | 
| 12 | 
            +
              def self.version
         | 
| 13 | 
            +
                VERSION
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              def self.banner
         | 
| 17 | 
            +
                "cryptopunks/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
         | 
| 18 | 
            +
              end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
              def self.root
         | 
| 21 | 
            +
                File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            end # module Cryptopunks
         | 
| 25 | 
            +
            end # module Module
         | 
| 26 | 
            +
            end # module Pixelart
         | 
| 27 | 
            +
             | 
    
        data/lib/cryptopunks.rb
    CHANGED
    
    | @@ -1,109 +1,66 @@ | |
| 1 | 
            -
            ## 3rd party
         | 
| 2 | 
            -
            require ' | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
            ##  | 
| 8 | 
            -
            require ' | 
| 9 | 
            -
            require ' | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
            require 'cryptopunks/ | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
             | 
| 54 | 
            -
             | 
| 55 | 
            -
             | 
| 56 | 
            -
             | 
| 57 | 
            -
             | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 66 | 
            -
                 | 
| 67 | 
            -
              end  # class Spritesheet
         | 
| 68 | 
            -
              ## add convenience (alternate spelling) alias - why? why not?
         | 
| 69 | 
            -
              SpriteSheet = Spritesheet
         | 
| 70 | 
            -
              Sheet       = Spritesheet
         | 
| 71 | 
            -
            end #  module Cryptopunks
         | 
| 72 | 
            -
             | 
| 73 | 
            -
             | 
| 74 | 
            -
             | 
| 75 | 
            -
            ####
         | 
| 76 | 
            -
            # add CryptoPunksData (off-chain) contract
         | 
| 77 | 
            -
            require 'cryptopunks/contract/punksdata-assets'
         | 
| 78 | 
            -
            require 'cryptopunks/contract/punksdata-meta'
         | 
| 79 | 
            -
            require 'cryptopunks/contract/punksdata-contract'
         | 
| 80 | 
            -
            CryptoPunksData = CryptopunksData
         | 
| 81 | 
            -
            PunksData       = CryptopunksData
         | 
| 82 | 
            -
             | 
| 83 | 
            -
             | 
| 84 | 
            -
             | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
            require 'cryptopunks/tool'
         | 
| 88 | 
            -
             | 
| 89 | 
            -
            ### add tool convenience helper
         | 
| 90 | 
            -
            module Cryptopunks
         | 
| 91 | 
            -
              def self.main( args=ARGV ) Tool.new.run( args ); end
         | 
| 92 | 
            -
            end ## module Cryptopunks
         | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
            ### add some convenience shortcuts
         | 
| 99 | 
            -
            CryptoPunks = Cryptopunks
         | 
| 100 | 
            -
            Punks       = Cryptopunks
         | 
| 101 | 
            -
             | 
| 102 | 
            -
             | 
| 103 | 
            -
            ###
         | 
| 104 | 
            -
            # note: for convenience auto include Pixelart namespace!!! - why? why not?
         | 
| 105 | 
            -
            include Pixelart
         | 
| 106 | 
            -
             | 
| 107 | 
            -
             | 
| 108 | 
            -
             | 
| 109 | 
            -
            puts Cryptopunks.banner    # say hello
         | 
| 1 | 
            +
            ## 3rd party
         | 
| 2 | 
            +
            require 'punks'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            ## extra stdlibs
         | 
| 7 | 
            +
            require 'digest'     ## move/add to pixelart upstream - why? why not?
         | 
| 8 | 
            +
            require 'optparse'
         | 
| 9 | 
            +
            require 'gli'        ## used for command line tool
         | 
| 10 | 
            +
             | 
| 11 | 
            +
             | 
| 12 | 
            +
             | 
| 13 | 
            +
            ## our own code
         | 
| 14 | 
            +
            require 'cryptopunks/version'    # note: let version always go first
         | 
| 15 | 
            +
             | 
| 16 | 
            +
             | 
| 17 | 
            +
            require 'cryptopunks/attributes'
         | 
| 18 | 
            +
            require 'cryptopunks/structs'
         | 
| 19 | 
            +
            require 'cryptopunks/composite'
         | 
| 20 | 
            +
             | 
| 21 | 
            +
             | 
| 22 | 
            +
            ## add old backwards compatible alias
         | 
| 23 | 
            +
            module Punk
         | 
| 24 | 
            +
               class Image
         | 
| 25 | 
            +
                  Composite = ImageComposite
         | 
| 26 | 
            +
               end
         | 
| 27 | 
            +
            end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
             | 
| 30 | 
            +
             | 
| 31 | 
            +
            require 'cryptopunks/dataset'
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            require 'cryptopunks/colors'
         | 
| 34 | 
            +
            require 'cryptopunks/image'
         | 
| 35 | 
            +
             | 
| 36 | 
            +
             | 
| 37 | 
            +
            ####
         | 
| 38 | 
            +
            # add CryptoPunksData (off-chain) contract
         | 
| 39 | 
            +
            require 'cryptopunks/contract/punksdata-assets'
         | 
| 40 | 
            +
            require 'cryptopunks/contract/punksdata-meta'
         | 
| 41 | 
            +
            require 'cryptopunks/contract/punksdata-contract'
         | 
| 42 | 
            +
            CryptoPunksData = CryptopunksData
         | 
| 43 | 
            +
            PunksData       = CryptopunksData
         | 
| 44 | 
            +
             | 
| 45 | 
            +
             | 
| 46 | 
            +
             | 
| 47 | 
            +
             | 
| 48 | 
            +
             | 
| 49 | 
            +
            require 'cryptopunks/tool'
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            ### add tool convenience helper
         | 
| 52 | 
            +
            module Punk
         | 
| 53 | 
            +
              def self.main( args=ARGV ) Tool.new.run( args ); end
         | 
| 54 | 
            +
            end ## module Punk
         | 
| 55 | 
            +
             | 
| 56 | 
            +
             | 
| 57 | 
            +
             | 
| 58 | 
            +
             | 
| 59 | 
            +
             | 
| 60 | 
            +
            ###
         | 
| 61 | 
            +
            # note: for convenience auto include Pixelart namespace!!! - why? why not?
         | 
| 62 | 
            +
            include Pixelart
         | 
| 63 | 
            +
             | 
| 64 | 
            +
             | 
| 65 | 
            +
             | 
| 66 | 
            +
            puts Pixelart::Module::Cryptopunks.banner    # say hello
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cryptopunks
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version:  | 
| 4 | 
            +
              version: 3.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Gerald Bauer
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2022-06-11 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pixelart
         | 
| @@ -16,28 +16,28 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version:  | 
| 19 | 
            +
                    version: 1.3.2
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version:  | 
| 26 | 
            +
                    version: 1.3.2
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            -
              name:  | 
| 28 | 
            +
              name: punks
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 30 | 
             
                requirements:
         | 
| 31 31 | 
             
                - - ">="
         | 
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            -
                    version:  | 
| 33 | 
            +
                    version: 0.2.0
         | 
| 34 34 | 
             
              type: :runtime
         | 
| 35 35 | 
             
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - ">="
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version:  | 
| 40 | 
            +
                    version: 0.2.0
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 42 | 
             
              name: gli
         | 
| 43 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -78,17 +78,17 @@ dependencies: | |
| 78 78 | 
             
                requirements:
         | 
| 79 79 | 
             
                - - "~>"
         | 
| 80 80 | 
             
                  - !ruby/object:Gem::Version
         | 
| 81 | 
            -
                    version: '3. | 
| 81 | 
            +
                    version: '3.23'
         | 
| 82 82 | 
             
              type: :development
         | 
| 83 83 | 
             
              prerelease: false
         | 
| 84 84 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 85 85 | 
             
                requirements:
         | 
| 86 86 | 
             
                - - "~>"
         | 
| 87 87 | 
             
                  - !ruby/object:Gem::Version
         | 
| 88 | 
            -
                    version: '3. | 
| 89 | 
            -
            description: cryptopunks -  | 
| 90 | 
            -
               | 
| 91 | 
            -
              collection; incl. 2x/4x/8x zoom for bigger sizes
         | 
| 88 | 
            +
                    version: '3.23'
         | 
| 89 | 
            +
            description: cryptopunks - generate your own 24×24 pixel punk images (off-chain) from
         | 
| 90 | 
            +
              the Official Genuine Matt & John's® Punks sha256-verified original 10 000 unique
         | 
| 91 | 
            +
              character collection; incl. 2x/4x/8x zoom for bigger sizes
         | 
| 92 92 | 
             
            email: wwwmake@googlegroups.com
         | 
| 93 93 | 
             
            executables:
         | 
| 94 94 | 
             
            - cryptopunk
         | 
| @@ -105,8 +105,6 @@ files: | |
| 105 105 | 
             
            - Rakefile
         | 
| 106 106 | 
             
            - bin/cryptopunk
         | 
| 107 107 | 
             
            - bin/punk
         | 
| 108 | 
            -
            - config/spritesheet.csv
         | 
| 109 | 
            -
            - config/spritesheet.png
         | 
| 110 108 | 
             
            - lib/cryptopunks.rb
         | 
| 111 109 | 
             
            - lib/cryptopunks/attributes.rb
         | 
| 112 110 | 
             
            - lib/cryptopunks/colors.rb
         | 
| @@ -115,7 +113,6 @@ files: | |
| 115 113 | 
             
            - lib/cryptopunks/contract/punksdata-contract.rb
         | 
| 116 114 | 
             
            - lib/cryptopunks/contract/punksdata-meta.rb
         | 
| 117 115 | 
             
            - lib/cryptopunks/dataset.rb
         | 
| 118 | 
            -
            - lib/cryptopunks/generator.rb
         | 
| 119 116 | 
             
            - lib/cryptopunks/image.rb
         | 
| 120 117 | 
             
            - lib/cryptopunks/structs.rb
         | 
| 121 118 | 
             
            - lib/cryptopunks/tool.rb
         | 
| @@ -141,10 +138,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 141 138 | 
             
                - !ruby/object:Gem::Version
         | 
| 142 139 | 
             
                  version: '0'
         | 
| 143 140 | 
             
            requirements: []
         | 
| 144 | 
            -
            rubygems_version: 3. | 
| 141 | 
            +
            rubygems_version: 3.3.7
         | 
| 145 142 | 
             
            signing_key:
         | 
| 146 143 | 
             
            specification_version: 4
         | 
| 147 | 
            -
            summary: cryptopunks -  | 
| 148 | 
            -
              Official Genuine  | 
| 149 | 
            -
              incl. 2x/4x/8x zoom for bigger sizes
         | 
| 144 | 
            +
            summary: cryptopunks - generate your own 24×24 pixel punk images (off-chain) from
         | 
| 145 | 
            +
              the Official Genuine Matt & John's® Punks sha256-verified original 10 000 unique
         | 
| 146 | 
            +
              character collection; incl. 2x/4x/8x zoom for bigger sizes
         | 
| 150 147 | 
             
            test_files: []
         |