representative_view 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6fa8dbaa32a5f6e116ca3dbf2e0664e366511ed5
4
+ data.tar.gz: 4f75b49d4591fc646835e99c828a9feb3a2c8440
5
+ SHA512:
6
+ metadata.gz: 6e63b5031a62d3616db4a3b49d22c6fda1d23c9600cd80f5431d4e7e45e4a01d30f8707ee4738641a758d2cdf006bb0664020cb08d3a933ff723d64d8fc07e9b
7
+ data.tar.gz: 2afbdff2a49e534625e64640aa14b641f1fe7a775cf9eb862ebfdb91cb4aadeb7ebfc12a66a0aa3b04342669d7eaf2c7ff33784b35e12d49d8b0f762fe6722fd
@@ -1,10 +1,10 @@
1
1
  language: ruby
2
- rvm:
3
- - 1.8.7
4
- - 1.9.2
2
+ rvm:
5
3
  - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.9
6
+ - 2.2.10
6
7
  env:
7
- - ACTIONPACK_VERSION="~> 2.3.0"
8
8
  - ACTIONPACK_VERSION="~> 3.0.0"
9
9
  - ACTIONPACK_VERSION="~> 3.1.0"
10
10
  - ACTIONPACK_VERSION="~> 3.2.0"
@@ -1,10 +1,15 @@
1
- 1.2.0 - 2011-09-06
2
- ------------------
1
+ ## 1.2.3 - 2018-04-28
3
2
 
4
- ### Enhancements
3
+ ### Fixed
4
+ - Deal with removal of `freeze_formats` in ActionPack 3.2.
5
5
 
6
- - Addition of `representative(FORMAT)` method, allowing a format to be forced.
6
+ ### Removed
7
+ - Remove support for Ruby 1.8, and Rails 2.
7
8
 
8
- ### Removals
9
+ ## 1.2.0 - 2011-09-06
9
10
 
10
- - We no longer attempt to infer an output format from the template format.
11
+ ### Added
12
+ - Addition of `representative(FORMAT)` method, allowing a format to be forced.
13
+
14
+ ### Removed
15
+ - We no longer attempt to infer an output format from the template format.
data/Gemfile CHANGED
@@ -10,7 +10,7 @@ end
10
10
  gem "nokogiri", ">= 1.5.0"
11
11
 
12
12
  group :test do
13
- gem "rake", "~> 0.8.7"
13
+ gem "rake", "~> 0.9.6"
14
14
  gem "rspec", "~> 2.5.0"
15
15
  gem "rr", "~> 1.0.2"
16
16
  gem "minstrel"
@@ -1,6 +1,9 @@
1
1
  Representative View
2
2
  ===================
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/representative_view.png)](http://badge.fury.io/rb/representative_view)
5
+ [![Build Status](https://secure.travis-ci.org/mdub/representative_view.png?branch=master)](http://travis-ci.org/mdub/representative_view)
6
+
4
7
  "Representative View" integrates [Representative](http://github.com/mdub/representative) as a Rails template format, making it possible to generate XML and JSON representations of data <u>using the same template</u>.
5
8
 
6
9
  Installing it
@@ -9,7 +12,7 @@ Installing it
9
12
  Simply add the '`representative_view`' gem to your `Gemfile`
10
13
 
11
14
  gem "representative_view"
12
-
15
+
13
16
  and run "`bundle install`".
14
17
 
15
18
  Using it
@@ -31,7 +34,7 @@ In your controller, declare that you can provide both XML and JSON, e.g.
31
34
  Next, create a template with the suffix "`.rep`" (to select the Representative View template handler) and use the Representative DSL to generate elements and lists, e.g.
32
35
 
33
36
  # app/views/books/index.rep
34
-
37
+
35
38
  r.list_of :books, @books do
36
39
  r.element :title
37
40
  r.list_of :authors
@@ -1,3 +1,3 @@
1
1
  module RepresentativeView
2
- VERSION = "1.2.2".freeze
2
+ VERSION = "1.2.3".freeze
3
3
  end
@@ -2,7 +2,7 @@ require 'action_view'
2
2
  require 'minstrel'
3
3
  require 'representative_view'
4
4
  require 'rspec'
5
-
5
+ require 'ostruct'
6
6
  require 'pathname'
7
7
  require 'fixtures/books'
8
8
 
@@ -24,14 +24,14 @@ module Fixtures
24
24
  if @base.respond_to?(:template_format=) # actionpack-2
25
25
  @base.template_format = format
26
26
  elsif @base.respond_to?(:lookup_context) # actionpack-3
27
- @base.lookup_context.freeze_formats([format])
27
+ @base.lookup_context.formats = [format]
28
28
  end
29
29
  @base.render(:file => file)
30
30
  end
31
31
 
32
32
  end
33
33
 
34
- Rspec.configure do |config|
34
+ RSpec.configure do |config|
35
35
 
36
36
  config.mock_with :rr
37
37
  config.include(Fixtures)
metadata CHANGED
@@ -1,74 +1,57 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: representative_view
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 1
8
- - 2
9
- - 2
10
- version: 1.2.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.3
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Mike Williams
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-02-27 00:00:00 +11:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
27
- hash: 19
28
- segments:
29
- - 1
30
- - 0
31
- - 2
32
- version: 1.0.2
33
- requirement: *id001
34
- prerelease: false
11
+ date: 2018-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
35
14
  name: representative
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.2
36
20
  type: :runtime
37
- - !ruby/object:Gem::Dependency
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: actionpack
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
41
31
  - - ">"
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 2
46
- - 3
47
- - 0
32
+ - !ruby/object:Gem::Version
48
33
  version: 2.3.0
49
- - - <
50
- - !ruby/object:Gem::Version
51
- hash: 63
52
- segments:
53
- - 4
54
- - 0
55
- - 0
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
56
36
  version: 4.0.0
57
- requirement: *id002
58
- prerelease: false
59
- name: actionpack
60
37
  type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">"
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.0
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: 4.0.0
61
47
  description:
62
48
  email: mdub@dogbiscuit.org
63
49
  executables: []
64
-
65
50
  extensions: []
66
-
67
51
  extra_rdoc_files: []
68
-
69
- files:
70
- - .gitignore
71
- - .travis.yml
52
+ files:
53
+ - ".gitignore"
54
+ - ".travis.yml"
72
55
  - CHANGES.markdown
73
56
  - Gemfile
74
57
  - README.markdown
@@ -83,41 +66,30 @@ files:
83
66
  - spec/fixtures/books.rb
84
67
  - spec/representative_view/template_handler_spec.rb
85
68
  - spec/spec_helper.rb
86
- has_rdoc: true
87
69
  homepage: http://github.com/mdub/representative_view
88
70
  licenses: []
89
-
71
+ metadata: {}
90
72
  post_install_message:
91
73
  rdoc_options: []
92
-
93
- require_paths:
74
+ require_paths:
94
75
  - lib
95
- required_ruby_version: !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
98
78
  - - ">="
99
- - !ruby/object:Gem::Version
100
- hash: 3
101
- segments:
102
- - 0
103
- version: "0"
104
- required_rubygems_version: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
107
83
  - - ">="
108
- - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 0
112
- version: "0"
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
113
86
  requirements: []
114
-
115
87
  rubyforge_project:
116
- rubygems_version: 1.5.3
88
+ rubygems_version: 2.4.5
117
89
  signing_key:
118
- specification_version: 3
90
+ specification_version: 4
119
91
  summary: Builds XML and JSON from a single view template
120
- test_files:
92
+ test_files:
121
93
  - spec/fixtures/books.rb
122
94
  - spec/representative_view/template_handler_spec.rb
123
95
  - spec/spec_helper.rb