alf-shell 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. data/CHANGELOG.md +4 -0
  2. data/Gemfile +17 -0
  3. data/Gemfile.lock +35 -0
  4. data/LICENCE.md +22 -0
  5. data/Manifest.txt +13 -0
  6. data/README.md +11 -0
  7. data/Rakefile +11 -0
  8. data/bin/alf +17 -0
  9. data/lib/alf-shell.rb +1 -0
  10. data/lib/alf/shell.rb +48 -0
  11. data/lib/alf/shell/command.rb +21 -0
  12. data/lib/alf/shell/command/exec.rb +16 -0
  13. data/lib/alf/shell/command/help.rb +30 -0
  14. data/lib/alf/shell/command/main.rb +175 -0
  15. data/lib/alf/shell/command/show.rb +49 -0
  16. data/lib/alf/shell/doc_manager.rb +83 -0
  17. data/lib/alf/shell/ext/signature.rb +45 -0
  18. data/lib/alf/shell/from_argv.rb +78 -0
  19. data/lib/alf/shell/loader.rb +2 -0
  20. data/lib/alf/shell/operator.rb +63 -0
  21. data/lib/alf/shell/support.rb +28 -0
  22. data/lib/alf/shell/version.rb +16 -0
  23. data/spec/integration/__database__/group.alf +3 -0
  24. data/spec/integration/__database__/parts.rash +6 -0
  25. data/spec/integration/__database__/suppliers.rash +5 -0
  26. data/spec/integration/__database__/suppliers_csv.csv +6 -0
  27. data/spec/integration/__database__/supplies.rash +12 -0
  28. data/spec/integration/alf/alf.db +0 -0
  29. data/spec/integration/alf/alf_db.cmd +1 -0
  30. data/spec/integration/alf/alf_db.stdout +5 -0
  31. data/spec/integration/alf/alf_e.cmd +1 -0
  32. data/spec/integration/alf/alf_e.stdout +4 -0
  33. data/spec/integration/alf/alf_help.cmd +1 -0
  34. data/spec/integration/alf/alf_help.stdout +72 -0
  35. data/spec/integration/alf/alf_json.cmd +1 -0
  36. data/spec/integration/alf/alf_json.stdout +1 -0
  37. data/spec/integration/alf/alf_r.cmd +1 -0
  38. data/spec/integration/alf/alf_r.stdout +5 -0
  39. data/spec/integration/alf/alf_version.cmd +1 -0
  40. data/spec/integration/alf/alf_version.stdout +2 -0
  41. data/spec/integration/alf/alf_yaml.cmd +1 -0
  42. data/spec/integration/alf/alf_yaml.stdout +22 -0
  43. data/spec/integration/alf/rel.rash +1 -0
  44. data/spec/integration/autonum/autonum_0.cmd +1 -0
  45. data/spec/integration/autonum/autonum_0.stdout +9 -0
  46. data/spec/integration/autonum/autonum_1.cmd +1 -0
  47. data/spec/integration/autonum/autonum_1.stdout +9 -0
  48. data/spec/integration/clip/clip_0.cmd +1 -0
  49. data/spec/integration/clip/clip_0.stdout +9 -0
  50. data/spec/integration/clip/clip_1.cmd +1 -0
  51. data/spec/integration/clip/clip_1.stdout +9 -0
  52. data/spec/integration/coerce/coerce_1.cmd +1 -0
  53. data/spec/integration/coerce/coerce_1.stdout +5 -0
  54. data/spec/integration/compact/compact_0.cmd +1 -0
  55. data/spec/integration/compact/compact_0.stdout +9 -0
  56. data/spec/integration/defaults/defaults_0.cmd +1 -0
  57. data/spec/integration/defaults/defaults_0.stdout +9 -0
  58. data/spec/integration/defaults/defaults_1.cmd +1 -0
  59. data/spec/integration/defaults/defaults_1.stdout +9 -0
  60. data/spec/integration/defaults/defaults_2.cmd +1 -0
  61. data/spec/integration/defaults/defaults_2.stdout +9 -0
  62. data/spec/integration/extend/extend_0.cmd +1 -0
  63. data/spec/integration/extend/extend_0.stdout +16 -0
  64. data/spec/integration/generator/generator_1.cmd +1 -0
  65. data/spec/integration/generator/generator_1.stdout +10 -0
  66. data/spec/integration/generator/generator_2.cmd +1 -0
  67. data/spec/integration/generator/generator_2.stdout +5 -0
  68. data/spec/integration/generator/generator_3.cmd +1 -0
  69. data/spec/integration/generator/generator_3.stdout +5 -0
  70. data/spec/integration/group/group_0.cmd +1 -0
  71. data/spec/integration/group/group_0.stdout +32 -0
  72. data/spec/integration/group/group_1.cmd +1 -0
  73. data/spec/integration/group/group_1.stdout +32 -0
  74. data/spec/integration/help/help_1.cmd +1 -0
  75. data/spec/integration/help/help_1.stdout +25 -0
  76. data/spec/integration/intersect/intersect_0.cmd +1 -0
  77. data/spec/integration/intersect/intersect_0.stdout +9 -0
  78. data/spec/integration/join/join_0.cmd +1 -0
  79. data/spec/integration/join/join_0.stdout +16 -0
  80. data/spec/integration/matching/matching_0.cmd +1 -0
  81. data/spec/integration/matching/matching_0.stdout +8 -0
  82. data/spec/integration/minus/minus_0.cmd +1 -0
  83. data/spec/integration/minus/minus_0.stdout +4 -0
  84. data/spec/integration/not-matching/not-matching_0.cmd +1 -0
  85. data/spec/integration/not-matching/not-matching_0.stdout +5 -0
  86. data/spec/integration/project/project_0.cmd +1 -0
  87. data/spec/integration/project/project_0.stdout +9 -0
  88. data/spec/integration/project/project_1.cmd +1 -0
  89. data/spec/integration/project/project_1.stdout +9 -0
  90. data/spec/integration/quota/quota_0.cmd +1 -0
  91. data/spec/integration/quota/quota_0.stdout +16 -0
  92. data/spec/integration/rank/rank_1.cmd +1 -0
  93. data/spec/integration/rank/rank_1.stdout +10 -0
  94. data/spec/integration/rank/rank_2.cmd +1 -0
  95. data/spec/integration/rank/rank_2.stdout +10 -0
  96. data/spec/integration/rank/rank_3.cmd +1 -0
  97. data/spec/integration/rank/rank_3.stdout +10 -0
  98. data/spec/integration/rank/rank_4.cmd +1 -0
  99. data/spec/integration/rank/rank_4.stdout +6 -0
  100. data/spec/integration/rank/rank_5.cmd +1 -0
  101. data/spec/integration/rank/rank_5.stdout +6 -0
  102. data/spec/integration/rename/rename_0.cmd +1 -0
  103. data/spec/integration/rename/rename_0.stdout +9 -0
  104. data/spec/integration/restrict/restrict_0.cmd +1 -0
  105. data/spec/integration/restrict/restrict_0.stdout +6 -0
  106. data/spec/integration/restrict/restrict_1.cmd +1 -0
  107. data/spec/integration/restrict/restrict_1.stdout +6 -0
  108. data/spec/integration/show/show_base.cmd +1 -0
  109. data/spec/integration/show/show_base.stdout +5 -0
  110. data/spec/integration/show/show_base_sort_1.cmd +1 -0
  111. data/spec/integration/show/show_base_sort_1.stdout +9 -0
  112. data/spec/integration/show/show_base_sort_2.cmd +1 -0
  113. data/spec/integration/show/show_base_sort_2.stdout +9 -0
  114. data/spec/integration/show/show_conflictual.cmd +1 -0
  115. data/spec/integration/show/show_conflictual.stdout +5 -0
  116. data/spec/integration/show/show_ff.cmd +1 -0
  117. data/spec/integration/show/show_ff.stdout +10 -0
  118. data/spec/integration/show/show_rash.cmd +1 -0
  119. data/spec/integration/show/show_rash.stdout +5 -0
  120. data/spec/integration/show/show_rash_pretty.cmd +1 -0
  121. data/spec/integration/show/show_rash_pretty.stdout +30 -0
  122. data/spec/integration/show/show_yaml.cmd +1 -0
  123. data/spec/integration/show/show_yaml.stdout +22 -0
  124. data/spec/integration/sort/sort_0.cmd +1 -0
  125. data/spec/integration/sort/sort_0.stdout +9 -0
  126. data/spec/integration/sort/sort_1.cmd +1 -0
  127. data/spec/integration/sort/sort_1.stdout +9 -0
  128. data/spec/integration/sort/sort_2.cmd +1 -0
  129. data/spec/integration/sort/sort_2.stdout +9 -0
  130. data/spec/integration/sort/sort_3.cmd +1 -0
  131. data/spec/integration/sort/sort_3.stdout +9 -0
  132. data/spec/integration/summarize/summarize_0.cmd +1 -0
  133. data/spec/integration/summarize/summarize_0.stdout +8 -0
  134. data/spec/integration/test_shell.rb +56 -0
  135. data/spec/integration/union/union_0.cmd +1 -0
  136. data/spec/integration/union/union_0.stdout +9 -0
  137. data/spec/integration/unwrap/unwrap_0.cmd +1 -0
  138. data/spec/integration/unwrap/unwrap_0.stdout +9 -0
  139. data/spec/integration/wrap/wrap_0.cmd +1 -0
  140. data/spec/integration/wrap/wrap_0.stdout +9 -0
  141. data/spec/spec_helper.rb +21 -0
  142. data/spec/test_shell.rb +10 -0
  143. data/spec/unit/doc_manager/dynamic.md +1 -0
  144. data/spec/unit/doc_manager/example.md +1 -0
  145. data/spec/unit/doc_manager/example_1.txt +11 -0
  146. data/spec/unit/doc_manager/static.md +1 -0
  147. data/spec/unit/doc_manager/test_call.rb +43 -0
  148. data/spec/unit/ext/signature/test_argv2args.rb +82 -0
  149. data/spec/unit/ext/signature/test_to_shell.rb +103 -0
  150. data/spec/unit/from_argv/test_to_attr_list.rb +30 -0
  151. data/spec/unit/from_argv/test_to_attr_name.rb +27 -0
  152. data/spec/unit/from_argv/test_to_boolean.rb +32 -0
  153. data/spec/unit/from_argv/test_to_heading.rb +37 -0
  154. data/spec/unit/from_argv/test_to_ordering.rb +28 -0
  155. data/spec/unit/from_argv/test_to_predicate.rb +26 -0
  156. data/spec/unit/from_argv/test_to_renaming.rb +23 -0
  157. data/spec/unit/from_argv/test_to_size.rb +32 -0
  158. data/spec/unit/from_argv/test_to_summarization.rb +19 -0
  159. data/spec/unit/from_argv/test_to_tuple_computation.rb +18 -0
  160. data/spec/unit/from_argv/test_to_tuple_expression.rb +38 -0
  161. data/spec/unit/main/test_class_methods.rb +44 -0
  162. data/spec/unit/operator/test_autonum.rb +28 -0
  163. data/spec/unit/operator/test_clip.rb +29 -0
  164. data/spec/unit/operator/test_coerce.rb +22 -0
  165. data/spec/unit/operator/test_compact.rb +16 -0
  166. data/spec/unit/operator/test_defaults.rb +29 -0
  167. data/spec/unit/operator/test_extend.rb +21 -0
  168. data/spec/unit/operator/test_generator.rb +37 -0
  169. data/spec/unit/operator/test_group.rb +32 -0
  170. data/spec/unit/operator/test_infer_heading.rb +16 -0
  171. data/spec/unit/operator/test_intersect.rb +18 -0
  172. data/spec/unit/operator/test_join.rb +18 -0
  173. data/spec/unit/operator/test_matching.rb +18 -0
  174. data/spec/unit/operator/test_minus.rb +18 -0
  175. data/spec/unit/operator/test_not_matching.rb +18 -0
  176. data/spec/unit/operator/test_project.rb +38 -0
  177. data/spec/unit/operator/test_quota.rb +23 -0
  178. data/spec/unit/operator/test_rank.rb +30 -0
  179. data/spec/unit/operator/test_rename.rb +21 -0
  180. data/spec/unit/operator/test_restrict.rb +36 -0
  181. data/spec/unit/operator/test_sort.rb +49 -0
  182. data/spec/unit/operator/test_summarize.rb +30 -0
  183. data/spec/unit/operator/test_ungroup.rb +28 -0
  184. data/spec/unit/operator/test_union.rb +18 -0
  185. data/spec/unit/operator/test_unwrap.rb +28 -0
  186. data/spec/unit/operator/test_wrap.rb +30 -0
  187. data/tasks/gem.rake +8 -0
  188. data/tasks/test.rake +6 -0
  189. metadata +317 -0
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Minus do
4
+
5
+ let(:left) { suppliers }
6
+ let(:right){ suppliers }
7
+ subject{ Minus.run(argv) }
8
+
9
+ context "the default config" do
10
+ let(:argv){ [left, right] }
11
+ specify{
12
+ subject.should be_a(Alf::Algebra::Minus)
13
+ subject.operands.should eq([left, right])
14
+ }
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe NotMatching do
4
+
5
+ let(:left) { suppliers }
6
+ let(:right){ suppliers }
7
+ subject{ NotMatching.run(argv) }
8
+
9
+ context "the default config" do
10
+ let(:argv){ [left, right] }
11
+ specify{
12
+ subject.should be_a(Alf::Algebra::NotMatching)
13
+ subject.operands.should eq([left, right])
14
+ }
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Project do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Project.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Project)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "--no-allbut" do
14
+ let(:argv){ [input, "--", "a", "b"] }
15
+ specify{
16
+ subject.attributes.should eq(Alf::AttrList[:a, :b])
17
+ subject.allbut.should eq(false)
18
+ }
19
+ end
20
+
21
+ context "--allbut" do
22
+ let(:argv){ [input, "--allbut", "--", "a", "b"] }
23
+ specify{
24
+ subject.attributes.should eq(Alf::AttrList[:a, :b])
25
+ subject.allbut.should eq(true)
26
+ }
27
+ end
28
+
29
+ context "none projected" do
30
+ let(:argv){ [input] }
31
+ specify{
32
+ subject.attributes.should eq(Alf::AttrList[])
33
+ subject.allbut.should eq(false)
34
+ }
35
+ end
36
+
37
+ end
38
+ end
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Quota do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Quota.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Quota)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "a typical config" do
14
+ let(:argv){ [input] + ["--", "a", "--", "time", "--", "time_sum", "sum{ time }"] }
15
+ specify{
16
+ subject.by.should eq(Alf::AttrList[:a])
17
+ subject.order.should eq(Alf::Ordering[[:time, :asc]])
18
+ subject.summarization.should eq(Alf::Summarization[:time_sum => "sum{ time }"])
19
+ }
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Rank do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Rank.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Rank)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "without name" do
14
+ let(:argv){ [input, "--", "time"] }
15
+ specify{
16
+ subject.order.should eq(Alf::Ordering[[:time, :asc]])
17
+ subject.as.should eq(:rank)
18
+ }
19
+ end
20
+
21
+ context "with explicit name" do
22
+ let(:argv){ [input, "--","time", "desc", "--", "newname"] }
23
+ specify{
24
+ subject.order.should eq(Alf::Ordering[[:time, :desc]])
25
+ subject.as.should eq(:newname)
26
+ }
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Rename do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Rename.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Rename)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "a typical config" do
14
+ let(:argv){ [input, '--', 'a', 'z'] }
15
+ specify{
16
+ subject.renaming.should eq(Alf::Renaming[:a => :z])
17
+ }
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,36 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Restrict do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Restrict.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Restrict)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "without arg" do
14
+ let(:argv){ [input] }
15
+ specify{
16
+ subject.predicate.should eq(Alf::Predicate.coerce(true))
17
+ }
18
+ end
19
+
20
+ context "with a single arg" do
21
+ let(:argv){ [ input ] + ["--", "status > 10"] }
22
+ specify{
23
+ subject.predicate.should be_a(Alf::Predicate)
24
+ subject.predicate.to_ruby_code.should eq("status > 10")
25
+ }
26
+ end
27
+
28
+ context "with two args" do
29
+ let(:argv){ [ input ] + ["--", "status", "10"] }
30
+ specify{
31
+ subject.predicate.should eq(Alf::Predicate.comp(:eq, :status => 10))
32
+ }
33
+ end
34
+
35
+ end
36
+ end
@@ -0,0 +1,49 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Sort do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Sort.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Sort)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "with empty args" do
14
+ let(:argv){ [input] + %w{} }
15
+ specify{
16
+ subject.ordering.should eq(Alf::Ordering.new([]))
17
+ }
18
+ end
19
+
20
+ context "with one arg" do
21
+ let(:argv){ [input] + %w{-- name} }
22
+ specify{
23
+ subject.ordering.should eq(Alf::Ordering[[:name, :asc]])
24
+ }
25
+ end
26
+
27
+ context "with two args" do
28
+ let(:argv){ [input] + %w{-- first last} }
29
+ specify{
30
+ subject.ordering.should eq(Alf::Ordering[[[:first, :asc], [:last, :asc]]])
31
+ }
32
+ end
33
+
34
+ context "with explicit ordering" do
35
+ let(:argv){ [input] + %w{-- first desc} }
36
+ specify{
37
+ subject.ordering.should eq(Alf::Ordering[[[:first, :desc]]])
38
+ }
39
+ end
40
+
41
+ context "with explicit ordering on multiple" do
42
+ let(:argv){ [input] + %w{-- first desc last asc} }
43
+ specify{
44
+ subject.ordering.should eq(Alf::Ordering[[[:first, :desc], [:last, :asc]]])
45
+ }
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Summarize do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Summarize.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Summarize)
10
+ subject.operands.should eq([input])
11
+ subject.by.should eq(Alf::AttrList[:a])
12
+ subject.summarization.should eq(Alf::Summarization[:time_sum => "sum{ time }"])
13
+ end
14
+
15
+ context "--no-allbut" do
16
+ let(:argv){ [input] + ["--", "a", "--", "time_sum", "sum{ time }"] }
17
+ specify{
18
+ subject.allbut.should eq(false)
19
+ }
20
+ end
21
+
22
+ context "--allbut" do
23
+ let(:argv){ [input] + ["--allbut", "--", "a", "--", "time_sum", "sum{ time }"] }
24
+ specify{
25
+ subject.allbut.should eq(true)
26
+ }
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Ungroup do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Ungroup.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Ungroup)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "without name" do
14
+ let(:argv){ [input] }
15
+ specify{
16
+ subject.attribute.should eq(:grouped)
17
+ }
18
+ end
19
+
20
+ context "with a name" do
21
+ let(:argv){ [input] + %w{-- attrname} }
22
+ specify{
23
+ subject.attribute.should eq(:attrname)
24
+ }
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Union do
4
+
5
+ let(:left) { suppliers }
6
+ let(:right){ suppliers }
7
+ subject{ Union.run(argv) }
8
+
9
+ context "the default config" do
10
+ let(:argv){ [left, right] }
11
+ specify{
12
+ subject.should be_a(Alf::Algebra::Union)
13
+ subject.operands.should eq([left, right])
14
+ }
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Unwrap do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Unwrap.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Unwrap)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "without name" do
14
+ let(:argv){ [input] }
15
+ specify{
16
+ subject.attribute.should eq(:wrapped)
17
+ }
18
+ end
19
+
20
+ context "with a name" do
21
+ let(:argv){ [input] + %w{-- attrname} }
22
+ specify{
23
+ subject.attribute.should eq(:attrname)
24
+ }
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+ module Alf::Shell::Operator
3
+ describe Wrap do
4
+
5
+ let(:input){ suppliers }
6
+ subject{ Wrap.run(argv) }
7
+
8
+ before do
9
+ subject.should be_a(Alf::Algebra::Wrap)
10
+ subject.operands.should eq([input])
11
+ end
12
+
13
+ context "without name" do
14
+ let(:argv){ [input, "--", "a", "b"] }
15
+ specify{
16
+ subject.attributes.should eq(Alf::AttrList[:a, :b])
17
+ subject.as.should eq(:wrapped)
18
+ }
19
+ end
20
+
21
+ context "with a name" do
22
+ let(:argv){ [input, "--", "a", "b", "--", "attrname"] }
23
+ specify{
24
+ subject.attributes.should eq(Alf::AttrList[:a, :b])
25
+ subject.as.should eq(:attrname)
26
+ }
27
+ end
28
+
29
+ end
30
+ end
@@ -0,0 +1,8 @@
1
+ require 'rubygems/package_task'
2
+ gemspec_file = File.expand_path('../../alf-shell.gemspec', __FILE__)
3
+ gemspec = Kernel.eval(File.read(gemspec_file))
4
+ Gem::PackageTask.new(gemspec) do |t|
5
+ t.name = gemspec.name
6
+ t.version = gemspec.version
7
+ t.package_files = gemspec.files
8
+ end
@@ -0,0 +1,6 @@
1
+ require "rspec/core/rake_task"
2
+ desc "Run tests"
3
+ RSpec::Core::RakeTask.new(:test) do |t|
4
+ t.pattern = "spec/**/test_*.rb"
5
+ t.rspec_opts = ["--color"]
6
+ end
metadata ADDED
@@ -0,0 +1,317 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: alf-shell
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.13.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Bernard Lambeau
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-07-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '10.1'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '10.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '2.14'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '2.14'
46
+ - !ruby/object:Gem::Dependency
47
+ name: highline
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: '1.6'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
62
+ - !ruby/object:Gem::Dependency
63
+ name: alf-core
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 0.13.0
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 0.13.0
78
+ - !ruby/object:Gem::Dependency
79
+ name: quickl
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 0.4.3
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.4.3
94
+ description: This project implements the `alf` commandline tool.
95
+ email:
96
+ - blambeau at gmail.com
97
+ executables:
98
+ - alf
99
+ extensions: []
100
+ extra_rdoc_files: []
101
+ files:
102
+ - CHANGELOG.md
103
+ - Gemfile
104
+ - Gemfile.lock
105
+ - bin/alf
106
+ - lib/alf/shell/command/exec.rb
107
+ - lib/alf/shell/command/help.rb
108
+ - lib/alf/shell/command/main.rb
109
+ - lib/alf/shell/command/show.rb
110
+ - lib/alf/shell/command.rb
111
+ - lib/alf/shell/doc_manager.rb
112
+ - lib/alf/shell/ext/signature.rb
113
+ - lib/alf/shell/from_argv.rb
114
+ - lib/alf/shell/loader.rb
115
+ - lib/alf/shell/operator.rb
116
+ - lib/alf/shell/support.rb
117
+ - lib/alf/shell/version.rb
118
+ - lib/alf/shell.rb
119
+ - lib/alf-shell.rb
120
+ - LICENCE.md
121
+ - Manifest.txt
122
+ - Rakefile
123
+ - README.md
124
+ - spec/integration/__database__/group.alf
125
+ - spec/integration/__database__/parts.rash
126
+ - spec/integration/__database__/suppliers.rash
127
+ - spec/integration/__database__/suppliers_csv.csv
128
+ - spec/integration/__database__/supplies.rash
129
+ - spec/integration/alf/alf.db
130
+ - spec/integration/alf/alf_db.cmd
131
+ - spec/integration/alf/alf_db.stdout
132
+ - spec/integration/alf/alf_e.cmd
133
+ - spec/integration/alf/alf_e.stdout
134
+ - spec/integration/alf/alf_help.cmd
135
+ - spec/integration/alf/alf_help.stdout
136
+ - spec/integration/alf/alf_json.cmd
137
+ - spec/integration/alf/alf_json.stdout
138
+ - spec/integration/alf/alf_r.cmd
139
+ - spec/integration/alf/alf_r.stdout
140
+ - spec/integration/alf/alf_version.cmd
141
+ - spec/integration/alf/alf_version.stdout
142
+ - spec/integration/alf/alf_yaml.cmd
143
+ - spec/integration/alf/alf_yaml.stdout
144
+ - spec/integration/alf/rel.rash
145
+ - spec/integration/autonum/autonum_0.cmd
146
+ - spec/integration/autonum/autonum_0.stdout
147
+ - spec/integration/autonum/autonum_1.cmd
148
+ - spec/integration/autonum/autonum_1.stdout
149
+ - spec/integration/clip/clip_0.cmd
150
+ - spec/integration/clip/clip_0.stdout
151
+ - spec/integration/clip/clip_1.cmd
152
+ - spec/integration/clip/clip_1.stdout
153
+ - spec/integration/coerce/coerce_1.cmd
154
+ - spec/integration/coerce/coerce_1.stdout
155
+ - spec/integration/compact/compact_0.cmd
156
+ - spec/integration/compact/compact_0.stdout
157
+ - spec/integration/defaults/defaults_0.cmd
158
+ - spec/integration/defaults/defaults_0.stdout
159
+ - spec/integration/defaults/defaults_1.cmd
160
+ - spec/integration/defaults/defaults_1.stdout
161
+ - spec/integration/defaults/defaults_2.cmd
162
+ - spec/integration/defaults/defaults_2.stdout
163
+ - spec/integration/extend/extend_0.cmd
164
+ - spec/integration/extend/extend_0.stdout
165
+ - spec/integration/generator/generator_1.cmd
166
+ - spec/integration/generator/generator_1.stdout
167
+ - spec/integration/generator/generator_2.cmd
168
+ - spec/integration/generator/generator_2.stdout
169
+ - spec/integration/generator/generator_3.cmd
170
+ - spec/integration/generator/generator_3.stdout
171
+ - spec/integration/group/group_0.cmd
172
+ - spec/integration/group/group_0.stdout
173
+ - spec/integration/group/group_1.cmd
174
+ - spec/integration/group/group_1.stdout
175
+ - spec/integration/help/help_1.cmd
176
+ - spec/integration/help/help_1.stdout
177
+ - spec/integration/intersect/intersect_0.cmd
178
+ - spec/integration/intersect/intersect_0.stdout
179
+ - spec/integration/join/join_0.cmd
180
+ - spec/integration/join/join_0.stdout
181
+ - spec/integration/matching/matching_0.cmd
182
+ - spec/integration/matching/matching_0.stdout
183
+ - spec/integration/minus/minus_0.cmd
184
+ - spec/integration/minus/minus_0.stdout
185
+ - spec/integration/not-matching/not-matching_0.cmd
186
+ - spec/integration/not-matching/not-matching_0.stdout
187
+ - spec/integration/project/project_0.cmd
188
+ - spec/integration/project/project_0.stdout
189
+ - spec/integration/project/project_1.cmd
190
+ - spec/integration/project/project_1.stdout
191
+ - spec/integration/quota/quota_0.cmd
192
+ - spec/integration/quota/quota_0.stdout
193
+ - spec/integration/rank/rank_1.cmd
194
+ - spec/integration/rank/rank_1.stdout
195
+ - spec/integration/rank/rank_2.cmd
196
+ - spec/integration/rank/rank_2.stdout
197
+ - spec/integration/rank/rank_3.cmd
198
+ - spec/integration/rank/rank_3.stdout
199
+ - spec/integration/rank/rank_4.cmd
200
+ - spec/integration/rank/rank_4.stdout
201
+ - spec/integration/rank/rank_5.cmd
202
+ - spec/integration/rank/rank_5.stdout
203
+ - spec/integration/rename/rename_0.cmd
204
+ - spec/integration/rename/rename_0.stdout
205
+ - spec/integration/restrict/restrict_0.cmd
206
+ - spec/integration/restrict/restrict_0.stdout
207
+ - spec/integration/restrict/restrict_1.cmd
208
+ - spec/integration/restrict/restrict_1.stdout
209
+ - spec/integration/show/show_base.cmd
210
+ - spec/integration/show/show_base.stdout
211
+ - spec/integration/show/show_base_sort_1.cmd
212
+ - spec/integration/show/show_base_sort_1.stdout
213
+ - spec/integration/show/show_base_sort_2.cmd
214
+ - spec/integration/show/show_base_sort_2.stdout
215
+ - spec/integration/show/show_conflictual.cmd
216
+ - spec/integration/show/show_conflictual.stdout
217
+ - spec/integration/show/show_ff.cmd
218
+ - spec/integration/show/show_ff.stdout
219
+ - spec/integration/show/show_rash.cmd
220
+ - spec/integration/show/show_rash.stdout
221
+ - spec/integration/show/show_rash_pretty.cmd
222
+ - spec/integration/show/show_rash_pretty.stdout
223
+ - spec/integration/show/show_yaml.cmd
224
+ - spec/integration/show/show_yaml.stdout
225
+ - spec/integration/sort/sort_0.cmd
226
+ - spec/integration/sort/sort_0.stdout
227
+ - spec/integration/sort/sort_1.cmd
228
+ - spec/integration/sort/sort_1.stdout
229
+ - spec/integration/sort/sort_2.cmd
230
+ - spec/integration/sort/sort_2.stdout
231
+ - spec/integration/sort/sort_3.cmd
232
+ - spec/integration/sort/sort_3.stdout
233
+ - spec/integration/summarize/summarize_0.cmd
234
+ - spec/integration/summarize/summarize_0.stdout
235
+ - spec/integration/test_shell.rb
236
+ - spec/integration/union/union_0.cmd
237
+ - spec/integration/union/union_0.stdout
238
+ - spec/integration/unwrap/unwrap_0.cmd
239
+ - spec/integration/unwrap/unwrap_0.stdout
240
+ - spec/integration/wrap/wrap_0.cmd
241
+ - spec/integration/wrap/wrap_0.stdout
242
+ - spec/spec_helper.rb
243
+ - spec/test_shell.rb
244
+ - spec/unit/doc_manager/dynamic.md
245
+ - spec/unit/doc_manager/example.md
246
+ - spec/unit/doc_manager/example_1.txt
247
+ - spec/unit/doc_manager/static.md
248
+ - spec/unit/doc_manager/test_call.rb
249
+ - spec/unit/ext/signature/test_argv2args.rb
250
+ - spec/unit/ext/signature/test_to_shell.rb
251
+ - spec/unit/from_argv/test_to_attr_list.rb
252
+ - spec/unit/from_argv/test_to_attr_name.rb
253
+ - spec/unit/from_argv/test_to_boolean.rb
254
+ - spec/unit/from_argv/test_to_heading.rb
255
+ - spec/unit/from_argv/test_to_ordering.rb
256
+ - spec/unit/from_argv/test_to_predicate.rb
257
+ - spec/unit/from_argv/test_to_renaming.rb
258
+ - spec/unit/from_argv/test_to_size.rb
259
+ - spec/unit/from_argv/test_to_summarization.rb
260
+ - spec/unit/from_argv/test_to_tuple_computation.rb
261
+ - spec/unit/from_argv/test_to_tuple_expression.rb
262
+ - spec/unit/main/test_class_methods.rb
263
+ - spec/unit/operator/test_autonum.rb
264
+ - spec/unit/operator/test_clip.rb
265
+ - spec/unit/operator/test_coerce.rb
266
+ - spec/unit/operator/test_compact.rb
267
+ - spec/unit/operator/test_defaults.rb
268
+ - spec/unit/operator/test_extend.rb
269
+ - spec/unit/operator/test_generator.rb
270
+ - spec/unit/operator/test_group.rb
271
+ - spec/unit/operator/test_infer_heading.rb
272
+ - spec/unit/operator/test_intersect.rb
273
+ - spec/unit/operator/test_join.rb
274
+ - spec/unit/operator/test_matching.rb
275
+ - spec/unit/operator/test_minus.rb
276
+ - spec/unit/operator/test_not_matching.rb
277
+ - spec/unit/operator/test_project.rb
278
+ - spec/unit/operator/test_quota.rb
279
+ - spec/unit/operator/test_rank.rb
280
+ - spec/unit/operator/test_rename.rb
281
+ - spec/unit/operator/test_restrict.rb
282
+ - spec/unit/operator/test_sort.rb
283
+ - spec/unit/operator/test_summarize.rb
284
+ - spec/unit/operator/test_ungroup.rb
285
+ - spec/unit/operator/test_union.rb
286
+ - spec/unit/operator/test_unwrap.rb
287
+ - spec/unit/operator/test_wrap.rb
288
+ - tasks/gem.rake
289
+ - tasks/test.rake
290
+ homepage: http://github.com/alf-tool/alf-shell
291
+ licenses: []
292
+ post_install_message:
293
+ rdoc_options: []
294
+ require_paths:
295
+ - lib
296
+ required_ruby_version: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ segments:
303
+ - 0
304
+ hash: -1701275740849508639
305
+ required_rubygems_version: !ruby/object:Gem::Requirement
306
+ none: false
307
+ requirements:
308
+ - - ! '>='
309
+ - !ruby/object:Gem::Version
310
+ version: '0'
311
+ requirements: []
312
+ rubyforge_project:
313
+ rubygems_version: 1.8.25
314
+ signing_key:
315
+ specification_version: 3
316
+ summary: Bring Alf's relational algebra to the shell
317
+ test_files: []