ambition 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ambition.gemspec +39 -17
- data/lib/ambition/api.rb +1 -3
- data/lib/ambition/processors/base.rb +3 -7
- data/lib/ambition/sexp_translator.rb +1 -0
- data/test/debug +0 -0
- metadata +90 -62
data/ambition.gemspec
CHANGED
@@ -1,25 +1,47 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Ambition-0.5.
|
2
|
+
# Gem::Specification for Ambition-0.5.4
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = %q{ambition}
|
7
|
-
s.version = "0.5.
|
8
|
-
|
9
|
-
s.
|
7
|
+
s.version = "0.5.4"
|
8
|
+
|
9
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
10
|
+
s.authors = ["Chris Wanstrath"]
|
11
|
+
s.date = %q{2008-09-16}
|
12
|
+
s.default_executable = %q{ambition_adapter}
|
13
|
+
s.description = %q{Ambition builds yer API calls from plain jane Ruby.}
|
10
14
|
s.email = %q{chris@ozmm.org}
|
15
|
+
s.executables = ["ambition_adapter"]
|
16
|
+
s.extra_rdoc_files = ["bin/ambition_adapter", "lib/ambition/api.rb", "lib/ambition/context.rb", "lib/ambition/core_ext.rb", "lib/ambition/enumerable.rb", "lib/ambition/processors/base.rb", "lib/ambition/processors/ruby.rb", "lib/ambition/processors/select.rb", "lib/ambition/processors/slice.rb", "lib/ambition/processors/sort.rb", "lib/ambition/sexp_translator.rb", "lib/ambition.rb", "LICENSE", "README"]
|
17
|
+
s.files = ["app_generators/ambition_adapter/ambition_adapter_generator.rb", "app_generators/ambition_adapter/templates/lib/adapter/base.rb.erb", "app_generators/ambition_adapter/templates/lib/adapter/query.rb.erb", "app_generators/ambition_adapter/templates/lib/adapter/select.rb.erb", "app_generators/ambition_adapter/templates/lib/adapter/slice.rb.erb", "app_generators/ambition_adapter/templates/lib/adapter/sort.rb.erb", "app_generators/ambition_adapter/templates/lib/init.rb.erb", "app_generators/ambition_adapter/templates/LICENSE", "app_generators/ambition_adapter/templates/Rakefile", "app_generators/ambition_adapter/templates/README", "app_generators/ambition_adapter/templates/test/helper.rb.erb", "app_generators/ambition_adapter/templates/test/select_test.rb.erb", "app_generators/ambition_adapter/templates/test/slice_test.rb.erb", "app_generators/ambition_adapter/templates/test/sort_test.rb.erb", "app_generators/ambition_adapter/USAGE", "bin/ambition_adapter", "lib/ambition/api.rb", "lib/ambition/context.rb", "lib/ambition/core_ext.rb", "lib/ambition/enumerable.rb", "lib/ambition/processors/base.rb", "lib/ambition/processors/ruby.rb", "lib/ambition/processors/select.rb", "lib/ambition/processors/slice.rb", "lib/ambition/processors/sort.rb", "lib/ambition/sexp_translator.rb", "lib/ambition.rb", "LICENSE", "Manifest", "README", "test/adapters/exemplar/association_test.rb", "test/adapters/exemplar/count_test.rb", "test/adapters/exemplar/detect_test.rb", "test/adapters/exemplar/enumerable_test.rb", "test/adapters/exemplar/helper.rb", "test/adapters/exemplar/index_operator.rb", "test/adapters/exemplar/reject_test.rb", "test/adapters/exemplar/select_test.rb", "test/adapters/exemplar/slice_test.rb", "test/adapters/exemplar/sort_test.rb", "test/debug", "test/helper.rb", "ambition.gemspec"]
|
18
|
+
s.has_rdoc = true
|
11
19
|
s.homepage = %q{http://errtheblog.com/}
|
20
|
+
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Ambition", "--main", "README"]
|
21
|
+
s.require_paths = ["lib"]
|
22
|
+
s.required_ruby_version = Gem::Requirement.new(">= 1.8.6")
|
12
23
|
s.rubyforge_project = %q{err}
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
|
16
|
-
s.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
24
|
+
s.rubygems_version = %q{1.2.0}
|
25
|
+
s.summary = %q{Ambition builds yer API calls from plain jane Ruby.}
|
26
|
+
|
27
|
+
if s.respond_to? :specification_version then
|
28
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
29
|
+
s.specification_version = 2
|
30
|
+
|
31
|
+
if current_version >= 3 then
|
32
|
+
s.add_runtime_dependency(%q<ParseTree>, ["= 2.1.1"])
|
33
|
+
s.add_runtime_dependency(%q<ruby2ruby>, ["= 1.1.8"])
|
34
|
+
s.add_runtime_dependency(%q<rubigen>, ["= 1.1.1"])
|
35
|
+
else
|
36
|
+
s.add_dependency(%q<ParseTree>, ["= 2.1.1"])
|
37
|
+
s.add_dependency(%q<ruby2ruby>, ["= 1.1.8"])
|
38
|
+
s.add_dependency(%q<rubigen>, ["= 1.1.1"])
|
39
|
+
end
|
40
|
+
else
|
41
|
+
s.add_dependency(%q<ParseTree>, ["= 2.1.1"])
|
42
|
+
s.add_dependency(%q<ruby2ruby>, ["= 1.1.8"])
|
43
|
+
s.add_dependency(%q<rubigen>, ["= 1.1.1"])
|
44
|
+
end
|
23
45
|
end
|
24
46
|
|
25
47
|
|
@@ -29,7 +51,7 @@ end
|
|
29
51
|
# require 'rake/testtask'
|
30
52
|
# require 'rake/rdoctask'
|
31
53
|
#
|
32
|
-
# Version = '0.5.
|
54
|
+
# Version = '0.5.4'
|
33
55
|
#
|
34
56
|
# module Rake::TaskManager
|
35
57
|
# def delete_task(task_class, *args, &block)
|
@@ -58,8 +80,8 @@ end
|
|
58
80
|
# p.ruby_version = '>= 1.8.6'
|
59
81
|
# p.ignore_pattern = /^(\.git|site|adapters).+/
|
60
82
|
# p.test_pattern = 'test/*_test.rb'
|
61
|
-
# p.dependencies << 'ParseTree =2.
|
62
|
-
# p.dependencies << 'ruby2ruby =1.1.
|
83
|
+
# p.dependencies << 'ParseTree =2.1.1'
|
84
|
+
# p.dependencies << 'ruby2ruby =1.1.8'
|
63
85
|
# p.dependencies << 'rubigen =1.1.1'
|
64
86
|
# end
|
65
87
|
#
|
data/lib/ambition/api.rb
CHANGED
@@ -25,7 +25,7 @@ module Ambition #:nodoc:
|
|
25
25
|
alias_method :to_a, :entries
|
26
26
|
|
27
27
|
def size
|
28
|
-
ambition_context.size
|
28
|
+
ambition_context == self ? super : ambition_context.size
|
29
29
|
end
|
30
30
|
|
31
31
|
def slice(start, length = nil)
|
@@ -68,7 +68,6 @@ module Ambition #:nodoc:
|
|
68
68
|
size.zero?
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
71
|
# Builds a new +Context+.
|
73
72
|
def ambition_context
|
74
73
|
Context.new(self)
|
@@ -81,7 +80,6 @@ module Ambition #:nodoc:
|
|
81
80
|
@@ambition_adapter[name] || @@ambition_adapter[parent.name]
|
82
81
|
end
|
83
82
|
|
84
|
-
|
85
83
|
# Assign the ambition adapter. Typically, you use this in the toplevel file of your adapter.
|
86
84
|
#
|
87
85
|
# For example, for ambitious_sphinx, in our lib/ambition/adapters/ambitious_sphinx.rb:
|
@@ -10,18 +10,13 @@ module Ambition #:nodoc:
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def process_dasgn_curr(exp)
|
13
|
-
@receiver = exp.first
|
14
|
-
@receiver.to_s
|
13
|
+
(@receiver = exp.first).to_s
|
15
14
|
end
|
16
15
|
alias_method :process_dasgn, :process_dasgn_curr
|
17
16
|
|
18
17
|
def process_array(exp)
|
19
18
|
# Branch on whether this is straight Ruby or a real array
|
20
|
-
|
21
|
-
ruby
|
22
|
-
else
|
23
|
-
exp.map { |m| process(m) }
|
24
|
-
end
|
19
|
+
rubify(exp) || exp.map { |m| process(m) }
|
25
20
|
end
|
26
21
|
|
27
22
|
def process_str(exp)
|
@@ -102,6 +97,7 @@ module Ambition #:nodoc:
|
|
102
97
|
def self.translator(context, name = nil)
|
103
98
|
# Grok the adapter name
|
104
99
|
name ||= self.name.split('::').last
|
100
|
+
|
105
101
|
# Get the module for it
|
106
102
|
klass = context.owner.ambition_adapter.const_get(name)
|
107
103
|
instance = klass.new
|
data/test/debug
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,33 +1,68 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
4
2
|
name: ambition
|
5
3
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.5.
|
7
|
-
date: 2008-02-29 00:00:00 -08:00
|
8
|
-
summary: Ambition builds yer API calls from plain jane Ruby.
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email: chris@ozmm.org
|
12
|
-
homepage: http://errtheblog.com/
|
13
|
-
rubyforge_project: err
|
14
|
-
description: Ambition builds yer API calls from plain jane Ruby.
|
15
|
-
autorequire:
|
16
|
-
default_executable:
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.8.6
|
24
|
-
version:
|
4
|
+
version: 0.5.4
|
25
5
|
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
28
|
-
post_install_message:
|
29
6
|
authors:
|
30
7
|
- Chris Wanstrath
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-09-16 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ParseTree
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.1.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: ruby2ruby
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.8
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rubigen
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.1.1
|
44
|
+
version:
|
45
|
+
description: Ambition builds yer API calls from plain jane Ruby.
|
46
|
+
email: chris@ozmm.org
|
47
|
+
executables:
|
48
|
+
- ambition_adapter
|
49
|
+
extensions: []
|
50
|
+
|
51
|
+
extra_rdoc_files:
|
52
|
+
- bin/ambition_adapter
|
53
|
+
- lib/ambition/api.rb
|
54
|
+
- lib/ambition/context.rb
|
55
|
+
- lib/ambition/core_ext.rb
|
56
|
+
- lib/ambition/enumerable.rb
|
57
|
+
- lib/ambition/processors/base.rb
|
58
|
+
- lib/ambition/processors/ruby.rb
|
59
|
+
- lib/ambition/processors/select.rb
|
60
|
+
- lib/ambition/processors/slice.rb
|
61
|
+
- lib/ambition/processors/sort.rb
|
62
|
+
- lib/ambition/sexp_translator.rb
|
63
|
+
- lib/ambition.rb
|
64
|
+
- LICENSE
|
65
|
+
- README
|
31
66
|
files:
|
32
67
|
- app_generators/ambition_adapter/ambition_adapter_generator.rb
|
33
68
|
- app_generators/ambition_adapter/templates/lib/adapter/base.rb.erb
|
@@ -72,43 +107,36 @@ files:
|
|
72
107
|
- test/debug
|
73
108
|
- test/helper.rb
|
74
109
|
- ambition.gemspec
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
-
|
83
|
-
|
84
|
-
|
110
|
+
has_rdoc: true
|
111
|
+
homepage: http://errtheblog.com/
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options:
|
114
|
+
- --line-numbers
|
115
|
+
- --inline-source
|
116
|
+
- --title
|
117
|
+
- Ambition
|
118
|
+
- --main
|
119
|
+
- README
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: 1.8.6
|
127
|
+
version:
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: "0"
|
133
|
+
version:
|
85
134
|
requirements: []
|
86
135
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: 2.0.1
|
96
|
-
version:
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: ruby2ruby
|
99
|
-
version_requirement:
|
100
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
101
|
-
requirements:
|
102
|
-
- - "="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 1.1.7
|
105
|
-
version:
|
106
|
-
- !ruby/object:Gem::Dependency
|
107
|
-
name: rubigen
|
108
|
-
version_requirement:
|
109
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
110
|
-
requirements:
|
111
|
-
- - "="
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: 1.1.1
|
114
|
-
version:
|
136
|
+
rubyforge_project: err
|
137
|
+
rubygems_version: 1.2.0
|
138
|
+
signing_key:
|
139
|
+
specification_version: 2
|
140
|
+
summary: Ambition builds yer API calls from plain jane Ruby.
|
141
|
+
test_files: []
|
142
|
+
|