goodheart 0.4.10 → 0.5.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 +4 -4
- data/Gemfile.lock +1 -1
- data/bin/goodheart +15 -0
- data/goodheart.gemspec +2 -2
- data/lib/clojure/reader.rb +11 -11
- data/lib/goodheart/version.rb +1 -1
- metadata +5 -4
- data/bin/console +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 787ea219e71baeae33eab4e729b5ac584f66af658ab275810cd6b978bd33ad76
|
4
|
+
data.tar.gz: 9771920c0daa9782a73f766d0a52a8dfcfc72598eda139f52fdc988fcd920415
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 679cc89b6a88100d831a82929cfa0c2737d7ecf889349dfa201ad9037a9a6583d854263fea4d9816148e403ead4f4a428ae1e71d2d3ae190cad9fb5143aa0e66
|
7
|
+
data.tar.gz: 4d324484a5ae6ef7ee6aa235323e30331c4a83bed853390de6d31f3c9e04f9ba8a6c15856ea8b9cc1dc6cf23fde94a5ca72abea59c27e10782a6118bae8cb9f2
|
data/Gemfile.lock
CHANGED
data/bin/goodheart
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "goodheart"
|
6
|
+
|
7
|
+
rt = Clojure::Runtime.new
|
8
|
+
rt.read("user", "(ns user)")
|
9
|
+
|
10
|
+
loop do
|
11
|
+
print "\nuser => "
|
12
|
+
line = gets
|
13
|
+
result = rt.read("user", line)
|
14
|
+
puts result
|
15
|
+
end
|
data/goodheart.gemspec
CHANGED
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
32
32
|
`git ls-files -z`.split("\x0").reject {|f| f.match(%r{^(spec)/}) }
|
33
33
|
end
|
34
|
-
spec.bindir = "
|
35
|
-
spec.executables =
|
34
|
+
spec.bindir = "bin"
|
35
|
+
spec.executables = ["goodheart"]
|
36
36
|
spec.require_paths = ["lib"]
|
37
37
|
|
38
38
|
spec.add_development_dependency "bundler", "~> 2.2.29"
|
data/lib/clojure/reader.rb
CHANGED
@@ -39,18 +39,18 @@ module Clojure
|
|
39
39
|
# puts "reading next"
|
40
40
|
# puts "-> #{cursor}"
|
41
41
|
case cursor
|
42
|
-
when :eof
|
42
|
+
when :eof then nil
|
43
43
|
when /\s|,/ then skip_char
|
44
|
-
when /;/
|
45
|
-
when /\d/
|
46
|
-
when /\(/
|
47
|
-
when /\[/
|
48
|
-
when /\{/
|
49
|
-
when /:/
|
50
|
-
when /"/
|
51
|
-
when /'/
|
52
|
-
when /\#/
|
53
|
-
when /\S/
|
44
|
+
when /;/ then skip_comment
|
45
|
+
when /\d/ then read_number
|
46
|
+
when /\(/ then read_form
|
47
|
+
when /\[/ then read_form till: "]", into: ["vector"]
|
48
|
+
when /\{/ then read_form till: "}", into: ["hash-map"]
|
49
|
+
when /:/ then read_keyword
|
50
|
+
when /"/ then read_string
|
51
|
+
when /'/ then read_quote
|
52
|
+
when /\#/ then read_special
|
53
|
+
when /\S/ then read_symbol
|
54
54
|
else raise StandardError, "Unexpected symbol: #{cursor}"
|
55
55
|
end
|
56
56
|
end
|
data/lib/goodheart/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goodheart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dimafedotov
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
@@ -111,7 +111,8 @@ dependencies:
|
|
111
111
|
description: Good Heart allows you to put some Clojure right inside you Ruby application.
|
112
112
|
email:
|
113
113
|
- fedotov2d@gmail.com
|
114
|
-
executables:
|
114
|
+
executables:
|
115
|
+
- goodheart
|
115
116
|
extensions: []
|
116
117
|
extra_rdoc_files: []
|
117
118
|
files:
|
@@ -127,7 +128,7 @@ files:
|
|
127
128
|
- LICENSE.txt
|
128
129
|
- README.md
|
129
130
|
- Rakefile
|
130
|
-
- bin/
|
131
|
+
- bin/goodheart
|
131
132
|
- bin/setup
|
132
133
|
- goodheart.gemspec
|
133
134
|
- lib/clojure.rb
|
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "goodheart"
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require "irb"
|
15
|
-
IRB.start(__FILE__)
|