ambition 0.1.6 → 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.
Files changed (4) hide show
  1. data/README +7 -2
  2. data/Rakefile +1 -1
  3. data/lib/ambition/processor.rb +8 -8
  4. metadata +2 -2
data/README CHANGED
@@ -9,7 +9,7 @@ but instead I'm just going to show you some examples.
9
9
  The goal is this: write once, run with ActiveRecord, Sequel, DataMapper,
10
10
  whatever. Kind of like Rack for databases.
11
11
 
12
- == Git It (Not with Git, though)
12
+ == Git It (with Git, even)
13
13
 
14
14
  $ sudo gem install ambition -y
15
15
 
@@ -24,6 +24,10 @@ To use with Rails, after installing the gem:
24
24
 
25
25
  RDoc exists: http://rock.errtheblog.com/ambition
26
26
 
27
+ Have at the Git repo:
28
+
29
+ $ git clone git://errtheblog.com/git/ambition
30
+
27
31
  == Examples
28
32
 
29
33
  Basically, you write your SQL in Ruby. No, not in Ruby. As Ruby.
@@ -199,7 +203,8 @@ possible.
199
203
 
200
204
  == SELECT * FROM bugs
201
205
 
202
- Found a bug? Sweet. Add it at the Lighthouse: http://err.lighthouseapp.com/projects/466-plugins/tickets/new
206
+ Found a bug? Sweet. Add it at the Lighthouse:
207
+ http://err.lighthouseapp.com/projects/466-plugins/tickets/new
203
208
 
204
209
  Feature requests are welcome.
205
210
 
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'rake/rdoctask'
4
4
 
5
- Version = '0.1.6'
5
+ Version = '0.2.0'
6
6
 
7
7
  module Rake::TaskManager
8
8
  def redefine_task(task_class, args, &block)
@@ -1,19 +1,14 @@
1
1
  require 'active_record/connection_adapters/abstract/quoting'
2
2
 
3
3
  module Ambition
4
- class Processor < SexpProcessor
4
+ class Processor
5
5
  include ActiveRecord::ConnectionAdapters::Quoting
6
6
 
7
7
  attr_reader :key, :join_string, :prefix, :includes
8
8
 
9
9
  def initialize
10
- super()
11
- @strict = false
12
- @expected = String
13
- @auto_shift_type = true
14
- @warn_on_default = false
15
- @default_method = :process_error
16
- @includes = []
10
+ @unsupported = [:alloca, :cfunc, :cref, :evstr, :ifunc, :last, :memo, :newline, :opt_n, :method] # internal nodes that you can't get to
11
+ @includes = []
17
12
  end
18
13
 
19
14
  ##
@@ -92,5 +87,10 @@ module Ambition
92
87
  raise "No reflection `#{receiver.last}' found on #{@owner}"
93
88
  end
94
89
  end
90
+
91
+ def process(node)
92
+ node ||= []
93
+ respond_to?(method = "process_#{node.shift}") ? send(method, node) : ''
94
+ end
95
95
  end
96
96
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: ambition
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.6
7
- date: 2007-09-02 00:00:00 -07:00
6
+ version: 0.2.0
7
+ date: 2007-09-04 00:00:00 -07:00
8
8
  summary: Ambition builds SQL from plain jane Ruby.
9
9
  require_paths:
10
10
  - lib