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.
@@ -1,23 +1,27 @@
1
-
2
-
3
- module Cryptopunks
4
-
5
- MAJOR = 2
6
- MINOR = 0
7
- PATCH = 1
8
- VERSION = [MAJOR,MINOR,PATCH].join('.')
9
-
10
- def self.version
11
- VERSION
12
- end
13
-
14
- def self.banner
15
- "cryptopunks/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
16
- end
17
-
18
- def self.root
19
- File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
20
- end
21
-
22
- end # module Cryptopunks
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 'pixelart/base'
3
- require 'csvreader'
4
-
5
-
6
-
7
- ## extra stdlibs
8
- require 'digest' ## move/add to pixelart upstream - why? why not?
9
- require 'optparse'
10
- require 'gli' ## used for command line tool
11
-
12
-
13
-
14
- ## our own code
15
- require 'cryptopunks/version' # note: let version always go first
16
-
17
- ## forward define superclass for image
18
- module Cryptopunks
19
- class Image < Pixelart::Image; end
20
- end
21
-
22
-
23
- require 'cryptopunks/attributes'
24
- require 'cryptopunks/structs'
25
- require 'cryptopunks/composite'
26
- ## add old backwards compatible alias
27
-
28
- module Cryptopunks
29
- class Image
30
- Composite = ImageComposite
31
- end
32
- end
33
-
34
-
35
- require 'cryptopunks/dataset'
36
-
37
- require 'cryptopunks/colors'
38
- require 'cryptopunks/image'
39
-
40
- require 'cryptopunks/generator'
41
-
42
- ###
43
- ## add convenience pre-configurated generatored with build-in spritesheet (see config)
44
-
45
- module Cryptopunks
46
-
47
- def self.generator
48
- @generator ||= Generator.new( "#{root}/config/spritesheet.png",
49
- "#{root}/config/spritesheet.csv" )
50
- end
51
-
52
- class Image
53
- def self.generate( *values )
54
- img = Cryptopunks.generator.generate( *values )
55
- ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
56
- new( img.image )
57
- end
58
- end # class Image
59
-
60
-
61
- class Spritesheet
62
- ## note: for now class used for "namespace" only
63
- def self.find_by( name:, gender: nil ) ## return archetype/attribute image by name
64
- # note: pass along name as q (query string)
65
- Cryptopunks.generator.find( name, gender: gender )
66
- end
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: 2.0.1
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: 2021-10-17 00:00:00.000000000 Z
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: '0'
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: '0'
26
+ version: 1.3.2
27
27
  - !ruby/object:Gem::Dependency
28
- name: csvreader
28
+ name: punks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
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: '0'
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.22'
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.22'
89
- description: cryptopunks - mint your own 24×24 pixel punk images off chain from the
90
- True Official Genuine CryptoPunks™ sha256-verified original 10 000 unique character
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.1.4
141
+ rubygems_version: 3.3.7
145
142
  signing_key:
146
143
  specification_version: 4
147
- summary: cryptopunks - mint your own 24×24 pixel punk images off chain from the True
148
- Official Genuine CryptoPunks™ sha256-verified original 10 000 unique character collection;
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: []