pidgin 0.0.1.pre → 0.0.2.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +83 -0
  3. data/lib/pidgin/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 320f277f2080469c666e5eb6e63b16dc91acfef0
4
- data.tar.gz: 2598a9b84457ccff4855b848f880fbfc288681ee
3
+ metadata.gz: 39d2433891bc3c62f922ca889d7309a68820765f
4
+ data.tar.gz: 60ed1cb56ec6af0bdf2187b3e2fc7383b2194734
5
5
  SHA512:
6
- metadata.gz: 5ef34d7d512730de03039b5a6eda4d8ba324a4a26dc8233450a055421f7d5bf3da3b6260765fe785d7a660e873cb957a11640b246aa5c31782bec8f1a7dedc58
7
- data.tar.gz: 26f74dcff76c6d96ac4c096b8b575a78014067608260bbc21bb999bc82903e03cad5e5361f0a8201d143cbb5ff03626ef82ed454271579afd316623326584697
6
+ metadata.gz: 3bb3ff985339d82aafda30e2b068b7a559de8754563e3966948dd41ccd6546f2f75fc77acf88deb185ecd0cf197d4724dff3f2ff7772d218a57fc10bb5aac11c
7
+ data.tar.gz: d7f5a85ec4b18ff7c0f689800267dee995cf3e27eb64c913ca0897f0dfdff31b4cb7efb77013bd00783655c40df4a72e1eedfe307b45372280eca800d984f4b2
data/README.md CHANGED
@@ -4,3 +4,86 @@
4
4
  [![Build Status](https://img.shields.io/travis/mtwilliams/pidgin/master.svg)](https://travis-ci.org/mtwilliams/pidgin)
5
5
  [![Code Climate](https://img.shields.io/codeclimate/github/mtwilliams/pidgin.svg)](https://codeclimate.com/github/mtwilliams/pidgin)
6
6
  [![Dependency Status](https://img.shields.io/gemnasium/mtwilliams/pidgin.svg)](https://gemnasium.com/mtwilliams/pidgin)
7
+
8
+ Pidgin is a framework for building domain-specific languages quickly and easily. It was cobbled together for [Ryb](https://github.com/mtwilliams/ryb), a project file generator similar to Premake.
9
+
10
+ It's straight-forward to use. You define your domain-specific language, composed of objects and properties and so forth:
11
+
12
+ ```Ruby
13
+ module Ryb
14
+ module DomainSpecificLanguage
15
+ include Pidgin::DomainSpecificLanguage
16
+ collection :project, Ryb::Project
17
+ end
18
+
19
+ class Project
20
+ include Pidgin::Object
21
+ property :name, String, :inline => true
22
+ collection :library, Ryb::Library, :plural => :libraries
23
+ end
24
+
25
+ class Library
26
+ include Pidgin::Object
27
+ property :name, String, :inline => true
28
+ enum :linkage, [:static, :dynamic], :default => :static
29
+ flag :gen_debug_symbols
30
+ property :files, Array, :appendable => true
31
+ # ...
32
+ end
33
+ end
34
+ ```
35
+
36
+ Then you use it by calling `Pidgin::DomainSpecificLanguage.eval`, in this case through `Ryb::DomainSpecificLanguage`:
37
+
38
+ ```Ruby
39
+ # Rybfile
40
+ project :name => 'vanguard' do
41
+ library :name => 'yeti' do
42
+ linkage :dynamic
43
+
44
+ configuration :name => 'debug' do
45
+ # ...
46
+ end
47
+
48
+ files ["src/yeti.cc",
49
+ "src/yeti/core/console.cc",
50
+ ...]
51
+
52
+ # ...
53
+
54
+ target :name => 'windows' do
55
+ files ["src/yeti/win32_window.cc",
56
+ "src/yeti/gfx/d3d11_*.cc",
57
+ ...]
58
+ end
59
+
60
+ # ...
61
+ end
62
+ end
63
+ ```
64
+
65
+ ```Ruby
66
+ rybfile = Ryb::DomainSpecificLanguage.eval(File.read("Rybfile"))
67
+ ```
68
+
69
+ Then use your object hierarchy how you see fit:
70
+
71
+ ```Ruby
72
+ rybfile[:projects].each do |project|
73
+ Ryb::XCode4.gen_project_files_for project
74
+ end
75
+ ```
76
+
77
+ ---
78
+
79
+ Pidgin was written quick 'n' dirty, as a result it has some warts:
80
+
81
+ 1. It doesn't handle errors well.
82
+ 2. It doesn't validate it's assumptions.
83
+ 3. It doesn't let you specify custom validation logic.
84
+ 4. It doesn't generate DSLs with the best possible syntax.
85
+ 5. It has duplicated code that is quite complex in some places.
86
+ 6. It has no automated testing suite.
87
+ 7. There's not documentation.
88
+
89
+ I'll eventually loop-back and fix these, but that may be a while. If you want to see Pidgin become something more you'll have to contribute.
@@ -1,6 +1,6 @@
1
1
  module Pidgin
2
2
  module VERSION #:nodoc:
3
- MAJOR, MINOR, PATCH, PRE = [0, 0, 1, 'pre']
3
+ MAJOR, MINOR, PATCH, PRE = [0, 0, 2, 'pre']
4
4
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pidgin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre
4
+ version: 0.0.2.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Williams