engineyard-serverside 2.8.0 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/engineyard-serverside.rb +2 -5
  3. data/lib/engineyard-serverside/configuration.rb +3 -3
  4. data/lib/engineyard-serverside/deploy.rb +2 -1
  5. data/lib/engineyard-serverside/version.rb +1 -1
  6. metadata +46 -126
  7. data/features/enable_maintenance/step_definitions/enable_maintenance_steps.rb +0 -43
  8. data/features/step_definitions/app_steps.rb +0 -10
  9. data/features/step_definitions/server_steps.rb +0 -14
  10. data/lib/vendor/json_pure/COPYING +0 -57
  11. data/lib/vendor/json_pure/GPL +0 -340
  12. data/lib/vendor/json_pure/README.rdoc +0 -358
  13. data/lib/vendor/json_pure/VERSION +0 -1
  14. data/lib/vendor/json_pure/lib/json.rb +0 -62
  15. data/lib/vendor/json_pure/lib/json/add/bigdecimal.rb +0 -28
  16. data/lib/vendor/json_pure/lib/json/add/complex.rb +0 -22
  17. data/lib/vendor/json_pure/lib/json/add/core.rb +0 -11
  18. data/lib/vendor/json_pure/lib/json/add/date.rb +0 -34
  19. data/lib/vendor/json_pure/lib/json/add/date_time.rb +0 -48
  20. data/lib/vendor/json_pure/lib/json/add/exception.rb +0 -31
  21. data/lib/vendor/json_pure/lib/json/add/ostruct.rb +0 -31
  22. data/lib/vendor/json_pure/lib/json/add/range.rb +0 -29
  23. data/lib/vendor/json_pure/lib/json/add/rational.rb +0 -22
  24. data/lib/vendor/json_pure/lib/json/add/regexp.rb +0 -30
  25. data/lib/vendor/json_pure/lib/json/add/struct.rb +0 -30
  26. data/lib/vendor/json_pure/lib/json/add/symbol.rb +0 -25
  27. data/lib/vendor/json_pure/lib/json/add/time.rb +0 -38
  28. data/lib/vendor/json_pure/lib/json/common.rb +0 -484
  29. data/lib/vendor/json_pure/lib/json/ext.rb +0 -21
  30. data/lib/vendor/json_pure/lib/json/generic_object.rb +0 -70
  31. data/lib/vendor/json_pure/lib/json/pure.rb +0 -21
  32. data/lib/vendor/json_pure/lib/json/pure/generator.rb +0 -522
  33. data/lib/vendor/json_pure/lib/json/pure/parser.rb +0 -359
  34. data/lib/vendor/json_pure/lib/json/version.rb +0 -8
  35. data/lib/vendor/multi_json/CHANGELOG.md +0 -121
  36. data/lib/vendor/multi_json/CONTRIBUTING.md +0 -46
  37. data/lib/vendor/multi_json/Gemfile +0 -31
  38. data/lib/vendor/multi_json/LICENSE.md +0 -20
  39. data/lib/vendor/multi_json/README.md +0 -105
  40. data/lib/vendor/multi_json/Rakefile +0 -12
  41. data/lib/vendor/multi_json/lib/multi_json.rb +0 -137
  42. data/lib/vendor/multi_json/lib/multi_json/adapters/gson.rb +0 -20
  43. data/lib/vendor/multi_json/lib/multi_json/adapters/json_common.rb +0 -35
  44. data/lib/vendor/multi_json/lib/multi_json/adapters/json_gem.rb +0 -12
  45. data/lib/vendor/multi_json/lib/multi_json/adapters/json_pure.rb +0 -12
  46. data/lib/vendor/multi_json/lib/multi_json/adapters/nsjsonserialization.rb +0 -35
  47. data/lib/vendor/multi_json/lib/multi_json/adapters/oj.rb +0 -29
  48. data/lib/vendor/multi_json/lib/multi_json/adapters/ok_json.rb +0 -58
  49. data/lib/vendor/multi_json/lib/multi_json/adapters/yajl.rb +0 -20
  50. data/lib/vendor/multi_json/lib/multi_json/vendor/okjson.rb +0 -602
  51. data/lib/vendor/multi_json/lib/multi_json/version.rb +0 -3
  52. data/lib/vendor/multi_json/spec/adapter_shared_example.rb +0 -162
  53. data/lib/vendor/multi_json/spec/helper.rb +0 -45
  54. data/lib/vendor/multi_json/spec/json_common_shared_example.rb +0 -36
  55. data/lib/vendor/multi_json/spec/multi_json_spec.rb +0 -151
@@ -1,46 +0,0 @@
1
- ## Contributing
2
- In the spirit of [free software][free-sw], **everyone** is encouraged to help
3
- improve this project.
4
-
5
- [free-sw]: http://www.fsf.org/licensing/essays/free-sw.html
6
-
7
- Here are some ways *you* can contribute:
8
-
9
- * by using alpha, beta, and prerelease versions
10
- * by reporting bugs
11
- * by suggesting new features
12
- * by writing or editing documentation
13
- * by writing specifications
14
- * by writing code (**no patch is too small**: fix typos, add comments, clean up
15
- inconsistent whitespace)
16
- * by refactoring code
17
- * by closing [issues][]
18
- * by reviewing patches
19
-
20
- [issues]: https://github.com/intridea/multi_json/issues
21
-
22
- ## Submitting an Issue
23
- We use the [GitHub issue tracker][issues] to track bugs and features. Before
24
- submitting a bug report or feature request, check to make sure it hasn't
25
- already been submitted. When submitting a bug report, please include a [Gist][]
26
- that includes a stack trace and any details that may be necessary to reproduce
27
- the bug, including your gem version, Ruby version, and operating system.
28
- Ideally, a bug report should include a pull request with failing specs.
29
-
30
- [gist]: https://gist.github.com/
31
-
32
- ## Submitting a Pull Request
33
- 1. [Fork the repository.][fork]
34
- 2. [Create a topic branch.][branch]
35
- 3. Add specs for your unimplemented feature or bug fix.
36
- 4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
37
- 5. Implement your feature or bug fix.
38
- 6. Run `bundle exec rake spec`. If your specs fail, return to step 5.
39
- 7. Run `open coverage/index.html`. If your changes are not completely covered
40
- by your tests, return to step 3.
41
- 8. Add, commit, and push your changes.
42
- 9. [Submit a pull request.][pr]
43
-
44
- [fork]: http://help.github.com/fork-a-repo/
45
- [branch]: http://learn.github.com/p/branching.html
46
- [pr]: http://help.github.com/send-pull-requests/
@@ -1,31 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rake', '>= 0.9'
4
- gem 'yard', '>= 0.8'
5
-
6
- platforms :ruby_18 do
7
- gem 'json', '~> 1.4', :require => nil
8
- end
9
-
10
- gem 'json_pure', '~> 1.4', :require => nil
11
-
12
- platforms :ruby, :mswin, :mingw do
13
- gem 'oj', '~> 2.0', :require => nil
14
- gem 'yajl-ruby', '~> 1.0', :require => nil
15
- end
16
- platforms :jruby do
17
- gem 'gson', '>= 0.6', :require => nil
18
- end
19
-
20
- group :development do
21
- gem 'kramdown', '>= 0.14'
22
- gem 'pry'
23
- gem 'pry-debugger', :platforms => :mri_19
24
- end
25
-
26
- group :test do
27
- gem 'rspec', '>= 2.11'
28
- gem 'simplecov', :require => false
29
- end
30
-
31
- gemspec
@@ -1,20 +0,0 @@
1
- Copyright (c) 2010-2013 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober, Pavel Pravosud
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,105 +0,0 @@
1
- # MultiJSON
2
- [![Gem Version](https://badge.fury.io/rb/multi_json.png)][gem]
3
- [![Build Status](https://secure.travis-ci.org/intridea/multi_json.png?branch=master)][travis]
4
- [![Dependency Status](https://gemnasium.com/intridea/multi_json.png?travis)][gemnasium]
5
- [![Code Climate](https://codeclimate.com/github/intridea/multi_json.png)][codeclimate]
6
-
7
- [gem]: https://rubygems.org/gems/multi_json
8
- [travis]: http://travis-ci.org/intridea/multi_json
9
- [gemnasium]: https://gemnasium.com/intridea/multi_json
10
- [codeclimate]: https://codeclimate.com/github/intridea/multi_json
11
-
12
- Lots of Ruby libraries parse JSON and everyone has their favorite JSON coder.
13
- Instead of choosing a single JSON coder and forcing users of your library to be
14
- stuck with it, you can use MultiJSON instead, which will simply choose the
15
- fastest available JSON coder. Here's how to use it:
16
-
17
- ```ruby
18
- require 'multi_json'
19
-
20
- MultiJson.load('{"abc":"def"}') #=> {"abc" => "def"}
21
- MultiJson.load('{"abc":"def"}', :symbolize_keys => true) #=> {:abc => "def"}
22
- MultiJson.dump({:abc => 'def'}) # convert Ruby back to JSON
23
- MultiJson.dump({:abc => 'def'}, :pretty => true) # encoded in a pretty form (if supported by the coder)
24
- ```
25
-
26
- When loading invalid JSON, multiJSON will throw a `MultiJson::LoadError`. `MultiJson::DecodeError` is an alias for backwards compatibility.
27
-
28
- ```ruby
29
- MultiJson.load('invalid json') #=> MultiJson::LoadError
30
- ```
31
-
32
- The `use` method, which sets the MultiJson adapter, takes either a symbol or a
33
- class (to allow for custom JSON parsers) that responds to both `.load` and `.dump`
34
- at the class level.
35
-
36
- MultiJSON tries to have intelligent defaulting. That is, if you have any of the
37
- supported engines already loaded, it will utilize them before attempting to
38
- load any. When loading, libraries are ordered by speed. First Oj, then Yajl,
39
- then the JSON gem, then JSON pure. If no other JSON library is available,
40
- MultiJSON falls back to [OkJson][], a simple, vendorable JSON parser.
41
-
42
- [okjson]: https://github.com/kr/okjson
43
-
44
- ## Supported JSON Engines
45
-
46
- * [Oj](https://github.com/ohler55/oj) Optimized JSON by Peter Ohler
47
- * [Yajl](https://github.com/brianmario/yajl-ruby) Yet Another JSON Library by Brian Lopez
48
- * [JSON](https://github.com/flori/json) The default JSON gem with C-extensions (ships with Ruby 1.9)
49
- * [JSON Pure](https://github.com/flori/json) A Ruby variant of the JSON gem
50
- * [NSJSONSerialization](https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSJSONSerialization_Class/Reference/Reference.html) Wrapper for Apple's NSJSONSerialization in the Cocoa Framework (MacRuby only)
51
- * [gson.rb](https://github.com/avsej/gson.rb) A Ruby wrapper for google-gson library (JRuby only)
52
- * [OkJson][okjson] A simple, vendorable JSON parser
53
-
54
- ## Supported Ruby Versions
55
- This library aims to support and is [tested against][travis] the following Ruby
56
- implementations:
57
-
58
- * Ruby 1.8.7
59
- * Ruby 1.9.2
60
- * Ruby 1.9.3
61
- * Ruby 2.0.0
62
- * [JRuby][]
63
- * [Rubinius][]
64
- * [MacRuby][] (not tested on Travis CI)
65
-
66
- [jruby]: http://www.jruby.org/
67
- [rubinius]: http://rubini.us/
68
- [macruby]: http://www.macruby.org/
69
-
70
- If something doesn't work on one of these interpreters, it's a bug.
71
-
72
- This library may inadvertently work (or seem to work) on other Ruby
73
- implementations, however support will only be provided for the versions listed
74
- above.
75
-
76
- If you would like this library to support another Ruby version, you may
77
- volunteer to be a maintainer. Being a maintainer entails making sure all tests
78
- run and pass on that implementation. When something breaks on your
79
- implementation, you will be responsible for providing patches in a timely
80
- fashion. If critical issues for a particular implementation exist at the time
81
- of a major release, support for that Ruby version may be dropped.
82
-
83
- ## Versioning
84
-
85
- This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
86
- of this scheme should be reported as bugs. Specifically, if a minor or patch
87
- version is released that breaks backward compatibility, that version should be
88
- immediately yanked and/or a new version should be immediately released that
89
- restores compatibility. Breaking changes to the public API will only be
90
- introduced with new major versions. As a result of this policy, you can (and
91
- should) specify a dependency on this gem using the [Pessimistic Version
92
- Constraint][pvc] with two digits of precision. For example:
93
-
94
- ```ruby
95
- spec.add_dependency 'multi_json', '~> 1.0'
96
- ```
97
-
98
- [semver]: http://semver.org/
99
- [pvc]: http://docs.rubygems.org/read/chapter/16#page74
100
-
101
- ## Copyright
102
- Copyright (c) 2010-2013 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober,
103
- and Pavel Pravosud. See [LICENSE][] for details.
104
-
105
- [license]: LICENSE.md
@@ -1,12 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
-
4
- require 'rspec/core/rake_task'
5
- desc "Run all examples"
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
9
- task :test => :spec
10
-
11
- require 'yard'
12
- YARD::Rake::YardocTask.new
@@ -1,137 +0,0 @@
1
- module MultiJson
2
- extend self
3
-
4
- class LoadError < StandardError
5
- attr_reader :data
6
- def initialize(message='', backtrace=[], data='')
7
- super(message)
8
- self.set_backtrace(backtrace)
9
- @data = data
10
- end
11
- end
12
- DecodeError = LoadError # Legacy support
13
-
14
-
15
- @default_options = {}
16
- attr_accessor :default_options
17
-
18
- REQUIREMENT_MAP = [
19
- ['oj', :oj],
20
- ['yajl', :yajl],
21
- ['json', :json_gem],
22
- ['gson', :gson],
23
- ['json/pure', :json_pure]
24
- ]
25
-
26
- # The default adapter based on what you currently
27
- # have loaded and installed. First checks to see
28
- # if any adapters are already loaded, then checks
29
- # to see which are installed if none are loaded.
30
- def default_adapter
31
- return :oj if defined?(::Oj)
32
- return :yajl if defined?(::Yajl)
33
- return :json_gem if defined?(::JSON)
34
- return :gson if defined?(::Gson)
35
-
36
- REQUIREMENT_MAP.each do |(library, adapter)|
37
- begin
38
- require library
39
- return adapter
40
- rescue ::LoadError
41
- next
42
- end
43
- end
44
-
45
- Kernel.warn '[WARNING] MultiJson is using the default adapter (ok_json). We recommend loading a different JSON library to improve performance.'
46
- :ok_json
47
- end
48
- # :nodoc:
49
- alias :default_engine :default_adapter
50
-
51
- # Get the current adapter class.
52
- def adapter
53
- return @adapter if defined?(@adapter) && @adapter
54
-
55
- self.use nil # load default adapter
56
-
57
- @adapter
58
- end
59
- # :nodoc:
60
- alias :engine :adapter
61
-
62
- # Set the JSON parser utilizing a symbol, string, or class.
63
- # Supported by default are:
64
- #
65
- # * <tt>:oj</tt>
66
- # * <tt>:json_gem</tt>
67
- # * <tt>:json_pure</tt>
68
- # * <tt>:ok_json</tt>
69
- # * <tt>:yajl</tt>
70
- # * <tt>:nsjsonserialization</tt> (MacRuby only)
71
- # * <tt>:gson</tt> (JRuby only)
72
- def use(new_adapter)
73
- @adapter = load_adapter(new_adapter)
74
- end
75
- alias :adapter= :use
76
- # :nodoc:
77
- alias :engine= :use
78
-
79
- def load_adapter(new_adapter)
80
- case new_adapter
81
- when String, Symbol
82
- require "multi_json/adapters/#{new_adapter}"
83
- MultiJson::Adapters.const_get(:"#{new_adapter.to_s.split('_').map{|s| s.capitalize}.join('')}")
84
- when NilClass, FalseClass
85
- load_adapter default_adapter
86
- when Class, Module
87
- new_adapter
88
- else
89
- raise "Did not recognize your adapter specification. Please specify either a symbol or a class."
90
- end
91
- end
92
-
93
- # Decode a JSON string into Ruby.
94
- #
95
- # <b>Options</b>
96
- #
97
- # <tt>:symbolize_keys</tt> :: If true, will use symbols instead of strings for the keys.
98
- # <tt>:adapter</tt> :: If set, the selected engine will be used just for the call.
99
- def load(string, options={})
100
- adapter = current_adapter(options)
101
- begin
102
- adapter.load(string, options)
103
- rescue adapter::ParseError => exception
104
- raise LoadError.new(exception.message, exception.backtrace, string)
105
- end
106
- end
107
- # :nodoc:
108
- alias :decode :load
109
-
110
- def current_adapter(options)
111
- if new_adapter = (options || {}).delete(:adapter)
112
- load_adapter(new_adapter)
113
- else
114
- adapter
115
- end
116
- end
117
-
118
- # Encodes a Ruby object as JSON.
119
- def dump(object, options={})
120
- options = default_options.merge(options)
121
- adapter = current_adapter(options)
122
- adapter.dump(object, options)
123
- end
124
- # :nodoc:
125
- alias :encode :dump
126
-
127
- # Executes passed block using specified adapter.
128
- def with_adapter(new_adapter)
129
- old_adapter, self.adapter = adapter, new_adapter
130
- yield
131
- ensure
132
- self.adapter = old_adapter
133
- end
134
- # :nodoc:
135
- alias :with_engine :with_adapter
136
-
137
- end
@@ -1,20 +0,0 @@
1
- require 'gson' unless defined?(::Gson)
2
-
3
- module MultiJson
4
- module Adapters
5
- # Use the gson.rb library to dump/load.
6
- module Gson
7
- extend self
8
-
9
- ParseError = ::Gson::DecodeError
10
-
11
- def load(string, options={}) #:nodoc:
12
- ::Gson::Decoder.new(options).decode(string)
13
- end
14
-
15
- def dump(object, options={}) #:nodoc:
16
- ::Gson::Encoder.new(options).encode(object)
17
- end
18
- end
19
- end
20
- end
@@ -1,35 +0,0 @@
1
- module MultiJson
2
- module Adapters
3
- module JsonCommon
4
- def load(string, options={})
5
- string = string.read if string.respond_to?(:read)
6
- ::JSON.parse("[#{string}]", process_load_options!(options)).first
7
- end
8
-
9
- def dump(object, options={})
10
- object.to_json(process_dump_options!(options))
11
- end
12
-
13
- protected
14
-
15
- def process_load_options!(options={})
16
- process_options!({:create_additions => false}, options) do |opts|
17
- opts.merge!(:symbolize_names => true) if options.delete(:symbolize_keys)
18
- end
19
- end
20
-
21
- def process_dump_options!(options={})
22
- process_options!({}, options) do |opts|
23
- opts.merge!(::JSON::PRETTY_STATE_PROTOTYPE.to_h) if options.delete(:pretty)
24
- end
25
- end
26
-
27
- def process_options!(default_options, options)
28
- return default_options if options.empty?
29
- yield default_options
30
- default_options.merge!(options)
31
- end
32
-
33
- end
34
- end
35
- end
@@ -1,12 +0,0 @@
1
- require 'json' unless defined?(::JSON)
2
- require 'multi_json/adapters/json_common'
3
-
4
- module MultiJson
5
- module Adapters
6
- # Use the JSON gem to dump/load.
7
- module JsonGem
8
- ParseError = ::JSON::ParserError
9
- extend JsonCommon
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'json/pure' unless defined?(::JSON)
2
- require 'multi_json/adapters/json_common'
3
-
4
- module MultiJson
5
- module Adapters
6
- # Use JSON pure to dump/load.
7
- module JsonPure
8
- ParseError = ::JSON::ParserError
9
- extend JsonCommon
10
- end
11
- end
12
- end