taps 0.3.19 → 0.3.20.pre1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :build:
3
3
  :major: 0
4
4
  :minor: 3
5
- :patch: 19
5
+ :patch: 20.pre1
data/lib/taps/json.rb CHANGED
@@ -1,5 +1,13 @@
1
+ require "active_support"
2
+ require "active_support/json"
3
+ require "active_support/ordered_hash"
4
+
5
+ # for compatibility with activesupport 2.2 and below
1
6
  unless Kernel.const_defined?(:JSON)
2
- $:.unshift File.expand_path("../vendor/json_pure-1.5.1/lib", __FILE__)
3
- require "json/pure"
7
+ module JSON
8
+ def self.parse(json)
9
+ ActiveSupport::JSON.decode(json)
10
+ end
11
+ end
4
12
  end
5
13
 
data/lib/taps/server.rb CHANGED
@@ -1,9 +1,14 @@
1
+ require 'hoptoad_notifier'
1
2
  require 'sinatra/base'
2
3
  require 'taps/config'
3
4
  require 'taps/utils'
4
5
  require 'taps/db_session'
5
6
  require 'taps/data_stream'
6
7
 
8
+ HoptoadNotifier.configure do |config|
9
+ config.api_key = ENV["HOPTOAD_API_KEY"]
10
+ end
11
+
7
12
  module Taps
8
13
  class Server < Sinatra::Base
9
14
  use Rack::Auth::Basic do |login, password|
@@ -13,6 +18,7 @@ class Server < Sinatra::Base
13
18
  use Rack::Deflater unless ENV['NO_DEFLATE']
14
19
 
15
20
  error do
21
+ HoptoadNotifier.notify(e)
16
22
  e = request.env['sinatra.error']
17
23
  if e.kind_of?(Taps::BaseError)
18
24
  content_type "application/json"
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taps
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
5
- prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 19
10
- version: 0.3.19
4
+ prerelease: 7
5
+ version: 0.3.20.pre1
11
6
  platform: ruby
12
7
  authors:
13
8
  - Ricardo Chimal, Jr.
@@ -15,166 +10,133 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-03-09 00:00:00 -05:00
13
+ date: 2011-03-20 00:00:00 -04:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
- name: rack
17
+ name: activesupport
23
18
  prerelease: false
24
19
  requirement: &id001 !ruby/object:Gem::Requirement
25
20
  none: false
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- hash: 21
30
- segments:
31
- - 1
32
- - 0
33
- - 1
34
- version: 1.0.1
24
+ version: 2.1.0
35
25
  type: :runtime
36
26
  version_requirements: *id001
37
27
  - !ruby/object:Gem::Dependency
38
- name: rest-client
28
+ name: rack
39
29
  prerelease: false
40
30
  requirement: &id002 !ruby/object:Gem::Requirement
41
31
  none: false
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 7
46
- segments:
47
- - 1
48
- - 4
49
- - 0
35
+ version: 1.0.1
36
+ type: :runtime
37
+ version_requirements: *id002
38
+ - !ruby/object:Gem::Dependency
39
+ name: rest-client
40
+ prerelease: false
41
+ requirement: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
50
46
  version: 1.4.0
51
47
  - - <
52
48
  - !ruby/object:Gem::Version
53
- hash: 11
54
- segments:
55
- - 1
56
- - 7
57
- - 0
58
49
  version: 1.7.0
59
50
  type: :runtime
60
- version_requirements: *id002
51
+ version_requirements: *id003
61
52
  - !ruby/object:Gem::Dependency
62
53
  name: sequel
63
54
  prerelease: false
64
- requirement: &id003 !ruby/object:Gem::Requirement
55
+ requirement: &id004 !ruby/object:Gem::Requirement
65
56
  none: false
66
57
  requirements:
67
58
  - - ~>
68
59
  - !ruby/object:Gem::Version
69
- hash: 87
70
- segments:
71
- - 3
72
- - 20
73
- - 0
74
60
  version: 3.20.0
75
61
  type: :runtime
76
- version_requirements: *id003
62
+ version_requirements: *id004
77
63
  - !ruby/object:Gem::Dependency
78
64
  name: sinatra
79
65
  prerelease: false
80
- requirement: &id004 !ruby/object:Gem::Requirement
66
+ requirement: &id005 !ruby/object:Gem::Requirement
81
67
  none: false
82
68
  requirements:
83
69
  - - ~>
84
70
  - !ruby/object:Gem::Version
85
- hash: 23
86
- segments:
87
- - 1
88
- - 0
89
- - 0
90
71
  version: 1.0.0
91
72
  type: :runtime
92
- version_requirements: *id004
73
+ version_requirements: *id005
93
74
  - !ruby/object:Gem::Dependency
94
75
  name: sqlite3-ruby
95
76
  prerelease: false
96
- requirement: &id005 !ruby/object:Gem::Requirement
77
+ requirement: &id006 !ruby/object:Gem::Requirement
97
78
  none: false
98
79
  requirements:
99
80
  - - ~>
100
81
  - !ruby/object:Gem::Version
101
- hash: 11
102
- segments:
103
- - 1
104
- - 2
105
82
  version: "1.2"
106
83
  type: :runtime
107
- version_requirements: *id005
84
+ version_requirements: *id006
108
85
  - !ruby/object:Gem::Dependency
109
86
  name: bacon
110
87
  prerelease: false
111
- requirement: &id006 !ruby/object:Gem::Requirement
88
+ requirement: &id007 !ruby/object:Gem::Requirement
112
89
  none: false
113
90
  requirements:
114
91
  - - ">="
115
92
  - !ruby/object:Gem::Version
116
- hash: 3
117
- segments:
118
- - 0
119
93
  version: "0"
120
94
  type: :development
121
- version_requirements: *id006
95
+ version_requirements: *id007
122
96
  - !ruby/object:Gem::Dependency
123
97
  name: mocha
124
98
  prerelease: false
125
- requirement: &id007 !ruby/object:Gem::Requirement
99
+ requirement: &id008 !ruby/object:Gem::Requirement
126
100
  none: false
127
101
  requirements:
128
102
  - - ">="
129
103
  - !ruby/object:Gem::Version
130
- hash: 3
131
- segments:
132
- - 0
133
104
  version: "0"
134
105
  type: :development
135
- version_requirements: *id007
106
+ version_requirements: *id008
136
107
  - !ruby/object:Gem::Dependency
137
108
  name: rack-test
138
109
  prerelease: false
139
- requirement: &id008 !ruby/object:Gem::Requirement
110
+ requirement: &id009 !ruby/object:Gem::Requirement
140
111
  none: false
141
112
  requirements:
142
113
  - - ">="
143
114
  - !ruby/object:Gem::Version
144
- hash: 3
145
- segments:
146
- - 0
147
115
  version: "0"
148
116
  type: :development
149
- version_requirements: *id008
117
+ version_requirements: *id009
150
118
  - !ruby/object:Gem::Dependency
151
119
  name: rake
152
120
  prerelease: false
153
- requirement: &id009 !ruby/object:Gem::Requirement
121
+ requirement: &id010 !ruby/object:Gem::Requirement
154
122
  none: false
155
123
  requirements:
156
124
  - - ">="
157
125
  - !ruby/object:Gem::Version
158
- hash: 3
159
- segments:
160
- - 0
161
126
  version: "0"
162
127
  type: :development
163
- version_requirements: *id009
128
+ version_requirements: *id010
164
129
  - !ruby/object:Gem::Dependency
165
130
  name: rcov
166
131
  prerelease: false
167
- requirement: &id010 !ruby/object:Gem::Requirement
132
+ requirement: &id011 !ruby/object:Gem::Requirement
168
133
  none: false
169
134
  requirements:
170
135
  - - ">="
171
136
  - !ruby/object:Gem::Version
172
- hash: 3
173
- segments:
174
- - 0
175
137
  version: "0"
176
138
  type: :development
177
- version_requirements: *id010
139
+ version_requirements: *id011
178
140
  description: A simple database agnostic import/export app to transfer data to/from a remote database.
179
141
  email: ricardo@heroku.com
180
142
  executables:
@@ -203,26 +165,6 @@ files:
203
165
  - lib/taps/schema.rb
204
166
  - lib/taps/server.rb
205
167
  - lib/taps/utils.rb
206
- - lib/taps/vendor/json_pure-1.5.1/CHANGES
207
- - lib/taps/vendor/json_pure-1.5.1/COPYING
208
- - lib/taps/vendor/json_pure-1.5.1/COPYING-json-jruby
209
- - lib/taps/vendor/json_pure-1.5.1/GPL
210
- - lib/taps/vendor/json_pure-1.5.1/lib/json/add/core.rb
211
- - lib/taps/vendor/json_pure-1.5.1/lib/json/add/rails.rb
212
- - lib/taps/vendor/json_pure-1.5.1/lib/json/common.rb
213
- - lib/taps/vendor/json_pure-1.5.1/lib/json/editor.rb
214
- - lib/taps/vendor/json_pure-1.5.1/lib/json/ext.rb
215
- - lib/taps/vendor/json_pure-1.5.1/lib/json/json.xpm
216
- - lib/taps/vendor/json_pure-1.5.1/lib/json/pure/generator.rb
217
- - lib/taps/vendor/json_pure-1.5.1/lib/json/pure/parser.rb
218
- - lib/taps/vendor/json_pure-1.5.1/lib/json/pure.rb
219
- - lib/taps/vendor/json_pure-1.5.1/lib/json/version.rb
220
- - lib/taps/vendor/json_pure-1.5.1/lib/json.rb
221
- - lib/taps/vendor/json_pure-1.5.1/Rakefile
222
- - lib/taps/vendor/json_pure-1.5.1/README
223
- - lib/taps/vendor/json_pure-1.5.1/README-json-jruby.markdown
224
- - lib/taps/vendor/json_pure-1.5.1/TODO
225
- - lib/taps/vendor/json_pure-1.5.1/VERSION
226
168
  - lib/taps/version.rb
227
169
  - README.rdoc
228
170
  - spec/base.rb
@@ -247,23 +189,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
189
  requirements:
248
190
  - - ">="
249
191
  - !ruby/object:Gem::Version
250
- hash: 3
251
- segments:
252
- - 0
253
192
  version: "0"
254
193
  required_rubygems_version: !ruby/object:Gem::Requirement
255
194
  none: false
256
195
  requirements:
257
- - - ">="
196
+ - - ">"
258
197
  - !ruby/object:Gem::Version
259
- hash: 3
260
- segments:
261
- - 0
262
- version: "0"
198
+ version: 1.3.1
263
199
  requirements: []
264
200
 
265
201
  rubyforge_project:
266
- rubygems_version: 1.5.0
202
+ rubygems_version: 1.6.2
267
203
  signing_key:
268
204
  specification_version: 3
269
205
  summary: simple database import/export app
@@ -1,188 +0,0 @@
1
- 2011-01-24 (1.5.1)
2
- * Made rake-compiler build a fat binary gem. This should fix issue
3
- https://github.com/flori/json/issues#issue/54.
4
- 2011-01-22 (1.5.0)
5
- * Included Java source codes for the Jruby extension made by Daniel Luz
6
- <dev@mernen.com>.
7
- * Output full exception message of deep_const_get to aid debugging.
8
- * Fixed an issue with ruby 1.9 Module#const_defined? method, that was
9
- reported by Riley Goodside.
10
- 2010-08-09 (1.4.6)
11
- * Fixed oversight reported in http://github.com/flori/json/issues/closed#issue/23,
12
- always create a new object from the state prototype.
13
- * Made pure and ext api more similar again.
14
- 2010-08-07 (1.4.5)
15
- * Manage data structure nesting depth in state object during generation. This
16
- should reduce problems with to_json method definіtions that only have one
17
- argument.
18
- * Some fixes in the state objects and additional tests.
19
- 2010-08-06 (1.4.4)
20
- * Fixes build problem for rubinius under OS X, http://github.com/flori/json/issues/closed#issue/25
21
- * Fixes crashes described in http://github.com/flori/json/issues/closed#issue/21 and
22
- http://github.com/flori/json/issues/closed#issue/23
23
- 2010-05-05 (1.4.3)
24
- * Fixed some test assertions, from Ruby r27587 and r27590, patch by nobu.
25
- * Fixed issue http://github.com/flori/json/issues/#issue/20 reported by
26
- electronicwhisper@github. Thx!
27
- 2010-04-26 (1.4.2)
28
- * Applied patch from naruse Yui NARUSE <naruse@airemix.com> to make building with
29
- Microsoft Visual C possible again.
30
- * Applied patch from devrandom <c1.github@niftybox.net> in order to allow building of
31
- json_pure if extensiontask is not present.
32
- * Thanks to Dustin Schneider <dustin@stocktwits.com>, who reported a memory
33
- leak, which is fixed in this release.
34
- * Applied 993f261ccb8f911d2ae57e9db48ec7acd0187283 patch from josh@github.
35
- 2010-04-25 (1.4.1)
36
- * Fix for a bug reported by Dan DeLeo <dan@kallistec.com>, caused by T_FIXNUM
37
- being different on 32bit/64bit architectures.
38
- 2010-04-23 (1.4.0)
39
- * Major speed improvements and building with simplified
40
- directory/file-structure.
41
- * Extension should at least be comapatible with MRI, YARV and Rubinius.
42
- 2010-04-07 (1.2.4)
43
- * Triger const_missing callback to make Rails' dynamic class loading work.
44
- 2010-03-11 (1.2.3)
45
- * Added a State#[] method which returns an attribute's value in order to
46
- increase duck type compatibility to Hash.
47
- 2010-02-27 (1.2.2)
48
- * Made some changes to make the building of the parser/generator compatible
49
- to Rubinius.
50
- 2009-11-25 (1.2.1)
51
- * Added :symbolize_names option to Parser, which returns symbols instead of
52
- strings in object names/keys.
53
- 2009-10-01 (1.2.0)
54
- * fast_generate now raises an exeception for nan and infinite floats.
55
- * On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
56
- and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
57
- functions are used to convert from all supported encodings. ASCII-8BIT
58
- encoded strings are handled like all strings under Ruby 1.8 were.
59
- * Better documentation
60
- 2009-08-23 (1.1.9)
61
- * Added forgotten main doc file extra_rdoc_files.
62
- 2009-08-23 (1.1.8)
63
- * Applied a patch by OZAWA Sakuro <sakuro@2238club.org> to make json/pure
64
- work in environments that don't provide iconv.
65
- * Applied patch by okkez_ in order to fix Ruby Bug #1768:
66
- http://redmine.ruby-lang.org/issues/show/1768.
67
- * Finally got around to avoid the rather paranoid escaping of ?/ characters
68
- in the generator's output. The parsers aren't affected by this change.
69
- Thanks to Rich Apodaca <rapodaca@metamolecular.com> for the suggestion.
70
- 2009-06-29 (1.1.7)
71
- * Security Fix for JSON::Pure::Parser. A specially designed string could
72
- cause catastrophic backtracking in one of the parser's regular expressions
73
- in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
74
- Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
75
- problem.
76
- * This release also uses a less strict ruby version requirement for the
77
- creation of the mswin32 native gem.
78
- 2009-05-10 (1.1.6)
79
- * No changes. І tested native linux gems in the last release and they don't
80
- play well with different ruby versions other than the one the gem was built
81
- with. This release is just to bump the version number in order to skip the
82
- native gem on rubyforge.
83
- 2009-05-10 (1.1.5)
84
- * Started to build gems with rake-compiler gem.
85
- * Applied patch object/array class patch from Brian Candler
86
- <B.Candler@pobox.com> and fixes.
87
- 2009-04-01 (1.1.4)
88
- * Fixed a bug in the creation of serialized generic rails objects reported by
89
- Friedrich Graeter <graeter@hydrixos.org>.
90
- * Deleted tests/runner.rb, we're using testrb instead.
91
- * Editor supports Infinity in numbers now.
92
- * Made some changes in order to get the library to compile/run under Ruby
93
- 1.9.
94
- * Improved speed of the code path for the fast_generate method in the pure
95
- variant.
96
- 2008-07-10 (1.1.3)
97
- * Wesley Beary <monki@geemus.com> reported a bug in json/add/core's DateTime
98
- handling: If the nominator and denominator of the offset were divisible by
99
- each other Ruby's Rational#to_s returns them as an integer not a fraction
100
- with '/'. This caused a ZeroDivisionError during parsing.
101
- * Use Date#start and DateTime#start instead of sg method, while
102
- remaining backwards compatible.
103
- * Supports ragel >= 6.0 now.
104
- * Corrected some tests.
105
- * Some minor changes.
106
- 2007-11-27 (1.1.2)
107
- * Remember default dir (last used directory) in editor.
108
- * JSON::Editor.edit method added, the editor can now receive json texts from
109
- the clipboard via C-v.
110
- * Load json texts from an URL pasted via middle button press.
111
- * Added :create_additions option to Parser. This makes it possible to disable
112
- the creation of additions by force, in order to treat json texts as data
113
- while having additions loaded.
114
- * Jacob Maine <jmaine@blurb.com> reported, that JSON(:foo) outputs a JSON
115
- object if the rails addition is enabled, which is wrong. It now outputs a
116
- JSON string "foo" instead, like suggested by Jacob Maine.
117
- * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported
118
- by John Evans lgastako@gmail.com. He could produce a crash in the JSON
119
- generator by returning something other than a String instance from a
120
- to_json method. I now guard against this by doing a rather crude type
121
- check, which raises an exception instead of crashing.
122
- 2007-07-06 (1.1.1)
123
- * Yui NARUSE <naruse@airemix.com> sent some patches to fix tests for Ruby
124
- 1.9. I applied them and adapted some of them a bit to run both on 1.8 and
125
- 1.9.
126
- * Introduced a JSON.parse! method without depth checking for people who like
127
- danger.
128
- * Made generate and pretty_generate methods configurable by an options hash.
129
- * Added :allow_nan option to parser and generator in order to handle NaN,
130
- Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers,
131
- aren't valid JSON according to RFC4627, so by default an exception will be
132
- raised if any of these symbols are encountered. Thanks to Andrea Censi
133
- <andrea.censi@dis.uniroma1.it> for his hint about this.
134
- * Fixed some more tests for Ruby 1.9.
135
- * Implemented dump/load interface of Marshal as suggested in ruby-core:11405
136
- by murphy <murphy@rubychan.de>.
137
- * Implemented the max_nesting feature for generate methods, too.
138
- * Added some implementations for ruby core's custom objects for
139
- serialisation/deserialisation purposes.
140
- 2007-05-21 (1.1.0)
141
- * Implemented max_nesting feature for parser to avoid stack overflows for
142
- data from untrusted sources. If you trust the source, you can disable it
143
- with the option max_nesting => false.
144
- * Piers Cawley <pdcawley@bofh.org.uk> reported a bug, that not every
145
- character can be escaped by ?\ as required by RFC4627. There's a
146
- contradiction between David Crockford's JSON checker test vectors (in
147
- tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because
148
- the JSON checker seems to be a bit older than the RFC.
149
- * Extended license to Ruby License, which includes the GPL.
150
- * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb.
151
- 2007-05-09 (1.0.4)
152
- * Applied a patch from Yui NARUSE <naruse@airemix.com> to make JSON compile
153
- under Ruby 1.9. Thank you very much for mailing it to me!
154
- * Made binary variants of JSON fail early, instead of falling back to the
155
- pure version. This should avoid overshadowing of eventual problems while
156
- loading of the binary.
157
- 2007-03-24 (1.0.3)
158
- * Improved performance of pure variant a bit.
159
- * The ext variant of this release supports the mswin32 platform. Ugh!
160
- 2007-03-24 (1.0.2)
161
- * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed!
162
- 2007-03-24 (1.0.1)
163
- * Forgot some object files in the build dir. I really like that - not!
164
- 2007-03-24 (1.0.0)
165
- * Added C implementations for the JSON generator and a ragel based JSON
166
- parser in C.
167
- * Much more tests, especially fixtures from json.org.
168
- * Further improved conformance to RFC4627.
169
- 2007-02-09 (0.4.3)
170
- * Conform more to RFC4627 for JSON: This means JSON strings
171
- now always must contain exactly one object "{ ... }" or array "[ ... ]" in
172
- order to be parsed without raising an exception. The definition of what
173
- constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and
174
- there are differences in floats and integers (no octals or hexadecimals) as
175
- well.
176
- * Added aliases generate and pretty_generate of unparse and pretty_unparse.
177
- * Fixed a test case.
178
- * Catch an Iconv::InvalidEncoding exception, that seems to occur on some Sun
179
- boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was
180
- reported by Andrew R Jackson <andrewj@bcm.tmc.edu>, thanks a bunch!
181
- 2006-08-25 (0.4.2)
182
- * Fixed a bug in handling solidi (/-characters), that was reported by
183
- Kevin Gilpin <kevin.gilpin@alum.mit.edu>.
184
- 2006-02-06 (0.4.1)
185
- * Fixed a bug related to escaping with backslashes. Thanks for the report go
186
- to Florian Munz <surf@theflow.de>.
187
- 2005-09-23 (0.4.0)
188
- * Initial Rubyforge Version