emoruby 0.1.2 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 423530889f98493bbdce91d15c37da041d602e93
4
- data.tar.gz: b66e29c66bb68a775eac25e93ce9d7ce6e3f59a0
3
+ metadata.gz: 441a8c136e30e880454464f5e1c0ba5634064ded
4
+ data.tar.gz: 14d02d2690d2c67af6e4215bce422c5c812f0ee2
5
5
  SHA512:
6
- metadata.gz: 5b82779ab601a22619807e8d3d4e0e2d7866b69c3500cacf7633f9fc64956b772d9b9179e4b999f7c40b08d8041d3c13b2ad8fb45ba3d4b8fb192cf457f4cf31
7
- data.tar.gz: ccffa6bee751969ed39083db151474434219e3287b519260aa5e9ca3b2d20622623b2b97c1d9f376f1d141e6e25117b52f75019a44bd1153c37b11b21eba8448
6
+ metadata.gz: b87172bc8c3133db7b226e65fd776706fe1162cce393deae684b5757a2536505d430857d35c2a3863eb24e59c2846147c741616bf5726bce4958312362319a07
7
+ data.tar.gz: c15ea4c31286a01b7f8a3391fa7a329c4a1f60dbc1faece7ab5697618f427983ae56629ccd3177c90e310f3150300ab4c72736278530d7f22e938e2a0a3875e3
data/README.md CHANGED
@@ -8,6 +8,8 @@ A little language that compiles Emoji down to Ruby. It's just Ruby. Really.
8
8
 
9
9
  If I were a real language designer, I would have put a lot of thought into the syntax, semantics, and structure of emoruby. Instead I basically implemented an inefficient find-and-replace from a static dictionary. (🐄🎩!)
10
10
 
11
+ ### hello world
12
+
11
13
  Anyway, here is an example hello world program:
12
14
 
13
15
  ```emoruby
@@ -32,6 +34,8 @@ end
32
34
  Heart.new.wave
33
35
  ```
34
36
 
37
+ ### procs and comments
38
+
35
39
  You can also define things like Procs and comments:
36
40
 
37
41
  ```emoruby
@@ -50,6 +54,22 @@ which is equivalent to this Ruby:
50
54
  end.call
51
55
  ```
52
56
 
57
+ ### enumerables and block params
58
+
59
+ You can also define Array and Hash literals, and use the `{}` block syntax:
60
+
61
+ ```emoruby
62
+ â—€ī¸9ī¸âƒŖâž°3ī¸âƒŖâ–ļī¸â–Ēī¸đŸ“ âĒ 🏂🅰🏂 🅰 ➕ 1 ⏊
63
+ ```
64
+
65
+ Which translates to this Ruby:
66
+
67
+ ```
68
+ [9,3].map { |a| a + 1 }
69
+ ```
70
+
71
+ ### method visibility
72
+
53
73
  You can define private and protected methods:
54
74
 
55
75
  ```emoruby
@@ -136,6 +156,6 @@ Emoruby.emoji_to_ruby(source)
136
156
 
137
157
  ## Versioning
138
158
 
139
- The Emoruby team embraces and advocates the adoption of the the emerging iconographic versioning standard ("icover" for short).
159
+ The Emoruby team embraces and advocates the adoption of the the emerging emotional versioning standard ("emover" for short).
140
160
 
141
- The initial release was 💩 (in honor of @tenderlove's 💩-lang). After that, ✊ was released. Next up is, of course, 🐷.
161
+ The initial release was 💩 (in honor of @tenderlove's 💩-lang). After that, ✊ was released. Then came 🐷. The next planned release is 📈.
@@ -18,8 +18,13 @@
18
18
  â–Ēī¸: "."
19
19
  â†Ēī¸: "("
20
20
  â†Šī¸: ")"
21
+ â—€ī¸: "["
22
+ â–ļī¸: "]"
23
+ âĒ: "{"
24
+ ⏊: "}"
25
+ 🏂: "|"
21
26
  ➰: ","
22
- 💭: '#'
27
+ 💭: "#"
23
28
 
24
29
  # literals
25
30
  1ī¸âƒŖ: "1"
@@ -41,6 +46,7 @@
41
46
  🚰: tap
42
47
  📞: call
43
48
  âš ī¸: warn
49
+ 📍: map
44
50
  ➕: "+"
45
51
  ➖: "-"
46
52
  ➗: "/"
@@ -1,3 +1,3 @@
1
1
  module Emoruby
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -5,5 +5,5 @@ require 'emoruby'
5
5
  describe Emoruby do
6
6
  Given(:source) { load_fixture("3_stabby_proc") }
7
7
  When(:result) { Emoruby.eval(source) }
8
- Then { expect(result).to eq("smiley") }
8
+ Then { result == "smiley" }
9
9
  end
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ require 'emoruby'
4
+
5
+ describe Emoruby do
6
+ Given(:source) { load_fixture("6_blocks") }
7
+ When(:result) { Emoruby.eval(source) }
8
+ Then { result == [10, 4] }
9
+ end
@@ -0,0 +1 @@
1
+ â—€ī¸9ī¸âƒŖâž°3ī¸âƒŖâ–ļī¸â–Ēī¸đŸ“ âĒ 🏂🅰🏂 🅰 ➕ 1 ⏊
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emoruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
@@ -150,6 +150,7 @@ files:
150
150
  - spec/2_module_with_addition_spec.rb
151
151
  - spec/3_stabby_proc_spec.rb
152
152
  - spec/5_comments_spec.rb
153
+ - spec/6_blocks_spec.rb
153
154
  - spec/fixtures/1_hello_world.emoruby
154
155
  - spec/fixtures/1_hello_world.rb
155
156
  - spec/fixtures/2_module_with_addition.emoruby
@@ -159,6 +160,7 @@ files:
159
160
  - spec/fixtures/4_method_access.rb
160
161
  - spec/fixtures/5_comments.emoruby
161
162
  - spec/fixtures/5_comments.rb
163
+ - spec/fixtures/6_blocks.emoruby
162
164
  - spec/spec_helper.rb
163
165
  - spec/support/file_helpers.rb
164
166
  homepage: https://github.com/searls/emoruby
@@ -190,6 +192,7 @@ test_files:
190
192
  - spec/2_module_with_addition_spec.rb
191
193
  - spec/3_stabby_proc_spec.rb
192
194
  - spec/5_comments_spec.rb
195
+ - spec/6_blocks_spec.rb
193
196
  - spec/fixtures/1_hello_world.emoruby
194
197
  - spec/fixtures/1_hello_world.rb
195
198
  - spec/fixtures/2_module_with_addition.emoruby
@@ -199,5 +202,6 @@ test_files:
199
202
  - spec/fixtures/4_method_access.rb
200
203
  - spec/fixtures/5_comments.emoruby
201
204
  - spec/fixtures/5_comments.rb
205
+ - spec/fixtures/6_blocks.emoruby
202
206
  - spec/spec_helper.rb
203
207
  - spec/support/file_helpers.rb