sqlite_ext 1.0.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65d496b1a883d0434eca25d716a17ee3b8601c10
4
- data.tar.gz: 072a4e2652b1cd62ae62387e545cb951ca36718d
3
+ metadata.gz: 78941c80576ab0ae3a12eadd30c76532873d2be7
4
+ data.tar.gz: 4d39aa19528e2630b5bb0ca20f9030f7aab7a8c8
5
5
  SHA512:
6
- metadata.gz: edde829aee324957431fdef3e21cbc571ee2bf27d5428f8414eddc6af8e4e1762d4e1978bdaaf8ca998332219877898d6637cb9e39dfc15a3cc0f7802a380fb3
7
- data.tar.gz: 949450c43351bdfd193da438b247e01faf495fdc2435198db4bff6e6789279c1dbeccb9d246678eec1aa9e06169662cfaffe7eef4e4df984a114918e7a91a4bf
6
+ metadata.gz: 9b637e9f54e0cb68cc775c9022fb16a4ebb41635f62c6636d4cc35f0d694e9075de94819c0183f958bf1ef421bc9b228762f8aa2bb980ae556679ecdcc33866f
7
+ data.tar.gz: 61aeab9272af31030d3ecc4e526882f70c240eca9202d52f3120f8640ced8ceda66e2b3401300e33921a1f59843c976c12334308a29ed32d2cc6a2ef90121597
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 1.1.0 - 2016-05-25
2
+ * Enhancements
3
+ * `SqliteExt.register_ruby_math` now also registers `floor` and `ceil`
4
+ functions.
5
+
1
6
  ### 1.0.0 - 2016-06-23
2
7
  * Features
3
8
  * Added `SqliteExt.register_ruby_math`. Registers most of Ruby's `Math`
data/lib/sqlite_ext.rb CHANGED
@@ -69,9 +69,10 @@ module SqliteExt
69
69
  end
70
70
  end
71
71
 
72
- # Registers most of the public module methods of Ruby's `Math`
73
- # module to be used as a functions in SQL code executed
74
- # through subsequent new instances of `SQLite3::Database`.
72
+ # Registers most of the public module methods of Ruby's
73
+ # `Math` module as well as `ceil` and `floor` to be used as
74
+ # functions in SQL code executed # through subsequent new
75
+ # instances of `SQLite3::Database`.
75
76
  #
76
77
  # The `Math.frexp` method is omitted becuse it returns an
77
78
  # array, and there is no way to return an array from a SQL
@@ -84,6 +85,9 @@ module SqliteExt
84
85
  fn_methods.each do |m|
85
86
  register_function m, Math.method(m)
86
87
  end
88
+ [:floor, :ceil].each do |m|
89
+ register_function m, m.to_proc
90
+ end
87
91
  end
88
92
 
89
93
  # Registers a #create_function call to be invoked on every
@@ -1,3 +1,3 @@
1
1
  module SqliteExt
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Jorgensen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-24 00:00:00.000000000 Z
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3