wayland-scanner 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50c0685457d999252f0262f3928fd5431c26ba08
4
+ data.tar.gz: 4ddc2dc3ccf59cb0b237601ae12d4e64bac477c9
5
+ SHA512:
6
+ metadata.gz: cb5ff693c55abe29234b954f1f745a640a42541a98b2462c15c3277e69bd107d1a15631a5c7b4a2010a6fb5c111aaf5ea6bc1c76e8d69315ae072cef39aa1a93
7
+ data.tar.gz: 2dcee4d557802453e9f65d36306859f8e0d11cc0c64cd133c059143049848bbd6fad3697d90da56207bf7b83a1b78bddc06819663fd634fba9aebc7862be7f9d
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Yong Joseph Bakos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,18 @@
1
+ # Wayland Scanner
2
+
3
+ ## Unstable! Insane! Inane!
4
+
5
+ A crazy person's experimental re-implementation of the official Wayland scanner.
6
+
7
+ A self-serving thought experiment about tool/language diversification.
8
+
9
+ * How is this implementation better and worse than _scanner.c_?
10
+ * Separation of data (eg inline strings used for codegen) from code better?
11
+ * Can external templates facilitate multi-language output?
12
+ * Can a different language and library facilitate lean code?
13
+ * Will lean code and another language ecosystem enable easier-to-maintain testing?
14
+ * Am I a crazy idiot?
15
+
16
+ TODO: Demonstrate the answers to the above.
17
+
18
+ © 2016 Yong Joseph Bakos
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "wayland/scanner"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
File without changes
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'nokogiri'
4
+
5
+ DTD_PATH = "wayland.dtd"
6
+ XML_PATH = "wayland.xml"
7
+
8
+ doc = Nokogiri::XML::Document.parse(File.read(XML_PATH), nil, nil, Nokogiri::XML::ParseOptions::DTDVALID)
9
+
10
+ unless doc.external_subset.validate(doc).empty?
11
+ abort("Error: #{XML_PATH} failed validation with #{DTD_PATH}")
12
+ end
@@ -0,0 +1,7 @@
1
+ require "wayland/scanner/version"
2
+
3
+ module Wayland
4
+ module Scanner
5
+ # Your code goes here...
6
+ end
7
+ end
@@ -0,0 +1,5 @@
1
+ module Wayland
2
+ module Scanner
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'wayland/scanner/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "wayland-scanner"
8
+ spec.version = Wayland::Scanner::VERSION
9
+ spec.authors = ["Yong Bakos"]
10
+ spec.email = ["junk@humanoriented.com"]
11
+
12
+ spec.summary = %q{A Ruby implementation of Wayland scanner.}
13
+ spec.description = %q{Generate interfaces for the Wayland protocol and protocol extensions.}
14
+ spec.homepage = "https://github.com/ybakos/wayland-scanner"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.required_ruby_version = "~> 2.2.1"
23
+ spec.add_dependency "nokogiri", "~> 1.6"
24
+ spec.add_development_dependency "bundler", "~> 1.12"
25
+ spec.add_development_dependency "rake", "~> 11.1"
26
+ spec.add_development_dependency "minitest", "~> 5.8"
27
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: wayland-scanner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yong Bakos
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-05-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '11.1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '11.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5.8'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.8'
69
+ description: Generate interfaces for the Wayland protocol and protocol extensions.
70
+ email:
71
+ - junk@humanoriented.com
72
+ executables:
73
+ - scanner.rb
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - bin/console
83
+ - bin/setup
84
+ - data/templates/.gitkeep
85
+ - exe/scanner.rb
86
+ - lib/wayland/scanner.rb
87
+ - lib/wayland/scanner/version.rb
88
+ - wayland-scanner.gemspec
89
+ homepage: https://github.com/ybakos/wayland-scanner
90
+ licenses:
91
+ - MIT
92
+ metadata: {}
93
+ post_install_message:
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: 2.2.1
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 2.4.6
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: A Ruby implementation of Wayland scanner.
113
+ test_files: []