expressive 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- expressive (0.0.24)
4
+ expressive (0.0.25)
5
5
  awesome_print (~> 1.0.2)
6
6
  json
7
7
  polyglot (~> 0.3.3)
@@ -14,10 +14,11 @@ GEM
14
14
  addressable (2.3.4)
15
15
  awesome_print (1.0.2)
16
16
  coderay (1.0.9)
17
- crack (0.3.2)
17
+ crack (0.4.0)
18
+ safe_yaml (~> 0.9.0)
18
19
  diff-lcs (1.1.3)
19
- ffi (1.8.1)
20
- ffi (1.8.1-java)
20
+ ffi (1.9.0)
21
+ ffi (1.9.0-java)
21
22
  guard (1.3.3)
22
23
  listen (>= 0.4.2)
23
24
  thor (>= 0.14.6)
@@ -25,7 +26,7 @@ GEM
25
26
  guard (>= 1.1)
26
27
  json (1.8.0)
27
28
  json (1.8.0-java)
28
- listen (1.1.2)
29
+ listen (1.1.6)
29
30
  rb-fsevent (>= 0.9.3)
30
31
  rb-inotify (>= 0.9)
31
32
  rb-kqueue (>= 0.2)
@@ -60,12 +61,13 @@ GEM
60
61
  diff-lcs (~> 1.1.3)
61
62
  rspec-mocks (2.11.3)
62
63
  ruby_gntp (0.3.4)
64
+ safe_yaml (0.9.3)
63
65
  slop (3.4.5)
64
66
  spoon (0.0.4)
65
67
  ffi
66
68
  thor (0.18.1)
67
69
  timecop (0.5.9.2)
68
- treetop (1.4.12)
70
+ treetop (1.4.14)
69
71
  polyglot
70
72
  polyglot (>= 0.3.1)
71
73
  webmock (1.8.11)
@@ -1,3 +1,3 @@
1
1
  module Expressive
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
data/lib/scope.rb CHANGED
@@ -127,8 +127,7 @@ module Expressive
127
127
  define('and') {|a,b| !!a && !!b }
128
128
  define('or') {|a,b| !!a || !!b }
129
129
  define('sum') {|*args| args.flatten.map(&:to_f).reduce(:+) || 0 }
130
- define('$sum') {|*args| args.flatten.map(&:to_f).reduce(:+) || 0 }
131
- define('sub') {|*args| result = args.flatten.map(&:to_f).reduce(:-) || 0 }
130
+ define('$sub') {|*args| result = args.flatten.map(&:to_f).reduce(:-) || 0 }
132
131
  define('if') {|*args| args.compact!; args[0] ? args[1] : args[2] }
133
132
  define('$days_ago'){|*args| Time.now - args[0].to_i * 86400 }
134
133
  define('$hours_ago'){|*args| Time.now - args[0].to_i * 3600 }
@@ -37,7 +37,7 @@ describe "Expressive" do
37
37
  it { Expressive.run("(* 4 2)").should eql 8.0 }
38
38
  it { Expressive.run("(/ 4 2)").should eql 2.0 }
39
39
  it { Expressive.run("(sum 1 2 3)").should eql 6.0 }
40
- it { Expressive.run("(sub 1 2 3)").should eql -4.0 }
40
+ it { Expressive.run("($sub 1 2 3)").should eql -4.0 }
41
41
  it { Expressive.run("(sum )").should eql 0 }
42
42
  it { Expressive.run("(- (sum 1 5 7) 3)").should eql 10.0}
43
43
  it { Expressive.run("(round 0.12345 2)").should eql 0.12}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -294,7 +294,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
294
294
  version: '0'
295
295
  segments:
296
296
  - 0
297
- hash: 419564563370159517
297
+ hash: -1947057546795348556
298
298
  required_rubygems_version: !ruby/object:Gem::Requirement
299
299
  none: false
300
300
  requirements:
@@ -303,7 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
303
303
  version: '0'
304
304
  segments:
305
305
  - 0
306
- hash: 419564563370159517
306
+ hash: -1947057546795348556
307
307
  requirements: []
308
308
  rubyforge_project:
309
309
  rubygems_version: 1.8.24