transit-rails 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54fb8c5fd98a4f514d0137ec258bd8bd42b31fe6
4
- data.tar.gz: 14beb974c6c91c146774e0d8930fac9fb2882393
3
+ metadata.gz: 0b2ea19330744f7c8be409f68ad9dc63ac30c6be
4
+ data.tar.gz: ebb7a7489ccbd206bd4274577221d1112bbc100a
5
5
  SHA512:
6
- metadata.gz: 29d568f11beba71eda87c61d1dbc12f3fe44ca108528d255df2ee03bfb21aeaa2d2099b89ec72054fb09adeddd322943f8858c798931663540a3deabdf0f6f07
7
- data.tar.gz: f119b7dfee76bb8fe18542076dcfcef2c951e965a38eebb6572be13e96a3c19f73772d8e79825797b56e43a7c469344783c7f6510bcd978af84cf51c2fe04f5d
6
+ metadata.gz: 09928faebfbb5d8c0e2bbe935953d7220512ccacbb7266bb1b6597a6f4c4954d614e7f3f7fef89ceb31a32829572100bf837f1c87130c9b5158d2bdb5d701ecf
7
+ data.tar.gz: ba17b854278bdcc6cc0b856537c3f2d57979750d75c3a930f20bc5ec2027a029a1302573c8e7b4d4618efd3308a003c91502a49582048aa90e37ea196e44baac
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.1.1
1
+ ruby-2.1.3
data/.travis.yml CHANGED
@@ -1,5 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.1
3
+ - 2.2.0
4
+ - 2.1.5
4
5
  - 2.0.0
5
6
  - 1.9.3
7
+ - jruby-19mode
8
+ - jruby-head
9
+ - rbx-2
data/Gemfile CHANGED
@@ -2,5 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
4
  gem 'rspec'
5
+ gem 'rails', '~> 4.1'
5
6
 
6
7
  gemspec
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Use [transit format][] in your Rails application, with minimal friction.
6
6
 
7
- Currently only works with C-based Ruby implementations.
7
+ Works wherever `transit-ruby` does.
8
8
 
9
9
  ## Installation
10
10
 
@@ -12,6 +12,7 @@ module Transit
12
12
  @format = options[:verbose] ? :json_verbose : :json
13
13
  @handlers = TRANSIT_HANDLERS.merge(options[:handlers] || {})
14
14
  @io = io
15
+ @symbolize_keys = options[:symbolize_keys]
15
16
  end
16
17
 
17
18
  def write
@@ -37,7 +38,11 @@ module Transit
37
38
  if obj.respond_to?(:to_transit)
38
39
  obj.to_transit
39
40
  elsif obj.respond_to?(:serializable_hash)
40
- obj.serializable_hash
41
+ if @symbolize_keys
42
+ obj.serializable_hash.symbolize_keys
43
+ else
44
+ obj.serializable_hash
45
+ end
41
46
  elsif obj.respond_to?(:to_ary)
42
47
  obj.to_ary.map {|o| serialize_for_transit(o)}
43
48
  else
@@ -1,5 +1,5 @@
1
1
  module Transit
2
2
  module Rails
3
- VERSION = "0.8.1"
3
+ VERSION = "0.8.2"
4
4
  end
5
5
  end
@@ -18,8 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "transit-ruby", "~> 0.8", ">= 0.8.467"
22
- spec.add_dependency "rails", "~> 4.0"
21
+ spec.add_dependency "transit-ruby", "~> 0.8", ">= 0.8.567"
23
22
 
24
23
  spec.add_development_dependency "bundler", "~> 1.6"
25
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Davey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: transit-ruby
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '0.8'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 0.8.467
22
+ version: 0.8.567
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,21 +29,7 @@ dependencies:
29
29
  version: '0.8'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 0.8.467
33
- - !ruby/object:Gem::Dependency
34
- name: rails
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '4.0'
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '4.0'
32
+ version: 0.8.567
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: bundler
49
35
  requirement: !ruby/object:Gem::Requirement